How can I calculate a variable and attack with said variable

Doopis_Doop

Warper
Member
Joined
Feb 2, 2019
Messages
2
Reaction score
0
First Language
English
Primarily Uses
RMMV
I want to use variable calculations to attack.

So say in the battle you click the attack button, well i want this to happen.
This here is what my common event looks like:

Set Variable Attack Random [1-20]
Text: "Your attack is [Attack Variable]"
Set variable Enemy Defense Random [1-20]
Text: "Your opponent's defense is [Enemy Defense Variable]"

Set Variable Attack[Var] - Defense[Var]
Set Variable Attack[Var] + Attack[Stat]

Then do the attack.
I know by putting the commo event in effects it'll go after the attack but I don't want that. I want it before, it's there anyways to do this?
 

Tiamat-86

old jrpg gamer
Veteran
Joined
Dec 5, 2017
Messages
557
Reaction score
232
First Language
english
Primarily Uses
RMMV
text aside, this can be done in damage formula.
(Math.randomInt(20)+1 + a.atk) - (Math.randomInt(20)+1)

without the +1 the randoms would actually be doing 0-19
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,434
Reaction score
7,713
First Language
German
Primarily Uses
RMMV
if you want the text to be displayed during skill use, then this is impossible by default.

you'll need a plugin to add that function, either a custom one or one that provides action sequences where you can program what will happen during skill use
 

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

Latest Threads

Latest Posts

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,047
Messages
1,018,540
Members
137,834
Latest member
EverNoir
Top