Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
tomatoKetchup

Easy way to ignore monsters for final count?

Recommended Posts

Hi there,

In a map in classic Doom format (not HEXEN), I'd like some monsters to be ignored in the final count at the end of the level, meaning that even if they are not killed but every other monster is, the ending stats will display '100%'.

I know something like that is done on the map 'Hunted' from Plutonia megawad but I can't find any particular lump in the Wad when opening it with XWE. I'm just wondering how it is done in that level and what's the easiest way to do it in my map.

Thanks,
tomatoKetchup

Share this post


Link to post

If it happens in 'Hunted', it's hardcoded for that level only. No way to customize it.

Your best option is to remove the monster's "Affect kills" flag in DEHACKED. Get a DEHACKED editor (WhackEd 4), open Things tab, find a monster type, uncheck the "Affect kills" flag, then save the .deh file, import it into your wad, and name it DEHACKED. This will, however, affect the particular monster type in your entire wad, not just 1 map. But there is a workaround: Again in DEHACKED in the Thing tab, you can alter properties of any thing, perhaps a decorative thing, to perfectly replicate properties of a given monster, except that it won't affect kills. Then you can use this thing in your map wherever you want to put the monster which wouldn't affect kill percentage.

A note-worthy side effect thing to mention: This trick will prevent the modified monsters from respawning on Nightmare difficulty or when playing with -respawn parameter.

Share this post


Link to post
tomatoKetchup said:

I know something like that is done on the map 'Hunted'

???

Is that some ZDoom thing?

Share this post


Link to post

Yeah id like to see the source on that too.

Anyway, is there a way you can kill the monsters with a crushing ceiling?

For example, I have a trap closet in a map that makes it look like monsters are pouring out from a distant hallway opening, but if the player is fast, I don't want him to see where all these monsters are coming from so I used a walkover line that raises the floor of the closet up to the ceiling and crushes the remaining monsters that didn't get out, so that the closet is hidden by the time the player gets there and the monsters he didn't kill are still counted towards his kill count.

Share this post


Link to post

ZDoom has an option for not counting monsters that are placed in a "damage + end game" sector type (like the imps and zombies in the dark room behind the teleporter in E1M8). However that's one of the gameplay options so it's off by default and your choice doesn't get saved in the ini so you have to reset it every time you start a new game.

Share this post


Link to post

Thank you all for the quick answer!

Gez said:

ZDoom has an option for not counting monsters that are placed in a "damage + end game" sector type (like the imps and zombies in the dark room behind the teleporter in E1M8). However that's one of the gameplay options so it's off by default and your choice doesn't get saved in the ini so you have to reset it every time you start a new game.


That's interesting Gez, and that's actually probably what's happening in 'Hunted' too to prevent the 4 remaining Archi-Viles for being counted as kills. So there's probably no particular trick or additionnal script with this map.

Anyway, I like your idea scifista42, and it's actually gonna cope me for another part of my map when I also wanted the same monster type not to be counted. I'll try this later and feedback it here.

Thanks again!

Share this post


Link to post
scifista42 said:

If it happens in 'Hunted', it's hardcoded for that level only. No way to customize it.

Your best option is to remove the monster's "Affect kills" flag in DEHACKED. Get a DEHACKED editor (WhackEd 4), open Things tab, find a monster type, uncheck the "Affect kills" flag, then save the .deh file, import it into your wad, and name it DEHACKED. This will, however, affect the particular monster type in your entire wad, not just 1 map. But there is a workaround: Again in DEHACKED in the Thing tab, you can alter properties of any thing, perhaps a decorative thing, to perfectly replicate properties of a given monster, except that it won't affect kills. Then you can use this thing in your map wherever you want to put the monster which wouldn't affect kill percentage.

A note-worthy side effect thing to mention: This trick will prevent the modified monsters from respawning on Nightmare difficulty or when playing with -respawn parameter.


So I did what you said scifista42, I pasted the properties of a Demon on the "Dead Lost Soul" thing, and made sure to give it an unique Id.
I correctly imported the .deh file into my WAD, but when testing it with Doom Builder nothing changes, the dead lost souls thing are still dead lost souls.

I wonder if it doesn't work just because it's tested within the editor and the later doesn't decode the dehacked file, or perhaps I miss something?

EDIT: nevermind, I had forgotten to name the file DEHACKED! Seems to work right so far, thanks a lot again!

Share this post


Link to post
tomatoKetchup said:

So I did what you said scifista42, I pasted the properties of a Demon on the "Dead Lost Soul" thing, and made sure to give it an unique Id.
I correctly imported the .deh file into my WAD, but when testing it with Doom Builder nothing changes, the dead lost souls thing are still dead lost souls.

I wonder if it doesn't work just because it's tested within the editor and the later doesn't decode the dehacked file, or perhaps I miss something?

Yes. If you didn't give the thing a unique Id, it would work. But as you've changed the Id, the engine now doesn't know what to spawn in place of the dead lost soul, because placing things in DoomBuilder means placing Ids defined in DB's config file. Either put the Id back via DEHACKED, or put an "unknown" thing with the new Id in DoomBuilder.

EDIT: OK, it was a different cause.

Share this post


Link to post

One more thing though, just to be a bit annoying... :)

Is there a way not to count this thing as monster in the monster count stat when on automap mode (I think it's a ZDoom feature)?

Not that it's very important but just to know.

Share this post


Link to post
tomatoKetchup said:

One more thing though, just to be a bit annoying... :)

