Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Excerpt |
---|
How to initialise player technologies, buildings, base type effects, determine victory (win/lose) conditions and send situation reports to players... |
rules.js
Each human player in a game will have an associated rules.js script assigned to them. It runs for the duration of the game.
The rules.js script is responsible for applying and monitoring game rules, and providing in-game situation reporting (SitRep) to the human player.
Game Rules
There are three key parts to the game rules as follows:
- Player Initialisation – set up technologies, components, base type, starting power, etc.
- Mini Map and Design Mode – enable or disable based on presence of HQ (Command Centre)
- Victory Conditions – check if the game is won or lost
You should make yourself familiar with all of them, even if you have no intention of modding them.
Situation Reporting (SitRep)
Realtime (or near-realtime) reporting of important events taking place in the game.
For detailed information, see:
- Situation Reporting (SitRep) – in-game situation reporting
Div | ||
---|---|---|
| ||
The game rules scripting lives in rules.js. |
Div | ||||
---|---|---|---|---|
| ||||
ContentsAssimilate:
|
Div | ||
---|---|---|
| ||
Developer LinksRelated documentation:
|