Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help

data/spawn_categories/

A spawn category: a population class, such as ambient creatures, with caps on how many may live near each player and in each 64-block region. Spawn rules name their category. Loaded by the server only.

Registrymanifold-ai:spawn-category
Filesdata/spawn_categories/*.ron, *.update.ron, *.final.ron
Sidesserver: only the server loads it
Readsnothing
ContractPopulation, data stage

Entry

A record, written SpawnCategory(..); the name before the parentheses is optional.

FieldTypeRequiredDefaultDescription
idstringyesThe category’s key, <mod-id>:<name>.
per_playeru16no10The most creatures of the category in the regions around each player.
per_regionu16no16The most creatures of the category in one interest region.
counts_toward_hard_capboolnotrueWhether its creatures count toward the space’s ambient cap.

Example

From game/flagship-game/data/spawn_categories/creature.ron:

SpawnCategory(
    id: "flagship-game:cat/creature",
    per_player: 10,
    per_region: 16,
    counts_toward_hard_cap: true,
)