Slimsy Platypus

Veteran
Veteran
Joined
May 17, 2016
Messages
117
Reaction score
132
Primarily Uses
Is there a way for a state to do damage based on how many turns it has remaining? For example, I'd like to have a damage/heal over time do 400 damage when the there are 4 turns left, 300 when there are 3 turns left, 200 when there are 2 turns left, etc.

I'm currently using Yanfly's Buffs and States as well as Extended Damage over Time but I haven't found any syntax that can return the number of turns on a state ID that can be used in a damage formula.

Thanks in advance for any assistance!
 

M.I.A.

Goofball Extraordinaire
Veteran
Joined
Jul 13, 2012
Messages
915
Reaction score
783
First Language
English
Primarily Uses
If you don't get an affirmative response on this one using Yanfly's plugins, there is a "Progressive States" plug in (I forgot who made it..) that you could use. You would just need 4 states to accomplish this.

State 400 - heals for 400HP, progresses into State 300.
State 300 - heals for 300HP, progresses into State 200.. etc.

Best,
MIA :)
 

JamesRyan

Game Designer
Veteran
Joined
Sep 13, 2014
Messages
698
Reaction score
219
First Language
Vietnamese
Primarily Uses
RMMV
I think i can help you. However, i haven't tested this so i cannot guarantee that it will work properly.

<Custom Apply Effect>
//Setup a flag to remember target's turn. Remember to set your turns to remove this state in your Database equal to this number. If you want to reset turn counter when this state is applied, just remove target._turnCounter ||
target._turnCounter = target._turnCounter || 4;
</Custom Apply Effect>


<Custom Regenerate Effect>
//Check if target's turn is higher than 0
if (target._turnCounter > 0){
//Get the amount of HP recovered
var heal = target._turnCounter * 100;
//Heal target
target.gainHp(heal);
//Decrease target's turns by 1
target._turnCounter -= 1;}
</Custom Regenerate Effect>

<Custom Remove Effect>

//Remove target's turn counter when the state is gone.
target._turnCounter = undefined;
</Custome Remove Effect>
 

Slimsy Platypus

Veteran
Veteran
Joined
May 17, 2016
Messages
117
Reaction score
132
Primarily Uses
@JamesRyan That works perfectly as intended. Thanks so much for your time.

Unfortunately I am getting a conflict with another plugin during the Custom Remove Effect and I just don't understand well enough to get around it. I'm thinking through some workarounds now, thanks again!
 

JamesRyan

Game Designer
Veteran
Joined
Sep 13, 2014
Messages
698
Reaction score
219
First Language
Vietnamese
Primarily Uses
RMMV
The <Custom Remove Effect> part is important, so you should do something with this incompatibility (even get rid of the plugin causing it if there is no other choices).
 

Latest Threads

Latest Posts

Latest Profile Posts

I haven't been on here in forever wow(missed my forum birthday T-T). Anyways, I'm dabbling in BGMs, here's something I'm actually willing to share.

Binge-watched 6 episodes of the Erased anime... And that means I've watched half of it?! Sigh...
I'm bad at base-building games (looking at other players created an aesthetically beautiful base compared to me), but IDK why I keep playing the game and seek more of it.
Pyra and Mythra in smash ultimate are way too OP. They're basically Smash 4 Bayonetta 2.0, and not in a good way. Very toxic and unfair. At least they're hot tho.
attack on titan keep reaching a new height with each episode, aaa I can't wait another week for a new episode at this point

Forum statistics

Threads
109,197
Messages
1,042,968
Members
141,700
Latest member
skybola188
Top