The entirety of my main.js - having other stuff defines soft symbols Code: console.log(Object.keys(this)) Object.keys(this).forEach(function(sym) { console.log(sym, ':') console.log(Object.keys(this[sym])) }) server.exit() Logging prefix removed:
This didn't turn up JS builtins like JSON (which is there and sometimes turns up things that Object.keys doesn't), but I imagine that the engine is mostly to spec. The interface is very limited - for instance sim.units only includes the two commanders that the script spawned itself.
Technically I modified the server-script files. I haven't tested if shadowing technically works for the script files, but all the code is loaded before shadowing happens, so it's kind of moot. You might be able to make a modified server script that deferred loading some files, but keep in mind you're letting anyone load code into your server ;^)
So.. for instance calling something like sim.speed might allow us to modify the sim speed (perhaps simulate time dilation effects?) on the fly? I'm not the most advanced of coders.. perhaps a simple usage example of some of these symbols? Also.. doesn't really seem to be much in the way of interacting with units and such... I suppose sim.units might output a big array/table/something? of all the current units in game? If that is so, i'm wondering where we might find info about what sort of functions we can use to actually touch the units.. modify HP, change control etc.. Or maybe I am completely wrong about what I am seeing here.
Two new methods on server object as of 74525, somewhat unsurprisingly markLadderGameComplete, markLadderGameAbandoned