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

● ARCHIVED · READ-ONLY
Started by ramza 138 posts Page 1 of 7 View original ↗
  1. I'm back, baby!

    I have updated the paste code for Shield blocking in this post. It now uses my Shield Blocking Plugin.

    Welcome everyone, to Ramza's Custom State Workshop. IN this thread, I will post and share custom lunatic states that I have made for use with RMMV. Everyone is welcome to incorporate them into their own projects, commercial or non-commercial, as long as the terms of use of Yanfly's plugins are followed. Also, please note that some of the states below were first posted on a previous version of the forum, which seems to have messed up the formatting on some of my posts. I was just made aware that the Hurricane state was broken as a result of this, so I'm going through and fixing the other states right now. This has been completed.

    Latest State: Overpower + Darkness Burst
    Previous Weekly States:
    Mind and Body
    Water Shield (+Frost Shield)
    Zealotry
    Void Effect
    Expose Weakness
    Static Charge
    Devil's Advocate
    Shadow Word + Consuming Shadow
    Effigy
    Arcane Burn
    Dark Aura
    Infinity + Big Bang
    Renewing Myst
    Prayer of Mending
    Touch of Death
    Lightning Shield
    edited march 19, 2017 (works for allies + enemies now)
    Overload
    Enflame
    Second Chance
    Overcharge
    Hurricane
    MP Absorb
    Perform
    Bleed

    (this post has Block Chance)


    I am also taking requests for custom states you would like to see implemented, as long as it's within my ability to do so, and doesn't require a non-yanfly plugin to achieve.

    I can also offer suggestions for your own custom states, or troubleshoot issues you have with the states I post here, or with your own lunatic codes, within reason, of course. The main purpose of this topic, however, is to share my own custom states, which I made for my own project, with the general RMMV community, for free.

    Here's a super basic request template, because I need one to conform to the rules of this forum.

    Spoiler
    State Name:
    What you want the state to be called.
    State Description:
    An in-depth description of how you'd like the state to function. Examples from other games are acceptable, with the proper description. I might request more information if I am interested in the concept but haven't played the game it is from.
    Plugin Requirement:
    If your idea will require a plugin that you are aware is not part of the core yanfly plugins package, I might still be able to help.
    Required Compatibility:
    If you're using some scripts that might interfere with compatibility, I can attempt to work around that. (Yanfly's CTB for example)


    Here are some plugins that you will definitely need to be able to make use of any state I post in here:

    Any other states I post that require additional plugins will mention them in the post.


    Feel free to drop a comment, or a like, or whatever. Subscribe to this thread for updates on states I release. If you want to see one of the above listed states sooner rather than later, feel free to drop me a message on here, or on my (terrible) wordpress blog.


    Without further delay, lets get into our first state (now updated) Block Chance.

    Spoiler
    For my first state copy paste, I figured I’d go for one of the first custom states I’d made, Block Chance. In my project, a hero who has a shield equipped has a chance to block when taking physical damage. This chance is different depending on what type of shield the actor has, with a buckler being the least effective, at a 1% chance, and a heavy shield offering a 15% chance to block.


    When a block occurs, an animation is shown on the actor, and he takes no damage from the attack. This animation can also be different based on the type of shield, or, if you’re willing to put in some effort, the individual shield equipped can show different animations as well.


    What do you need to set this up?
    Setup Steps:
    • Import my shield block plugin into your project. You will need an animation set up in your database to play over your battlers when a block is successful. This plugin allows you to set this on a per shield basis.
    • Create a passive state for the block chance trait. We will go over what needs to be in the state’s note box shortly. For now, since this is passive, we won’t need an icon, or removal conditions. Make sure that all shields that can block in your project bestow this state passively using the below note tag note that text in red will need to have its value changed to work in your project):


      <Passive State: 37> // where 37 is your state ID for the block state

    • Using the new plugin, any shield that bestows a chance to block will also need to have the following note tag on it
    <Block Chance: X>
    This note tag will help determine how often a block occurs. X is the chance in % for a successful block. do not include the % sign in this. A value of 5 will denote a 5% chance to block.​
    • It isn't necessary to set a block animation on each individual shield, but at the very least, a default animation must be set in the plugin parameters of the plugin.
    Here is the paste code to go in the notebox of the block state:

    Code:
    <Custom Select Effect>
    target._oldStates = target._states.clone()
    </Custom Select Effect>
    <Custom React Effect>
    if (value > 0 && this.isHpEffect() && this.isPhysical()) {
      var rnd = (Math.floor(Math.random() * 99 + 1))
      var shd = target.blk
      if (rnd < shd){
        target._blocked = true
        value -= value;
          target.startAnimation(target.equips()[1].blockAnimation, true, 0);
          target.requestMotion('guard')
      }
    }
    </Custom React Effect>
    <Custom Deselect Effect>
    if (target._blocked) {
     target._states = target._oldStates.clone()
     target._blocked = undefined
     target._oldStates = undefined
    }
    setTimeout(function () {
     target.requestMotion('walk')
    }, 180);
    </Custom Deselect Effect>


    How does it look?
    See for yourself


    Bonus
    The original bonus section for this block state allowed for extra passive states that added to your passive chance to block. This in unnecessary now, because the plugin adds all sources of block chance together to get a final value. A passive state (or active buff) can actually just use the <Block Chance: X> note tag to add to this block chance without having to modify this state at all.

    So I have added a new bonus effect to this state instead. Block Barrier.

    This bonus effect will add a barrier using YEP_AbsorptionBarrier to a battler that blocks successfully equal to the damage he would've taken from the attack that he blocked, up to two times the battlers maximum hit points.

    The new paste code:

    Code:
    <Custom Select Effect>
    target._oldStates = target._states.clone()
    </Custom Select Effect>
    <Custom React Effect>
    if (value > 0 && this.isHpEffect() && this.isPhysical()) {
      var rnd = (Math.floor(Math.random() * 99 + 1))
      var shd = target.blk
      if (rnd < shd){
        target._blocked = true
        if (target.isStateAffected(185)) {
          target.gainBarrier(value)
          var barrierAdd = true
          if (target.barrierPoints(-1) > (target.mhp / 2)) {
            target.gainBarrier((target.mhp / 2) - target.barrierPoints(-1))
            }
        }
        value -= value;
          target.startAnimation(target.equips()[1].blockAnimation, true, 0);
          target.requestMotion('guard')
        if (barrierAdd == true) {
          target.startAnimation(170, true, 0);
        }
      }
    }
    </Custom React Effect>
    <Custom Deselect Effect>
    if (target._blocked) {
     target._states = target._oldStates.clone()
     target._blocked = undefined
     target._oldStates = undefined
    }
    setTimeout(function () {
     target.requestMotion('walk')
    }, 180);
    </Custom Deselect Effect>



    It probably won't hurt to add a waiting slot system to this topic, so here's that:


    Current requests:

    1. (none)

    2. (none)

    3. (none)



    Next State:

    • Archangel
    I hope this topic conforms closely enough to the resource workshop forum to prevent it from being closed again. I look forward to working with you all in the future, and to seeing what you guys can come up with. :)


    edit: Making a hidden list of all user-suggested states that I've made, so it's easier to find them all later without scrolling through ( what I hope will be) a giant topic.

    Spoiler
    Stacking DEF buff (Crysillion)


    Break/Daze/Topple (Lnik3500)


    Mental Charge (Iqus) (increases MP cost by 5% per remaining turn on the debuff)


    Stealth (Iqus) (cannot be targeted by physical or certain attacks, removed when striking with a physical attack, deals double damage)


    Summon Skill + timed debuff that removes the party member summoned (Past Midnight Gaming)


    Virus (Iqus) (reduces maxhp to current hp until cured)
  2. Spoke with you here: 





    I'm glad we see eye-to-eye on what exactly it is that I'm asking. I confess that I didn't even try the stacking thing because I saw it wouldn't work with what I need, so it's really cool that it actually has a stack number built in. I like the idea of some kind of invisible state. I'm not sure how it will be done, but what if it was something like...


    State 1 has the icon, and is Stack 1. Let's say State 1 does +10% MDF (*110% in params). State 2, invisible and applied alongside State 1 with a second stack, also gives +10% MDF.


    With Stack 3, you'd have State 1 and State 3, of course State 3 is also invisible, and State 3 is +20%, giving the illusion of a linear path of +10% of the bonus per stack. etc.
  3. Alright, I've got that working.


    So we have four separate states, 246, 247, 248 and 249. The first one has no icon, so the player will never see it, and is the "stacking" state that your skill will apply every time it is used.


    invisible.PNG


    And here is the note tags on this state:

    Spoiler
    <Reapply Reset Turns>
    <Custom Apply Effect>
    target.addStateCounter(246, 1)
    if (target.getStateCounter(246) > 3){
    target.setStateCounter(246, 3)
    }
    if (target.getStateCounter(246) == 1){
    target.addState(247)
    target.setStateCounter(247, target.getStateCounter(246))
    }else if (target.getStateCounter(246) == 2){
    target.removeState(247)
    target.addState(248)
    target.setStateCounter(248, target.getStateCounter(246))
    }else if (target.getStateCounter(246) >= 3) {
    target.removeState(247)
    target.removeState(248)
    target.addState(249)
    target.setStateCounter(249, target.getStateCounter(246))
    }
    </Custom Apply Effect>
    <Custom Remove Effect>
    this.removeState(247)
    this.removeState(248)
    this.removeState(249)
    </Custom Remove Effect>

    Note that stateIds need to be changed to match your project.


    The other three states are mostly blank. Each one has a Defense trait 10% higher than the previous one. In my example here, I also used different icons for each, but with the stacks, that probably isn't necessary.


    defensestack1.PNG


    As you can see, there is no code in any of the stat raising states, as the removal is handled by the 'invisible' state.


    How it works:


    When state 246 is applied, it adds one stack to its counter immediately, after which it does an if...else check to determine how many stacks it has, and apply the correct buff state, and remove previous buff states if applicable. If this state is forcibly removed, or leaves due to turn decay, it will remove all three of the buff states it can apply. Also, during the application process of the buff states, it shows it's current stack on the new buff, because the player wouldn't be able to see the stack count otherwise.


    To modify this state to higher stacking limits, change the first if statement to check against a higher value, and add more of the next if statements to check for higher values and add higher states.
  4. I modified it to fit 10 states and was a bit worried that the code would end up being too long somehow, but nope, it works just fine, no delays in anything, it's beautiful and everything I wanted.


    Thanks, man. I really appreciate it.
  5. Request


    State Name:


    Break State


    Topple State


    Daze State


    State Description:


    This is a mechanic from Xenoblade Chronicles on Wii. The way it works is that a certain skill would apply Break to the target and does nothing more than let access to Topple State. Which let's access to Daze while in Topple.


    If I'm not clear enough, here is a detailed explanation of the mechanic:


    http://ca.ign.com/wikis/xenoblade-chronicles/Break-Topple-Daze


    Plugin Requirement:


    None, except for those you listed :p  


    Required Compatibility:


    Should not have issues with other plugins ~
  6. Crysillion said:
    I modified it to fit 10 states and was a bit worried that the code would end up being too long somehow, but nope, it works just fine, no delays in anything, it's beautiful and everything I wanted.


    Thanks, man. I really appreciate it.

    I'm glad we could sort this out. :)

    Lnik3500 said:
    Request


    State Name:


    Break State


    Topple State


    Daze State


    State Description:


    This is a mechanic from Xenoblade Chronicles on Wii. The way it works is that a certain skill would apply Break to the target and does nothing more than let access to Topple State. Which let's access to Daze while in Topple.


    If I'm not clear enough, here is a detailed explanation of the mechanic:


    http://ca.ign.com/wikis/xenoblade-chronicles/Break-Topple-Daze


    Plugin Requirement:


    None, except for those you listed :p  


    Required Compatibility:


    Should not have issues with other plugins ~

    If I'm understanding this correctly, topple can only be applied to a target that is already under guard break, and daze can only be applied to an enemy who is toppled, yes? I believe this was also a mechanic in the second Xenosaga game. Making states that require another state to be on the target shouldn't be very difficult. I'll get to work on it tomorrow after work. Did you want it do have similar effects to the states from Xenoblade, or were you planning to add that in there on your own, later?
  7. @ramza If it's not too much work, I would like to have it similar to the game if possible :D  


    Keep in mind that Daze extends Topple, not overwriting it.


    For example:


    Actor 1 use skill 1 which inflicts Break


    Actor 2 use skill 2 which inflicts Topple for 3 turns only f the target has Break


    Actor 1 use skill 3 which inflicts Daze, it extends Topple for 2 turns (State icon changes during the extension) (Topple has to be applied for it to work)


    Daze is kind of important and cannot be just <add turns> from Topple, since some skills have bonuses from the target being Dazed instead.


    I hope it's not too difficult as a request :p  
  8. Alright, request complete.


    Firstly, the turns are sort of arbitrary. I set the Break state to only last one turn, so you had to follow up immediately with a Topple skill if you actually wanted to topple the target. I set the topple to three turns, but that can be modified as you see fit. Daze adds to the Topple state's duration, and sets its own duration to be equal to the modified topple's duration. I didn't add any restrictions to the skills, (like a stun on daze), if you choose to do that, it might cause the turn counter to act erratically depending on what type of battle system you're using.


    For best effect, you can use if...else statements in an action sequence to increase damage on a target that is toppled or dazed, although I also added a 1.2 and 1.25 x damage boost for topple and daze respectively, which means physical attacks will do 1.5x normal damage on a dazed opponent, or 1.2x on a toppled one.


    If you have YEP_X_CriticalControl, You can also use that in an action sequence to increase or force a critical hit on a target that is afflicted with topple or daze.


    So, we have three states, Break, Topple and Daze.


    BreakState.png


    ToppleState.png


    DazeState.png


    In order for an attack to apply Topple, Break must be on the target. If a target is toppled, and a skill that adds topple is used again on it, the topple will not gain extra turns, and will otherwise be ignored. If a skill that would apply Daze is used, but the target isn't toppled, the effect is not applied at all. If the target is toppled, and a daze is applied, the toppled state increases its remaining turns by 2, and the daze state starts with the same number of turns. If a dazed state is reapplied after, it will add two more turns. There is no limit in place to how much this can stack. If you would prefer if Daze cannot be reapplied either, add a <Reapply Ignore Turns> tag to the daze state.


    Here is the code for each state:

    Spoiler
    Break:



    <Custom Apply Effect>
    if (this.isStateAffected(247)){
    this.removeState(246)
    }
    </Custom Apply Effect>


    Topple:



    <Reapply Ignore Turns>
    <Custom Apply Effect>
    if (!target.isStateAffected(246) && target._hadBreak != true){
    target.removeState(247)
    }else{
    target.removeState(246)
    target._hadBreak = true
    }
    </Custom Apply Effect>
    <Custom Remove Effect>
    this._hadBreak = undefined
    this.removeState(248)
    </Custom Remove Effect>
    <Custom React Effect>
    if (value > 0 && this.isHpEffect() && this.isPhysical()) {
    value = Math.round(value * 1.2)
    }
    </Custom React Effect>


    Daze:



    <Custom Apply Effect>
    if (!this.isStateAffected(247)){
    this.removeState(248)
    }else{
    this._stateTurns[247] = (this._stateTurns[247] + 2)
    this._stateTurns[248] = this._stateTurns[247]
    }
    </Custom Apply Effect>
    <Custom Remove Effect>
    this._hadBreak = undefined
    this.removeState(248)
    </Custom Remove Effect>
    <Custom React Effect>
    if (value > 0 && this.isHpEffect() && this.isPhysical()) {
    value = Math.round(value * 1.25)
    }
    </Custom React Effect>

    Bonus: An action sequence example to use with the state to make it have a different effect:

    Spoiler
    <Setup Action>
    clear battle log
    display action
      if (user.attackMotion() !== 'missile' && (user.isActor() && target.isEnemy() || user.isEnemy() && target.isActor()))
        move user: target, front base, 20
        wait for move
      else
        perform start
      end
    immortal: target, true
    </Setup Action>
    <Target Action>
    wait: 15
    perform action: user
    action effect: target
    if (target.result().isHit())
     if (target.isStateAffected(247))
      <EXTRA EFFECTS HERE>
     end
     action animation: target
     wait for animation
    end
    wait: 20
    </Target Action>
    <Finish Action>
    clear battle log
    perform finish
    wait: 10
    immortal: target, false
    </Finish Action>

    Please note, that the stateIds need to be changed to match your project. I used 246, 247 and 248. Change those values in the paste code as needed.


    Examples of extra action effects you can use on a dazed or toppled target:

    DAMAGE RATE: x%


    DAMAGE RATE: x.y


    DAMAGE RATE: VARIABLE x


    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


    This changes the damage rate across all types of damage (physical, magical,


    and certain hit). The damage rate is reset at the end of each action


    sequence. If you use a variable, it is treated as a percentage.


    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


    Usage Example: damage rate: 50%


    damage rate: 8.667


    damage rate: variable 3
    FORCE CRITICAL


    FORCE NO CRITICAL


    NORMAL CRITICAL


    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


    This forces the following action effects in the action sequence to either


    always be a critical hit or not a critical hit ignoring all other factors.


    Using 'normal critical' will reduce the following action effects to use the


    regular critical hit rate calculation.


    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


    Usage Example: force critical


    force no critical


    normal critical

    Let me know if you need anything changed, or usage examples.
  9. @ramza Holy that is so perfect! 


    I've been requesting help for this for about a month, and you resolved it in a matter of a few hours  :D  


    I'm definitely going to be us... requesting your help on similar problems :p  


    Seriously, you helped me a bunch, thank you!


    EDIT: Do I have to change 


    target.hadBreak


    to:


    target.had(Name of state) ?


    EDIT2: Bug report on request?


    After I set Topple and Daze to "Cannot Move", When I try inflicting it and cannot because the target hasn't met the conditions, the target won't do any actions for the turn I tried inflicting it
  10. Lnik3500 said:
    @ramza Holy that is so perfect! 


    I've been requesting help for this for about a month, and you resolved it in a matter of a few hours  :D  


    I'm definitely going to be us... requesting your help on similar problems :p  


    Seriously, you helped me a bunch, thank you!


    EDIT: Do I have to change 


    target.hadBreak


    to:


    target.had(Name of state) ?


    EDIT2: Bug report on request?


    After I set Topple and Daze to "Cannot Move", When I try inflicting it and cannot because the target hasn't met the conditions, the target won't do any actions for the turn I tried inflicting it

    ._hadBreak was a variable I had to store to prevent re-applying topple from removing topple entirely. You shouldn't need to change the name of that unless you're making multiple copies of the same states, and plan to apply both simultaneously.


    As for the second thing, adding 'cannot move' to the state might cause some wonky workings to it, as turns for enemies inflicted with a cannot move state aren't determined normally, at least not in a tick based battle system like ATB or CTB. I'm not sure why it wouldn't apply to them, however, I will take a look at this.
  11. ramza said:
    ._hadBreak was a variable I had to store to prevent re-applying topple from removing topple entirely. You shouldn't need to change the name of that unless you're making multiple copies of the same states, and plan to apply both simultaneously.


    As for the second thing, adding 'cannot move' to the state might cause some wonky workings to it, as turns for enemies inflicted with a cannot move state aren't determined normally, at least not in a tick based battle system like ATB or CTB. I'm not sure why it wouldn't apply to them, however, I will take a look at this.

    Thanks for this! So in the end, even if I change the name of _hadBreak, it shouldn't have problems?


    And for the second note, I might add that I'm using default Turn Based Battle with Yanfly's Battle System :)  
  12. Okay, so in testing, for a minute there, I thought that I had messed up the copy+paste code somehow, but it turned out I didn't have any plugins on my test project, so the second state wasn't applying because lunatic codes weren't being read. XD. Is it possible that in renaming the the target._hadBreak variable, you missed one in the apply effects of topple or daze? that seems likely given what I just experienced with the plugins not being loaded.


    Anyways, it seems like in testing, even with the 'cannot move' tag, it still applies for me, and also prevents the foe from taking turns as they should. However, it seems that the way I have the state apply, also causes them to miss their turn, even though they're not effected by the state anymore. In my test fight, when I hit both enemies with daze, even though only one of them was inflicted with it, they both missed their turn, I assume because the state is technically applied for a single frame before being removed. This can be remedied by adding another state, on the note tag, that causes the stun effect instead of having that ride off the main topple/daze effects.


    So let's change that up a bit.


    First, a new state, which has no icon, as the player shouldn't know about it.


    stunstate.png


    State codes for that state:

    Spoiler
    <Custom Apply Effect>
    this._stateTurns[249] = this._stateTurns[247]
    </Custom Apply Effect>

    This code makes it so that when applied, this state  has the same duration as topple, but otherwise does nothing. The other states will handle removing it.


    Next, we need to add this state to the topple and daze effects:

    Spoiler
    Topple:



    <Reapply Ignore Turns>
    <Custom Apply Effect>
    if (!target.isStateAffected(246) && target._hadBreak != true){
    target.removeState(247)
    }else{
    target.removeState(246)
    target.addState(249)
    target._hadBreak = true
    }
    </Custom Apply Effect>
    <Custom Remove Effect>
    this._hadBreak = undefined
    this.removeState(248)
    this.removeState(249)
    </Custom Remove Effect>
    <Custom React Effect>
    if (value > 0 && this.isHpEffect() && this.isPhysical()) {
    value = value * 1.2
    }
    </Custom React Effect>


    Daze:



    <Custom Apply Effect>
    if (!this.isStateAffected(247)){
    this.removeState(248)
    }else{
    this._stateTurns[247] = (this._stateTurns[247] + 2)
    this._stateTurns[248] = this._stateTurns[247]
    this._stateTurns[249] = this._stateTurns[247]
    }
    </Custom Apply Effect>
    <Custom Remove Effect>
    this._hadBreak = undefined
    this.removeState(247)
    </Custom Remove Effect>
    <Custom React Effect>
    if (value > 0 && this.isHpEffect() && this.isPhysical()) {
    value = value * 1.25
    }
    </Custom React Effect>

    These modifications will add a fourth state, which has no other purpose than to stun the inflicted, and which will last as long as topple's effect lasts.
  13. @ramza WOW! You're definitely helping me so much just with this! Thank you!
  14. No problem. It's what I do, after all. :)
  15. @ramza Help! :(  


    Suddenly, when the enemy is Toppled, they suddenly deal huge damage according to the popup, but not in reality...


    They deal the same amount of damage, but it gets sometimes crazy and pops like 23144235346354 damage or something while dealing around 350 damage only


    it's weird... maybe the value for more physical damage?
  16. Ah, I think I know what I did XD


    The bit in the end of topple and daze - the part where it increases damage dealt, I forgot to put a round function to stop it from doing decimal damage.


    The skill isn't really doing 836592520 damage, it's just showing 6 decimal places.


    Change the line in custom react effect for topple to:


    value = Math.round(value * 1.2)


    and the one for daze to:


    value = Math.round(value * 1.25)


    That should do it.
  17. @ramza I'm going to continue pinpointing your mistakes until it doesn't have bugs anymore :p  


    I did more testing for now, and it seems that the stun isn't updating with Topple state, but luckily, it seems that if I set my stun to last as long as the default Topple, it should be ok :)  


    Thank you for the great help for debugging it :p  
  18. Reason: I am an idiot. XD


    The copy+paste code for the stun should read <Custom Apply Effect>, not <Custom Apply EffectS>, so it's not applying.
  19. @ramza Haha even I didn't see it :p  


    it's a little out of context, but do you think you'll open a Skill Workshop similar to this? There is the custom formula thread, but it could be awesome if there were suggestions similar to how Yanfly does his tips and tricks videos. Even with ALL those errors :p  , It could be fun and just from you helping me on this, I learned some neat things out of it :)  
  20. Lnik3500 said:
    @ramza Haha even I didn't see it :p  


    it's a little out of context, but do you think you'll open a Skill Workshop similar to this? There is the custom formula thread, but it could be awesome if there were suggestions similar to how Yanfly does his tips and tricks videos. Even with ALL those errors :p  , It could be fun and just from you helping me on this, I learned some neat things out of it :)  

    Some of my states might need an action sequence to apply. In those cases I will include an action sequence, but at this time I have no plans to make an actual skill workshop. Perhaps in the future.


    And to be fair about the mistakes, I did make those states in a little over an hour, and had little QA time. in the future, I will be sure to fully test the state before I release it :p