If it's a lot of info, maybe have an upgrades.js that's included by rules.js?
If rules.js 'me' is now -1, how does rules.js know what human player it's related to? I assume we will have to focus on 'selectedPlayer' (the player the human is playing as on the local network peer) in rules.js?
As most current mods that alter rules.js assume 'me' will be same as 'selectedPlayer' it would be useful to mention in 3.2 release notes (and even comment at top of rules.js) the changed value of 'me'.
Percentages are good for modifiers, but for base values it would be better to use the value rather than a percentage.
I notice the capitalised first letters in your example code above - is the JS API moving more towards OOP or is it just for this specific aspect of the API?
I assume we will be able to now get a list of bodies, etc., simply by iterating the nested object? for (i in Upgrades[5].Body) .... -- That will be most useful
Do you have any docs explaining the structure of the nested object yet? Also, in your example code above I notice that you use 'me' - is there a -1 index in the Upgrades array? If so, is there a duplicate of the object it contains in Upgrades[selectedPlayer]?
Will this system be replacing the normal effects of research? For example, will rules.js now be listening to eventResearched() and depending on what tech it sees applying the relevant upgrade via JS (rather than WZ engine doing that)? How will the rules.js know what upgrade to apply -- will it be able to query research.ini?
Specifically, I imagine modders would prefer to keep all the effects listed in research.ini (regardless of whether they get applied via JS or in the WZ engine) rather than having to split some stuff out to rules.js.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO