Yanfly Instant cast

Hey everybody,


I am using Yanflys Instant cast plugin and was wondering if it is possible to limit the amount of "instant Cast" spells or skills to one per turn?


The idea behind this is to represent a sort of secondary skill or spell that can be used alongside main spells or skills.


any help will be much apriciated. thanks in advance.
Set the instant cast to be conditional via the custom eval you place on the skill. Once you use the skill have it no longer meet the condition until the beginning of the next turn. For example, you could use a state or a variable as the condition. Instant Cast only if v[1] == 1. The use of the skill removes the state or changes the value of the variable. Then you have something running at the beginning of every turn via the troop events that adds the state or changes the value of the variable back to whatever you need it to be.


Hope this helps. 
Depends if you want the instant cast to no longer be instant or to restrict it completely.


for the latter


on all the instant skills:


<After Eval>


user._IN = 1


user.addState(X)


</After Eval>


<Custom Requirement>


if (user._IN = 0) {


value = true;


} else {


value = false;


}


</Custom Requirement>


on the X Blank State that lasts 1 Turn


<Custom Remove Effect>


target._IN = 0


</Custom Remove Effect>
Thank you for your help and time guys!! Much appreciated!
You could also potentially use Yanfly's Skill Cooldowns plugin for this, in one of two ways.

Option 1: Make all instant cast skills in the game of their own skill "type" (IE Skills, Magic, etc.), then use the SType Cooldown feature. Let's say you called skills that are instant cast... Let's say their type was "Feats". Then in each of these skills' notetags, you could use <SType Feats Cooldown: 1>. That way, every time a Feat was used, all other Feats in that character's repertoire would be one a 1-turn cooldown.

Option 2: Use the Global Cooldown feature, if you didn't want to define a single type for every instant cast skill. This way you could put <Global Cooldown: 1> into the instant cast notetags, and <Bypass Cooldown> in every other skill's notetags to force instant cast skills that classify as Skills, Magic, or anything else to send all other instant cast skills on a 1-turn cooldown, without affecting any other skill.


If you use option 2, make sure you set all the default skills like Attack to <Bypass Cooldown> too! Don't wanna be locked out of attacking because you used an instant cast ability. 🙂
Depends if you want the instant cast to no longer be instant or to restrict it completely.


for the latter


on all the instant skills:


<After Eval>


user._IN = 1


user.addState(X)


</After Eval>


<Custom Requirement>


if (user._IN = 0) {


value = true;


} else {


value = false;


}


</Custom Requirement>


on the X Blank State that lasts 1 Turn


<Custom Remove Effect>


target._IN = 0


</Custom Remove Effect>

That apeals to me a an elegant and controlled solution, but it somehow doesnt work for me (the skills are greyed out, always)


I did set the state and all


Seeing as user._IN is the only thing i don't understant, could it be that ? Should i define it somewhere ?


Edit : got it to work without user._IN

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-instant-cast.72549/