Well, i just tried to use this and it works! But there was one bell that rings.
Right now there is quite a few stuff unhardcoded into rules.js, which is a good thing. For example, we have GUI button code, tileset-specific texture code, upgrades code, oil drum spawning code, command center code, victory conditions code.
Now suppose i want to make a custom rules script. Then i have a choice of
- either running my script as "extra", alongside existing rules.js, and then i cannot override existing functions, eg. change victory conditions so that game didn't end when all enemy units are destroyed,
- or running my script as "rules", replacing existing rules.js, and then my script would have to re-implement all the things, eg. i wanted to only change victory conditions, but i have to carry the whole GUI and textures and upgrades code along with my mod and update it whenever it changes in the base game.
Code: Select all
include('multiplay/skirmish/gui.js");
include('multiplay/skirmish/upgrades.js");
include('multiplay/skirmish/victory.js");
Code: Select all
include('multiplay/skirmish/gui.js');
include('multiplay/skirmish/upgrades.js');
// implement my own victory conditions here