[RMVX ACE] ADDING A STATE ONLY IF ANOTHERS STATE IS APPLIED

Posts

Pages: 1
I want to give a player character two skills; the first one inflicts a state 100% of the time, I can do that. The second one applies a state 100% of the time, but ONLY if the first state is applied.

For an example of this, in Xenoblade Chronicles a key combo available early in the game is using a skill to inflict 'break', then using a follow-up skill that applies 'topple' if a target is suffering break. Then a third set of skills come in that inflict daze, but only if topple is applied.

I've tried searching for this and haven't found anything, either through ingame commands or for scripts. I would be grateful if someone could help me.
Max McGee
with sorrow down past the fence
9159
I was about to link you to a script but then I realized this is possible to do with default functionality : D.

Basically speaking, to accomplish this, every enemy should have a State Rate 1% Trait for State 2. Then, give State 1 a State Rate 100% Trait for State 2. Boom....you're good to go.
Thank you very much, Max McGee, it works perfectly. Though, is there a reason why it doesn't work if the enemy has State Rate 0%? Also, if you still have it, could you link me to the script anyway?
Craze
why would i heal when i could equip a morningstar
15170
But then there's still a 1% chance the other skill could work. Also, that's not how state rate works! It's multiplicative. 0.01 * 1.00 = 0.01.

I'm at work or I'd help further, sorry.

edit: what it works perfectly? huhh
Well, it works 'perfectly', as in theres only a 1% chance that it actually works when the 1st state isnt applied; generally speaking, the user isn't going to be spamming the 2nd skill while the 1st state isnt applied.
Max McGee
with sorrow down past the fence
9159
But then there's still a 1% chance the other skill could work. Also, that's not how state rate works! It's multiplicative. 0.01 * 1.00 = 0.01.

I'm at work or I'd help further, sorry.

edit: what it works perfectly? huhh

I went 1% instead of 0% because I wasn't sure if it was multiplicative or just 'replaces'. My original instinct was to say 'have the base enemy state rate be 0%' but I didn't go with that because I thought that maybe 100% * 0 = 0...I only didn't carry that line of thinking to conclude that 100% * 0.01% = .1% because...well derp. Because derp.

But then again I mean if the second state is sticking regularly when the first state is inflicted, as Screedle indicated then maybe it isn't multiplicative and just replaces the base State Rate Trait (too many rhyming words)? I honestly have no idea.
Craze
why would i heal when i could equip a morningstar
15170
If that doesn't work the way you want it to, plug in this script:

http://yanflychannel.wordpress.com/rmvxa/battle-scripts/lunatic-objects/

And then in a new script slot, use this add-on by me:


if $imported["YEA-LunaticObjects"]
class Scene_Battle < Scene_Base

alias lunatic_object_extension_lop1 lunatic_object_extension
def lunatic_object_extension(effect, item, user, target, line_number)
case effect.upcase
#----------------------------------------------------------------------
# Superimposed States
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Inflict a new state, if a certain state is already applied.
#
# Recommended notetag:
# <during effect: superinflict break>
# <during effect: superinflict topple>
#----------------------------------------------------------------------
when /SUPERINFLICT BREAK/i # Rename what you wish the tag to be (ALL CAPS)
return unless target.state?(4) # Replace 4 with your required state
target.add_state(5) unless target.state_resist?(5)
# Replace 5 with your new state
# "unless target.state_resist?(x)" means it won't inflict if the enemy
# has a set immunity.


when /SUPERINFLICT TOPPLE/i # Rename what you wish the tag to be (ALL CAPS)
return unless target.state?(5) # Replace 5 with your required state
target.add_state(7) unless target.state_resist?(7)
# Replace 7 with your new state
# "unless target.state_resist?(x)" means it won't inflict if the enemy
# has a set immunity.

# You can keep copy-pasting entries as you need them.

#----------------------------------------------------------------------
# Stop editting past this point.
#----------------------------------------------------------------------
else
lunatic_object_extension_lop1(effect, item, user, target, line_number)
end
end # lunatic_object_extension

end # Scene_Battle
end # $imported["YEA-LunaticObjects"]
Pages: 1