...
Excerpt |
---|
Warzone2100 contains a scripting language for implementing AIs, campaigns and some of the game rules... |
...
It uses JavaScript, so you should become familiar with this language before proceeding with this document. A number of very good guides to JavaScript exist on the Internet – Mozilla Developer Network is arguably the best. Note, however, that most online Javascript guides are aimed at web development - Warzone is most certainly not a web browser, so there is no DOM, no HTML, etc.
The ECMA-262 implementation (Javascript to you and me) used in Warzone is based on Spidermonkey, the JS engine used in Apple's Safari web browser. For more information on it's native features, see Nokia's QtScript documentation.
Regardless of your knowledge of the game or programming experience, I highly recommend reading Common Mistakes as you will almost certainly fall prey to one of these.
Game rules and Scavenger AI
The following hard-coded files exist for game rules that use this API:
- multiplay/skirmish/rules.js – Default game rules including base setup, starting research, winning and losing.
- multiplay/script/scavfact.js – If scavengers are active, this script controls their actions.
...
...
...
...
...
...
Challenge scripts
...
...
...
...
...
...
...