Ramza's State Workshop OPEN (current states: 26 LATEST: Overpower + Darkness Burst)

Discussion in 'Resource Workshops' started by ramza, Aug 2, 2016.

  1. Dankovsky

    Dankovsky Veteran Veteran

    Messages:
    199
    Likes Received:
    144
    First Language:
    RU
    Primarily Uses:
    RMMV
    I don't think it's something that can be coded so easily. I suggest you use SRD Summon Core though, it works like a charm mostly.
     
    Mihe likes this.
  2. Mihe

    Mihe Veteran Veteran

    Messages:
    192
    Likes Received:
    70
    First Language:
    English
    Primarily Uses:
    RMMV
    Thank you, friend. :cutesmile:
     
  3. ramza

    ramza Lunatic Coder Veteran

    Messages:
    490
    Likes Received:
    261
    Location:
    Nova Scotia, Canada
    First Language:
    English
    Primarily Uses:
    RMMV
    I actually had a summon state in here all the way back on page 3. It was linked in the OP, but the link doesn't seem to work anymore? Possibly due to the forum changing or something.

    Anyways, not sure what you can make of it, but SRD summon core is definitely the better option here... It didn't exist back then. Just in case though, I have quoted the original summon skill I made below:

     
    Mihe likes this.
  4. Recruit

    Recruit Villager Member

    Messages:
    19
    Likes Received:
    5
    First Language:
    English
    State Name:
    Infected
    State Description:
    A state that can spread the infection if attacked, or when attacking (preferably melee), and every start of a turn, has a chance to apply infection to close by allies maybe 10-25% chance, as well as a 25% chance to attack allies too with a specific skill.
    Plugin Requirement:
    Basic Yanfly + Aura Effects
    Required Compatibility:
    Any Yanfly Battle Systems

    I was gonna use this with some other cool effects like someone burning, but i think infected makes a better name for it.. Hopefully this isnt too challenging, thanks in advance
     
  5. Dobberman

    Dobberman Villager Member

    Messages:
    7
    Likes Received:
    1
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    Dear friends, hello there!


    I'm just trying to make a DoT - damage over turn - and HoT - healing over turn - effects that can hit critically, using the critical chance and the critical modifier of the user (and critical resistance from target), but i have no idea where to start.

    State Name: DoT/Regen Critical!
    State Description: when the user use a bleed/poison/regen effect, the effect need a chance do critical hit in every DoT effect/turn. Like World of Warcraft and some other MMOs.
    Plugin Requirement: I'm think you will need the Battle Engine of Yanfly, the buffs and States Cores, Extended Damage over Time and Critical Control.
    Required Compatibility: I'm just using Yanfly's plugins, soo need compatibility with Yanfly plugins in Maker's default battle system.


    Anyone have some idea?
    Hugs.
     
  6. ramza

    ramza Lunatic Coder Veteran

    Messages:
    490
    Likes Received:
    261
    Location:
    Nova Scotia, Canada
    First Language:
    English
    Primarily Uses:
    RMMV
    Sorry it took so long to get back to you on this one. I'd hope by now you've found an answer to this, but if not, I will write up a brief explanation which you can modify a bit to fit into whatever state you want.

    So this state has multiple parts, so it will need to be handled in multiple lunatic codes. The first part, being attacked, will be handled in a <Custom React Effect> tag:

    Code:
    <Custom React Effect>
    if (this.isHpEffect() && this.isPhysical()){
     var rnd = VARIANCE VALUE HERE
     var formula = DAMAGE FORMULA HERE
     var total = MULTIPLY FORMULA BY RND
    user.gainHp(-total);
    user.startAnimation(x);
    user.startDamagePopup();
    if (user.isDead())
      {
         user.performCollapse();
      }
    }
    </Custom React Effect>
    
    Likewise, the section where it deals extra damage when the infected target makes a physical attack is handled through a <Custom Confirm Effect>
    Code:
    <Custom Confirm Effect>
    if (this.isHpEffect() && this.isPhysical()){
     var rnd = VARIANCE VALUE HERE
     var formula = DAMAGE FORMULA HERE
     var total = MULTIPLY FORMULA BY RND
    target.gainHp(-total);
    target.startAnimation(x);
    target.startDamagePopup();
    if (target.isDead())
      {
         target.performCollapse();
      }
    }
    </Custom Confirm Effect>
    
    The second half of your request needs to be on a <Custom Turn Start Effect>
    Code:
    <Custom Turn Start Effect>
    var units = user.friendsUnit().aliveMembers()
    for (var i = 0; i < units.length; i++){
     if (Math.randomInt(100) > 25){
     //this unit is infected now
     units[i].addState(stateId)
     units[i].startAnimation(x)
     }
    }
    </Custom Turn Start Effect>
    This checks all alive allies of the infected against a 25% check, and if it fails the check, inflicts them with the infected state, and plays an animation. In this section you could also force an action to use a specific skill on them, but the system doesn't play well with forced actions from inside a state, so showing an animation may be the best you can do here.


    As above, I'm sorry it took so long to get to this request. YEP_X_ExtDot is sort of capable of this on it's own, and I can't think of a better way to pull this off without making an extension to that plugin (which I may do at some point though). Because the damage of the dot state is determined by the note tags on that state, the easiest way to do this is work the critical chance into the original damage formula. INstead of the following:
    Code:
    <Custom DoT Formula>
         value = Math.max(a.mat, a.atk)
         variance = 20;
         element = 10;
    </Custom Dot Formula>
    You would use something more like this:
    Code:
    <Custom DoT Formula>
    if (user.isStateAffected(x)){
        var critchance = Math.max(user.cri - target.cev, 0)
        var critmultiplier = 2.0
        if (Math.random() < critchance){
        //a crit has happened
        value = Math.max(a.mat, a.atk) * critmultiplier
        } else {
        //crit failed
        value = Math.max(a.mat, a.atk)
       }
    } else {
         value = Math.max(a.mat, a.atk)
    }
         variance = 20;
         element = 10;
    </Custom Dot Formula>
    Where the user is checked for the critically enabling dot state first, then his crit rate is checked against the target's cev rate, and then a random check is used to determine if this dot has critically hit, which doubles the damage of the tick.

    Like I said, this could be shorted dramatically by making a change to the actual ExtDot plugin, and I might make one at some point in the future.
     
    Last edited: Oct 12, 2018
    Fireworker, Lnik3500 and Dobberman like this.
  7. Dobberman

    Dobberman Villager Member

    Messages:
    7
    Likes Received:
    1
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    Thank you mate!

    With this formula i can made a critical damage occur in every situation, this was a tremendous help.
    But this is a "fake critical", right? because count only for damage proposities and don't count for "if(critical)" checks and another fancy things (colorful numbers, etc...).
    There's a way to make a FORCE CRITICAL like in the Yanfly Action Sequence?

    Anyway, thank you soo much!
    Hugs!
     
  8. ramza

    ramza Lunatic Coder Veteran

    Messages:
    490
    Likes Received:
    261
    Location:
    Nova Scotia, Canada
    First Language:
    English
    Primarily Uses:
    RMMV
    That is correct, this is a 'fake' critical.
    Since it isn't an action causing the damage, tags like force critical that work on skills or action sequences have no effect here. I looked briefly at a way to reverse engineer the crit control plugin to see if I couldn't push that in there too, but it needs a bit more of a deep dive than I have time for. I was hoping for a function to call right before the damage popup that denoted a critical hit, which I didn't find.

    On the other hand, you must be using a different plugin entirely if you can change the color of the text of a critical hit, so there might still be a function that can be tweaked a little bit to at least cause the damage popup from these dot effects to look the same as a critical hit, even if it doesn't end up doing any of the other fancy effects.

    The main thing is that it won't work for other states that do effects on action results, like a state that restores your MP if you critically hit, because this isn't an action, and therefore can't trigger action effects. Also, changing it so that it could, would likely lead to causing an endless loop of state effects triggering off each other constantly.
     
    Dobberman likes this.
  9. Chaos17

    Chaos17 Dreamer Veteran

    Messages:
    1,252
    Likes Received:
    419
    Location:
    France
    First Language:
    French
    Hello,

    I'm looking for a lunatic code that will:
    - check if the user as the required tp
    - check if he has a stated applied
    If those conditions are meet, skill will add a (secondary) bonus effect

    For example, when I will attack an enemy with shield bash, it will apply stun only has a bonus effect only if the requirement above is triggered.
    Another example would be while using heal on an ally; it will also give a debuff to a random enemy like decrease atk but only if conditions are met.


    State Name: Trance
    State Description: enter a state if some condittions are meet if meet do X skill.
    Plugin Requirement: I'm using all yanflybattle plugins so do what you can.
     
  10. ramza

    ramza Lunatic Coder Veteran

    Messages:
    490
    Likes Received:
    261
    Location:
    Nova Scotia, Canada
    First Language:
    English
    Primarily Uses:
    RMMV
    A <Custom Passive Condition> tag is what we'll need to do this, as you only want the trance state to be on the battler when their TP is above a certain level.

    So first we need a custom condition tag that will make the Trance state only active when the user's TP is above a certain amount:

    Code:
    <Custom Passive Condition>
    if (user._tp >= 75){
    condition = true
    } else {
    condition = false
    }
    </Custom Passive Condition>
    From here, all you need to do is make it so that the state is on all actors, using the plugin parameters for the AutoPassiveStates plugin.

    Next, there are a couple of ways we can set up skills that interact with it. The easiest way is via action sequences. For each skill that can be modified by this state, you simply use an if statement in the action sequence, and place the added effect into it.

    So your shield bash example might go something like this:

    Code:
    <Setup Action>
    clear battle log
    display action
    motion standby: user
    move user: target, front base, 20
    wait for move
    immortal: target, true
    </Setup Action>
    <Target Action>
    wait: 15
    motion attack: user
    wait: 3
    action effect: target
    if target.result().isHit()
     attack animation: target
    end
    if (user.isStateAffected(X))
    add state Y: target
    end
    wait for animation
    wait: 20
    </Target Action>
    <Finish Action>
    clear battle log
    perform finish
    wait: 10
    immortal: target, false
    </Finish Action>
    Where if the actor is affected by state X, it applies state Y to the target. This if section can be modified to do anything an action sequence can do, to add states, or extra damage, or whatever else you want. You can even use different action sequence targets to cause damage to enemies from your healing spell as well.
     
    Chaos17 likes this.
  11. Chaos17

    Chaos17 Dreamer Veteran

    Messages:
    1,252
    Likes Received:
    419
    Location:
    France
    First Language:
    French
    Hello,

    Sorry for the late reply.
    I was able to test it today and it works like a charm.
    Thank you very much for your help.

    :kaojoy:
     

Share This Page