Adding a zombie type
Ce contenu n’est pas encore disponible dans votre langue.
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.
1. Add the block
Section titled “1. Add the block”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.
2. Give it a spawn share
Section titled “2. Give it a spawn share”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.
3. Rewards and loot
Section titled “3. Rewards and loot”rewardis a key inConfig.Rewardsinbs_core/config/config.lua(the shipped ones arezombie_killandzombie_kill_brute). Faction rep is mapped inbs_factions/config/config_factions.luaunder the same key.lootis resolved by name inbs_economy/config/config_economy.lua. A table with that name must exist (walkerandbrutedo), otherwise reuse an existing one.
4. Special flags
Section titled “4. Special flags”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.
5. Test
Section titled “5. Test”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.
bs19.org · Privacy · Terms · Cookie settings
Cookies and outside content
The site only needs two essential cookies to keep you logged in and protect forms. Videos and streams from YouTube and Twitch load from their servers, which can set their own cookies, so they stay off until you say yes. Nothing is pre-ticked and you can change your mind any time with "Cookie settings" at the bottom of every page. Details.
Questions about the server, the framework or the site? A real person reads this, usually within a day.