[VX Ace] Help with Yanfly's skill cost manager script

S.Court

Veteran
Veteran
Joined
Oct 17, 2012
Messages
394
Reaction score
98
First Language
Español
Primarily Uses
RMVXA
Hello, I have a question, I'm using Yanfly's skill cost manager script and I want to make a skill requires the user has or DOESN'T HAVE certain state

For example, I want to make a "Fire seal" state, which makes the affected can't use fire based attacks, or make an attack it's only usable when the user has the poison state

Does someone know how to make that? Thank you
 

Iavra

Veteran
Veteran
Joined
Apr 9, 2015
Messages
1,797
Reaction score
863
First Language
German
Primarily Uses
You can set a state to add or seal skill types in the database.
 

S.Court

Veteran
Veteran
Joined
Oct 17, 2012
Messages
394
Reaction score
98
First Language
Español
Primarily Uses
RMVXA
You can set a state to add or seal skill types in the database.
All abilities will be in same skill type, so that doesn't work exactly as I want
 

Iavra

Veteran
Veteran
Joined
Apr 9, 2015
Messages
1,797
Reaction score
863
First Language
German
Primarily Uses
You can do the same for single skills, as well.
 

S.Court

Veteran
Veteran
Joined
Oct 17, 2012
Messages
394
Reaction score
98
First Language
Español
Primarily Uses
RMVXA
You can do the same for single skills, as well.
...Ohhh my, how did I miss that? xDDDD

Well, that fix one stuff, but how do I make a skill is only usable if the user has X state?
 

NaosoX

Veteran
Veteran
Joined
Feb 28, 2013
Messages
48
Reaction score
47
First Language
English
Primarily Uses
N/A
Go to the states in your database, on the right are effects of the state. Add new, choose tab "skill", you can choose to add the skill there.
 

S.Court

Veteran
Veteran
Joined
Oct 17, 2012
Messages
394
Reaction score
98
First Language
Español
Primarily Uses
RMVXA
Go to the states in your database, on the right are effects of the state. Add new, choose tab "skill", you can choose to add the skill there.
Ummm the skill is learnable via skill system, so I'm not convinced about this idea
 

NaosoX

Veteran
Veteran
Joined
Feb 28, 2013
Messages
48
Reaction score
47
First Language
English
Primarily Uses
N/A
But it should at least exist in your database, if it's a skill?

state skiill'.png
 

S.Court

Veteran
Veteran
Joined
Oct 17, 2012
Messages
394
Reaction score
98
First Language
Español
Primarily Uses
RMVXA
But it should at least exist in your database, if it's a skill?

state skiill'.png
I'm using Yanfly learn system engine so, that will happen: When it's learned, it'll be usable even if the user doesn't have this state, and when the player gets the state, it'll be able to use this skill even if it hasn't learned it wit this system, so that's not what I want
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
I think you will need an edit to the script then, because as far as I can tell, if you haven't learned the skill, the learn conditions script will never let you use that skill, regardless of what you put there for the skill conditions script. The only other way is to make a second copy of the skill which you can cast when the state is applied (by setting it under the state that the state gives that skill).

Though you will then have the issue that both copies of the skill will show up if the actor has learned it and is inflicted with the state.

My suggestion would be to come up with a unique version of a skill that is only castable when under the state. That way it works within the system. Otherwise, you will need an edit to the script, which you may need to request.
 
Last edited by a moderator:

S.Court

Veteran
Veteran
Joined
Oct 17, 2012
Messages
394
Reaction score
98
First Language
Español
Primarily Uses
RMVXA
I think you will need an edit to the script then, because as far as I can tell, if you haven't learned the skill, the learn conditions script will never let you use that skill, regardless of what you put there for the skill conditions script. The only other way is to make a second copy of the skill which you can cast when the state is applied (by setting it under the state that the state gives that skill).

Though you will then have the issue that both copies of the skill will show up if the actor has learned it and is inflicted with the state.

My suggestion would be to come up with a unique version of a skill that is only castable when under the state. That way it works within the system. Otherwise, you will need an edit to the script, which you may need to request.
I'm pretty sure it's not needed, because there is this string called custom cost requirement

