This page should provide some analysis on the functioning of the gametype, covering all active functionality exposed either by this class, Invasion, or any other parent classes. It should provide relevant information that modders can use for their projects, without being too complicated or over-detailed. Any intricate areas should either be in their own article, or provided in the form of an external link.
Two specimen lists are maintained:
- MonsterClasses is a customizable list that is used when spawning squads.
- StandardMonsterClasses is the default list of specimens, loaded for a non-sandbox game.
Upon initialization, in a non-sandbox game the StandardMonsterClasses list is copied into MonsterClasses.
Each item in these lists contains two strings: a class name, MClassName, and a letter, MID. The class name is used to refer directly to the specimen class, while the letter is used for constructing squad strings (see below).
A squad is a group of enemies that is to be spawned together. It is defined using a string containing letters and numbers. The letter specifies the specimen (from 'MonsterClasses') and the number that follows specifies how many of that specimen should be spawned. For example, "A3" means 3 clots (since A is the clot's letter).
ShortSpecialSquads, NormalSpecialSquads, LongSpecialSquads
Similar to above, however these squads are only used per single iteration of the squad list. They usually contain the toughest enemies such as fleshpounds.
These are squads spawned when the Patriarch runs away to heal.
Waves, ShortWaves, NormalWaves, LongWaves
Waves determines wave difficulty, maximum specimens, and a list of squads that can appear in the wave. The allowed squads are encoded as a bit field inside WaveMask, where bit 0 corresponds to MonsterSquad, bit 1 corresponds to MonsterSquad, and so on.
Player spawning is mostly handled in GameInfo's RestartPlayer(). One can provide the game with custom spawn points either by overriding FindPlayerStart() or by adding a GameRules class with a custom FindPlayerStart().
Difficulty is defined by the GameDifficulty variable, and this affects certain aspects of the game such as specimen spawning, speed, health, and damage. Values correspond to these difficulty levels:
- 7.0+ Hell on Earth
- 5.0+ Suicidal
- 4.0+ Hard
- 2.0+ Normal
- <2.0 Beginner