Monster Respawning (Nightmare) for Brutal Doom

Projects that alter game functions but do not include new maps belong here.
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.
thesleeve
Posts: 38
Joined: Tue Feb 21, 2012 10:57 am

Monster Respawning (Nightmare) for Brutal Doom

Post by thesleeve »

Hi everyone,

I noticed that a lot of people were asking for respawning monsters in Brutal Doom (like the classic Nightmare difficulty in Doom) and nobody had tackled that problem yet, so I went ahead and did it.

Here is an example in Doom 2's MAP01. I basically run back and forth in the level so that you can see the monsters respawning.


Here's a brief example in the original Doom's Knee Deep In The Dead campaign. You can see at around 6:45 that some monsters I killed earlier are clearly respawning back into the map:


The monsters I selected for respawning are as follows:
ZombieMan
ShotgunGuy
ChaingunGuy
Imp
Demon
Spectre
HellKnight
BaronofHell
PainElemental
Arachnotron
Cacodemon
Revenant
Mancubus

I figured it would be a little crazy to have respawning Cyberdemons and Spider Masterminds, so I left those out.
It also gets crazy if you respawn Lost Souls, because Pain Elementals spit so many of them out, and they just multiply... it gets ridiculous. So, those aren't included either.

The spawn time I chose is 1400 tics, which is 40 seconds (35 tics = 1 second). This means that after a monster dies, a timer will begin to count down from 40 seconds, and when it hits zero, the monster will come back to life (leaving its original corpse on the ground). The original Doom had a spawn time of 30 seconds, but since Brutal Doom makes everything a bit faster paced and generally more difficult, I chose 40 seconds so that the player doesn't get overwhelmed. You can easily edit my mods and replace the "1400" in the DECORATE lumps with whatever respawn duration you prefer.