<custom cost requirement>

 string

 string

</custom cost requirement>

And a example of that

I just need to make a script line checks the user of this atttack has x state, but I don't know how
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
Yes, there is a string, which is for paying the cost to use the skill, once you already learned it. It does not handle giving you the skill in any way, shape, or form. They are two separate things.

See, the reason you are having a problem is it will be looking for you to 'pay' a state, which makes no sense. Costs can only be HP, MP, TP, or items, weapons or armor, and they are consumed. The system cannot consume a state, so that is why it doesn't work.
 

S.Court

Veteran
Veteran
Joined
Oct 17, 2012
Messages
394
Reaction score
98
First Language
Español
Primarily Uses
RMVXA
Yes, there is a string, which is for paying the cost to use the skill, once you already learned it. It does not handle giving you the skill in any way, shape, or form. They are two separate things.

See, the reason you are having a problem is it will be looking for you to 'pay' a state, which makes no sense. Costs can only be HP, MP, TP, or items, weapons or armor, and they are consumed. The system cannot consume a state, so that is why it doesn't work.
What? No, the learning system covers all I need for this skill, I just need this skill requires you have X state
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
No, it doesn't. You want the skill to be useable when you have a state but you haven't learned it, right? That is what I'm saying you can't do. You see, for the skill cost manager to work, you *have* to have already learned it. Period. It is not set up to work any other way.
 

S.Court

Veteran
Veteran
Joined
Oct 17, 2012
Messages
394
Reaction score
98
First Language
Español
Primarily Uses
RMVXA
No, it doesn't. You want the skill to be useable when you have a state but you haven't learned it, right? That is what I'm saying you can't do. You see, for the skill cost manager to work, you *have* to have already learned it. Period. It is not set up to work any other way.
No, I just said to NaosoX the metod he told me wouldn't work because "When it's learned, it'll be usable even if the user doesn't have this state, and when the player gets the state, it'll be able to use this skill even if it hasn't learned it wit this system, so that's not what I want"

So, I just need a requeriment checks the user has X state, that's all
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
So, let's check this again:

Way I read it, you want the skill to be learnable, plus also useable when under a state? Or do you want it learnable AND only useable when under a state? Which one determines how you have to do it.
 

NaosoX

Veteran
Veteran
Joined
Feb 28, 2013
Messages
48
Reaction score
47
First Language
English
Primarily Uses
N/A
You could try when any battle ends, seal that skill?
 

S.Court

Veteran
Veteran
Joined
Oct 17, 2012
Messages
394
Reaction score
98
First Language
Español
Primarily Uses
RMVXA
So, let's check this again:

Way I read it, you want the skill to be learnable, plus also useable when under a state? Or do you want it learnable AND only useable when under a state? Which one determines how you have to do it.
The ability will be learned with this system, and there is nothing is needed about learning conditions (I mean, nothing I require in this post) I just need the ability is only usable when the user has X state, for this I only need a script call checks the user has X state, how do I do that?
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA
Ok, I was reading it as you wanted to be able to use it if you *had not* learned it, which is why I was saying it was impossible. For what you stated, it can be done. Here is how you do it.

The script call to see if someone has a state is this:

state?(x),

where x is the state id of the state you wish to check.

So to check for the default poison, do this:

<custom cost requirement>
state?(2)
</custom cost requirement>

Change 2 to what your poison State ID is.

I tested it in a blank project with all Yanfly's scripts installed, and it worked. The skill was not selectable when not under the state, and selectable when under the state.
 
Last edited by a moderator:

S.Court

Veteran
Veteran
Joined
Oct 17, 2012
Messages
394
Reaction score
98
First Language
Español
Primarily Uses
RMVXA
Ok, I was reading it as you wanted to be able to use it if you *had not* learned it, which is why I was saying it was impossible.
It started like that, because I needed both, if the player has the state or if he has not, but the second one was fixed with the "Seal skill" feature lavra fixed and I forgot because I'm clumsy as hell

Well, that fixes it, so thanks a lot!
 

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

Latest Threads

Latest Posts

Latest Profile Posts

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.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,018
Members
137,563
Latest member
MinyakaAeon
Top