I tried using a formula that uses a variable in it and it doesn't work (the stats don't change), in addition if I put the formula directly into an item damage formula to recover the default HP stat, and then use the item in game, it turns the current HP value into NaN. However, if I remove the script, the formula works just fine to recover HP. Here's my formula, for reference: v === 5 ? 17 : 15; The idea is that the character has a preference for certain foods (sweet, spicy, etc) and foods/drinks they like are more filling. Variable 3 tracks their preference, 5 means they like bland foods, so if they like bland foods, the item is +17, but if they don't, it's +15 instead.