Yanfly Buffs & States Core, newbie question, please help

Hello. 

I know it is simple. I know alot of you may laugh on me cos I am totally newbie in this area, but I will appreciate any  help.

I am using Yanfly Buffs & States Core ( http://yanfly.moe/2015/12/25/yep-50-buffs-states-core/ )

Imagine game system when BUFF you got, will switch to DEBUFF after expired. So you had nice high agility? Now it faded and you are tired, so you got DEBUFF.

Via this yanfly plugin it is easy, I know. 

<Custom Remove Effect>

$gameActors.actor(actorId).addState(n);

$gameTroop.members()[enemyIndex].addState(n);

</Custom Remove Effect>

n - is ID of debuff.

$ - not sure if this prefix should or should not be present but I can test it and see.  

actorId/enemyIndex - not sure how I should deal with it. I want use "self" here 🙂 instead of ID, which I dont know. 

Also, it should work same way for Troops and Party members as well.

If you can point me at tutorial, where I can understand this logic. I have some programming experience but it is almost medieval - i was programming  25 yrs back on Borland C++ for DOS. 

Thank you very much for any response.  I hope I put it into right thread.
Hello there!

If you wanna add a state (your debuffing state) after a state expires by itself, you can try this:

<Custom Leave Effect>

user.addState(n);

user.refresh();

</Custom Leave Effect>

Where n is your debuffing state to be added to the battler with the buff state.

Using 'Custom Remove Effect' makes that debuff added even when let's say a boss prematurely ended your buff state.

Hope that helps! 🙂

- Riff
Thank you very much, helps alot. 

Any chance to point me where I can find all these funcions? Like user.addState, user.removeState, user.refresh...

I tried RPGmaker  help, and then JS library but no luck. 

Or just - where to start 🙂 .
I dont know how to do this - but a lot of people actually look into the plugin codes and manage to figure out from there. Otherwise, this list compiled by Smelipanda should be handy:

http://forums.rpgmakerweb.com/index.php?/topic/53558-yanfly-script-callsnote-tags/

- Riff
I dont know how to do this - but a lot of people actually look into the plugin codes and manage to figure out from there. Otherwise, this list compiled by Smelipanda should be handy:

http://forums.rpgmakerweb.com/index.php?/topic/53558-yanfly-script-callsnote-tags/

- Riff
Perfect, this link is miracle, thank you for all your help and nice RPG Making to you. 
You're welcome. I'm pretty sure there are more around, so check for updates often. Also check the help section for yanfly's plugins for even more codes (for example, Row Formation, Enhanced TP). There are usually at the most bottom of the help files. 🙂

Happy RPG Making to you too. Good luck in your project! 🙂

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-buffs-states-core-newbie-question-please-help.54702/