Optional Gameplay Mod Question

Ask about mapping, UDMF, using DoomBuilder/editor of choice, etc, here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Optional Gameplay Mod Question

Postby Oliver Condlehet » Sat Nov 28, 2020 11:04 pm


I have a mapping/decorate question. I'd like to hear some opinions on what's the smartest way to go about this.

My friends and I are working on a mapset designed for vanilla, but our modder would like to include an -optional- gameplay mod enchancement with it that adds some extra enemies. Suppose a mapper wanted to add the new monsters to their map. The mapper places a new thing and changes the ThingID to that of the newly created monster.

Again, the gameplay mod is supposed to be optional. The map should be able to be played without the gameplay mod. When playing without the gameplay mod, the new thing will not appear in the game. But we would at least like... something to appear?

We thought of two options, none of which seem ideal.

1. We create a dehacked patch that duplicates a vanilla monster (such as a revenant) to share IDs with the custom monsters in the decorate mod. With the mod, the new monster will appear. Our thinking is that when playing without the mod, the dehacked patch will substitute the custom monster with a revenant. We don't know yet if using dehacked in conjunction with decorate will create conflicts, or which lump takes priority over the other. We're also doubtful users will load a dehacked patch that essentially adds no custom content to the wad.

2. We rename one of the skill levels to "no gameplay mod" and use the skill flags to call vanilla monsters versus custom ones. This kinda forfeits skill levels in our maps though, doesn't it?

Keep in mind we don't want to replace all or most of a particular monster species with a custom decorate one. Ideally we would like to let the mapper have full control of their vanilla monster placement, be free to place new monsters, and let players choose whether they play with or without the gameplay mod without compromising the map.

Oliver Condlehet

Re: Optional Gameplay Mod Question

Postby Caligari87 » Sun Nov 29, 2020 6:26 pm

A couple possibilities both using ZScript to determine which actors to replace:

  1. If by "vanilla" you mean "using only stock Doom actors for gameplay mod compatibility", then you could use the UDMF map format and apply a custom UDMF property to the things you wish to be replaced with your custom actors. Then (in the gameplay mod half) you'd use a ZScript event handler to check all the map actors at runtime and replace them with the custom version if they have this property tag.
  2. If you're actually using vanilla map format then your options become a little more limited but a similar principle applies. You can "hard-code" a ZScript event handler in your gameplay mod to replace actors at a certain positions or that meet other criteria.
Either of these could be achieved with the WorldThingSpawned() handler, or with a LevelPostProcessor(). The latter would be especially flexible since you could define which replacements to do, by verifying the map's checksum (GZDoom does this internally for many older maps that otherwise wouldn't run correctly without modifications)

User avatar
I'm just here for the community
User Accounts Assistant
Joined: 26 Feb 2004
Location: Salt Lake City, Utah, USA
Discord: Caligari87#3089

Return to Mapping

Who is online

Users browsing this forum: No registered users and 2 guests