I'm trying to make my standard Warrior class's ATK increase the lower his HP is. I'm guessing it has something to do with the Features section, but I can't for the life of me figure out how to do it.
Alternatively, if I need to download a script to make that happen, is it possible to give him a big attack buff whenever his HP is below 15% without scripts, instead?
Thanks in advance!
As long as actors aren't changing classes, then just go into your troop events and make a page with the condition set to Actor(x) HP = 15%, then make a Change State command in the event. Add a state that increases their attack.
Let me know how that works out.
Sorry it took me so long to respond to this. I haven't had much access to the internet over the past few weeks, but it's back up and running again now.
Is there any way to have that happen without having to set it on every battle? I mean, if I need to do it, then I will... just wondering if there's an easier way that won't take as long.
I'm gonna have well over 100 different troops in my game, and not all of them are put together yet.
The method you gave me works, although the ATK buff persists even after the warrior is healed to above 15% HP. Any way to cancel it once his HP is too high?
Conditional Branches can't make decisions based on actor HP state, and I've tried setting two pages instead; one makes it so that if Warrior's HP is 15% or lower, his ATK will increase; the other makes it so when his HP is 99% or below, the state is removed. I'm thinking that effect only takes place once, and that's why it isn't working, but I could be wrong.
Use a switch on the state page, and make the removal page dependant on that switch. Then turn that switch back off so that the cycle may continue.
You would use the damage formula for this.
If you only want it for a single skill, use this (I'm using the default a.atk * 4 - b.def * 2 as an example, but if you are using a different formula, just change that aspect)
[SIZE=10.5pt]a.atk *4 - b.def * 2 + ((a.atk*4 - b.def * 2) * (a.mhp - a.hp)/a.mhp)[/SIZE]
If you want to use this for many skills, you might want to
put the custom formula on a method on a custom script then just make your damage formula use that method
To do that, you need to use a scriptlet
class Game_Battler < Game_BattlerBase
def custom_formula_name(a, b, v)
#here you can add as much as you want
end
end
then you only need to write this in your skill formula box:
custom_formula_name(a, b, v)
EDIT
Just thought, that formula would apply to any actor using attack. To restrict it to only one actor, you will need to use a script which assigns different skill slots to 'Attack'. A simple one to use is Vlue's Set Guard/Attack script. Then, once you've assigned a new skill slot, use the formula as set out above.
Thanks. I'm sorry it took so long to respond again, but you're amazing. Your suggestion worked. I'll be sure to credit you and Vlue in the credits.