tchkb Posted July 29, 2020 (edited) Thanks to Nine Inch Hells for helping with the write-up and providing her personal opinions on the matter. What we're looking at here is a case that revolves primarily around monsters with the flag "friendly" in MBF format maps. As such, it is a bit of a unicorn in terms of rarity. That being said though, it did end up exhibiting some problems with how PrBoom+ keeps track of kills. Since the UMapInfo fork of PrB+ is still being worked on as far as I'm aware, this may be a good point in time to discuss things, so that maybe some adjustments can be made to the newer generation of PrB+, in order to make things less ambiguous for casual players, completionists and speedrunners alike. Hence, this thread. Unfortunately, just to get people on the same page, we'll have to start with some cotton dry basics, that being the different kill-counters. There are 3 different measures to track kills in PrBoom+. - advanced HUD (most commonly used by speedrunners and UVmaxers) displays values K and M K = all monster kills gotten including kills on "new monsters", AV (Arch-Vile) resurrects and IoS (Icon of Sin) spawns M = sum total of all monsters currently alive Increases with AV resurrects and IoS spawns, decreases with any kill made. This counter is what matters for regular UV-Maxing - M must equal 0 before level exit for a successful UVmax. - automap/levelstat displays values L and T (they don't have an in-game name, but I'll call them these by analogy with the above ones) L tracks how many of the pre-placed monsters were killed at least once It is not affected by killing AV resurrects or IoS spawn. T is the number of monsters present at start of the map It is a constant value that doesn't change during the level: in cl2/cl9, there is no way for L to ever exceed T; this counter can be helpful in IoS maps, as the common ruling for maxing these maps is that all starting monsters must have been killed at least once, which is tracked by L. There is a known issue with L counter in WADs such as Valiant that use certain MBF functions to spawn "new monsters" during the level itself. Unlike AV resurrects and IoS spawns, MBF function-spawned monsters do increase L counter when killed and may cause it to exceed T. However, they don't increase it again in case they're resurrected and killed once more. The K and M counters from the advanced HUD treat them just like all other monsters, so you know when you've killed them all. - end tally Displays a number that is the result of division of K from adv HUD counter by T from automap/levelstat counter as % and rounded down; does not matter for regular UVmaxes (but back in 90s this was the sole metric by which max runs were considered valid), however all-kills runs with respawning monsters (UV-Respawn, hypothetical NM100K) use this over the other kill trackers. Now onto MBF friendly monsters. Before describing how they affect the kill counters, here are some basic mechanics in the spoiler below (tested empirically, source code and therefore facts may be otherwise): Spoiler - any monster present at level start can be set to be friendly via a special flag (can be set in Eternity: Doom 2 (Doom format) mode in GZDoomBuilder, for instance) - friendly monsters wake up immediately at level start - friendly monsters have default behavior of chasing, but not attacking the player - friendly monsters can automatically spot hostile monsters in their field of vision, upon which they start chasing and attacking that monster - friendly monsters will become hostile towards player for one attack if he damages them - friendly monsters resurrected by hostile AVs become hostile - hostile monsters resurrected by friendly AVs become friendly - friendly IoS monster spawners will spawn friendly monsters - Nightmare difficulty and -respawn parameter causes corpses to resurrect with friendliness flag if the monster had it right before its death (ex. initially hostile zombieman resurrected by friendly AV and then dying later will auto-resurrect as friendly) - friendly monsters have the same re-targeting thresholds as other monsters in MBF engine (they can't switch targets until they move a certain number of steps) - friendly monsters don't infight each other (or at least I haven't been able to get them to infight during testing) Here's how friendly monsters currently affect each of the four counters: L - Increased by 1 on the first kill on a friendly monster (re-killing resurrected friendlies does not increase it again). Similar behavior as with monsters spawned by MBF functions. T - Set to the number of non-friendly monsters present at level start. Coupled with above, L can be increased above T just by a friendly monster dying for whatever reason. K - Increased by 1 every time a friendly monster is killed, just like with all other monsters. M - Set to number of hostile+friendly monsters at level start. However, it is not affected by friendly monsters being killed during play nor friendly Arch-Viles resurrecting corpses, but it is affected by friendly IoS monster spawner, as well as corpses auto-resurrecting as friendly monsters on NM/-respawn. Furthermore, if you save the game and load it, the counter will be recalculated and will only count the living hostile monsters (new friendly IoS monsters and NM/-respawn autoresurrects will still keep increasing it). The last point is well illustrated by Artica 2, an MBF map from 1998 that has 19 hostile and 1 friendly monster at level start. The T counter is initially set to 19, while M is set to 20. Saving and loading immediatelly after map start before doing anything will set the latter to 19. End tally still displays K divided by T, only with the counters changing according to the rules outlined above. M counter recalculation upon loading a save is an obvious glitch that needs to be fixed, but the overall issue is that the treatment of friendly monsters by these counters is paradoxical - some count them as regular monsters while others do not, and that behavior also changes depending on how exactly a given friendly monster arose (initial monster / friendly AV resurrect / NM autoresurrect / friendly IoS spawn). This behavior should definitely be normalized, either one way or the other. The question is - should friendly monsters be considered monsters or not? The answer to this question will affect how completionists and speedrunners will approach serious MBF maps employing friendly monsters that do not really exist now, but might be created in the future. Normally the game engine itself should hold a noncontroversial answer, but right now two of the in-game counters say "yes", one says "no" while the last one flip-flops on the issue. Therefore, the decision should be made - preferrably based on a consensus from discussion in this thread rather than one coder arbitrarily choosing one of these two answers while fixing these counter inconsistencies. Edited July 30, 2020 by tchkb 1 Quote Share this post Link to post
Shepardus Posted July 29, 2020 (edited) Thanks for writing this up in such detail! In my opinion it wouldn't make sense for the concept of friendly monsters to require killing them in a UV-Max, so the L, T, and M counters (as you named them) should not count friendly monsters. I think for AV resurrections you should have to kill friendly monsters resurrected by hostile arch-viles (since they are now hostile), but not hostile monsters resurrected by friendly arch-viles (since they are now friendly), so "M" would reflect the current alignment of the monster even if it's different from what it was originally. To properly track "L" though, you'd have to know the original state of the monster, which I'm guessing is related to why it's also broken for MBF spawns like the Valiant arachnorbs. It's less clear to me what to do about the "K" counter and the end tally, but I'd lean toward counting friendly monsters as kills, even if it has some weird implications for UV-respawn. They still are kills, after all. Edited July 29, 2020 by Shepardus 0 Quote Share this post Link to post
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.