Calculate attack in battle and use that calculation to attack

Doopis_Doop

Warper
Member
Joined
Feb 2, 2019
Messages
2
Reaction score
0
First Language
English
Primarily Uses
RMMV
I Want to make the combat random.
What I did was make a random common event that basically says:

Set User Attack Variable random (1-20)
Show text: "You got \V[attack variable]."
Set Enemy Defense Variable random (1-20)
Show text: "Your opponent got \v[enemy defense variable]."

Attack Variable - Enemy Defense Variable
Attack Variable + Attack [Stat]

I want to do all that before the attack, which is the normal attack skill. It's it at all possible?

I know I can set the formula to be the variable and I know how to do that, but I want to set the variable before the attack.
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
8,137
Reaction score
5,376
First Language
Dutch
Primarily Uses
RMXP

I've moved this thread to MV Support. Please be sure to post your threads in the correct forum next time. Thank you.

 

Rugman

Veteran
Veteran
Joined
Jun 11, 2020
Messages
182
Reaction score
47
First Language
English
Primarily Uses
RMMV
Put that event inside of a troop event. You can set it to run once at the start of battle or once before every turn. Use Yanfly’s base troop events plugin to copy it to all troops.
 

Latest Threads

Latest Posts

Latest Profile Posts

Just a reminder. One expectation of being a new member is that you read the rules. You can find them here: https://forums.rpgmakerweb.com/index.php?threads/forum-rules.90/

Looking to identify this particular Keygen song used in a YTP
I'm currently in the mood to write horror.
Someone do something scary. (orange)
I have an idea, I am making low polygon 3D resources for a package in itch. but it occurred to me that I could export these as images and make MV / MZ compatible tilesets. What do you think of this?
I hate seeing threads where less-experienced user's ask for an opinion of their project, and the thread is full of negative feedback by others who are clearly not the target audience. I feel bad for the OP, and I hope they understand that no game can appeal to everyone. :frown:

Forum statistics

Threads
109,091
Messages
1,041,944
Members
141,577
Latest member
dreaptix
Top