RPG Maker VX ACE: Encountering a state glitch with a common event attached to a skill

Joined
Jan 23, 2018
Messages
2
Reaction score
0
First Language
English
Primarily Uses
RMVXA
Hey.

Software: RPG Maker VX ACE
Scripts: Yanfly core, battle, life bars

Hope you are doing well. I came across a rather odd occurrence with a specific skill I made. I will break down the skill first and then explain what went wrong:

This skill is suppose to attack two random enemies for A.Atk * 3 - B.Def * 2 and in addition to attacking the enemies, it also gives the Actor a state buff that grants +30% EVA for 4 Turns.

State name: Vanishing
Features: +30% EVA
goes away at end of battle
lasts 4 ~ 4
Action End

When creating the skill in the database, under features, the software wouldn't allow me to add this state to the Actor using the Skill (it only lets you add the state to the enemies you hit)

So as a work around, I created a Common Event that that automatically gives this particular actor that has this skill, a 100% chance to add the vanishing state and I attached the "call Common Event" to the Vanishing Slice Skill features. I tested it in the battle tester and also in the play test and it seemed to work as intended 90% of the time.

But this one time in the Playtest, the Vanishing state was still on this actor even after the battle ended (or at least the icon was)

It hasn't happened again yet, so i'm thinking maybe it was just an odd glitch with something, but would like to verify if there is something wrong with how I did it.

In addition, out of curiosity, is there an alternate way to have an attack skill that targets enemies also give the skill user a positive state?

I thank you in advanced for reading and responding. Much appreciated!
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,434
Reaction score
7,713
First Language
German
Primarily Uses
RMMV
1) your way of doing it is rather roundabout and can cause timing issues, for example the common event attached to a skill is usually called at the end of turn, not on the skill action itself. and if for example that happened in the last battleturn after all enemies are already killed...

2) yes, there is a much better way to do this - check the Ace areas for a topic "how to use the damage formula" and read there. This topic is also linked in my starting point tutorial because it shows you how to use ruby code inside the damage formula for a lot of effects, including adding user effects to a skill targeted on an enemy.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,713
First Language
English
Primarily Uses
RMVXA
For adding a state to the user while dealing damage to the enemy, you can use the damage formula.

a.add_state(x); a.atk * 4 - b.def * 2

where x is the id of the state you want to give to the user. The actual damage will be whatever you put after the semi-colon.
 
Joined
Jan 23, 2018
Messages
2
Reaction score
0
First Language
English
Primarily Uses
RMVXA
1) your way of doing it is rather roundabout and can cause timing issues, for example the common event attached to a skill is usually called at the end of turn, not on the skill action itself. and if for example that happened in the last battleturn after all enemies are already killed...

2) yes, there is a much better way to do this - check the Ace areas for a topic "how to use the damage formula" and read there. This topic is also linked in my starting point tutorial because it shows you how to use ruby code inside the damage formula for a lot of effects, including adding user effects to a skill targeted on an enemy.
Wow. What an informative thread. Definitely book marking it to read through on my down-time. Well done. Thank you, sir!


For adding a state to the user while dealing damage to the enemy, you can use the damage formula.

a.add_state(x); a.atk * 4 - b.def * 2

where x is the id of the state you want to give to the user. The actual damage will be whatever you put after the semi-colon.
Excellent. That is a lot more smoother than I had. Thanks! Works like a charm.
 

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

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,050
Messages
1,018,548
Members
137,835
Latest member
yetisteven
Top