VX Ace Conditional Branch For Skill Learned Help Request

Egerunt

Villager
Member
Joined
Jan 5, 2019
Messages
29
Reaction score
0
First Language
English
Primarily Uses
RMVXA
Hello, I'm currently making a conditional branch which is meant to check whether a specific character has learned a certain skill and if they have then the player can choose to perform it.
However, even though the character has the skill, the conditional branch moves to the else option which is only for when they don't have the skill.
I'm wondering if anyone knows why that could be happening as I can't seem to figure it out.
I don't know if this could affect its function, but just in case, I'll mention that the conditional branch is used in a common event that is activated by the use of a different skill mid battle.
If anyone needs extra information then please tell me and I will do whatever I can to provide you with that.
 

gsuk

Veteran
Veteran
Joined
Jun 24, 2013
Messages
135
Reaction score
10
First Language
English
Primarily Uses
RMVXA
Can you post screenshots of your events related to this?
 

Egerunt

Villager
Member
Joined
Jan 5, 2019
Messages
29
Reaction score
0
First Language
English
Primarily Uses
RMVXA
Can you post screenshots of your events related to this?
This is a screenshot of the conditional branch, it really doesn't seem like it shouldn't work, I know that it is checking the right character and I know that the character knows the move, but it just doesn't let you make the choice to attack as it's a skill which puts the opponent to sleep and lets the player use this other skill if they want to do more damage but they can save MP if they choose not to attack on top of this they keep the opponent asleep, as in my game being hit immediately wakes you up.
 

Attachments

Last edited:

gsuk

Veteran
Veteran
Joined
Jun 24, 2013
Messages
135
Reaction score
10
First Language
English
Primarily Uses
RMVXA
Does Strong Attack require anything other than 10MP? Maybe you are forcing him to use something that costs TP too when he has none?
 

Egerunt

Villager
Member
Joined
Jan 5, 2019
Messages
29
Reaction score
0
First Language
English
Primarily Uses
RMVXA
Does Strong Attack require anything other than 10MP? Maybe you are forcing him to use something that costs TP too when he has none?
I've edited my post so you have a picture of the skill that initiates it, and to answer this question, the skill doesn't require anything other than 10 MP so as long as he has 10 or more he's meant to be able to use it as far as I understand how the check is meant to work and I've always made sure that he has enough MP to perform the skill.

I've now added a picture of strong attack so you can see that it doesn't require anything else.
 

Attachments

Last edited:

gsuk

Veteran
Veteran
Joined
Jun 24, 2013
Messages
135
Reaction score
10
First Language
English
Primarily Uses
RMVXA
if he has a sword equipped and 10MP, I don't see why it won't work. I've never used "Force Attack" in any of my projects, so it might be something to do with that – maybe you'd need to set the scope to "One Random Enemy", but I don't know (I'd try that just to see if it makes any difference).
Another thing you can do is put Show Text commands in various parts of the conditional branch in order to see exactly what 'choices' the game actually makes.
Also, your Sleeping Blade skill costs 5MP to use, so Erik would actually need 15MP to use both (you probably know that).
The only other thing I can think of is that your conditional branch checks Erik's MP through a variable check – so maybe check what value that variable actually is (and if it correctly corresponds to his current MP). If you don't have it already, put "Control variable 0002:Erik's MP = Game Data 001:Erik's MP" immediately before the start of the conditional branch to make sure that the variable 0002 has the correct value after you've used the Sleeping Blade skill.
 

Egerunt

Villager
Member
Joined
Jan 5, 2019
Messages
29
Reaction score
0
First Language
English
Primarily Uses
RMVXA
if he has a sword equipped and 10MP, I don't see why it won't work. I've never used "Force Attack" in any of my projects, so it might be something to do with that – maybe you'd need to set the scope to "One Random Enemy", but I don't know (I'd try that just to see if it makes any difference).
Another thing you can do is put Show Text commands in various parts of the conditional branch in order to see exactly what 'choices' the game actually makes.
Also, your Sleeping Blade skill costs 5MP to use, so Erik would actually need 15MP to use both (you probably know that).
The only other thing I can think of is that your conditional branch checks Erik's MP through a variable check – so maybe check what value that variable actually is (and if it correctly corresponds to his current MP). If you don't have it already, put "Control variable 0002:Erik's MP = Game Data 001:Erik's MP" immediately before the start of the conditional branch to make sure that the variable 0002 has the correct value after you've used the Sleeping Blade skill.
I've put in text boxes that pop up and let me know what point in the conditional branch the actions occur and it always seems to fail at the point when it checks if he knows the skill. As it for some reason doesn't think he has the skill, but I have the skill added on his actor, so it wouldn't even have any problems with being in the wrong class or anything like that.
 

