Displaying a sum with a variable in text.

Hello,

So, I know how to display a variable in text, but I would like to also display the result of a quick sum. For example:

Congratulations. You have destroyed \V[181] Crystals! 

 

This works fine. I now want to display something like:

 

[8-\V[181]] to go!

 

As in, to show the total of 8 minus the value of variable 181. What's the easiest way to do this? Many thanks,
Set another variable to the total value you want (in this case, 8), then before the text you can subtract the "crystals" variable from the total and display that instead.
Well, I think that's easy. Create a variable for Crystals To Be Destroyed (For example, 182) and set it to the maximum value of Crystals to be destroyed (8, if that's the case). Everytime one is destroyed, Increase the Variable 181 (for Destroyed Crystals) by 1 and Decrease the Variable 182 (for Crystals To Be Destroyed) by 1 as well. In the text box, it'd be like:

"Congratulations! You've destroyed \V[181] Crystals!

\V[182] to go!"
Thank you both. I'm embarrassed I didn't think of that, though I guess it would be preferable to have a way to display a sum like that without needing to store another variable. I'm going to mark this as closed.
No problem, it's alright.

Also, did you set your own answer as the best one?
Not intentionally. Oh, I meant to mark the thread as solved, but I guess it highlighted that post haha. Fixed.
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/displaying-a-sum-with-a-variable-in-text.45427/