Class whose power raises as HP decreases?

Failnaut

Warper
Member
Joined
Jul 19, 2016
Messages
3
Reaction score
0
First Language
English
Primarily Uses
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!
 

ThePotatoOfFire

8-bit Obsessed
Veteran
Joined
Jan 15, 2016
Messages
157
Reaction score
58
First Language
English
Primarily Uses
RMMV
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.
 
Last edited by a moderator:

Failnaut

Warper
Member
Joined
Jul 19, 2016
Messages
3
Reaction score
0
First Language
English
Primarily Uses
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.
 

ThePotatoOfFire

8-bit Obsessed
Veteran
Joined
Jan 15, 2016
Messages
157
Reaction score
58
First Language
English
Primarily Uses
RMMV
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.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
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.
 
Last edited by a moderator:

Failnaut

Warper
Member
Joined
Jul 19, 2016
Messages
3
Reaction score
0
First Language
English
Primarily Uses
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.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,860
Messages
1,017,040
Members
137,569
Latest member
Shtelsky
Top