DOOM2 CONSISTENCY CHECKER (DCC) v3.01
-------------------------------------

Author: Rand Phares ([email protected])
       Co-author of Cleimos & Cleimos2
       Member of TeamTNT, contributor to Icarus, Bloodlands,
       Grievance, and the BOOM source project.


Introduction
------------

Many wad editors provide consistency checking, but they provide
it to different degrees.  My purpose in writing DCC is to provide a single
program that can tell you as much as possible about the basic and
"fit-and-finish" problems that can (and will) plague map design.  It was
originally designed for use by TeamTNT on the Bloodlands and
Grievance projects, and was used on Final Doom just before publication.

DCC cares Absolutely Nothing about playability or design choices.  It simply
looks for problems that may cause DOOM2 to abort, or for problems that
just Look Bad.

DCC _will not_ alter your *.wad file.  It writes its output to the screen,
unless you redirect it.  You can provide options to have DCC correct certain
problems for you, and DCC will create a NEW *.wad file with the corrections.

DCC only handles DOOM2 and BOOM wads.  It doesn't deal with DOOM, Heretic, or
Hexen wads.  There are no plans to make it do so.


Preprocessing
-------------
DCC requires that you run DCC_PRE first to retrieve information about the
graphics you're using.  This information could be coming from

       - standard DOOM2.wad (IWAD)
       - a replacement IWAD if you're doing a full TC
       - a PWAD that has custom graphics

Read the dcc_pre.txt file for instructions on how to run DCC_PRE.

DCC_PRE will create a data file (*.tdt) that DCC reads.


How to use DCC
--------------

Command Line

     dcc [options] <mapfile>

     where <mapfile> is the PWAD file containing the maps to be examined,
     and where the options include:

        -boom

           Check for the enhanced features of BOOM.

        -b

           Check for bullet-absorbing lower textures.  This is a prevalent
           condition, and nothing short of redesign will make it go away,
           so checking for it is optional.

           BOOM corrects the absorption, so no absorption errors will be
           reported if -boom is included as an option, even if -b is
           included.

        -h

           Create a new copy of <mapfile> with the hidden (not shown on
           automap) bits set on the lines DCC thinks it should be set on.

        -r

           Create a new copy of <mapfile> with "rocket absorbing" problems
           corrected.  Not all conditions can be corrected automatically.

        -t

           Check for problems caused by undefined textures, y-alignment,
           invalid flat names, texture height math, or missing textures.
           If you don't specify -t, DCC will only check for missing
           textures.

        -o <outfile>

           If creating a new version of <mapfile>, this tells DCC what
           it's called.  If not supplied, and output is needed (i.e.
           setting hidden bits on lines), the file "tmp.wad" will be
           created.  Your original *.wad file will not be changed.

        -y

           DCC will automatically apply the y-offsets it reports.  It
           will not make any changes corresponding to "pegging change"
           messages.  Those are left to the author.  DCC always applies
           changes in the form of y-offsets, even though upper- or lower-
           unpegging might also have fixed the problem.  See the section
           "Y-Alignment" below.

        -s

           DCC will ignore errors from conditions that may be there on
           purpose to provide special effects.  These include:

               I0111: Sector floor is above its ceiling
               E0119: Vertices are identical
               E0121: Lines intersect
               I0126: Sectors are identical
               I0132: Line is detached
               E0302: Missing lower texture
               E0303: Missing lower texture
               E0304: Missing upper texture
               E0305: Missing upper texture

        -f

           One of DCC's checks is to see if lines intersect, rather than
           meet at vertices. This check consumes 50% of the overall
           time it takes DCC to check a map. Using the -f switch will skip
           this check, allowing DCC to run twice as fast.

        -i <filename.ini>

           Use an alternate DCC.INI file.


Examples:

   dcc myfile.wad

       will report any errors found in 'myfile.wad'.

       No texture-related problems will be reported, but missing textures
       will be reported.

   dcc -boom myfile.wad

       Same as the previous example, with extra checking for BOOM-
       specific features, and with some checking eliminated in the cases
       where BOOM fixed the condition.

   dcc -t myfile.wad

       will report any errors found in 'myfile.wad', and will use texture
       and flats data from the *.tdt file defined in DCC.INI.

   dcc -h -i myfile.ini -o newfile.wad myfile.wad

       will correct any hidden line problems and write the new wad info
       to newfile.wad. It will use data from the alternate initialization
       file MYFILE.INI.


Redirecting and Paging Output
-----------------------------

DCC's output can be redirected to a file.

   dcc myfile.wad > results.dcc

DCC's output can be stepped through one screen at a time.

   dcc myfile.wad | more


Error Classes
-------------

       Each problem has been assigned to one of 10 classes:

               01 Basic problems with all elements
               02 Things
               03 Textures
               04 Flats
               05 Triggers, Tags
               06 Hidden Lines
               07 Pegging
               08 Keys and Locked Doors
               09 Secrets
               10 Exits

       The Error Class is printed with the problem description, allowing
       you to parse the output if you are trying to focus on a specific
       class of problems (i.e. correct pegging on lines).  For example,
       you might see:

               E0701: Line 1305 should NOT use lower unpegging

       If you were only interested in pegging problems, you could post-
       process the report looking only for E07 problems.


