Yanfly Passive States that remove after X turns?

● ARCHIVED · READ-ONLY
Started by Icenick 7 posts View original ↗
  1. I was wondering how I would go about making a passive state that only lasts a turn or that removes when taking damage.
    I want to create an item that reduces damage by 50% for the first instance of damage per battle.
  2. If it's through states, in the state section of the database you can set the auto-removal timing to either Action End or Turn End. For damage, just tick Remove by Damage.

    Then all you have to do with the item is make it apply the state when used.
  3. atoms said:
    If it's through states, in the state section of the database you can set the auto-removal timing to either Action End or Turn End. For damage, just tick Remove by Damage.

    Then all you have to do with the item is make it apply the state when used.

    I currently have this set up and it does not work. It keeps the state permanently even if I take damage.
  4. @Icenick

    Sorry didn't realize you meant auto passive state. Auto passive state don't work like that.

    So my question then is how are you applying the state? The best thing to do is not use auto passive state but other Yanfly Plugins, that way the state will appear at the beginning and be removed upon damage or if you choose turns, on turns.

    If your using weapon/equipment use Base Troop Events
    http://yanfly.moe/2015/10/18/yep-15-base-troop-events/

    Create Turn 0 + 1 Span = Battle should work.

    Add a common event

    make common event something like Passive States

    Then write the events you need in there I.e. Conditional Branch Actor 1 Weapon 1 if Add State Actor 1 The State.

    That should work and wear off after the turns you set in states or damage is taken.

    If it doesn't work for first turn in battle, then try Turn 0 + 0 Span = Battle & try Turn if Battle doesn't give you the result you want.

    Let me know whether one of those works or not for the very first turn.

    If you are using skills then Yanfly's Equip Battle Skills

    http://yanfly.moe/2016/04/08/yep-90-equip-battle-skills-rpg-maker-mv/

    will let you do just that.

    As it says,

    <Equip State: x>
    <Equip State: x, x, x>
    <Equip State: x through x>
    This causes the actor to be affected by state x while the skill is equipped for battle.
  5. atoms said:
    @Icenick

    Sorry didn't realize you meant auto passive state. Auto passive state don't work like that.

    So my question then is how are you applying the state? The best thing to do is not use auto passive state but other Yanfly Plugins, that way the state will appear at the beginning and be removed upon damage or if you choose turns, on turns.

    If your using weapon/equipment use Base Troop Events
    http://yanfly.moe/2015/10/18/yep-15-base-troop-events/

    Create Turn 0 + 1 Span = Battle should work.

    Add a common event

    make common event something like Passive States

    Then write the events you need in there I.e. Conditional Branch Actor 1 Weapon 1 if Add State Actor 1 The State.

    That should work and wear off after the turns you set in states or damage is taken.

    If it doesn't work for first turn in battle, then try Turn 0 + 0 Span = Battle & try Turn if Battle doesn't give you the result you want.

    Let me know whether one of those works or not for the very first turn.

    If you are using skills then Yanfly's Equip Battle Skills

    http://yanfly.moe/2016/04/08/yep-90-equip-battle-skills-rpg-maker-mv/

    will let you do just that.

    As it says,

    <Equip State: x>
    <Equip State: x, x, x>
    <Equip State: x through x>
    This causes the actor to be affected by state x while the skill is equipped for battle.

    Wow that works great! I used the base troops. It will be very tedious but at least it works. I will limit the equipment with those kind of effects. THANKS!
  6. Icenick said:
    ...

    Glad to hear it. To be honest you could keep calling common events into that single base troop event and that should make it easier if you do want a lot of effects.

    You could also use the same common event to check all actors for all states you want. It is a bit tedious with the conditional branches and other such additional eventing, but otherwise it should be fine, so if you do want a lot more effects, then I would encourage you to at least try with this method and see how it goes. If a single common event is too much, you could try multiple common events and try to label them something clear and obvious for you. I'm sure there are ways around it. But if your fine with just a few effects that'd fine too.

    If you still don't know much about what can be done with events, switches and variables I recommend you experiment as they can do a lot!

    Good luck with your game!
  7. @Icenick I could be wrong, but I feel like the solution provided is a pretty long-winded way of doing things. If I can suggest another method...

    The AutoPassiveState plugin has the following notetag:

    Code:
    <Passive Condition: Variable x Below y>

    This allows you to pretty much toggle passive states on/off.

    Since you're using Base Troops, why not have an event that raises a variable every turn? This way, you can just use the notetag above as a condition for the state to be active. In other words, using:

    Code:
    <Passive Condition: Variable 1 Below 2>

    Means that the state can be deactivated when the second turn begins if you're using Variable ID 1 to track the battle turns.