Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
Excerpt

How to initialise player technologies, buildings, base type effects, determine victory (win/lose) conditions and send situation reports to players...

 

Player Initialisation

See Player Initialisation Rules

Design Mode & Mini Map

Under normal game rules a HQ is required to enable the Design Mode (droid design tool) and mini map.

If the HQ gets destroyed, both those features must be disabled. If a HQ gets build, they are re-enabled.

The code to do this is usually stored in a function so that it can be called from three key events:

Victory Conditions

See Victory Conditions.

 

other

Child pages (Children Display)
alltrue
depthall
excerpttrue

See also

Javascript APIJavascript Coding – game rules are implemented using JavaScript

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:

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:

Div
classbox suggest

The game rules scripting lives in rules.js.

Check out Enhanced SitRep Mod for an example of a heavily customised rules.js. 

Div
classbox

Contents

Assimilate:

Table of Contents
excludeContents

Div
classbox

Related documentation: