Yanfly Instant cast

Klammsi

Veteran
Veteran
Joined
Nov 19, 2016
Messages
58
Reaction score
9
First Language
English
Primarily Uses
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.
 

Traveling Bard

The Bard
Veteran
Joined
Jul 4, 2012
Messages
565
Reaction score
491
First Language
English
Primarily Uses
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. 
 
Last edited by a moderator:

lolshtar

Master of Magic thatknow nospell
Veteran
Joined
Apr 13, 2013
Messages
694
Reaction score
101
First Language
French
Primarily Uses
RMMV
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>
 

Klammsi

Veteran
Veteran
Joined
Nov 19, 2016
Messages
58
Reaction score
9
First Language
English
Primarily Uses
Thank you for your help and time guys!! Much appreciated!
 

TakaDynasty

Apologetic Lurker
Veteran
Joined
Dec 21, 2016
Messages
41
Reaction score
8
First Language
English
Primarily Uses
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. :)
 

Nol

Veteran
Veteran
Joined
Oct 22, 2016
Messages
91
Reaction score
6
First Language
english
Primarily Uses
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
 
Last edited by a moderator:

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

Latest Threads

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.

Forum statistics

Threads
105,868
Messages
1,017,083
Members
137,583
Latest member
write2dgray
Top