FCBP_ACPSpawnProbability

A spawn probability window for a room NPC rule. Used in the array of FCBP_ACPRoomRule.spawnProbabilities(...).

Setters

Setter Effect
probabilityMinWindow(float) Lower bound (0..1) of the spawn window.
probabilityMaxWindow(float) Upper bound (0..1) of the spawn window.

At spawn, a random value in 0..1 is drawn: the NPC spawns if it falls inside [min, max]. [0, 1] = always spawns; disjoint windows across several entries = mutually exclusive choices; min > max = never. The onRoomNPCSpawnConditionSkill hook adds a scripted veto.

The hook onRoomNPCSpawnConditionSkill is a skill, documented in the Skills section.

Example

FCBP_ACPSpawnProbability proba = FCBP_ACPSpawnProbability()
    .probabilityMinWindow(0.0f)
    .probabilityMaxWindow(1.0f);