Syntax in Formulas |
I'm going through the data files looking at all the stuff that's moddable, and one thing immediately jumps out at me, the formulas for the various component abilities are all very oddly written.
Here's an example from the Energy Refractor:
-1 - (([%Level%] - 1) * 1)
If I was writing this formula, it would be:
0 - [%Level%]
So is there some reason why these formulas are syntaxed in such a way? Not only is this a thousand times clearer for someone to read, it's also a lot less calculations done. Not all the formulas are this bad, but most of them could seriously use some cleaning up.
From the formula's general patern, I would say they were all generated by some sort of program with no concept of efficiency. In which case, should I even bother modding these now? Or will that be addressed in the future as well?




Could use some optimization
It's mostly due to cutting and pasting I would imagine.
In some cases where you're amount per level increase is different from the base amount you want to use a variant of the top formula - which is usually the case with most components.
-----
Space Empires Depot | Space Food Empires!