gsuk

Veteran
Veteran
Joined
Jun 24, 2013
Messages
135
Reaction score
10
First Language
English
Primarily Uses
RMVXA
And he can definitely use Strong Attack independently of the combo with Sleeping Blade?
Plz post the full Common Event with the text popups etc.
 

Egerunt

Villager
Member
Joined
Jan 5, 2019
Messages
29
Reaction score
0
First Language
English
Primarily Uses
RMVXA
And he can definitely use Strong Attack independently of the combo with Sleeping Blade?
Plz post the full Common Event with the text popups etc.
I've tried to make it simple, and it is just a short conditional branch, yet he still can't perform the skill because it pops up that he doesn't know it even though I can use it separately as it is in a skill type that he has and it appears there in battle allowing me to use it independently.
 

Attachments

gsuk

Veteran
Veteran
Joined
Jun 24, 2013
Messages
135
Reaction score
10
First Language
English
Primarily Uses
RMVXA
So it says "Erik doesn't know the skill"?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,398
Reaction score
7,222
First Language
German
Primarily Uses
RMMV
What you're missing is that "has learned the skill" and "can use the skill" are two different things.

If a skill is added through a trait (for example by equipping something that has the skill added), then the actor can use it without having learned it. Especially as that knowledge can be removed by unequipping that item.

A skill only counts as "learned" if it is either learned by event command or by the skill list of the class.

So how did your actor get the skill?
 

gsuk

Veteran
Veteran
Joined
Jun 24, 2013
Messages
135
Reaction score
10
First Language
English
Primarily Uses
RMVXA
I just made a new project and put exactly what you have into it and it works just fine...
1580915392221.png
1580915413484.png
1580915435080.png
1580915473113.png
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,398
Reaction score
7,222
First Language
German
Primarily Uses
RMMV
@Egerunt @gsuk
please read what I posted above at the same time as gsuk wrote the answer, that will explain what happened.
 

Egerunt

Villager
Member
Joined
Jan 5, 2019
Messages
29
Reaction score
0
First Language
English
Primarily Uses
RMVXA
What you're missing is that "has learned the skill" and "can use the skill" are two different things.

If a skill is added through a trait (for example by equipping something that has the skill added), then the actor can use it without having learned it. Especially as that knowledge can be removed by unequipping that item.

A skill only counts as "learned" if it is either learned by event command or by the skill list of the class.

So how did your actor get the skill?
I mentioned in an earlier post, but I put it on the actor himself, so that he wouldn't need a specific class to have the skill nor a specific level while I was testing if the skill's event would work.
 

Egerunt

Villager
Member
Joined
Jan 5, 2019
Messages
29
Reaction score
0
First Language
English
Primarily Uses
RMVXA
@Andar @gsuk
Thank you for your help. I don't know why it doesn't count the skill as being learned as that is what it says in the conditional branches option when the skill has been added to the actor directly, but when I put it in his class at level one the conditional branch worked as intended.
 

gsuk

Veteran
Veteran
Joined
Jun 24, 2013
Messages
135
Reaction score
10
First Language
English
Primarily Uses
RMVXA
Cool. Glad it's working now! And I learned how to use the Force Action command. :)
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Stream will be live shortly with some Darkest Dungeon! Feel free to drop by!
I made a battle results screen for my minigame.. any feedback? :)
Things I thought would never happen but just did: I needed to use my snow shovel. In August. In the Northern Hemisphere.
So I finished Cupcake, now I need to figure out my next project!
Do I pick up one of my incomplete games?
Do I start something entirely new???
The possibilities are endless!
Am I the only one who keeps thinking TPBS means "Turn Press Battle System" and not "Time Progress Battle System?"

Forum statistics

Threads
100,682
Messages
978,373
Members
132,303
Latest member
justindizon
Top