Talk:Kill percentage flag used for -nomonsters and respawning

Discussion 1.1
This issue has been discussed before &mdash; sorry I can't find it all, but here is one part of it. The conclusion AFAICT was that Keen is a monster for exactly the reasons you state here: he counts toward kill percentage (unlike, say, a barrel) and can even behave as a "boss" on certain levels. Also, a decade of precedent in level editors categorizes him that way (though of course those are all reverse-engineered). Do you, perhaps, have some new citation to include, based on information from id employees, that contradicts all this? Ryan W 13:18, 14 September 2006 (UTC)

Ah, here's the conversation I was really looking for. The respawning part is particularly striking. Ryan W 13:27, 14 September 2006 (UTC)


 * Having looked at all the other bugs listed in this category, this would fall under the 'oddities' category. And moreso: while it might not practically be a bug, it obviously was something the game designers did not take into account, as level 32 cannot be finished on -nomonstrs deathmatch. That is interesting about the respawning, and seems to favor my point, that "keen == monster" is a bug ^_^. --Splarka (talk) 17:40, 14 September 2006 (UTC)


 * As an aside, it is interesting to note that the Icon of Sin is not flagged a (in that it does not count towards kill percentages, appears even with -nomonsters, and does not respawn), and is the "boss" on any level it appears on (in that the level ends). If Keen had never been flagged as a monster, there would be no bug, so it is hard to discount the simplest solution to fix it as the embodyment of the error. I admit this could be considered a bug in Map32 (in the same way the missing texture in Map18 causes HOM, and the shortage of deathmatch spots in Map28 in 1.666), but it is interesting, if so, that it made it to version 1.9. It smells to me like a miscommunication between the programmers and level designers.


 * But even so, the only portion of this article that isn't facutally obvious, and would be considered original research due to it being pure speculation, is "(probably mistakenly)". Feel free to remove that if you want ^_^. --Splarka (talk) 17:56, 14 September 2006 (UTC)


 * Original research is permitted on this wiki. However, if you start using terms like "smells" and "probably mistakenly" without providing primary sources, you shouldn't be astonished if other people look at the same data and smell a different conclusion.  :>   In this case:


 * E1M8, E2M8, E3M8, and E4M8 also cannot be finished in -nomonsters deathmatch. (Maybe E4M6 too, I can't remember.)  Does that mean barons, cyberdemons, and spider masterminds aren't monsters?
 * Perhaps you would consider Keen a monster if only he could attack. Some pain elementals in MAP09 can't attack, and neither can the sergeant next to the first barrel in MAP02.  Does that mean they aren't monsters?
 * A phenomenon that makes Keen more like a monster (the respawning) immediately convinces you that he is less likely to be one? Now you've lost me completely.


 * I still think the flags by themselves are enough evidence to make him a monster. Doom was neither the first nor the last game to offer monster-like rewards for attacking inanimate objects (e.g. the empty bricks in Super Mario Bros).    Ryan W 19:03, 14 September 2006 (UTC)


 * I think you misunderstand me. Let me make some points
 * "smells" is used only on this discussion page, which I assume allows opinions.
 * providing sources. The flag is quite obviously set on Mr Keen in the engine.
 * E#M8 when finished, exit to DOS in Vanilla Doom 1. If they looped back to E#M1 or E(#+1)M1, then it would make sense to have another deathmatch exit thereon. However, MAP32 is in the friggen middle of the game. Having to stop the deathmatch and start again just because some programmer or level designer didn't think things through "smells" like a bug.
 * If you consider Dead player's line of sight tracks his killer, which in no way terminally interferes with alternate sequential gameplay (that is, visiting every level) and only peripherially gives an advantage during deathmatch, then I would consider this a much more serious and obvious bug. ^_^
 * Lets get some terminology straight: Monsters in the sense of attacking enemeies, and Monsters in the sense of the flag in the engine for respawning, death percentages, and hiding with -nomosters, are not 100% comparable. Whether Keen should be considered a Monster is irrelevant really. Whether it should be flagged a monster is the issue, IMHO. Objects should only be flagged monsters if they should not appear during distraction-free deathmatch.
 * "A phenomenon that makes Keen more like a monster (the respawning) immediately convinces you that he is less likely to be one" <-- this immediately convinces me that giving him the monster flag is a bug, because the respawning is caused by the monster flag. Same for the kill percentages and hiding from -nomonsters.
 * "I still think the flags by themselves are enough evidence to make him a monster." <-- by this logic, the Icon of Sin is not a monster? The boss brain, spawn shooter, and spawn spots are not flagged as monsters in the engine. If that is the case, it should be removed from Monsters.
 * --Splarka (talk) 19:31, 14 September 2006 (UTC)


 * I was not disputing the setting of the flag. I was pointing out that, in the absence of an explanation from id's programmers, different people may interpret the flag in different ways.  Our policy is that opinions can go in the main space, but only when there is a time-tested consensus about them.  (And yes, saying "smelling" there might be contrary to the style guide.  :>


 * You are quite right about the Icon. I now think the table in Thing types is misleading and needs a footnote, because it sure looks like it's referring to flags, and not the more heuristic definition you just described.


 * Here is the main point I take from the above: MAP07 also cannot be completed in solo mode without monsters. No one calls this a bug, or says that mancubi and arachnotrons shouldn't be flagged as monsters, because the map designer(s) noticed this problem and included another way to exit the level during deathmatches.  If the same thing had been done with MAP32, we wouldn't be having this conversation.  Therefore, you are convincing me that this is all a map design bug, not an engine bug, and should be confined to the article about MAP32.


 * By the way, there are thousands of maps in the idgames archive with no exits at all. Apparently, a lot of people could care less about restarting the program in between deathmatch levels.


 * Ryan W 02:29, 15 September 2006 (UTC)


 * As I said, you can change the wording about it being a map bug or programming bug. In regard to time tested, I personally have noticed this (and have designed levels around it) as far back as 1995.


 * So then, what exacty is the definition of a Monster in Thing types if not the monster flag? Shootable? (other players) Killable? (barrels), hurts the player? (barrels, acid floors, teleport exits), semi intelligent? (well designed crushing ceilings could be described thusly, and I've also used a combination of crushing ceilings, barrels and teleporters to cause barrels to teleport and explode next to a player when he crosses a linedef), has a wake-up frame? (keen doesn't), is alive? (many of the monsters aren't, and keen is hanging from a noose), has eyes? (several powerups have eyes), respawnable? (not all monsters are), revivable by arch-vile? (not all are). It seems to me that the flag is the only thing that really differentiantes monsters from other things, which I again state is a bug to apply to Keen (as furniture ^_^).


 * This may be an opinion, but re: other maps: Map32 is about the most boring deathmatch map (along with Map07 and Map01) in Vanilla. It really should have had an exit. --Splarka (talk) 03:08, 15 September 2006 (UTC)


 * By "time-tested", I meant a community consensus (sorry, I keep using very abstract terms without defining them), as explained on our policy page. It may well be that most people have always considered this an engine bug and not a map design bug.  If so, that is new information to me.


 * With regard to this wiki, engine bug vs. map design bug is not simply a matter of nomenclature. If it is a map design bug, it does not get its own article: there are no articles about the missing key on TNT 31, the inaccessible secret sector on MAP27, or the paralyzed sergeant on MAP02.  At least, that's how we've done things so far.


 * Why does the definition of "monster" have to be a one-step algorithm? Maybe it can be defined as anything with the monster flag or a wake-up frame.  That would include everybody in Template:Doom monsters, and nothing else.


 * I think your statement about MAP07 must be an opinion, because so many people disagree that the sentiment made it into the Wikipedia article. :>   Also, there are an awful lot of deathmatch lmps floating around which use MAP01 (though that baffles me as well).    Ryan W 04:24, 15 September 2006 (UTC)


 * Fair enough, re "time-tested".


 * "there are no articles about the ... paralyzed sergeant on MAP02.". Sleeping_Sergeant_of_Doom_II_MAP02. And several other bugs could be fixed or hidden by proper level design (as could Keen), for example: Visplane overflow, and Visible_sprites_limit (which shouldn't really be considered a bug, but a game limitation, why is that a bug anyway, maybe there should be a bug that the screen resolution was limited to VGA at 256 colors).


 * Well, I personally would define a monster as something that can wake up, follow you, attack you, hurt you, and die, or have at least 50% of those qualities. In DeHackEd they call the monster flag "count towards kill percentage", so perhaps you'd accept that the bug is using this flag to determine what shows up on -nomonsters.


 * What gave it away? the "This may be an opinion"? ^_^ --Splarka (talk) 05:20, 15 September 2006 (UTC)


 * Not that sergeant, this one.   Ryan W 05:36, 15 September 2006 (UTC)


 * Really, sounds like both are just more map bugs (rather, bugs that can be fixed via proper map construction, as you claim Keen can ^_^). Perhaps there should be a specific category for map bugs, or a subsection of map pages specifically for bugs and oddities (such as the missing door texture in The Courtyard, the unused linedef flags in early versions of Spawning Vats, the several monsters-stuck-over-monsters in Halls of the Damned, etc).


 * Now I've forgotten what we are arguing about. You think this bug should be deleted and put into the map article under trivia, or rephrased? --Splarka (talk) 06:14, 15 September 2006 (UTC)


 * In case I forget also, I want to say that I'm grateful for this talk page, because I now understand the policies and precedents of this wiki better than I did before. :>


 * Perhaps there should be . . . a subsection of map pages specifically for bugs and oddities   I completely agree.  One of my main projects on this site is standardizing the map articles, and though I've barely started, you can see here that there is a section for existing (v1.9/1.10) bugs, as well as a "development" section in which past anomalies could be included.


 * You think this bug should be deleted and put into the map article   Yes, that was why I posted originally.  You say that, for certain definitions of "monster", it could be interpreted as an engine bug.  That's true, but since none of these definitions come from id, including the ones I described above, we don't have a reproducible way of deciding between them, or between the next five proposed by future editors.  IMHO we should start with what actually comes from id (the flag), make exceptions only when we clearly have no choice (the Icon), and then interpret everything else based on that.  That makes MAP32 behave like MAP07 with no "hidden" exit; therefore, it is a map design bug.


 * Again, if there is a single widely accepted heuristic definition of "monster", and I'm just uninformed, please tell me. Maybe I've just played too many RPGs in my life, but if a monster doesn't want to attack me, that's not my problem.  The programmers had their chance to give it a weapon.  (By this logic, maybe the bug is the fact that Romero's head is unflagged.)


 * Ryan W 08:23, 15 September 2006 (UTC)


 * I am having trouble keeping track of the colons.
 * The only definition we have from id on the actual word "monster" is the observed effect of command line parameter -nomonsters. This is one of 3 uses of a common flag (kill percentage, respawn). I would say then, that this is flag is the only 'official definition of a monster, if one needs an official definition (and yet precludes the Icon of Sin and Boss Brain from the list) (actually, that isn't totally true, the Boss Brain is called a "Monster" in the end text for Doom II, but that can't be taken too tertibly literally). The bug (if it is a bug, and the definition of bugs here allows for oddities and limitation) in my opinion is, from most likely to least likely: 1) a programming oversight in regards to the objects needing the flag, 2) a programming oversight in regards to the uses of the flag, 3) a miscommunication between programmers and map designers, 4) a simple map bug/oversight just like Map07 doesn't have, 5) intentional ("and consequences be damned"). --Splarka (talk) 09:48, 15 September 2006 (UTC)


 * I just noticed that, if you finish MAP30 on the first three skill levels, you get the wrong kills percentage because the engine thinks the starting number of monsters is zero. The obvious fix would be to set the "monster" flag on Romero's head (which would produce no real side effects &mdash; respawning is irrelevant because he's a boss).  On the other hand, IMHO, the deathmatch exit problem on MAP32 is not serious enough to disregard the "monster" flag on Keen, because it can be explained by item 4 in your list.  Therefore, we can take the "monster" flag at face value in all but one case (which is what this wiki was doing already).  Describe the deathmatch exit problem here if you will, but I now think that if there is an engine bug, it's the Icon.    Ryan W 15:59, 15 September 2006 (UTC)


 * If that is the case, then I call for Monsters open locked doors to be deleted and moved to Map27, as it most obvioulsy is a map bug. ^_^ --Splarka (talk) 23:51, 15 September 2006 (UTC)


 * You wanted the same thing for the sleeping sergeant. Please tell me you're not serious.  You seem to be saying, "If there's a known workaround, it's not a bug."


 * Suppose I write a C compiler which works perfectly, except that it rejects any source code containing the character "3". If you spend months/years figuring out how to change all your existing programs to work with my compiler, and finally succeed, does that mean my compiler isn't buggy?    Ryan W 02:45, 16 September 2006 (UTC)

Discussion 1.2
Just dug the relevant parts out of the source in regards to MF_COUNTKILL

if (source && source->player) {    // count for intermission if (target->flags & MF_COUNTKILL) source->player->killcount++;

if (target->player) source->player->frags[target->player-players]++; } else if (!netgame && (target->flags & MF_COUNTKILL) ) {    // count all monster deaths, // even those caused by other monsters players[0].killcount++; }

In both above cases the MF_COUNTKILL is used exactly as the flag indicates. However:

// don't spawn any monsters if -nomonsters if (nomonsters    && ( i == MT_SKULL || (mobjinfo[i].flags & MF_COUNTKILL)) ) {    return; }

This puzzled me at first, but checking the item flags, the Lost Soul is not set to count for kill percentages, so an exception had to be made to hide it via -nomonsters (lame).

// check for nightmare respawn if (! (mobj->flags & MF_COUNTKILL) ) return;

This seems to have no such exception.

Others may interpret it differently, but I still say it is a good indication that the bug is either in giving Keen MF_COUNTKILL, or in the -nomonsters and -respawn/nightmare handlers. For all we know, MAP32 might have worked perfectly when first designed, and later broke when someone fiddled with the Keen object. --Splarka (talk) 23:21, 15 September 2006 (UTC)


 * Lost souls did count for kills in v1.2 (not sure about v1.4), so the "exception" is necessary, no matter what our aesthetic opinion of the code.   Ryan W 02:31, 16 September 2006 (UTC)