From FreeOrionWiki
Revision as of 21:48, 15 December 2004 by Drek (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Jumping the gun here, since this stuff isn't slated in the roadmap for a long time. (actually, specials might be overdue on the roadmap...) The following has been half the idea of the Effects engine since the beginning--just wanted to get it written out and on the wiki, esp. since the Effects engine as it stands is awfully close to being able to do all of the below already:


Specials are traits attached to planets, systems, empires, and sometimes the galaxy itself. Specials use the same Effects engine as technologies and buildings.

(Future Note: Racial Abilities can be thought of as Specials attached to an empire.)

Specials are seeded into the galaxy via Galaxy Generation Events:

Galaxy Generation Events

Galaxy Generation Events are events that occur directly after galaxy generation, before the game begins....then never again. These events use the same Effects engine as technologies and buildings and are meant to as a method of placing specials into the galaxy via determined rules.

For example, a Galaxy Generation Event might place the special “Blackhole Sun” on all planets orbiting blackhole colored stars.

Generally, a Galaxy Generation Event should use the Chance condition to determine whether or not to place it’s special, and should not place specials on a planet with a “Homeworld” special. A condition to count specials will be needed, so that Galaxy Generation Events that use the chance condition can skip over planets that already have three or more specials.

A variable will be needed: “Galaxy.SpecialDistribution” to account for user preference. It’s up to each Galaxy Generation Event to use this variable (or not) when determining special placement.

Some specials are attached to the galaxy itself. These specials are invisible to the player, but are executed via the Event engine normally. These specials are commonly used to spawn events.

(Future Note: It is possible, and perhaps desirable, to replace the current system for generating star color, planet size, and planet environment with a set of Galaxy Generation Events.)


Events, like specials, are traits attached to an object in the galaxy. Unlike specials, events tend to have a set duration in turns (though that duration can be infinite).

Events can be spawned by just about anything that operates under the Effects engine. Technologies, Racial Picks, Government Picks, Buildings, and Specials can all have lists of events spawned (usually by chance). In addition, the galaxy itself is seeded

Of particular note are the Galaxy Specials, which are spawned by the Galaxy Generation Events at the start of the game. These specials tend to spawn events and other effects that occur throughout the game. (examples include spawning the Pollution special, the Unrest event, and Space Monsters)

The Happiness and Security meters of colonized planets have the primary role of modifying the chance of certain events occurring. It’s up to the designer of events-spawning objects to incorporate these meters.

The variable “Galaxy.EventFrequency” is used by event spawning objects to account for user preference. It’s up to each object to use this variable (or not) when determining whether or not an event is fired.

The variable “Galaxy.CurrentTurn” can be used by event spawning objects to modify the chance of an event occurring dependant upon the number of turn elapsed. For example, Space Monsters might not spawn prior to turn 30.

Multiple Choice Events

Multiple Choice Events pose a question to a player, and provide a series of possible responses. Each possible response results in one or more EffectsGroups being executed.

(Future Note: There will have to be a method to guide the AI players as to the “correct” choice to make.)

Multiple choice events have no duration—they always last one turn. They are always executed before other objects' effects, immediately after the player presses the end turn button. If a choice has a persistent effect, it must spawn another Event or Special.

If a Multiple Choice Event spawns another Multiple Choice Event, the event should be executed within the same turn.