Kilitar

Veteran
Veteran
Joined
Jul 28, 2015
Messages
141
Reaction score
44
First Language
czech
Primarily Uses
RMMV
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.
 

Riff

Eorzean
Veteran
Joined
Oct 25, 2015
Messages
267
Reaction score
86
First Language
English
Primarily Uses
RMMZ
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
 

Kilitar

Veteran
Veteran
Joined
Jul 28, 2015
Messages
141
Reaction score
44
First Language
czech
Primarily Uses
RMMV
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 :) .
 

Kilitar

Veteran
Veteran
Joined
Jul 28, 2015
Messages
141
Reaction score
44
First Language
czech
Primarily Uses
RMMV

Riff

Eorzean
Veteran
Joined
Oct 25, 2015
Messages
267
Reaction score
86
First Language
English
Primarily Uses
RMMZ
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! :)
 

Latest Threads

Latest Posts

Latest Profile Posts

Posted some halloween freebies! Grab them while on season :kaopride:
hallow_cat.png
So my birthday was about a week ago! Just forgot to post it. I went to a Golden Corral, and it was soooooo good! :kaojoy: I also got some Animal Crossing in my life! Yay, Animal Crossing!
At this point, "unique and diverse cast of characters" might as well be slang for Every Character is a Human-Sue.
I found an absolutely brilliant lifehack on the internet today.

Screenshot_760.jpg

Forum statistics

Threads
116,143
Messages
1,096,138
Members
151,570
Latest member
grungewitch
Top