This script adds a new convert code to your project called “eval”. You can use this to evaluate arbitrary formulas inside your show text commands.
Script: download here
Place this script below Materials and above Main
In your show text command, use the convert code
The formula will be evaluated when the message is being processed and the
appropriate value will be displayed.
The following formula variables are available
p - game party t - game troop s - game switches v - game variables
Note that the text is not automatically re-positioned to fill in the gaps.
But what if by chance I do not want to use the leader, what options do I have?
It is just an example. It supports any formula you can come up with.
This is a very convenient and exceptionally easy way to add any variable data to in game text. I am now using it to refer to database object names, and things likely to change in the future, without needing to hunt down every instance of old use.
Also, there is a typo in the example eval. There is a ‘}’ instead of a ‘]’ at the end.
Must have been holding the shift key. It’s fixed now.