Informational Messages
----------------------

       These aren't errors, but may give you some clues about things you'd
       like to change.  For example:

               I0902: Sector   17 is SECRET
               I0902: Sector  234 is SECRET

       tells you that you have two secret sectors.  If you thought you had
       three or four, you'll want to go back and figure out where they        went.


A Note on TC's
--------------

       Texture and Flats information is taken from whatever IWAD and
       PWAD files you provide DCC through DCC_PRE.  This is as far as
       I've taken 'customization' in this version.  For example, the
       standard monster data is still being used.

       Future work will include extracting custom monster data, and any
       other custom data that will be necessary for DCC to give a proper
       diagnosis.


What does DCC look for?
-----------------------

Basic Field Integrity

        1. Do all fields of all elements (vertices, lines, sides,
           sectors, things) contain valid entries?

Vertices

        1. Do any vertices share the same coordinates?

        2. Are there vertices not being used by lines?

Lines/sides

        1. Are there sides not being used by lines?

        2. Are there lines whose vertices are the same (NULL-length)?

        3. Are there lines who have the same vertices (coincident)?

        4. Do all lines have at least a "right" side?

        5. Do lines marked "2-sided" have 2 sides?

        6. Are there 1-sided lines that aren't marked impassable?
           (*OBSOLETE* As of v3.00, this is a valid situation.)

        7. Are there candidates for hidden lines?  These are lines you
           don't want shown on the automap.  (Report any lines whose
           sectors have the same floor and ceiling heights, and whose
           sectors do not move.  These are typically lighting changes and
           walking trigger lines that you might want to hide.)

           Use the -h command-line switch if you want DCC to automatically
           set the hidden bit on these lines.

           The hidden (or invisible) flag on a linedef is so the line won't
           show on the automap.  When you slice up a room into sectors with
           a lot of lighting changes, the automap shows a spiderweb of lines
           in the room.  The player uses the automap to figure out where
           they've been and where they should go next, and lighting-change
           lines are useless in that context.  So ID gave us the "hidden" or
           "invisible" flag to blow all those things out of the automap,
           leaving the player with lines that are meaningful.

           When DCC encounters such a line, and finds that you haven't
           already marked it hidden, it'll suggest that you do.  (DCC is
           smart enough to recognize rising stairs and lifts and things,
           which are _useful_ lines on the automap.)

           BOOM allows you to hide these lines in the automap, so if the
           -boom switch is used, potential hidden lines are not reported.

        8. Are manual door triggers used on 1-sided lines?

        9. Are there more than 64 animated walls?

           This limit is removed in BOOM, and not reported with -boom.

       10. Are there impassable 2-sided lines with no texture on
           either normal?  (NOTE: Not necessarily a problem,
           since this is used on many "windows" to fence out the
           player.)

       11. Are there lines that intersect other lines w/o
           benefit of a shared vertex?

           If the -f switchis used, this check is skipped. This improves
           DCC's processing time by a factor of 2.

       12. Report sectors that have regular or secret exits.
           There's a problem if none are present.  (Unless the
           level is headed for the MAP30 slot, indicated by the
           presence of the BOSS...)

           In BOOM, if the map has no secret exits, you're given 100%
           secrets automatically.

       13. W1 teleport lines are noted, since WR is what's usually used,
           and having a W1 might indicate an error.

       14. Report any switch trigger lines that have the same sector on
           both sides. Ignore gun switches.

       15. Report any walking trigger lines that only have one side.

       16. The lower texture of a 2-sided line that has F_SKY1 ceilings on
           both sides will absorb bullets (no bullet puffs).  Report these.

           If a sector moves, then this check is also performed at the new
           sector position.

           This is not something the level author can correct without
           redesigning the part of the level that suffers the condition.
           Because of this, these messages are Informational, and only
           obtained through the use of the -b switch.

           BOOM corrects this error, so this check is skipped if the -boom
           switch is used.

       17. Rockets and plasma will be absorbed by a lower texture on either
           side of a 2-sided line that has an F_SKY1 ceiling on its second
           side, and where the ceilings on both sides have different
           heights.  Report these.

           If a sector moves, then this check is also performed at the new
           sector position.

           There are 2 distinct cases: 1) only one F_SKY1 is involved, and
           2) two F_SKY1's are involved.  Case 2 is only correctable by
           changing the ceiling height of one of the sectors involved.  DCC
           will not offer to automatically correct for this.  Case 1 can be
           automatically corrected by DCC (using the -r switch), but this
           involves flipping the line.  DCC will NOT correct the condition
           if the line is a "side-oriented" trigger, i.e. a teleport
           trigger line.

           DCC assigns error E0128 to case 1, and error E0129 to case 2, so
           you can tell which ones DCC will automatically correct if told
           to do so.

           BOOM corrects this error, so this check is skipped if the -boom
           switch is used.

       18. Are there any detached lines?  These are lines whose vertices
           are not shared by any other vertices.  Detached lines are used
           to create special effects, or simply to define triggers.

           This check is skipped if the -s switch is used.

       19. Are BOOM's new line-controlled features properly used? Are the
           new line-to-line tags correct?


