Zeireth

Veteran
Veteran
Joined
Nov 2, 2013
Messages
81
Reaction score
64
First Language
English
Primarily Uses
N/A
I was copying and pasting from the damage formulas page lol
I think I get how it's all supposed to work, I just don't know what order to put it all in. Is this right?
a.equips()[1].params[3] a.addState(2); a.atk * 4 - b.def * 2
Your formula is incorrect. The result will be zero because of an error.

Use this instead a.addState(2); a.equips()[1].params[3] + a.atk * 4 - b.def * 2
 

itachi11115

Veteran
Veteran
Joined
Jun 12, 2018
Messages
60
Reaction score
23
First Language
English
Primarily Uses
RMMV
Your formula is incorrect. The result will be zero because of an error.

Use this instead a.addState(2); a.equips()[1].params[3] + a.atk * 4 - b.def * 2
Ahh, so close lol thank you. Is there a particular order of operations that the system prefers? Just in case I need to try and make something like this again
 

Zeireth

Veteran
Veteran
Joined
Nov 2, 2013
Messages
81
Reaction score
64
First Language
English
Primarily Uses
N/A
Ahh, so close lol thank you. Is there a particular order of operations that the system prefers? Just in case I need to try and make something like this again
From what I understand you want your damage number to be at the end. Technically you can keep on using ; before damage like this a.addState(2); a.addState(4); a.equips()[1].params[3] + a.atk * 4 - b.def * 2

What that formula will do is apply guard state to user, then apply poison state to user, then do math to get a value for damage. There is a lot of fun things you can do once you learn more.

Have fun with damage formulas, experiment, but always remember to make backup copies so in case you actually want it to go back to original, then you will have it.

I would highly suggest searching Javascript Math in your search engine. Pretty much all math functions and methods work in the damage formula for skills and items. I love mathematics lol

Also in your game folder called js, you will notice rpg_object.js

It has cool information, however I suggest you make a backup copy if you ever plan to mess around with it, or better yet you could write a script to overwrite functions or do whatever you like.

For instance when I read through rpg_object.js I discovered that I can put a.die() to make the user dead in a damage formula. die() is a function, same is true as addState(). You will find addState() function in rpg_object.js under Game_Battler function. Game_BattlerBase function is also a good one to look through. It is a superclass of Game_Battler.

I am available to chat with whenever you need some help. Send me a dm.

I assume that this thread can now be closed now. I believe your original request has been fullfilled.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
5,087
Reaction score
3,244
First Language
English
Primarily Uses
RMMV
Is there a particular order of operations that the system prefers?
How do you mean? If you mean the order of commands, then as Zeireth and the Damage Formula 101 thread said, the last command must always be a number because that's what the game uses for the actual damage.

If you mean order of operations mathematically, it's the exact same as you learned in math class.
I assume that this thread can now be closed now. I believe your original request has been fullfilled.
I know that you're just being very helpful in this thread; but for future etiquette, only the original author of a thread can request it to be closed.
 

itachi11115

Veteran
Veteran
Joined
Jun 12, 2018
Messages
60
Reaction score
23
First Language
English
Primarily Uses
RMMV
From what I understand you want your damage number to be at the end. Technically you can keep on using ; before damage like this a.addState(2); a.addState(4); a.equips()[1].params[3] + a.atk * 4 - b.def * 2

What that formula will do is apply guard state to user, then apply poison state to user, then do math to get a value for damage. There is a lot of fun things you can do once you learn more.

Have fun with damage formulas, experiment, but always remember to make backup copies so in case you actually want it to go back to original, then you will have it.

I would highly suggest searching Javascript Math in your search engine. Pretty much all math functions and methods work in the damage formula for skills and items. I love mathematics lol

Also in your game folder called js, you will notice rpg_object.js

It has cool information, however I suggest you make a backup copy if you ever plan to mess around with it, or better yet you could write a script to overwrite functions or do whatever you like.

For instance when I read through rpg_object.js I discovered that I can put a.die() to make the user dead in a damage formula. die() is a function, same is true as addState(). You will find addState() function in rpg_object.js under Game_Battler function. Game_BattlerBase function is also a good one to look through. It is a superclass of Game_Battler.

I am available to chat with whenever you need some help. Send me a dm.

I assume that this thread can now be closed now. I believe your original request has been fullfilled.

How do you mean? If you mean the order of commands, then as Zeireth and the Damage Formula 101 thread said, the last command must always be a number because that's what the game uses for the actual damage.

If you mean order of operations mathematically, it's the exact same as you learned in math class.

I know that you're just being very helpful in this thread; but for future etiquette, only the original author of a thread can request it to be closed.
You have both been incredibly helpful, looks like the skill is working as expected now. Thank you again!
 

Latest Threads

Latest Posts

Latest Profile Posts

ScreenShot_8_19_2022_2_3_18.png
FINALLY got the mood system in the game during battle. Since the game is called Panic Attack, I figured you should have certain moods present including Panic. so the main 3 or Hype, Depressed, and Anxious. Panic is only when stunned.
Red_V2.png
Red's design is finally finished (his hair is blue on purpose, it's a joke!). Out of all of the compulsory party members, he spends the most time with you. Just like the character he's based on, he presents himself as a simple person who only wants to help others, but there's obviously more to him than meets the eye.
I drew the cover for my new book. I don 't like to entrust this work to someone else )

WM8Xp2VYvg8.jpg
So if I wanted to share little video clips of my game on here... without using youtube... what would be the most ideal way to do that? FWIW, I use Mega a lot to upload videos and just share the links with my friends.

Forum statistics

Threads
124,688
Messages
1,165,265
Members
163,506
Latest member
johnb6189
Top