Killing Floor 2

Killing Floor 2

Controlled Difficulty
blackout  [dezvoltator] 30 sept. 2016 la 2:37
Feature Preview: Spawn Squad Control
Summary

This post describes an upcoming feature. I just hacked up a prototype of this in my dev environment. It needs more polish before shipping, but the basic functionality is working well enough that I can talk about what I'm up to.

What will this feature do?

When enabled, this feature gives full control over all squads in each wave (regular & special) and the order in which they spawn. Furthermore, you can compose squads however you like. For example, if you are a sadomasochist who wants a 4FP squad, you can do that, even though that squad does not exist in standard KF2. This will probably support only the default game lengths (short, medium, long) to start. It might be theoretically possible to support nonstandard wave counts (e.g. 12), but I am not considering it right now. This also doesn't affect boss waves in its current form.

How will I use it (initially)?

In my initial prototype, squad information has to be specified through KFGame.ini. As an alternative to ini-editing, I hope to eventually get community help building a range of standard squad configs, which I'll then hardcode into the mod as easy-to-use, optional presets that don't require ini-editing. In the best case, people like this feature and some top faked challengers draft custom squad configs they find interesting, which I could absorb as hardcoded ini-free choices. In the worst case, nobody cares :steamhappy:

Right now, I only have ini-input implemented. No hardcoded presets yet. Here's a snippet from the KFGame.ini that I just fed to my test build. The format shown may change before this feature ships. However, after it ships, I will treat it as an API and try to keep it stable.

[ControlledDifficulty.CD_Survival] ; Wave 1 SquadScheduleDefs=4CC,4CC_1Bloat,3CC_1CA_1Gorefast,3CA_1CS ; Wave 2 SquadScheduleDefs=3CC_1CA,3CC_1CS_1Bloat,4Crawler,2Stalker,1CS_2CA_1Gorefast,2CA_2Gorefast,3CC_1CA_1Gorefast,1Husk (... etc for the remaining waves ...)

Each SquadScheduleDefs defines zeds that spawn in a wave. The value on each line is a comma-delimited list of squads. Squads are composed of one or more elements, separated by underscores (_). Each element is in the form "<#><enemytype>". enemytype is parsed very similarly to the way the SpawnZed command parses zed names: you can use any unique prefix (down to just "F" for fleshpound or "Sc" for Scrake, etc, or spell them out fully if you like). Some non-prefix shorthands are also recognized, such as CC = clot cyst, CA = clot alpha, CS = clot slasher.

Examining the snippet, the first line defines 4 squads. The first squad on that line/wave is 4 cysts. The second squad is 4 cysts and 1 Bloat. The third squad is 3 cysts, an alpha, and a gorefast. The last squad is three alphas and a slasher. And so on for wave two on the line after that.

The game spawns each squad in the exact order by the SquadScheduleDefs. When the game reaches the end of a schedule def before the associated wave ends, the game returns to the beginning of the def and repeats it. It repeats the schedule def this way as many times as necessary until the wave ends. If only part of a squad can be spawned because of MaxMonsters, then the remaining elements are saved and spawned as soon as slots become available.

What if I don't like editing ini files?

This ini-syntax is powerful but also error-prone and verbose. I'm going to ship it with (hopefully) robust error checking and a facility that prints out the full squad schedule to the console, so that it's easy to check for mistakes before starting a game. And, as mentioned above, I hope to eventually provide hardcoded presets that can be activated with an open-option (maybe like ?SpawnSchedule=foo) later on, so that people can avoid ini-editing if they want. Hardcoded presets may not ship at first though, since people have to be able to try it out before making useful presets.

What about bosses?

As a side effect of this work, it looks likely that I could add an option to force either Hans or Patriarch, even though the boss waves are not part of the schedule. I have not tested that, so I can't promise it yet, but it looks like it should be easy to do.

The trash spawned in a boss wave will remain random. It could be made deterministic, but it is kind of a special case that would complicate the code, and I'm not sure it's worth it.
Editat ultima dată de blackout; 30 sept. 2016 la 2:47
< >
Se afișează 1-4 din 4 comentarii
Trance 2 oct. 2016 la 19:30 
Is there any record of the old spawn squad schedule? It didn't used to be random, did it? If it did, the FP/SC squads certainly weren't.
blackout  [dezvoltator] 2 oct. 2016 la 20:37 
CD's current and past squads are/were selected in the same way as the unmodded game, i.e. random. That's why absolutely deterministic spawn scheduling is my top priority. The old way (random) will remain as a selectable option, so you can still use it if you want, but I suspect some people will prefer hardcoded spawns (I definitely will for my own enjoyment). I've been working on it quite a bit over the weekend. Aside from robust error checking for the ini file's spawn definition strings, I also added some diagnostic commands to project the size and summary composition of each wave ("summary" = # FP, # SC, # Husk, # Bloat, # Siren, # Trash). I also expanded the scope to allow squad schedules to control albinism on crawlers and alphas using a * suffix on the zedname, so you can spawn e.g. CR or CR*. Boss select option is also implemented in my dev version.
Editat ultima dată de blackout; 2 oct. 2016 la 21:35
With the future feature, would it be possible to add more bosses or make bosses only spawn instead of normal zeds?
blackout  [dezvoltator] 13 oct. 2016 la 18:41 
For the hardcoded presets part, I'm going to be looking for realistically completable waves. My hope is to include stuff that people actually want to try as a solo challenge.

The ini-editing part allows spawning crawlers, cysts, alphas, slashers, sirens, bloats, husks, scrakes, and fleshpounds. It does not support spawning hanses and patties. My dev build does have a new Boss=hans|patriarch option, but that only controls the boss that spawns at the regular conclusion of the match.
< >
Se afișează 1-4 din 4 comentarii
Per pagină: 1530 50