Math is essential. Perhaps something like $calc(%variable1% - %variable2% + %variable3% * (%variable4% + %variable5%)), also %INT(), $round(), etc.
I also suggest having a variable for every stat of the ship that is currently available in the DEL menu. And in addition, add local variables...