Plugin that allows us to have Formulas in messages

Morpheus

Jack-of-Trades
Veteran
Joined
Mar 14, 2012
Messages
231
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,639
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
331
Reaction score
481
First Language
German
Primarily Uses
RMMV
Last edited:

Morpheus

Jack-of-Trades
Veteran
Joined
Mar 14, 2012
Messages
231
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,639
First Language
Czech
Primarily Uses
RMMV
Last edited:

JamesRyan

Game Designer
Veteran
Joined
Sep 13, 2014
Messages
696
Reaction score
215
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).
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,018
Members
137,563
Latest member
MinyakaAeon
Top