Killing Floor 2

Killing Floor 2

Controlled Difficulty
blackout  [developer] 28 Mar, 2017 @ 11:42pm
Notes on spawnrate nerfs sometime on version interval [1049,1052]
Sometime after 1048, it appears that TWI modified KF2's builtin solo spawnrate modifiers. This slowed spawns in the unmodded game, but not in CD. I do not know exactly which version introduced this change because I only have the v1048 SDK and v1052 SDK (but not SDKs in between). If someone has the SDKs for intervening versions, then I could determine exactly when this change happened.

What are the "bulitin solo spawnrate modifiers"? These are hardcoded multipliers unconditionally applied to the minimum time (in seconds) that the game waits between attempting to spawn a squad. Note that this nomenclature is maddeningly contradictory... it's not so much a "rate" modifier as an interval modifier. This in similar to writing "frequency" when you mean "period". Higher numbers mean longer time spent between spawns, lower numbers mean shorter time spent between spawns (just like SpawnMod). This the exact opposite of what you would expect from a parameter stored in variables with names like "SoloWaveSpawnRateModifier" and "UsedSoloWaveRateMod"! But that's how TWI named it.

Anyway, the builtin solo spawnrate modifiers have existed at least as long as CD has existed. These are stored in twelve arrays: one for each combination of difficulty and gamelength. The arrays are indexed by wave (e.g. 0 to 9 for long), as if to allow spawnrate modifier variation as the waves progress. In reality, the values in every cell of any given builtin solo spawnrate modifier array are identical, so these arrays do not vary the spawnrate as a game progresses. Furthermore, the values for any given difficulty are identical across all gamelengths. So really, there are only four distinct modifier values, one for each difficulty, irrespective of wave or gamelength. This applies both before and after TWI's latest changes.

Solo builtin spawnrate modifiers comparing 1048 -> 1052 (all gamelengths):
normal: 1.5 -> 1.65
hard: 1.5 -> 1.8
suicidal: 1.5 -> 1.8
hoe: 1.0 -> 1.4

HOWEVER: because Unrealscript does not have multiple inheritance or mixins (a good thing), I ended up copying these spawnrate modifiers from the SDK source code into CD's source code a long time ago. CD has always used the original TWI modifiers 1.5, 1.5, 1.5, 1.0 (ascending dfificulty). CD never used the new TWI modifiers (1.65, 1.8, 1.8, 1.4). Copy-pasting these constants felt like an ugly hack at the time, but it inadvertently helped in this case.

You can see the relevant CD source here:

https://github.com/notblackout/kf2-controlled-difficulty/blob/master/Classes/CDSpawnManager_Long.uc#L64
https://github.com/notblackout/kf2-controlled-difficulty/blob/master/Classes/CDSpawnManager_Normal.uc#L54
https://github.com/notblackout/kf2-controlled-difficulty/blob/master/Classes/CDSpawnManager_Short.uc#L42

These constants in CD's source are the only ones that applied to CD. TWI changed their copies of these modifiers in KFAISpawnManager_{Short,Normal,Long}.uc, but those changes did not apply to CD due to the class inheritance hierarchy.

This is fortuitous, because SpawnMod's effect (in solo play) is dependent on these builtin solo spawnrate modifiers, and because SpawnMod should ideally remain as stable as possible. So, I'm kind of happy that CD happened to ignore TWI's builtin solo spawnrate modifier tweaks. However, this is also kind of bad because SpawnMod=1.0 does not correspond as closely with the unmodded game behavior as it used to. TWI made their game easier (maybe to partially offset the addition of rally alphas and gorefiends?); CD remained at essentially constant difficulty. Still, I think this is a pretty good outcome.

I also confirmed that the spawn manager wakeup interval has not changed. It still appears unchanged at 1 second. This is good.

Overall, I currently think that CD's spawn behavior, and the meaning of SpawnMod values in particular, has not substantially changed since v1048 last November.

Recall that TWI made a separate and indirect spawn nerf in v1048 last November. In my little solo tests, the November nerf slowed overall solo spawnrate by something like 9~13%. I reviewed and deliberately accepted that change into CD. Although it altered SpawnMod interpretation, it also made SpawnMod have much more impact throughout the wave. Before v1048, SpawnMod mostly affected wave starts. For details on this old change from November, see https://steamhost.cn/steamcommunity_com/workshop/filedetails/discussion/738484519/224446614462215414/. This is not particularly relevant anymore. I'm just including it here as deep background for those who might stumble on this thread one day without any context.

The foregoing discussion might be kind of confusing. Here's a TL;DR:

* Sometime after v1048, TWI slowed down spawns in the unmodded game (but not CD)
* CD overrode and ignored TWI's spawnrate slowdown
* AFAICT, CD SpawnMod remains stable and comparable across challenges
Last edited by blackout; 29 Mar, 2017 @ 12:12am
< >
Showing 1-1 of 1 comments
Xylona 29 Mar, 2017 @ 2:21am 
Nice!
< >
Showing 1-1 of 1 comments
Per page: 1530 50