This script allows you to use a formula to calculate how much gold is obtained from an enemy.
Script: download here
Place this script below Materials and above Main
Note-tag enemies with
<gold formula: FORMULA>
Where the FORMULA is any valid ruby formula that returns a number.
You can use the following variables in your formula:
gold - the default gold value set in the database for that enemy a - this enemy p - game party t - game troop v - game variables s - game switches
If no gold formula is specified, then the default gold is given.
If you would like to use ruby statements that extend across multiple lines,
you can use the extended note-tag:
<gold formula> if v gold + 200 else gold - 200 end </gold formula>
This may be useful if you have complex logic and you don’t want to write it as