Texture Use

       1. Do the sides refer to nonexistent wall textures?

       2. Are there any missing textures?

       3. Are there any normal textures on 2-sided lines that
          extend into the floor or ceiling?  These can be fixed by
          making sure there's some difference (lighting, floor/ceiling
          heights) across the line.

       4. Are there any lines with a texture that is too short for where
          it's being used (Tutti-Frutti).  This only applies to textures
          shorter than 128.  It can also be caused by y-offsets, even if
          the wall height is OK.

          BOOM corrects Tutti-Frutti conditions, so these won't be
          reported if -boom is used.

       5. Are there any transparent textures being used on upper or lower
          walls?  (Tutti-Frutti)

          BOOM corrects Tutti-Frutti conditions, so these won't be
          reported if -boom is used.

       6. Are there any 2-sided lines using multi-patch textures on
          the normals? (Medusa Effect.) Not all multi-patch textures
          will cause Medusa, and this is accounted for, and whether
          Medusa appears depends also on which part of the texture is
          visible.

          BOOM corrects Medusa conditions, so these won't be
          reported if -boom is used.

       7. Are there any 1-sided lines that use transparent textures?
          (Tutti-Frutti)

          BOOM corrects Tutti-Frutti conditions, so these won't be
          reported if -boom is used.

       8. Textures on passable normals that are exposed by moving sectors
          (i.e. a door) will be reported.  Look for messages like:

               "Line 318's first side normal should have no texture"

          Any textures on normals that are visible w/o moving anything (i.e.
          sniper textures) are _not_ reported.

          Some special effects situations will have their normal textures
          reported by this check.  Just ignore them.

       9. Check for Y-alignment of neighboring textures.

      10. Check for X-alignment of neighboring textures. (NOT YET
          IMPLEMENTED)

      11. When there is a lower on a low-unpegged line, and the texture on
          the lower has a height less than 128, Tutti-Frutti can occur, even
          if the height of the lower is less than the height of the texture.
          DCC checks for this.

          Look for messages line:

          "TUTTI-FRUTTI: lower texture on low-unpegged line 14's 1st side"

          The simplest correction for this is to remove the low-unpegging.

          BOOM corrects Tutti-Frutti conditions, so these won't be
          reported if -boom is used.

      12. In BOOM, you can place user-defined COLORMAPS and TRANSLUCENCY
          Filters in the upper/normal/lower texture fields on sidedefs of
          controlling linedefs. DCC checks for proper use of these.


Moving Sectors

       One-by-one, move each sector that's movable.  Then, answer these:

       1. Are there any missing textures that are exposed by the move?

       2. Are there lines next to moving sectors that use
          unpegging incorrectly?

       3. For sectors that use door-triggers to open (both manual and
          tagged), does the door open enough to let you pass?  In many
          cases, there may be closets or cabinets that aren't designed
          for walk-through, but they'll be reported anyway.

       4. Are there more than 30 moving floors (including lifts)?  This
          won't tell you if the problem will occur, since more than 30
          have to be moving at the same time, but it will tell you if
          there's the _potential_ for it to happen.

          BOOM removes this limit, so this won't be reported if the -boom
          switch is used.

Tags

       1. Are there tagged lines that have no associated sectors?

       2. Are there tagged sectors that have no associated triggers?

       3. Are there trigger lines (other than manual door triggers)
          with no tag numbers?

       4. Are there tagged lines that aren't triggers?

          BOOM allows line-to-line tags, so 'target' lines can have tags
          w/o being trigger lines. These are not reported if the -boom
          switch is used.

       5. For each teleporter line, are there two or more teleporter
          exits sharing the tag?  (The higher-numbered exit will win.)

          For BOOM line-to-line teleporters, are there more than one exit
          linedefs?

       6. Are there teleport exits in the sectors that are tagged to
          teleport lines?

       7. Are there any tagged sectors referenced by teleport lines that
          don't contain teleport exit Things?

       8. Any 667 tag will be noted, since this is only useful on
          MAP 07 and MAP 32.

Sectors

       1. Are there any sectors not being used by sides?

       2. Are there mis-matched "pain" sector types and floor textures?

       3. Report the number of secret sectors.  There should be at least
          one, even if you have to stick it out in plain sight.

          BOOM allows you to have zero. It will report 100% secrets
          in this case.

       4. Are all sectors closed?  (Does not account for special effects.)

       5. Some flats are expected to be properly aligned on the 64x64
          grid.  (For example, the GATE* textures in standard DOOM2.)
          Are there any of these types of flats that might not look right?

       6. Are there any sectors whose ceilings are lower than their
          floors?

          Not reported if the -s switch is used.

       7. Do the sectors refer to nonexistent flats?

       8. Does the line bordering an F_SKY ceiling and a regular ceiling
          have an upper (sectors have the same height)?  Ditto floors.
          You expect to see a lip on those lines.

       9. Does a non-moving sector have zero height (floor = ceiling)?


