Killing Floor 2

Killing Floor 2

Not enough ratings
Zed Spawner
   
Award
Favorite
Favorited
Unfavorite
Maps and Mods: Mutators
File Size
Posted
Updated
93.600 KB
May 22, 2022 @ 6:53am
Mar 8 @ 12:56pm
13 Change Notes ( view )

Subscribe to download
Zed Spawner

Description


Description
Spawner for zeds. Started as a modification of this version, but now there is almost nothing left of the previous mutator, lol xD

Features
- spawn without increasing zed counter;
- spawn depends on the number of players;
- cyclic spawn (useful for endless mode);
- separate spawn for special waves and boss waves;
- spawn after a certain percentage of killed zeds.

Whitelisted?
No. This mod is not whitelisted and will de-rank your server. Any XP gained will not be saved.

Usage (single player)
  1. Subscribe to this mutator;
  2. Start KF2;
  3. Open console (~) and input:
    open KF-BioticsLab?Mutator=ZedSpawner.Mut
    (replace the map and add the parameters you need)
  4. <Enter>.

Usage (server)
Note: If you don't understand what is written here, read the article Dedicated Server (KF2 wiki)[wiki.killingfloor2.com] before following these instructions.
  1. Open your PCServer-KFEngine.ini / LinuxServer-KFEngine.ini;
  2. Find the [IpDrv.TcpNetDriver] section and make sure that there is a line (add if not):
    DownloadManagers=OnlineSubsystemSteamworks.SteamWorkshopDownload
    ❗️ If there are several DownloadManagers= then the line above should be the first ❗️
  3. Add the following string to the [OnlineSubsystemSteamworks.KFWorkshopSteamworks] section (create one if it doesn't exist):
    ServerSubscribedWorkshopItems=2811290931
  4. Start the server and wait while the mutator is downloading;
  5. Add mutator to server start parameters: ?Mutator=ZedSpawner.Mut and restart the server.

Important setup information
The config should be created on first start, but now the game contains a bug that initializes the config values ​​randomly if they are not explicitly set. Thus, the config may have incorrect values ​​or not be created at all.
So if you are using this mutator for the first time, I highly recommend doing the following:
  1. Create (modify) KFZedSpawner.ini manually. Put the following content there:
    [ZedSpawner.ZedSpawner]
    Version=0

  2. Start the game/server with ZedSpawner to generate the contents of the config.
  3. Close the game/server.
Right now this is the only way to correctly create the default config.
Unfortunately I can't do anything about it because it's a game problem (not mutator). I hope TWI fixes this someday.

Setup (KFZedSpawner.ini)
bPreloadContentServer - enable/disable server-side preload content;
bPreloadContentClient - enable/disable client-side preload content;

Cyclic spawn
If you don't want to write an endless spawn list for the endless mode (lol) use a cyclic spawn. Set parameter bCyclicalSpawn=True
After the last wave in the spawn list ends, spawn will start again from the beginning of the list.
Using the SpawnTotalCycleMultiplier and SingleSpawnLimitCycleMultiplier modifiers will allow you to adjust the difficulty of the following cycles.

Shadow spawn
With bShadowSpawn=True, the zeds from the list will replace the original zeds that haven't spawned yet, so the counter of the remaining zeds won't grow. Spawning will stop when there are no unspawned zeds left.
With bShadowSpawn=False zeds from the spawn list will not replace the original ones. The counter of remaining zeds will increase when spawning. Spawn will continue until the end of the wave.

Smooth spawn
With bSmoothSpawn=True a group of zeds will spawn gradually (1 zed per second);

AliveSpawnLimit
If you have a server crash with a large number of zeds, set AliveSpawnLimit. If the number of live zeds reaches the specified limit, spawning will be stopped until there are fewer zeds. At zero there is no limit.

Spawn lists
Use the [ZedSpawner.SpawnListRegular] section to set spawn on any wave.
Use the [ZedSpawner.SpawnListBossWaves] and [ZedSpawner.SpawnListSpecialWaves] sections to set a separate spawn for the boss wave and special waves if needed. Use bStopRegularSpawn=True if you want to stop spawning from the regular list during boss waves or special waves.

Spawn entry parameters
  • Wave / BossClass - what wave is the spawn for. Wave number for the regular list, wave type for the special list; boss class for the boss list.
  • ZedClass - the class of the zed you want to spawn (for example: ZedternalReborn.WMPawn_ZedScrake_Omega).
  • RelativeStart - allows you to start spawning a zed not on a timer, but after killing the specified percentage of zeds. If set to zero, spawn will start after Delay seconds from the start of the wave. Note that RelativeStart does not work on bosses.
  • Delay - time in seconds between spawns.
  • Probability - the chance (%) of each spawn (1-100).
  • SpawnCountBase - The base number of zeds to spawn, aka the number of zeds that will be spawned on the first cycle with one player. Can be adjusted by modifiers, number of players and cycle number.
  • SingleSpawnLimit - maximum number of zeds for one spawn. Can be adjusted by modifiers, number of players and cycle number.

Spawn logic
I really tried to describe in text how it works, but every time I got some kind of crap. Therefore, I decided to explain it a little differently and made a small calculator for this. It is interactive, you can change the parameters and see what happens. It has all the necessary explanations, so I think you will quickly figure out how the spawner works.

Link (remove spaces):
htt ps://docs .google .com/spreadsheets/d/1q67WJ36jhj6Y0lPNO5tS2bU79Wphu4Xmi62me6DAwtM/edit?usp=drive_link
Just please try not to interfere with each other if you see that someone is already using a calculator.

Notes
📌 Mutator does not contain custom zeds. You must have the required zeds in your subscriptions to be able to spawn them.
📌 If you are using this mutator to add zeds, you should not use mutators from zed packs (just having them in subscriptions is enough).
📌 If the spawner's behavior differs from what you expect, check the server logs first. ZedSpawner writes in the logs everything it does (and describes why), most likely you will find an explanation of what is happening there. If not, feel free to report bugs :)

Sources
https://github.com/GenZmeY/KF2-ZedSpawner (GNU GPLv3)
36 Comments
cOOKie_MoN$TeR May 24 @ 1:18pm 
I looked at the log when it happens, its not showing the zedspawner over riding the normal wave. It is a Poundamonium wave and starts dropping them in waves of thirty five all at once. I have no special waves setup and have left the ini pretty much stock, I have been using the spawner just to mix up the waves randomly. I have nuked the whole server and rebuilt it twice. Eventually it comes back. I am using the UFKF2 patch with this mutator along with its supporting mutators and CTI. Waves seven and nine is when it mostly happens. I have no special waves setup for those rounds. I'm thinking the maps are to blame as it has never happened on an official map. Just wondering if any one else has experienced this and maybe resolved it. I'm going to rebuild it and try running it without the Zedspawner and see what happens. I will advise if it happens again.
GenZmeY  [author] May 23 @ 2:07pm 
and if there is something in the log, compare it with your config to see if it’s normal or not
GenZmeY  [author] May 23 @ 1:47pm 
@cOOKie_MoN$TeR, sounds weird. It makes sense to look at the log when this happens again, if ZedSpawner is to blame - there will be spawn entries in the log (it logs all its spawn attempts)
cOOKie_MoN$TeR May 23 @ 1:14pm 
When using this mutator on my server, I randomly get a two hundred plus Fleshpound wave. It seems to randomly happen. I've seen it happen only on certain maps, KillingPool, BigRoom2020, Defence Thyself (Day and Night), and BlockfortV2. Anybody have a solution?
sw Apr 14 @ 6:07pm 
The server turns off when changing maps.
GenZmeY  [author] Nov 16, 2023 @ 2:28am 
the formulas work the same for all spawns, so you can't do that, but...

you can try to use this spawner for dynamic changing spawn and some other simple spawner for spawn regardless of the number of players

The spawners that are in the workshop do not replace the game classes, so they should not conflict
Deko Nov 15, 2023 @ 6:50pm 
thank you. and what if I wanted a specific Spawn to be influenced by the number of players, but others Spawns not? is that possible?
GenZmeY  [author] Nov 15, 2023 @ 9:11am 
you can completely get rid of the influence of the number of players on spawn if you set:
[ZedSpawner.Spawn]
SpawnTotalPlayerMultiplier=0.0
SingleSpawnLimitPlayerMultiplier=0.0

Look at the formulas on the calculator page and you will understand how it works
Deko Nov 15, 2023 @ 8:58am 
even if "SpawnCountBase=1" the numer of zeds that will spawn is multiplied if there are more players in the servers. how can I set the exacly number of zeds I wante to spawn,
independent of how many players are on the server? and what command should I use to multiply the number of zeds according to the amount of players on the server??

for exemple, I have this:
Spawn=(Wave=2,ZedClass="KFGameContent.KFPawn_ZedFleshpound",RelativeStart=30,Delay=0,Probability=100,SpawnCountBase=1,SingleSpawnLimit=1)

If I'm alone on the server it only spawns 1 FP, after 30% of zeds killed. but if there are 6 players on the server, it will spawn 3 FPs.
GenZmeY  [author] Jun 26, 2023 @ 10:48am 
The config I used on my endless servers before:
https://github.com/GenZmeY/KF2-MSK-GS-Resources/blob/master/common/KFZedSpawner.ini

I am not using CyclicSpawn here, but otherwise this should be a good example

In case someone wants to test this config, these zeds are used:
https://steamcommunity.com/sharedfiles/filedetails/?id=2811849367