Page 1 of 1

Making doors stay open

Posted: Sun Oct 16, 2011 3:57 am
by marco75
Most of the doors in Doom are opened manually, but close automatically. They are defined by LineDef Action Type 1 and 117. I find this irritating. Often there is an entire menagerie of monsters in the room on the other side, and with some weapon mods I get killed the very instant I open the door.

As an illustration, here's a webcomic:
http://www.vgcats.com/comics/?strip_id=210

1) I would like to find a way to find and replace the following throughout a multi-level WAD:

LineDef Action Type 1 -- change to 31
LineDef Action Type 117 -- change to 118

I can do this in DoomBuilder using the search and replace function, but this is very tedious for a 32 map WAD.

What is the best way to do this?

2) Since I don't think uploading a level with just some LineDefs changed is good practice (and contravenes the wishes of most map authors), is it possible to make a patch like the following?

original.WAD
==========
MAP01
THINGS
LINEDEFS
SIDEDEFS
VERTEXES
SEGS
SSECTORS
NODES
SECTORS
REJECT
BLOCKMAP
MAP02
THINGS
LINEDEFS

MAP03
THINGS
LINEDEFS


patch.WAD
=========
MAP01
LINEDEFS
MAP02
LINEDEFS
MAP03
LINEDEFS

The idea that only the LINEDEFS entry in the original is overwritten by the corresponding entry in the patch, but the other entries are unaffected.

Re: Making doors stay open

Posted: Sun Oct 16, 2011 4:39 am
by Gez
I have no idea what you're on if you think doors closing is what kills you when you open them, but anyway what you need to read about is [wiki]map translator[/wiki]. Then you can make yourself your own little xlat file based on the existing ones in zdoom.pk3, but replacing all [wiki]Door_Raise[/wiki] by [wiki]Door_Open[/wiki]n and setting all the the delays in [wiki]Door_LockedRaise[/wiki] to 0.

Re: Making doors stay open

Posted: Sun Oct 16, 2011 2:18 pm
by ibm5155
you told what i wnat to told =/

Re: Making doors stay open

Posted: Sun Oct 16, 2011 2:41 pm
by wildweasel
This doesn't really help much to the point of the thread, but the original poster should probably learn to open doors tactically - that is, don't just stand directly in front of a door and hit Use. Stand off to the side, in cover if you can, and punch it from there. If you can't reach the door from cover, tag it and RUN for the nearest solid object. Use choke points (like smaller doors) to filter the crowd.

Re: Making doors stay open

Posted: Sun Oct 16, 2011 11:29 pm
by Virtue
I think his point is it would be nice to change it as a single flag or tag to give the option easier than going through a level editor and changing every single door in Doom1 and Doom2....

Re: Making doors stay open

Posted: Sun Oct 16, 2011 11:41 pm
by NeuralStunner
Can't you use a modified map translator? Look in ZDoom.pk3\xlat.

Re: Making doors stay open

Posted: Mon Oct 17, 2011 7:03 am
by marco75
I admit I'm a bit confused by the "Map translator", "MAPINFO" and "Action specials" pages in the ZDoom wiki.
Please tell me if I understand correctly:

I can re-define LineDef tag numbers for ZDoom-derived ports such as GZDoom and Skulltag using the MAPINFO lump:
Simply make a doors-open.pk3 containing two lumps:

MAPINFO
doors_stay_open.txt

MAPINFO consists of a single line:
translator = doors_stay_open.txt

doors_stay_open.txt has three lines:
include "xlat/doom.txt"
1 = USE, Door_Open (0, D_SLOW, tag)
117 = USE, Door_Open (0, D_FAST, tag)

So if doors-open.pk3 is loaded last in the PWAD list, it will make the doors of type 1 and 117 behave as though they were of type 31 and 118 respectively? If so, this would truly be the most elegant solution!

As an aside, it's not so much that the doors auto-closing are getting me killed, I really just find them annoying.
I find hydraulic lever doors annoying IRL, too, it's just a personal preference.

Re: Making doors stay open

Posted: Mon Oct 17, 2011 9:40 am
by Gez
You seem to have got it, yeah.

Re: Making doors stay open

Posted: Sat Oct 22, 2011 7:27 pm
by marco75
The doors-stay-open.pk3 as described above produces an error message; I have changed it, now I don't get an error message, but I also get zero effect. Maybe someone could point out what's missing? The wiki doesn't have an example of custom translators being used in MAPINFO, it just mentions that it can be done somehow.

Code: Select all

doors-stay-open.pk3:
===================
MAPINFO
doors_stay_open

MAPINFO:
========
gamedefaults
{
translator = doors_stay_open
}

doors_stay_open:
===============
include "xlat/doom.txt"
1 = USE, Door_Open (0, D_SLOW, tag)
117 = USE, Door_Open (0, D_FAST, tag)
63 = USE|REP, Door_Open (tag, D_SLOW)
114 = USE|REP, Door_Open (tag, D_FAST)
29 = USE, Door_Open (tag, D_SLOW)
111 = USE, Door_Open (tag, D_FAST)
26 = USE|MONST,	Door_LockedRaise (0, D_SLOW, 0, BCard | CardIsSkull, tag)
28 = USE|MONST,	Door_LockedRaise (0, D_SLOW, 0, RCard | CardIsSkull, tag)
27 = USE|MONST,	Door_LockedRaise (0, D_SLOW, 0, YCard | CardIsSkull, tag)

Re: Making doors stay open

Posted: Mon Oct 24, 2011 2:22 am
by Gez
Your problem is that there are no "gamedefault" block in MAPINFO, it's a gameinfo block instead.

Re: Making doors stay open

Posted: Mon Oct 24, 2011 4:57 am
by marco75
Thanks, it works now! :-)

The information is listed in http://zdoom.org/wiki/MAPINFO/GameInfo_definition. I missed that page; I read http://zdoom.org/wiki/MAPINFO/Map_definition instead and misinterpreted the gamedefaults explanation.

Still, maybe it would be a good idea to give this as a code example on the http://zdoom.org/wiki/Map_translator page, on how to use the translator property in the MAPINFO lump?