Is there a way not to count this thing as monster in the monster count stat when on automap mode (I think it's a ZDoom feature)?

Not that it's very important but just to know.

Did you actually uncheck the "Affect Kills" flag? Because if you did, they shouldn't count to the automap stats in ZDoom.

Share this post


Link to post

Sorry for the late reply.

I did unckeck the "affect kill %" flag indeed, but they are still counted. I went through the list of flag and cannot see anything else, so I guess that's probably not possible. It's not very important though, I'm happy enough with what I have. :)

Thanks again.

Share this post


Link to post

Did you test it in other source ports than ZDoom that display monster count on the automap? (PrBoom+, Zandronum, etc.) Were the monsters counted in all of them?

Share this post


Link to post

Non I didn't test in another port, I only have ZDoom at the moment. But if somebody wants to test it out it'd be nice to feedback me the result.

Share this post


Link to post
tomatoKetchup said:

But if somebody wants to test it out it'd be nice to feedback me the result.

Send me your .deh file.

Share this post


Link to post

Got your deh. I've made a test map with 1 zombieman, 1 dead lost soul, and an exit. I tested it in ZDoom 2.7.1, GZDoom, Zandronum, PrBoom-plus and ZDaemon. First, I've killed only the zombieman, checked the automap, then exited the map and checked kill statistics. Then I've restarted the map, killed only the "dummy" demon, checked the automap, then exited the map and checked kill statistics. In all ports, the result was the same: Automap showed that there's 1 monster (the zombieman) in the map in total. Zombieman counted to the kill percentage on both automap and intermission (100% kills). The "dummy" demon's death didn't affect the automap or the intermission at all (0% kills).

Share this post


Link to post

That is very odd, when I do the same as you it counts it as a monster. Are you testing the map from your editor or launch it separately (although I don't think it'd make a difference.

I play with GZDOOM v.1.8.2

Edit: by the way, it still counts it in kill percentage too. Could you send me your test wad so I can take a look?

Share this post


Link to post

In fact, I just realised something:

It actually works fine if I start from a empty wad. But in my proper wad, where I have all my maps, it doesn't.

I checked both wads and made sure the dehacked file was properly named and it's content was the same. Could the position of the lump in the wad affect it's behavior?

Share this post


Link to post
tomatoKetchup said:

Could the position of the lump in the wad affect it's behavior?

It shouldn't. My test wad is here. Do your maps use the dead_lost_soul enemies?

EDIT: The critical part of the new enemy's DEHACKED is "Bits = 6", this number shouldn't be anything else.

Share this post


Link to post
scifista42 said:

The critical part of the new enemy's DEHACKED is "Bits = 6", this number shouldn't be anything else.


Indeed, that number wasn't equal to 6 in my main wad for some reason. I changed it, but I'm at work ATM so I can't test out if it solved the issue.

I'll let you know later on.

BTW, what does that parameter do exactly, just by curiosity?

Share this post


Link to post

Be aware that unsetting the 'counts as kill' flag in Dehacked also makes the engine think it's not a monster in situations when it's specifically looking for monsters. So your non-counting monster may behave weirdly.

Share this post


Link to post

Any such effect visible on lost souls in vanilla? (Other than the tally, of course.)

Share this post


Link to post

No, because, if you look at the code, every single check for MF_COUNTKILL also has a special check for MT_SKULL.

Share this post


Link to post
tomatoKetchup said:

BTW, what does that parameter do exactly, just by curiosity?

It's just a code of the thing's checked flags. Flag 1 (Can be picked up) = code 1. Flag 2 (Obstacle) = code 2. Flag 3 (Shootable) = code 4. Flag 4 (Invisible & Touchable) = code 8. And so on. Code 6 = 2 + 4 = Obstacle + Shootable.

Share this post


Link to post

Hmm, sounds interesting. I know that in Batman Doom there are technically no monsters, and I didn't notice any particularly weird behavior while playing it. But of course it is very different from classic Doom so maybe that's why the behavior didn't stand out for me.

Share this post


Link to post
Graf Zahl said:

Be aware that unsetting the 'counts as kill' flag in Dehacked also makes the engine think it's not a monster in situations when it's specifically looking for monsters. So your non-counting monster may behave weirdly.

Which situations and what kind of weirdness do you have in mind?

Share this post


Link to post

Just to say it works fine now. The value of bit was something like "65xxx" so according to your explanation scifista it must have been a bug. I personally didn't touch the file so my guess is something inside my wad must have overwritten it.

Anyway problem's solved completely now, scifista you're the best! o/

Share this post


Link to post

Thanks.

tomatoKetchup said:

The value of bit was something like "65xxx" so according to your explanation scifista it must have been a bug. I personally didn't touch the file so my guess is something inside my wad must have overwritten it.

I bet that you have accidentally clicked Projectile flag while editing the DEHACKED file in a DEHACKED editor. Maybe you've corrected it later, but didn't save the change before importing the file to your wad with maps.

Share this post


Link to post
scifista42 said:

Which situations and what kind of weirdness do you have in mind?


Having grepped through the Doom source code for instances of MT_SKULL, the only case of it being used as an alternative to the COUNTKILL flag that I've found is this:

    // don't spawn any monsters if -nomonsters
    if (nomonsters
	&& ( i == MT_SKULL
	     || (mobjinfo[i].flags & MF_COUNTKILL)) )
    {
	return;
    }
It's in P_SpawnMapThing and I'll let the comment tell you what it does.

So making monsters that don't count is only a problem as far as -nomonsters playthrough are concerned.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×