Sorry if this has been asked somewhere else, but I looked around and couldn't find it. I'm trying to create a gambler class and was wondering if there is there any way to create a skill that has a chance to either damage the user, or damage the target?
Move that can either damage the user or the enemy?
RPG Maker VXAce Supportbest bet would be to create 3 skills 1 targeting 1 random enemy 1 targeting 1 random ally and 1 to cast a common event. for the common event make it control a variable of your choice any number will do but rename it, you want to use random option set it to 0 and 1 add 2 conditions for your variable landing on the numbers and under them add force action from the 3rd tab of commands to each one choose to force your protagonist to use one of the 2 skills for random attack that you made, use the under the 2nd conditional
then in the skill you made to trigger the common event, make it so that it targets n heals caster for 1 hp just to make sure theres no annoying messages about effectiveness, in the effects section of the skill (the list on the right) go to the past page and select the common event. should be good to go
then in the skill you made to trigger the common event, make it so that it targets n heals caster for 1 hp just to make sure theres no annoying messages about effectiveness, in the effects section of the skill (the list on the right) go to the past page and select the common event. should be good to go
Hello! This is when you will make great use of the fact that Skills can be linked to a Common Event.
So the trick here is that you're really going to make 3 skills. One as the one "displayed" for the actor to use during battle, and then other 2 skills will be linked to this 1 skill via a common event using a random variable.
For what you want in particular, 1st create a skill that will be the one the actor can "use" during combat. (I will call it Skill 1).
Now with this skill, go to the traits, and go to "Other" and link it to a Common Event.
Next, create 2 more skills. (Skill 2 and Skill 3).
Make Skill 2 to where Skill 2 is some attack you want, with the Scope as 1 Random Enemy.
Now make Skill 3 to where it is some attack you want, with the Scope as 1 Random Ally.
Now go to the same Common Event you just linked for Skill 1, and within this Common Event, use "Control Variable".
( You will be making a variable that will either force-use Skill2 or Skill3. )
To do this, when you're in the Control Variable tab, make it to where this Variable is Random (bottom of page), and choose a range from 0-1.
What will happen is, the common event will run, and decide a random value for your variable. Since you picked the range 0-1, it will either pick 0 or 1.
With that in mind, now create 2 Conditional Branches with that same Variable.
Set it to where...
If Variable = 0, Force Action Skill 2.
If Variable = 1, Force Action Skill 3.
(Force Action command can be found under "Battle" on page 3 of event commands)
And that should work!
Essentially, what happens is you have your actor select Skill 1, which is really just Skill2/Skill3 (coin toss).
If you want to have more fun, you can use this technique for making more variance happen with more skills. Just be sure to account for them using the variables, and the scope of each possible skill that could happen.
Hope that helped!
So the trick here is that you're really going to make 3 skills. One as the one "displayed" for the actor to use during battle, and then other 2 skills will be linked to this 1 skill via a common event using a random variable.
For what you want in particular, 1st create a skill that will be the one the actor can "use" during combat. (I will call it Skill 1).
Now with this skill, go to the traits, and go to "Other" and link it to a Common Event.
Next, create 2 more skills. (Skill 2 and Skill 3).
Make Skill 2 to where Skill 2 is some attack you want, with the Scope as 1 Random Enemy.
Now make Skill 3 to where it is some attack you want, with the Scope as 1 Random Ally.
Now go to the same Common Event you just linked for Skill 1, and within this Common Event, use "Control Variable".
( You will be making a variable that will either force-use Skill2 or Skill3. )
To do this, when you're in the Control Variable tab, make it to where this Variable is Random (bottom of page), and choose a range from 0-1.
What will happen is, the common event will run, and decide a random value for your variable. Since you picked the range 0-1, it will either pick 0 or 1.
With that in mind, now create 2 Conditional Branches with that same Variable.
Set it to where...
If Variable = 0, Force Action Skill 2.
If Variable = 1, Force Action Skill 3.
(Force Action command can be found under "Battle" on page 3 of event commands)
And that should work!
Essentially, what happens is you have your actor select Skill 1, which is really just Skill2/Skill3 (coin toss).
If you want to have more fun, you can use this technique for making more variance happen with more skills. Just be sure to account for them using the variables, and the scope of each possible skill that could happen.
Hope that helped!
Much more clean than the chicken scratch I typed for them, Thank you!
Thanks. I can't believe I didn't think of that!
Aww now don't say that, it's often not very obvious what has to be done sometimes. I don't think a single person has thoroughly read and remembered every single thing that's possible in RPG Maker's engine.
That just comes with experiencing game making yourself, so don't ever hesitate to ask questions here!
Original thread: https://forums.rpgmakerweb.com/threads/move-that-can-either-damage-the-user-or-the-enemy.153273/