hi, i'm not very good at code and i want to use YEP's buffs & states core to make progressive states. I want my bleeding state to evolve into hemorrhage after 3 turns and i don't know what to write into the notetags of my bleeding state.
MV make progressive state with YEP plugins
Javascript/Plugin Supportsomething along the lines of this
Code:
<Custom Turn End Effect>
user._bleed = user._bleed +1 || 1;
if(user._bleed >=3){
user.removeState(stateId);
user.addState(Hemorrhage ID);
}
</Custom Turn End Effect>
<Custom Remove Effect>
delete user._bleed;
</Custom Remove Effect>
thank you, you're a boss man! It worked and now i'm realising that i need to limit to one state my actors. Like they can't have bleeding if they've already have hemorrhage. And i think It's more simple to have only one state possible like in pokemon.
you can add the "resist state" trait to the state to make it so that if you have hemorrhage you resist bleeding. No need to do anything special to get it like that. its a default editor function.
If you choose to go that route, i remember seeing a plugin some time ago that automatically limits the number of states an actor can have. Although i cant remember where i saw it and a few cursory google searches didnt dig it up
The other way that would be a bit more concise is to just give your bleed state a fixed duration in its database entry of 3 turns. Then put
Limiting a battler to one state is pretty straightforward, paste this into a text editor, save as a *.js file, include as a plugin:
user.addState(X) in a Custom Leave Effect.Limiting a battler to one state is pretty straightforward, paste this into a text editor, save as a *.js file, include as a plugin:
Code:
var limited_addState = Game_Battler.prototype.addState;
Game_Battler.prototype.addState = function(stateId) {
if (this.states().length>0)
return;
limited_addState.call(this, stateId);
};
Original thread: https://forums.rpgmakerweb.com/threads/make-progressive-state-with-yep-plugins.163560/