(Yanfly Plugins) Set a state to certain turns?

Servidion

Last Soul Keeper
Veteran
Joined
Mar 15, 2015
Messages
233
Reaction score
27
First Language
English
Primarily Uses
RMMV
Is there a way to use a skill to set an already applied state to a certain amount of turns?


Example: Bard class.


Bard uses song1 (State Lasts 5 turns)


Bard uses song2 (State Lasts 5 turns)


Bard uses song3 (State Lasts 5 turns)


-At this point the state from song1 only has 2 turns left


Bard uses Harmony to boost the turns of all applied song-states back to 5.


Bard uses song4 (State Lasts 5 turns)


Etc. Etc.


I notice that in the buffs and states core help file you can add or remove turns, <State x Turns: +y> or <State x Turns: -y> respectively, but there doesn't seem to be a way to set or reset turns.
 

shockra

Slightly Crazy Programmer
Veteran
Joined
Feb 16, 2016
Messages
444
Reaction score
208
First Language
English
Primarily Uses
RMMV
Put this code in the skill that you want to reset the states with.  Replace X with state ID:


<Custom State X Turn>


if (target.isStateAffected(X)){


     turn = 5;


}
</Custom State X Turn>


Make that tag for each state you want to reset in the skill.
 
Last edited by a moderator:

Servidion

Last Soul Keeper
Veteran
Joined
Mar 15, 2015
Messages
233
Reaction score
27
First Language
English
Primarily Uses
RMMV
I still seem to be having issues. I made a short video demonstrating this. Not sure if I've overlooked something.


Skill applies state 160, but the other skill doesn't bring state 160 back up to 5 turns.

 

Sagittarius1

Villager
Member
Joined
Jul 24, 2016
Messages
6
Reaction score
1
First Language
Spanish
Primarily Uses
Plugin documentation for v1.1 has a mistake in this part, since the actual tag is <Custom State X Turns></Custom State X Turns> (notice the s at the end)


Hope this helps somebody searching through Google since this thread is one of the first hits.
 
Last edited by a moderator:

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

Latest Threads

Latest Profile Posts

I should realize that error was produced by a outdated version of MZ so that's why it pop up like that
Ami
i can't wait to drink some ice after struggling with my illness in 9 days. 9 days is really bad for me,i can't focus with my shop and even can't do something with my project
How many hours have you got in mz so far?

A bit of a "sparkle" update to the lower portion of the world map. :LZSexcite:
attack on titan final season is airing tomorrow, I'm excited and scared at the same time!

Forum statistics

Threads
105,881
Messages
1,017,227
Members
137,607
Latest member
Maddo
Top