All 5 classic difficult levels are still available (I'm to young to die, Hey, not too rough, Hurt me plenty, Ultra violence, and Nightmare), but the difference is that monsters will respawn after dying on all difficulty levels, not just on Nightmare difficulty.

After trying this mod out with some friends online, I discovered that it's actually fun to use respawning monsters in deathmatch games. In order to make sure the players don't run too low on ammo, I made it so that all monsters will drop a random item or weapon when you kill them... If you also turn off the "Items Respawn" deathmatch flag, this means that the ONLY way for players to get additional items/weapons/ammo is by killing monsters. This makes for a fun new mode of gameplay where players are fending off a constant horde of enemies (and scavenging items from them) while also fighting each other. It's pretty fun. You could also edit this mod and do fun stuff like having higher-level monsters give better items and weapons, or whatever you feel like.

I have tested this with Brutal v018a and it works just fine. I really can't guarantee forwards compatibility or backwards compatibility, but I will try to update this mod each time a new version of Brutal Doom is released.

I uploaded both mods as attachments.
BrutalDoomNightmare_TheSleeve.wad
BrutalDoomNightmareItemDrop_TheSleeve.wad
To use these mods, just add them after brutalv018a.pk3 in the command line. For example...

Code: Select all

(...directory path...)/zdoom.exe -file brutalv018a.pk3 BrutalDoomNightmare_TheSleeve.wad
or...

Code: Select all

(...directory path...)/zandronum.exe -file brutalv018a.pk3 BrutalDoomNightmare_TheSleeve.wad
or...

Code: Select all

(...directory path...)/gzdoom.exe -file brutalv018a.pk3 BrutalDoomNightmare_TheSleeve.wad
It's very important that my mod comes after brutalv018a.pk3... If not, execution will fail.

You can also use launchers like Doomseeker to do this. Just make sure my mod comes after Brutal Doom if you're using multiple mods.

Known bugs:
- I have noticed that a few monsters (particularly the bigger, badder ones) don't always reliably respawn, and I'm not entirely sure why.
- If you are standing directly on a monster when it respawns, it's possible that you will get stuck. This is due to the fact that I am using the SXF_NOCHECKPOSITION flag on the A_SpawnItemEx function. Just kill the monster and you should be able to move again.
- Sometimes monsters who are thrown against walls when they die will get sort of stuck in the wall when they come back to life. This is also a side-effect of the SXF_NOCHECKPOSITION flag. I'm not sure how to fix this.
- If several monsters die in the same place, they may get stuck in each other when they respawn. Once again, this is due to the SXF_NOCHECKPOSITION flag.
- It's not possible to destroy corpses to keep them from coming back.

Fixed bugs:
- Pain elementals are no longer replaced by mancubi
- Pain elementals now respawn properly
- Chaingunners now drop only one chaingun instead of two
You do not have the required permissions to view the files attached to this post.
Last edited by thesleeve on Mon Mar 18, 2013 8:24 am, edited 13 times in total.
thesleeve
Posts: 38
Joined: Tue Feb 21, 2012 10:57 am

Re: Monster Respawning (Nightmare) for Brutal Doom

Post by thesleeve »

Hmm, well, I already found a (small) bug. If you stand directly on an enemy's spawn spot (especially if they are up against a corner), then the monster will fail to respawn because I guess there's no space to place them. That shouldn't be. I'll see if I can fix that!
thesleeve
Posts: 38
Joined: Tue Feb 21, 2012 10:57 am

Re: Monster Respawning (Nightmare) for Brutal Doom

Post by thesleeve »

Bug resolved! I just had to switch to the expanded A_SpawnItemEx function and use the SXF_NOCHECKPOSITION flag. Piece of cake! I will update the code and scripts in the original post.
User avatar
Lance
Posts: 34
Joined: Fri Mar 15, 2013 9:46 pm
Location: NYC

Re: Monster Respawning (Nightmare) for Brutal Doom

Post by Lance »

This is the error message I'm getting,

Script error, "BrutalDoomNightmare_TheSleeve.wad:DECORATE" line 11:
Parent type 'Imp' not found in RespawningImp

Execution could not continue.
thesleeve
Posts: 38
Joined: Tue Feb 21, 2012 10:57 am

Re: Monster Respawning (Nightmare) for Brutal Doom

Post by thesleeve »

Hi Lance,

It looks like the program isn't seeing Brutal Doom. My mod is dependent on Brutal Doom, so the Brutal Doom pk3 file needs to come before my wad in the command line.

So, if you're using Zdoom, it should look like this:

Code: Select all

zdoom.exe -file brutalv018a.pk3 BrutalDoomNightmare_TheSleeve.wad
brutalv018a.pk3 comes before BrutalDoomNightmare_TheSleeve.wad.
thesleeve
Posts: 38
Joined: Tue Feb 21, 2012 10:57 am

Re: Monster Respawning (Nightmare) for Brutal Doom

Post by thesleeve »

By the way, it looks like I will still need to make some tweaks. Using the SXF_NOCHECKPOSITION flag proved to be problematic because sometimes monsters will spawn in invalid locations and get "stuck". Also, some monsters, if they die a certain way, will not respawn. In particular, the Mancubus doesn't seem to want to respawn very often. I guess I will have to do a bit more work to get a faithful recreation of Nightmare mode!
PaskaTykki
Posts: 201
Joined: Wed Jul 11, 2012 5:34 am
Location: Finland

Re: Monster Respawning (Nightmare) for Brutal Doom

Post by PaskaTykki »

Can you destroy corpses to prevent enemy respawn?
User avatar
Lance
Posts: 34
Joined: Fri Mar 15, 2013 9:46 pm
Location: NYC

Re: Monster Respawning (Nightmare) for Brutal Doom

Post by Lance »

I was using Zandronum to load Brutal Doom, and yeah I was dragging it before your respawn mod also. Still getting that error message. =/
thesleeve
Posts: 38
Joined: Tue Feb 21, 2012 10:57 am

Re: Monster Respawning (Nightmare) for Brutal Doom

Post by thesleeve »

PaskaTykki wrote:Can you destroy corpses to prevent enemy respawn?
No, my mod is a simple "hack" that makes a monster drop a respawner when it dies. The respawner is invisible and can't be destroyed. So, regardless of whether there is a corpse or if the monster explodes into gibs, it will respawn in 40 seconds.

It's more complicated to do anything else because Brütal Doom has so many different death states for each monster. It would be a major pain to go in and manually edit them all, so I chose the easy and simple route.
thesleeve
Posts: 38
Joined: Tue Feb 21, 2012 10:57 am

Re: Monster Respawning (Nightmare) for Brutal Doom

Post by thesleeve »

Lance wrote:I was using Zandronum to load Brutal Doom, and yeah I was dragging it before your respawn mod also. Still getting that error message. =/
Try creating a shortcut and manually writing the command line parameters instead of dragging the wad to the executable. In the case of zandronum, make a shortcut and edit its properties. You will see a path to the zandronum.exe somewhere. Change it to this:

C:/(path to your zandronum directory)/zandronum.exe -file brutalv018a.pk3 BrutalDoomNightmare_TheSleeve.wad

That's the way I launch it. I think there are some tutorials on this forum to help in case you are having trouble. I wish I could provide more details, but I'm at the pub having beer and brunch right now, so I am posting from my phone.

Oh, you can also try using Doomseeker and adding my mod after brutal doom in the list of add on Wads, then choose the "Play offline" option.
thesleeve
Posts: 38
Joined: Tue Feb 21, 2012 10:57 am

Re: Monster Respawning (Nightmare) for Brutal Doom

Post by thesleeve »

By the way Lance, I played a network deathmatch game last night with my friend and we used this mod, and it worked fine. We were using Zandronum. Hopefully you'll be able to get it working!
thesleeve
Posts: 38
Joined: Tue Feb 21, 2012 10:57 am

Re: Monster Respawning (Nightmare) for Brutal Doom

Post by thesleeve »

Lance wrote:I was using Zandronum to load Brutal Doom, and yeah I was dragging it before your respawn mod also. Still getting that error message. =/
Lance, here's the method for launching my mod (or any mod) when the order of wad loading is important.

* Make sure both brutalv018a.pk3 and my mod (BrutalDoomNightmare_TheSleeve.wad) are in the same folder as your Zandronum.exe executable.
* Right-click on Zandronum.exe and choose the "Create shortcut" option.
* Find the shortcut it created. Normally it is called "Zandronum - shortcut".
* Right click on the shortcut and choose the "Properties" option.
* There are 5 tabs at the top of the window that opens up - General, Shortcut, Compatibility, Security and Details. Click the Shortcut tab.
* Find the line that says "Target:". It should show the directory path to your zandronum executable. In the case of my computer, since I installed Zandronum on the desktop, it reads:

Code: Select all

C:\Users\thesleeve\Desktop\Games\Zandronum\zandronum.exe
(In your case, the part that comes before "zandronum.exe" might be different because you installed it in a different path)
* Add this to the end of the Target: line: -file brutalv018a.pk3 BrutalDoomNightmare_TheSleeve.wad
* So, it should now look like this:

Code: Select all

C:\Users\thesleeve\Desktop\Games\Zandronum\zandronum.exe -file brutalv018a.pk3 BrutalDoomNightmare_TheSleeve.wad
* Click the OK button at the bottom of the window to save your edits to the shortcut.

Now, double-click the shortcut and it should execute properly.
thesleeve
Posts: 38
Joined: Tue Feb 21, 2012 10:57 am

Re: Monster Respawning (Nightmare) for Brutal Doom

Post by thesleeve »

Ah, sorry everyone. I found another small bug. Working on it now. I will update the wads soon...
thesleeve
Posts: 38
Joined: Tue Feb 21, 2012 10:57 am

Re: Monster Respawning (Nightmare) for Brutal Doom

Post by thesleeve »

OK, I just made the fix and updated the new files. It turns out that I had forgotten to make the ZombieMan, ShotgunGuy, and ChaingunGuy drop their respective weapons when you kill them in the classic Nightmare mode. This is now fixed.
User avatar
Lance
Posts: 34
Joined: Fri Mar 15, 2013 9:46 pm
Location: NYC

Re: Monster Respawning (Nightmare) for Brutal Doom

Post by Lance »

It worked, thanks man, it's fun playing Brutal Doom with this lol

Return to “Gameplay Mods”