How do I enable multiplayer monsters in singleplayer?

General help and assistance forum.
Post Reply
Ralf
New User
Posts: 5
Joined: Sun Jan 31, 2016 6:37 pm

How do I enable multiplayer monsters in singleplayer?

#1

Post by Ralf » Sat Aug 26, 2017 11:25 am

Many maps have extra monsters that are only active in multiplayer, to up the difficulty for co-op. I'd like to enable them for singleplayer games, but I can't figure out how.

A sort of solution is to make a local server and connect to it with sv_noweaponspawn, but that comes with the burden of having the game act like it's a server, and not a singleplayer game.

Is there a way to just enable things with the non-singleplayer flag in singleplayer?

I made a python script to edit maps in .wad files to do this, for now:

Code: Select all

from sys import argv
from struct import pack, unpack
if len(argv) == 1:
	input('No input .wad specified.\nDrag a .wad file onto the script, or run the script with the .wad as a parameter. This will directly edit the file, so keep a backup!\n')
	quit()
thing_monsterthings=(7,9,16,58,64,65,66,67,68,69,71,72,84,3001,3002,3003,3004,3005,3006)
f = open(argv[1],'rb+')
f.seek(4)
wad_numfiles      = unpack('I',f.read(4))[0]
wad_iaddress      = unpack('I',f.read(4))[0]
wad_ioffset       = 0
info_flagsflipped = 0
f.seek(wad_iaddress)
for file in range(wad_numfiles):
	wad_ientry_offset = unpack('I',f.read(4))[0]
	wad_ientry_size   = unpack('I',f.read(4))[0]
	wad_ientry_name   = f.read(8)
	wad_ioffset       +=1
	if wad_ientry_name == b'THINGS\0\0':
		if wad_ientry_size % 10:
			raise AssertionError('Things lump (file {}) is not divisible by 10; halted.'.format(wad_ioffset))
		f.seek(wad_ientry_offset)
		for thing in range(wad_ientry_size//10):
			f.seek(wad_ientry_offset+thing*10+6)
			thing_type  = unpack('H',f.read(2))[0]
			thing_flags = unpack('H',f.read(2))[0]
			if thing_type in thing_monsterthings:
				if thing_flags & 0x10:
					f.seek(f.tell()-2)
					f.write(pack('H',thing_flags^0x10))
					info_flagsflipped+=1
		f.seek(wad_iaddress+10*wad_ioffset)
f.close()
if info_flagsflipped:
	print('Activated {} multiplayer-only monster{}.'.format(info_flagsflipped,'' if info_flagsflipped == 1 else 's'))
else:
	print('No multiplayer-only monsters found.')
input()

User avatar
WaTaKiD
Master Server Admin
Posts: 126
Joined: Mon Oct 08, 2012 4:40 am
Location: USA

Re: How do I enable multiplayer monsters in singleplayer?

#2

Post by WaTaKiD » Sat Aug 26, 2017 11:41 am

open the ingame console and do:
netgame ; sv_noweaponspawn 1 ; map map01

Ralf
New User
Posts: 5
Joined: Sun Jan 31, 2016 6:37 pm

Re: How do I enable multiplayer monsters in singleplayer?

#3

Post by Ralf » Sat Aug 26, 2017 12:05 pm

Perfect! Thanks for the quick answer.
EDIT: Almost perfect! It's pretty much the same thing as just starting up a server, but cuts out a bit of the process. I'll keep this command in mind though.

User avatar
Empyre
Zandrone
Posts: 1316
Joined: Sun Jul 08, 2012 6:41 am
Location: Garland, TX, USA

Re: How do I enable multiplayer monsters in singleplayer?

#4

Post by Empyre » Sat Aug 26, 2017 3:12 pm

In Doomseeker's Create Game dialog box, in the Custom Parameters box, type +multiplayer (the + is important), and set the flags as desired in the Zandronum tab, including Don't Spawn Deathmatch Weapons on the Cooperative tab of the flags. Then click Play Offline. This will set up multiplayer emulation mode, where you have the best of both worlds: you get the multiplayer-only monsters, you can respawn, but you can also pause, save the game, and use cheat codes. There is one downside: that mode has no support for voodoo dolls, so any map that depends on voodoo dolls will be broken, which is why I never use them in my maps. Setting it up in Doomseeker is extra work the first time, but when you want to play the same thing again later, it is so simple. You can also save and load configurations for different wads and combinations of wads.

If you really don't want to use Doomseeker (try it, you'll like it), you can type multiplayer (no + here) in the console. Doom Explorer can do the same thing, but I personally prefer Doomseeker.
"For the world is hollow, and I have touched the sky."

Ralf
New User
Posts: 5
Joined: Sun Jan 31, 2016 6:37 pm

Re: How do I enable multiplayer monsters in singleplayer?

#5

Post by Ralf » Sun Aug 27, 2017 11:34 am

I was hoping for a way to do this in normal singleplayer mode, for reasons like Empyre's voodoo doll mention. I suppose Zandronum just lacks this functionality, so I'll stick to my script for proper play.

Thanks for the help anyways; I'm happy to have replaced the server creation process with netgame (and multiplayer, same command) for when I do need that.

Post Reply