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

Generalized Boom Types

Recommended Posts

Where can I find specific details on Boom's generalized linedef and sector types? I looked through boomref.txt and it basically says "these are the options, put them together." But it doesn't say what values/bits to set.

Share this post


Link to post

I'm talking about the action types. For example, how to make a door that requires more than one key. That link doesn't give information on how to do this.

Share this post


Link to post

The actions are divided into the following ranges

0x2F80 <= n < 0x3000: Crushers
0x3000 <= n < 0x3400: Stairs
0x3400 <= n < 0x3800: Platforms
0x3800 <= n < 0x3c00: Locked doors
0x3c00 <= n < 0x4000: Regular doors
0x4000 <= n < 0x6000: Ceilings
0x6000 <= n < 0x8000: Floors

To decode the meaning of a trigger number, you first subtract it by the range's lower limit, which'll give you the bits that contain information.

For example, if a number is in the range between 0x3000 and 0x3400, you subtract 0x3000. You'll then get a 10 bits long int (because 0x400 is 10 bits).

The least significant 3 bits always define the trigger method:

000 - Walk across (works once)
001 - Walk across (works repeatedly
010 - Switch (works once)
011 - Switch (works repeatedly
100 - Shoot (works once)
101 - Shoot (works repeatedly
110 - Push door (works once)
111 - Push door (works repeatedly

The next 2 bits always define the speed:

00 - Slow
01 - Normal
10 - Fast
11 - Turbo

The remaining set of bits is of variable length (depending on the size of the range). They come in chunks of one bit (binary attribute, e.g. whether a ceiling crushes or not) up to three bits (as used to define the keys for locked doors).

If it helps, here's the guts of a decoder function i wrote in Python:

if 0x2F80 <= n < 0x3000:
    n -= 0x2F80
    d += ["CRUSHER"]
    d += [("W1","WR","S1","SR","G1","GR","P1","PR") [n&0x0007]]
    d += [("SLOW","NORMAL","FAST","TURBO")          [(n&0x0018)>>3]]
    d += [("MONSTER","")                            [(n&0x0020)>>5]]
    d += [("SILENT","")                             [(n&0x00c0)>>6]]
elif 0x3000 <= n < 0x3400:
    n -= 0x3000
    d += ["STAIR"]
    d += [("W1","WR","S1","SR","G1","GR","P1","PR") [n&0x0007]]
    d += [("SLOW","NORMAL","FAST","TURBO")          [(n&0x0018)>>3]]
    d += [("","MONSTER")                            [(n&0x0020)>>5]]
    d += [("4","8","16","24")                       [(n&0x00c0)>>6]]
    d += [("DOWN","UP")                             [(n&0x0100)>>8]]
    d += [("", "IGNTXT")                            [(n&0x0200)>>9]]
elif 0x3400 <= n < 0x3800:
    n -= 0x3400
    d += ["PLATFORM"]
    d += [("W1","WR","S1","SR","G1","GR","P1","PR") [n&0x0007]]
    d += [("SLOW","NORMAL","FAST","TURBO")          [(n&0x0018)>>3]]
    d += [("MONSTER","")                            [(n&0x0020)>>5]]
    d += [("1","3","5","10")                        [(n&0x00c0)>>6]]
    d += [("LNF","NNF","LNC","PERP")                [(n&0x0300)>>8]]
elif 0x3800 <= n < 0x3c00:
    n -= 0x3800
    d += ["DOOR"]
    d += [("W1","WR","S1","SR","G1","GR","P1","PR") [n&0x0007]]
    d += [("SLOW","NORMAL","FAST","TURBO")          [(n&0x0018)>>3]]
    d += [("OWC","OSO")                             [(n&0x0020)>>5]]
    d += [("ANY","RED","YELLOW","BLUE","RED",
           "BLUE","YELLOW","ALL")                   [(n&0x01c0)>>6]]
    d += [("3KEYS","6KEYS")                         [(n&0x0200)>>9]]
elif 0x3c00 <= n < 0x4000:
    n -= 0x3c00
    d += ["DOOR"]
    d += [("W1","WR","S1","SR","G1","GR","P1","PR") [n&0x0007]]
    d += [("SLOW","NORMAL","FAST","TURBO")          [(n&0x0018)>>3]]
    d += [("OWC","OSO","CWO","CSC")                 [(n&0x0060)>>5]]
    d += [("MONSTER","")                            [(n&0x0080)>>7]]
    d += [("1SECS","4SECS","9SECS","30SECS")        [(n&0x0300)>>8]]
elif 0x4000 <= n < 0x6000:
    n -= 0x4000
    d += ["CEIL"]
    d += [("W1","WR","S1","SR","G1","GR","P1","PR") [n&0x0007]]
    d += [("SLOW","NORMAL","FAST","TURBO")          [(n&0x0018)>>3]]
    d += [("TRIG","NUM")                            [(n&0x0020)>>5]]
    d += [("DOWN","UP")                             [(n&0x0040)>>6]]
    d += [("HNC","LNC","NNC","HNF","FLR",
           "SUT","24","32")                         [(n&0x0380)>>7]]
    d += [("","CPYTEX+DELTYPE","CPYTEX","CHGTYPE")  [(n&0x0c00)>>10]]
    d += [("CRUSH","")                              [(n&0x1000)>>12]]
elif 0x6000 <= n < 0x8000:
    n -= 0x6000
    d += ["FLOOR"]
    d += [("W1","WR","S1","SR","G1","GR","P1","PR") [n&0x0007]]
    d += [("SLOW","NORMAL","FAST","TURBO")          [(n&0x0018)>>3]]
    d += [("TRIG","NUM")                            [(n&0x0020)>>5]]
    d += [("DOWN","UP")                             [(n&0x0040)>>6]]
    d += [("HNF","LNF","NNF","LNC","CL",
           "SLT","24","32")                         [(n&0x0380)>>7]]
    d += [("","CPYTEX+DELTYPE","CPYTEX","CHGTYPE")  [(n&0x0c00)>>10]]
    d += [("CRUSH","")                              [(n&0x1000)>>12]]
The information used above should be correct, I haven't verified it though :)

To compile a trigger number, just go backwards: compose the bits and then add the range number.

Share this post


Link to post

In Doom Builder you can mix and match these without all the hex flag editing, if you like

Share this post


Link to post
iori said:

In Doom Builder you can mix and match these without all the hex flag editing, if you like

This is for the code of an editor, and the hex flag editing is what's done on that level.

Share this post


Link to post

I think the source code for the BOOM editing utility TRIGCALC is available out there somewhere -- probably on Jim Flynn's site, if it is still up (I hope so; I've heard he's fallen on hard times :-< )

Share this post


Link to post

Thank you, Fredrik, for your informative post.

I do not use Doom Builder since I do all of my editing in Linux.

Share this post


Link to post
John Gaughan said:

I'm talking about the action types. For example, how to make a door that requires more than one key. That link doesn't give information on how to do this.


Ah, sorry... thought you meant the types and not triggers. To use the new generalised action triggers, you'll need to calculate them. Fortunately for you, you do not need to do that yourself but use the utility TRIGCALC.EXE which you can find in your Boom editing package. If you don't have it, we have a link to it at the first link I gave you. For more info on TRIGCALC, check out "the tools" link, or the docs that came with it.

If your editor does not support the new calculated trigger number, you can insert it in your level with the tool CLED. Again, more info at that link (as well as a few examples).

TRIGCALC and CLED are DOS utilities, and thus may not work on a XP machine. In that case, install VDMS (search for it on google) and run it with VDMS.

Share this post


Link to post

I have a zip file from the official Boom page, but it doesn't have the utilities in it. I'll go look again, hopefully they have source code too.

My ultimate goal is to write a GUI calculator for Boom features, and somehow integrate extended Doom features from all ports into my editor, Winwad. It's a lot of work -- right now its main feature is crashing :-)

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
×