Things

       Since things can appear at different skill levels, this has to
       be taken into account when asking these questions. In BOOM, there
       are two new flags: "doesn't appear in Co-op", and "doesn't appear
       in Deathmatch". These instances are also considered if the -boom
       switch is used.

       1. Is there a starting point for each player?  Is there more
          than one?  Skill level is irrelevant in this case.

       2. Are there between 4 and 10 DM starts?  Again, skill level is
          irrelevant.

       3. Are all things inside sectors?

       4. Are there any things on top of each other? In some cases, this
          is OK; it depends on what things are involved.

       5. Are any things sitting in sectors that are not tall enough for
          them?  Does the sector subsequently become taller through floor
          and/or ceiling movement, allowing the thing to fit?  If the
          sector has an F_SKY ceiling, everything fits.

       6. Are there any things stuck in walls?

       7. Are there any teleporter exits that don't appear on all skill
          levels?

       8. Are there any teleporter exits in untagged sectors?

       9. Are there Pain Elementals and more than 20 Lost Souls?  (Pains
          won't start shooting until the number of Lost Souls drops to
          20.)  These are standard DOOM2 monsters, of course, and if
          you're doing a TC, the names are probably different.

          BOOM eliminates this limit, so this isn't checked if the -boom
          switch is used.

      10. Are there keys for locked doors?

      11. Are there locked doors for keys?

      12. Is there more than one key with the same color? For BOOM, is
          there more than one key of the same type?

      13. Report on blocking things that are marked "multi".  While
          not necessarily a problem, the author may be using these
          to block off areas in DM, which may cause a problem in
          multiplayer mode.

      14. Do all Things exist on SOME skill level?

      15. Are any Player or DM starts marked MULTI?  This is unnecessary
          and confusing.

      16. In BOOM, is there more than one PUSH Thing in a sector? Does it
          exist at all skills?

Misc

       1. Are the level bounds too large for BLOCKMAP (ie. creates more
          than 21,844 blocks).  (NOT YET IMPLEMENTED)


Y-Alignment
-----------

