Plugin that allows us to have Formulas in messages

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.
That is because this feature is not needed.
Screenshot_270.png
That is because this feature is not needed.
View attachment 148322

That's the formula box, not the message or description box. Please read my thread again carefully.
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 it only recently when I browsed the forum and found this post:
https://forums.rpgmakerweb.com/index.php?threads/formulas-in-skill-descriptions.86488/
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?
Oh, my bad.
Here. https://raw.githubusercontent.com/Poryg1/RPG-maker-MV-small-plugins/master/POR_descFormulas.js

EDIT: Using battler.pha or a.pha will not work outside of battle as battler and a are defined only in battle, in fact they would be defined only in the current action. It will be necessary to track the current actor's phase.
if ($gameActors.actor(1)._actionPhase == 'undecided')

I can't get that plugin to work :/

tried $[v(469) + 5] but it seems like it's not working🙁
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).

Original thread: https://forums.rpgmakerweb.com/threads/plugin-that-allows-us-to-have-formulas-in-messages.123080/