Morpheus

Jack-of-Trades
Veteran
Joined
Mar 14, 2012
Messages
237
Reaction score
85
First Language
english
Primarily Uses
N/A
It'd be SO, SO useful to have the ability to have dynamic formulas in messages.

For example, you have the item Potion that heals '\v[1] + 5' HP.
or a Mana Potion that restores 'a.mat * 2' MP

I can't believe nobody has made a 'formula in messages' or 'formula in descriptions' plugin yet.
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,646
First Language
Czech
Primarily Uses
RMMV
That is because this feature is not needed.
Screenshot_270.png
 

ScorchedGround

Blizzards most disappointed fan
Veteran
Joined
Apr 12, 2020
Messages
416
Reaction score
621
First Language
German
Primarily Uses
RMMV
Last edited:

Morpheus

Jack-of-Trades
Veteran
Joined
Mar 14, 2012
Messages
237
Reaction score
85
First Language
english
Primarily Uses
N/A
Check out WAY_EvalText.
I believe that is exactly what you are looking for.

You find the plugin file here: https://github.com/waynee95/mv-plugins/blob/master/dist/WAY_EvalText.js
You will also need WAY_Core: https://github.com/waynee95/mv-plugins/blob/master/dist/WAY_Core.js

I found out about only recently when I browsed the forum and found this post:
https://forums.rpgmakerweb.com/index.php?threads/formulas-in-skill-descriptions.86488/

Well, that certainly allows me to use formulas in messages and texts! Much appreciated!
One question if you know it; How would one use SP Parameters in a formula in the item description?

battler.pha nor a.pha work :/

I tried variables using '${v[469] + 5}' but instead of the number, it gave me 'NaN'. Any idea?
 
Last edited:

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,646
First Language
Czech
Primarily Uses
RMMV
Last edited:

JamesRyan

Game Designer
Veteran
Joined
Sep 13, 2014
Messages
698
Reaction score
218
First Language
Vietnamese
Primarily Uses
RMMV
Use JS language to make the code work, not the way MV handles objects like v[x] or s[y]. Some basic ones for you to use:

- Refer an actor: $gameActors.actor(x) (Where X is your actor ID from database)
If you wanna get the actor 1's ATK, use this: $gameActors.actor(1).atk
You can replace atk with other parameters like def, mat, mdf, agi, luk.

- Get the value of a variable or switch: $gameVariables.value(x), $gameSwitches.value(x) (Where X is your variable/switch ID)

- Set the value of a variable or switch: $gameVariables.setValue(x, y), $gameSwitches.setValue(x,y) (Where x is your variable/switch ID, and y is your new value).
 

Latest Threads

Latest Profile Posts

Is it necroposting if I ask for more info in my own months old thread? All the information in the thread is relevant
JRPG TextBox HTML - Part 2:
So I'm resuming work on the Shadowstar Trilogy. I've decided that it will take place between the end of G4 and the start of G5, and two of the Lost Rulers will be Twilight Sparkle and Sunset Shimmer (who is the moon princess in my AU).
Been working on some sprites, My favorite out of all of them is this guy, his name is Moss:

Forum statistics

Threads
108,958
Messages
1,040,874
Members
141,418
Latest member
Emileewitt
Top