DCC aligns textures by following common textures across the
normals, uppers, and lowers of connected lines.  It will stop
a "run" when it encounters a side that doesn't use the texture,
a side that is already part of the "run", or a lower that is less
than 25 units high (considered a step, which in most cases
doesn't figure into y-alignment).  DCC selects the most
commonly-used "y origin" from this set and aligns the others
accordingly.  DCC properly handles the case where several lines
may lead away from a vertex, essentially causing the "run" to
head off in different directions.  DCC doesn't care which line
starts the "run", as it will travel backward and forward across
the connected lines.  DCC will also "leap" across a sector from
normal to normal if the textures are the same.

Normals take precedence over uppers, and uppers over lowers.  If
a side is aligned based on its normal, and another "run" tries to
come across the upper, the second "run" will stop dead since
alignment has already taken place for the normal.  Same rule
when considering lowers in a "run".

CAVEAT: Always inspect the results if you use this option.
DCC might unknowingly undo your favorite y-offset in the name
of "proper" alignment.


Messages
--------

Here is a detailed description of the Error Messages and Information
Messages that DCC gives you, in numerical order.

E0100: Unused vertices:
E0101: Unused lines (no sides):
E0102: Unused sides:

   There are unused vertices, lines, or sidedefs in the map.
   Use your level editor to remove them.

E0103: Line 123 has zero length

   The vertices for line 123 lie on top of one another.  Move one vertex
   away from the other.

E0104: Line 123 has no 1st side

   The line probably has a second side, but its first side is missing.
   Add one.

E0105: Line 123 is one-sided, but isn't marked impassable

   *OBSOLETE*
   This is a valid situation.

E0106: Line 123 is two-sided, but has no 2nd side

   The line is marked two-sided, but there's no second side.  Add one,
   or mark the line as one-sided.

E0107: Line 123 is one-sided, but has a 2nd side

   *OBSOLETE*
   This is a valid situation.

I0108: Line 123 is impassable, has 2 sides, but no normal textures

   Normally, two-sided lines with no normal (middle) textures on both
   sides, are passable, barring floor and ceiling height restrictions.
   However, this MIGHT be a design choice you made.  Better check.

E0109: More than 64 animated lines (67)

   DCC found 67 animated lines (side-scrolling), and the DOOM2 engine
   only supports up to 64.

   BOOM removed this limit.

E0110: Unused sectors:

   There are unused sectors in the map. Use your level editor to remove
   them.

I0111: Sector 64's ceiling is below its floor

   The ceiling altitude of this sector is lower than the floor altitude,
   which doesn't make sense.  Unless you're doing some special effect,
   correct either the ceiling or floor.

E0112: Can't get through the door in sector 16

   This may not be an error, depending on whether you intended the
   player to walk through the area or not.  It might be an alcove that
   opens up to reveal a switch, or it might really be a door you expect
   the player to pass through.  Better check.

E0113: Thing 12 has an invalid angle of 390

   Valid angles lie between 0 and 360 degrees.

E0114: Thing 12 has an invalid type of 10000

   Better check what your editor says this thing is!  The DOOM2 engine
   only understands certain types.

E0115: Line 123 uses illegal line type 200

   Again, there are only a certain number of legal line types.  Better
   check what your editor did here.

E0116: Line 123 uses an invalid sector number 10000

   Probably referencing a sector higher than the number of sectors in
   your map.

E0117: Sector 12 has an invalid light level 400

   Light levels range from 0 to 255.

E0118: Sector 98 has an invalid type 100
E0118: Sector 98 has an invalid regular type 300
E0118: Sector 98 has an invalid general type 10000

   Check what your editor says this sector type is.  The DOOM2 engine
   only supports certain sector types.

   BOOM introduces general sector types, to allow multiple characteristics
   in the same sector.

E0119: Vertices 98 (line 56) and 107 (line 78) are identical

   These vertices lie on top of one another, which might not be what
   you intended.  Move one or the other if it's a problem.

E0120: Lines 876 and 877 are identical

   These lines lie on top of one another and share end vertices.  This
   is probably NOT what you intended.  Change one or the other.

E0121: Lines 67 and 76 intersect

   These lines intersect each other.  Unless you're doing this on
   purpose for some special effect, you should move one or the other
   so they don't intersect.  Lines should normally only touch each
   other because they share vertices.

E0122: Sector 77 isn't closed.  Check vertex 876.

   All sectors should be closed, unless you're doing some special
   effect.  The lines of this sector that touch at the given vertex
   probably have non-matching sectors on their first or second
   sides.

E0123: Line 56's [first/second] vertex is illegal

   The given vertex falls outside the set of vertices that are being
   used in your map.  Better check.

E0124: Line 87's [first/second] side is illegal

   The sidedef number on the first or second side of this line
   references an illegal sidedef, probably outside the set of sidedefs
   for your map.

I0125: Sector 78 has zero height

   This might be what you intended, but you should check anyway.  The
   ceiling and floor are at the same altitude, and the sector doesn't
   move.

I0126: Sectors 456 and 457 are identical; could be merged at line 655

   You could join these two sectors if you really wanted to, and get
   rid of the common line.

I0127: Line 45's [first/second] side lower absorbs bullets

   On a two-sided line, if the ceilings of both sectors are sky,
   and a lower is visible on either side, you'll get no bullet puffs
   when you shoot the lowers.  There isn't anything you can do about
   this unless you redesign the area.

I0127: Line 654's [first/second] side lower absorbs bullets.
      Sector 123 moved.

   Same as the previous message, but you can't see the lower texture
   until a sector moved.

E0128: Line 123's [first/second] side lower absorbs rockets (fix with -r)

   Similar to bullet absorption, but rockets and plasma are absorbed
   by the lower texture on the line.

   There are two cases.  The first case (E0129) is where neighboring sectors
   are both sky, and are at different heights.  DCC can't offer to fix
   these.  The second case (E0128) is where the second side of the line has
   a sky ceiling, and the first side doesn't, and the two ceilings have
   different heights.  DCC can offer to correct this, since it involves
   swapping the two side references so that the sky side becomes side one
   and the non-sky side becomes side two.

E0128: Line 2's [first/second] side lower absorbs rockets.
      Sector 123 moved (fix with -r).

   Same as the previous message, but a sector had to move to expose the
   affected lower texture.

E0129: (See E0128.)

I0130: Line 123's [first/second] side normal is textured.  Should it be?

   This involves moving sectors.  The best example is that of a door that
   has a texture on its normal.  In its closed state, the upper texture
   of the line forms the door face, and everything looks ok.  But when
   the door is opened, the normal (middle) texture of the line becomes
   visible, and looks like a separate texture that is being dragged up
   out of the floor as the door opens.

   To correct, remove the normal texture on the line.

E0131: Zero-length or missing blockmap!

   Not something you'll often see if you've bsp'ed your map properly.

I0132: Line 17 is detached

   One or both vertices of this line aren't used by any other lines.  If you're not
   trying to do some special effect, and this line isn't a trigger, you
   might want to tie it to another line.

E0201: Thing 98 isn't in a sector

   This thing lies outside all sectors.  Either delete it or move it
   inside a sector.

E0202: Thing 87 doesn't exist on ANY skill level

   You can set the skill levels where things will appear.  Unfortunately,
   this poor thing isn't being allowed in the game!  Better delete it
   or let it show up on some skill level.

I0204: Thing 77 is marked MULTI, and will block the player

   You may have design differences between Single-player and
   multi-player/deathmatch that require things like torches that only
   show up in multi-player/deathmatch mode.  But be careful that you
   haven't stuck these kinds of things in places where the player
   gets unintentionally blocked.  (I know, because I've done this!)

E0205: Thing 4 is a Player Start marked MULTI

   It makes no sense to mark Player Starts as MULTI.  Remove the
   MULTI flag.

E0206: Thing 43 is a teleport exit in an untagged sector

   You've got a teleport exit in a sector, but the sector isn't tagged,
   so it won't work.  Either remove the exit or tag the sector to the
   teleport trigger linedef.

E0207: Thing 6 is too tall for sector 76 (84 > 80)

   This is purely visual.  The height of the thing is taller than
   the height of the sector it's in.  Play the map and see if it
   matters.  If things don't look quite right, raise the ceiling or
   lower the floor, or remove the thing.

I0208: Identical things in the same spot.  Check thing 87.

   Sometimes this is ok, especially if you're trying to give the
   player a whole load of ammo at the same moment.  BUT, you might
   not have wanted to do this, so you better check.  Sometimes, level
   editors do strange things when you copy things.

E0209: Things 87 and 90 are stuck together

   These things are so close that they'll appear stuck together.  In
   the case of monsters, which are expected to move, they won't.
   Either move them apart, or delete one.

E0210: More than 20 Lost Souls (24) on skill 4,5

   When there are more than 20 Lost Souls on a map, Pain Elementals
   won't spit any more out.  When you see this message, it means that
   you're starting the level with PE's and >20 Lost Souls, so you're
   going to see the effect.  Since the number of Lost Souls may vary
   depending on skill level, that's shown.

   You should delete enough Lost Souls to get down to 20 or less.

E0211: There is NO Player [1/2/3/4] start

   The indicated Player Start is missing.  Stick one in.

E0212: Fewer than 4 DM starts (0)

   Whoa!  I guess you don't expect anyone to play Deathmatch with this
   level.  If you do, I suggest you add between 4 and 10 DM starts!

E0213: More than 10 DM starts (12)

   10 is the upper limit on DM starts, so trim back.

E0214: There are 2 Player 1 starts

   When this happens, the lowest-numbered Player Start is the one the
   engine uses, and the second one becomes a DOLL.  If the player
   can find the DOLL, it doesn't look too good.  Any damage to the DOLL
   hurts the Player.

   Some special effects (invisible weapons) rely on this, so if that's
   what you intended, leave it alone.  Otherwise, get rid of the bad
   Player Start.

E0215: Thing 65 is a DM Start marked MULTI

   It's useless to mark DM starts as MULTI.  Remove the flag.

E0216: Thing 45 is embedded in line 678

   If the thing is a monster, it won't move when it sees you.  It the
   thing is an inanimate object, it MAY appear stuck in the wall (part of
   it disappears depending on your viewing angle).  Definitely worth
   checking.

E0217: Thing 38 respawns, but appears on skill other than 3

   For TeamTNT Deathmatch projects, items that respawn are only allowed
   on skill 3.

E0218: Plasma! Thing 215 should not appear on skills 1 or 2

   For TeamTNT Deathmatch projects, plasma items aren't allowed on
   skills 1 or 2.

I0219: Thing 4 doesn't respawn.  Want it on skill 3?

   For TeamTNT Deathmatch projects, items that don't respawn aren't
   allowed on skill 3.

E0220: No monsters in TeamTNT DM Mode. See thing 67.

   For TeamTNT Deathmatch projects, monsters are not allowed.

E0221: Sector 101: PUSH-enabled, but no PUSHER Thing (skill 3, single-player)

   This sector has its PUSHER bit set, but there's no PUSHER Thing
   present. Add one.

E0222: >1 PUSHER Things in sector 22 (skill 1&2, Co-op)

   There can only be one PUSHER thing in a sector. Delete the extras.

E0223: Thing 3 is a Player Start not appearing in Co-op

   Player Starts should appear in all modes.

E0224: Thing 7 is a DM Start not appearing in DM

   DM Starts should certainly appear in DeathMatch mode!

E0301: Missing normal texture on line 888's 1st side

   Probably a one-sided line w/o a normal (middle) texture.  Add one.

E0302: Missing lower texture on line 88's 1st side
E0303: Missing lower texture on line 76's 2nd side
E0304: Missing upper texture on line 14's 1st side
E0305: Missing upper texture on line 98's 2nd side

   You're going to get HOM from these unless you add textures where
   indicated.

E0306: Line 76's [first/second]-side normal may extend into the floor
      or ceiling

   If the two sectors on either side of this line are identical (either
   they're the same sector number or their attributes are identical),
   and the height of the normal texture is taller than the wall
   space between floor and ceiling, (take breath) then the texture
   will appear to bleed either into the floor or ceiling.

   You can correct this by placing different sectors on either side
   of the line, then changing something subtle, like the light level
   so it's slightly different between the two sectors.

E0307: Line 77 uses unknown [upper/normal/lower] texture JUNKY

   Your map uses a texture that isn't included in the texture list.
   Better change to a valid texture, or check your custom textures to
   make sure they're being included in the PWAD when you build it.

E0308: MEDUSA: Line 765's [first/second]-side normal

   MEDUSA occurs if you have a multi-patch texture on a two-sided
   normal.  DCC will tell you if any of the multi-patch part of the
   texture is showing.

   Either remove the texture, or pick another one that's made of only
   a single patch.  You probably don't know how many patches make up
   textures, so just keep trying different textures until the problem
   goes away.

E0309: Missing [upper/normal/lower] texture on line 123's [1st/2nd] side; a
E0310  [staircase/floor/ceiling/door/elevator] moved
E0311
E0312
E0313

   Moving sectors again.  A missing texture was exposed by a moving
   sector.  You should place a texture in the indicated place.

E0314: TUTTI-FRUTTI: [upper/normal/lower] texture on
E0315  line 123's [1st/2nd] side
E0316
E0317
E0318

   If the texture height is <128, it will not tile properly, and you
   will get a patchwork of colors if the wall height is greater than
   128 and you've used one of these textures.

   Either match the sector height to the texture, or use a different
   texture.

E0319: TUTTI-FRUTTI: [upper/normal/lower] texture on
E0320  line 12's [1st/2nd] side; a [staircase/floor/ceiling/door] moved
E0321
E0322
E0323

   Same as the previous message, but a sector had to move before the
   TUTTI-FRUTTI showed itself.

E0324: Line 888's [1st/2nd] side needs a y-offset of 24

   DCC does Y-alignment checking.  When this message appears, DCC is
   suggesting a better y-offset than the one you're using.  DCC can
   automatically correct y-offsets if you invoke the -y option and specify
   an output file.

   Of course, you always have the final say, and have probably set things
   up the way you want them.  But you might give DCC's suggestions a try
   and compare them against your own settings.

E0325: Line 777 needs a pegging change for y-alignment

   DCC won't offer to automatically correct these kinds of lines, since
   it may affect texture display if a neighboring sector moves.  Better
   check it yourself.

E0326: TUTTI-FRUTTI: lower texture on low-unpegged line 56's [1st/2nd] side

   The low-unpegging is probably being used for the normal (middle) texture,
   but it may affect the display of the lower texture on that line.

E0327: Transparent [normal/upper/lower] texture on line 567's [1st/2nd] side
E0328
E0329
E0330
E0331

   A transparent texture is being used on a surface that only has one
   side.  Check the texture visually and see if TUTTI-FRUTTI is showing
   itself.  If so, change the texture.

E0332: Line 212: translucency on one-sided line

   BOOM supports translucent textures. Translucency on a one-sided line
   makes no sense.

E0333: Lines 45 and 123: translucency controls with the same tag

   Separate translucency control lines have the same tag.

E0334: Line 567: invalid translucency filter MYSTUFF

   The translucency filter name provided does not appear in BOOM or
   your PWAD. Pick one that does.

E0335: Line 456: invalid normal colormap SANDY23; COLORMAP used

   You're trying to use a colormap that doesn't exist in BOOM or your
   PWAD. Pick one that does.

E0336: Line 234: friction control, but sector 35 not enabled

   For friction/sludge to work, you need to set bit 8 in the sector type.

E0337: Line 765: pusher control, but sector 34 not enabled

   For pushers to work, you need to set bit 9 in the sector type.

E0338: Line 17's lower texture displays differently in BOOM than in DOOM2

   This is a low-unpegged two-sided line with a texture whose height is
   less than 128. In DOOM2, this lower might display Tutti-Frutti if the
   texture alignment on the lower was not correct. (See E0326.)

   BOOM eliminates Tutti-Frutti by correcting the texture alignment code.
   This may cause some properly-displayed DOOM2 lower textures to appear
   misaligned in BOOM. To correct this, clear the line's 'low-unpegged' flag.

I0401: Sector 55 is painful, but uses non-painful floor flat NOPAIN

   The player will expect certain flats to be painful, and certain to be
   not painful.  The [PAIN] list in the dcc.ini file describes the flats
   that are expected to be painful.

   If you've made your sector painful, and you're using a flat other
   than these, DCC tells you about it, in case that wasn't your intent.

   This may be a design choice on your part, however, so you might not
   want to change the flat.

I0402: Sector 77 uses painful floor flat BLOOD1, but isn't painful

   This is the compliment to the previous message.  You've used what is
   normally considered a painful floor flat, but you haven't made it
   painful.  Again, you may want to correct this, or you may want to
   leave it alone.

I0403: Sector 3's flat GATE1 isn't aligned on the 64 grid

   Most of the time you'll want certain flats to look right, in relation
   to the architecture you're using.  For example, teleport gates are most
   often aligned on the 64x64 grid so that the flat is visually correct.

   DCC will tell you when you're using one of the textures from the
   [64x64] section of dcc.ini, and the sector isn't aligned on the
   64x64 grid.

   This might be a design choice, however.

E0404: Same ceiling height in sectors 123 (F_SKY1) and 124 (not F_SKY1)

   When you have a textured ceiling next to a sky, and they're at
   the same height, it will look like the textured ceiling has no
   depth.  You should lower the textured ceiling slightly to give it
   a lip (or raise the sky).

E0405: Same floor height in sectors 123 (F_SKY1) and 124 (not F_SKY1)

   Same effect as the previous message, but at the floor level.  Either
   lower the sky or raise the textured floor.

E0406: Sector 45 uses unknown [floor/ceiling] flat WALLY07

   Couldn't find the given flat in the flat list.

I0501: Line 456 is a W1 teleport trigger.  Did you mean to use WR?

   You might want this to be a one-time-only trigger, for example if
   you're releasing one monster from a holding area.

   But, you might have wanted this to be a repeatable trigger, and
   you messed up, right?

E0502: Line 888: teleport trigger w/o an exit in any skill

   You've got the tags right, but you didn't put a teleport exit in
   the destination sector.  Better go do that.

E0503: Line 543 has a tag < zero

   Tags should be greater than zero.

E0504: Tag 54 is used by line 67, but not by any sectors

   Your tag on this line will have no effect.  Either go tag the
   right sector, or delete the tag.

E0505: Line 23 is a manual door trigger w/o a door

   You've marked this line as a door, but there's no door behind it!
   Either change the line type or make that door!

E0506: Line 3: tag is missing

   You've set the line type to be a trigger, but you haven't indicated
   a target.  Either change the line type to a non-trigger, or add a
   tag (and the sector it affects).

E0507: Line 78: tag, but no trigger

   What's this line supposed to do?  Either remove the tag or make the
   line some kind of trigger.

E0508: Sector 77 has invalid tag -3

   Similar to E0503, but a different error message.  (Programmers!)
   Either remove the tag or make it a legal one (>0).

E0509: Tag 54 is used by sector 87, but not by any lines

   You've tagged this sector, but there's no corresponding line with
   the same tag, so what's supposed to happen?  Either remove the tag
   or go make some line do something.

E0510: Line 46: teleport trigger with >1 exit (skill 1&2, single-player)

   There should only be one teleport exit per tag, and you've got two
   that share the same tag.  Go make one of them different.

E0511: Line 45 is a switch line with 2 sides

   Since manual switches are usually associated with textures, you
   might have a problem here.  The player isn't going to know that
   a switch exists at this point.

   You might be doing this on purpose if you have several manual
   switch lines stacked in front of a switch texture, but you might
   want to check anyway.

E0512: Line 543 is a walking trigger with only 1 side

   It's a walking trigger line, but you can't walk across it.  Give
   the line a second side, or remove the trigger, or make it a
   manual trigger.

I0513: More than 30 moving floors (32)

   If the number of simultaneous moving plats goes over 30, the engine
   is going to have a problem.  This message shows you the potential
   for your map, but it says nothing about whether they'd all be
   moving at the same time.

I0514: Sector 13 has a 667 tag, only useful on MAPS 7 & 32

   This tag is used to make sectors move when certain monsters
   die, but it only takes effect on MAPS 7 and 32.  If your map is
   destined to end up in one of these slots, all is well, but if not,
   you may want to do something about it.

E0515: Lines 23 and 543 are teleport exits with the same tag

   Since you're only supposed to come in one place, these line-to-line
   teleport exit lines should have unique tags.

E0517: Sector 23 is PUSH-enabled, but not tagged to control line

   The PUSH enable bit in this sector is set, but there's no controlling
   line to set the magnitude or direction.

E0518: Teleport trigger w/o an exit

   There is no teleport exit Thing for this trigger line.

E0519: Line 234: teleport trigger with >1 exit

   There is more than one teleport exit Thing for this trigger line.

I0601: Should be hidden lines (not shown) on the automap (fix with -h):

   You'll get a set of line numbers following this message.  This
   means that these are lines that you really don't need to show on
   the automap, and they're probably just making useless spiderwebs
   for the player to look at, and getting in the way of useful
   information.

   DCC can automatically correct these for you if you invoke the -h
   switch at run time and specify an output file.

E0701: Line 54 should NOT use lower unpegging
E0702: Line 34 SHOULD use lower unpegging
E0703: Line 23 should NOT use upper unpegging

   These have to do with moving floors or ceilings.  You should
   inspect these lines and their associated moving sectors, to make
   sure the visual effect is what you want.  Sometimes you've done
   this on purpose (braces that move with lifts), but more often than
   not you've got moving textures that you really don't want to be
   moving.

E0801: Found Red keys, but no Red doors
E0802: Found Blue doors, but no Blue keys (skill 4&5, Co-op)
E0803: Found keys, but no locked doors
E0804: Found Any-key doors, but no keys in any skill
E0805: Found 3-key doors, but no Yellow key (skill 1&2, Co-op)
E0806: Found Red-Card doors, but no Red Cards (skill 3, single-player)
E0807: Found 6-key doors, but no Blue Skulls in any skill

   These all have to do with the matchup of keys and locked doors, and are
   self-explanatory.  You should correct these problems.

   If you're doing a TC, and you've replaced keys with other objects,
   just pretend they're keys when using DCC...

E0808: Thing 17 is a key that doesn't appear in single-player mode

   You have a key that should appear in single-player mode, but doesn't.
   Your keyed door doesn't go away in single-player mode, so why have a
   key that goes away?

E0809: More than one Red Skull (skill 1&2, Co-op)\n",

E0901: There are NO secret sectors

   This isn't a real problem, but the accepted convention is that
   you should have at least one secret sector, even if it's one that
   the player HAS to walk through.  That way, when he gets to the
   end, he'll definitely know whether he hit all the secrets or not.

   In deference to your audience, go tag a sector as a secret.

I0902: Sector 56 is SECRET

   This is for your information only.  You'll be able to count how
   many secret sectors are in your map.

E1001: No exit!

   Hey!  Do you want the player to STAY THERE?

I1002: Sector 67 includes a regular exit

   Just so you know you've got an exit...

I1003: Sector 56 includes a secret  exit

   This is only useful on MAP15 and MAP31, so if your map isn't going
   to end up in these slots, you should remove this.

I1004: Exit via BOSS death!

   You've got the ROMERO-HEAD in your level. That's OK, just thought you
   might like to know.  If you're doing a TC, you might have someone
   else's head...



References
----------

"The Unofficial DOOM Spec", v1.666 by Matt Fell.

Robert Forsman's list of things to check for.  I discovered this after I
had already put my own list together, and had started coding.

BOOM's boomref.txt file.

Ty Halderman's seemingly unlimited knowledge.

TeamTNT's massive beta test.


Bug Reports
-----------

If you find any bugs (in DCC, not in your level...), or have suggestions
for other things that need checking, please send email to

       [email protected]


Change history since v1.01
--------------------------

v1.02

1. Added -s switch to tell DCC to ignore certain special effects.  In v1.02,
  that includes messages

   E0121: Lines intersect
   I0126: Sectors are identical


v1.03

1. Lines that share co-incident vertices are not flagged as intersecting.
  These lines are already reported by

   E0119: Vertices are identical

2. The 'E0119: Vertices are identical' message now reports the lowest line
  numbers using these vertices.

3. Added the I0132 message for detached lines.

4. Added these messages to the set that DCC ignores if the -s switch is set:

   E0119: Vertices are identical
   I0132: Line is detached

v1.04

1. Fixed bug in 'are all sectors used?' code.
2. DCC wasn't finding things outside of map.  Fixed.
3. DCC now won't complain if 666 and/or 667 line types are found on MAP07 or
  MAP32.
4. Removed some false negatives from the 'on the 64 grid' check.
5. Added check for monsters in deathmatch mode.

v3.00

1. Removed the E0105 and E0107 errors. Working with the BOOM sources showed
  that these are valid situations.
2. Line type 666 can be used on any map, so it's no longer an error.
3. Added BOOM support.
4. Added I0111 to the list of special effects. Ignored if -s is set.

v3.01

1. Fixed bug where an unknown Thing caused a Seg Violation.