There are now two new globals, one of which is very special, and one which is its mirror, so both are capitalized in direct contravention with the way all other globals are capitalized, to mark them as being special. These are 'Stats' and 'Upgrades'. The former is a read-only tree of values that tell you the original stats of game object types. The latter is a write-able array of similar trees, that tell you the current stats of these types, for each player.
'Stats' contains a lot of info that 'Upgrades' does not. This info cannot (yet) be changed during the game.
'Upgrades' and 'Stats' both contain real values, that is, the actual values used in the game. It used to be the case that upgrades were stored as percentage modifications. This is, however, still the case in the research.ini file.
for the "Cyborg Superdense Thermal Armor" tech. This string is parsed in rules.js to implement a 45% increase in thermal armour protection for cyborgs only. The 'results' value is a comma-delimited string list, but other than that may contain any information that rules.js needs. The game engine itself does not parse the contents of the 'results' strings.results = "Cyborgs:Thermal:45"
One important thing to note is that you can now set different upgrades for each component and building type. This allows a much more fine grained control of upgrades than previously possible. Also a number of new values can be modified during the game for weapons than previously, which may be interesting for game balancing.
You can now set initial 'productionPoints', 'powerPoints', 'repairPoints', 'researchPoints' and 'rearmPoints' for buildings in structure.ini directly.
I had to simplify the handling of structure modules somewhat for now. Adding better handling of modules is on my TODO list. Currently, modules do not add any hitpoints to their basic structure. Adding a module to a structure multiplies the effect of the basic structure, except for power, in which case it adds 50%. This is the same effect as before, but is now hard-coded.
It is a huge amount of changes that went into this, and I need help debugging it. The easiest way to do that is to play the game while having 'jsdebug' up, and watch that the values change as you'd expect when you research things.