KFGameType

From Tripwire Interactive Wiki
Jump to: navigation, search
Killing Floor class KFGameType (source)


Main gametype for Killing Floor, this sits directly on top of Invasion and uses much of its functionality.

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.

Specimens

Specimen classes

Two specimen lists are maintained:

  1. MonsterClasses is a customizable list that is used when spawning squads.
  2. 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).

Squads

MonsterSquad, StandardMonsterSquads

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).

Special Squads

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.

Support Squads

FinalSquads

These are squads spawned when the Patriarch runs away to heal.

Waves

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[0], bit 1 corresponds to MonsterSquad[1], and so on.

Player spawning

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

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

External links