Trying to make an attack skill that buffs the user.

Dicherello

Warper
Member
Joined
Jul 16, 2021
Messages
3
Reaction score
0
First Language
English
Primarily Uses
RMVXA
I want to apologize in advance if this has already been asked before or if I'm posting in the wrong forum. My research didn't turn up anything (at least not for VX Ace) and I'm new to this site. Please feel free to move this thread to the appropriate place or point me to an already existing answer.

That out of the way, here is my problem:

I want to make a skill that damages an enemy and simultaneously applies a buff to the user. As I understand it, using the State function of the skill menu can only apply states to the target and not the user. I know that a Common Event could probably be used to do this, but it would be really complex (i.e. beyond my own skillset) to do in my particular game, since I use a system that allows actors to change classes at will, which is to say that I cannot know ahead of time which actor is going to use the skill and therefore need to receive the buff, not to mention multiple actors could be the same class at the same time.

If anyone can help with this I would be incredibly grateful. Thank you.
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
3,220
Reaction score
728
First Language
English
Primarily Uses
RMVXA
Look into how to apply damage formulas.
You could do it with your damage formula like this
a.add_state(2); a.atk * 4 - b.def * 2
 

Dicherello

Warper
Member
Joined
Jul 16, 2021
Messages
3
Reaction score
0
First Language
English
Primarily Uses
RMVXA
Thank you so much for the reply. It worked.

The crazy thing is, I had found a topic with a similar suggestion before, but they had it written "a.addState(x); a.atk * 4 - b.def * 2", which didn't work, obviously. But this was on a forum about MV and I simply came to the conclusion that this function didn't exist in VX Ace. Guess I just needed to find the right syntax.

Anyway, thanks again!
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
3,747
Reaction score
2,847
First Language
English
Primarily Uses
RMMZ
One thing to be aware of is that this method causes issues if you use the "auto battle" command at all, because when the battler is testing out what actions they could potentially take they evaluate the damage formula of each one, meaning they'd end up buffed even if they don't use the skill.

@Dicherello, you'll find that almost all functions listed in things for MV are there in VX Ace, but Ruby syntax conventions use underscores to separate the words in method names, while Javascript uses camelCase.
 

Dicherello

Warper
Member
Joined
Jul 16, 2021
Messages
3
Reaction score
0
First Language
English
Primarily Uses
RMVXA
Thank you @Trihan, both are very good to know. I'll be sure to keep that in mind.
 

Chuck4688

Veteran
Veteran
Joined
Nov 16, 2019
Messages
30
Reaction score
7
First Language
English
Primarily Uses
RMVXA
Look into how to apply damage formulas.
You could do it with your damage formula like this
a.add_state(2); a.atk * 4 - b.def * 2
Hi. I chanced upon this thread and I was thinking of using this in my game on VX Ace. Thanks for this.
 

Latest Threads

Latest Profile Posts

I might not participate in the Boss Battle contest after all... I have more important things to do, like Wishful Wanda. And of course the Dark Deception spinoff I plan to pitch, Demon Slayer.
Changed my avatar, goodbye Alan Sugar, hello George Carlin (one of my favorite human beings ever)
If you still don't subscribe our Polish channel please consider it :)
1.png
Who wants to see my review of the worst star wars movie? This movie has all the excitement of being on Jury Duty of the most boring case ever about trade negotiations.
A lot to learn to make a game. Can I handle it?

Forum statistics

Threads
115,171
Messages
1,087,803
Members
149,723
Latest member
krinalle
Top