Zum Inhalt springen

Adding a zombie type

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

Zombie types (“archetypes”) live in Zombies.Types in resources/[beyond]/bs_zombies/config/config_zombies.lua. The shipped ones are walker, brute and crawler. There is deliberately no fast runner class.

Copy brute and rename it. Fields used by the existing types: label, weight, health, armour, shambleRate, drawnRate, chaseRate, damage, senseRadius, hearRadius, loseRadius, persistence, aggroDelay, bodyResist, reward, loot.

Zombies.Types.bloater = {
label = 'Bloater', weight = 0, health = 600, armour = 0,
shambleRate = 1.0, drawnRate = 1.0, chaseRate = 1.0,
damage = 30, senseRadius = 24.0, hearRadius = 44.0, loseRadius = 50.0,
persistence = 12000, aggroDelay = 1200, bodyResist = 0.1,
reward = 'zombie_kill_brute', loot = 'brute',
}

Keep move rates low, the comments in the file explain why: you should be able to walk away from one. Settings.maxMoveRate clamps them.

Natural composition comes from the per-zone types weights in config_zones.lua (for example types = { walker = 98, brute = 2 }), read by typeForCell in server/sv_registry.lua. The weight field in the type is documentation only for crawlers. Add your type to the zones where it should appear. Types missing from a zone never spawn there, but staff can still spawn them from the admin menu.

  • reward is a key in Config.Rewards in bs_core/config/config.lua (the shipped ones are zombie_kill and zombie_kill_brute). Faction rep is mapped in bs_factions/config/config_factions.lua under the same key.
  • loot is resolved by name in bs_economy/config/config_economy.lua. A table with that name must exist (walker and brute do), otherwise reuse an existing one.

Crawler-style movement uses noClipset, crawls and maxBlend. Do not remove them from a crawl type, cl_sync.lua and cl_ai.lua check them. Crawlers also need nutria_crawl_anims started before bs_zombies.

Restart bs_zombies, spawn your type from the admin menu, then use the debug commands in Zombies. The hooks other resources can use are in Zombies API.