...
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.
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.
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.
It's worth looking at both these files (click links above) as they contain lots of useful code which you can learn from.
Also, you can create mods to overwrite these files if desired. need to link to mods page on wz2100.net
...
. |
...
...
...
...
...
Challenge scripts
...
...
...
...
...
...