DECALDEF

From ZDoom Wiki

Jump to: navigation, search

The DECALDEF allows the wad maker to redesign the decals that are left on walls by monsters or the player. Hitscan weapons as well as projectile weapons can leave decals. You can also place decals on the map with a Decal Thing (9200).

The information of a decal begins with the decal itself followed by a generator to tell ZDoom which object will leave this decal. You can also specify a Decal ID in order to place decals directly on the map. The Decal ID must be a number between 1 and 255. Several options can be used when defining a decal:

  • pic picname
This is the picture ZDoom will paste on the wall.
  • shade "rr gg bb"
This allows you to recolor the picture using specific RGB values. The value is specified as a string containing 3 hexadecimal values.
  • x-scale <scale>
This scales the graphic on the x axis. 1.00 is default.
  • y-scale <scale>
This scales the graphic on the y axis. 1.00 is default.
  • flipx
This tells ZDoom to flip the graphic on the x axis when drawing it.
  • flipy
This tells ZDoom to flip the graphic on the y axis when drawing it.
  • randomflipx
This tells ZDoom to randomly flip the graphic on the x axis when drawing it.
  • randomflipy
This tells ZDoom to randomly flip the graphic on the y axis when drawing it.
  • solid
draws the decal non-translucent.
  • translucent <alpha>
Draws a translucent decal with the specified translucency. 0 means it's invisible, 1 means it's opaque
  • add <alpha>
Draws the decal with additive translucency. 0 means it's invisible, 1 means it's drawn in full intensity.
  • fuzzy
Draws the decal with a fuzz effect (like the spectre in Doom.)
  • fullbright
Draws the decal full bright regardless of the current lighting in the sector.
  • lowerdecal decalname
Draws another decal below this one. The BFG lightning effect uses this for example
  • colors "rr gg bb" "rr gg bb"
Creates a translation table. From a look at the implementation it doesn't look useful. If somebody has more information or some experience how to use it please post it here!
  • animator
Sets a Decal animator for the current decal

Note that not all of these must be used for each decal. However, the following example shows each in use.

   decal MyDecal 4
   {
       pic SCORCH1
       shade "00 10 00"
       x-scale 0.25
       y-scale 0.25
       randomflipx
       randomflipy
   }
   generator FrostMissile        MyDecal

In this example, the image "SCORCH1" is read, and shaded slightly green. It is then scaled to 25% its normal size, and randomly flipped on the two axes. To place this decal on a map with the decal thing, use an ID number of 4.

The last line shows the "generator," which tells ZDoom that the "FrostMissile" object will use the "MyDecal" decal. This means that any time the Mage's Frost Shards hit the wall, it will leave a decal of this kind. This name comes from using a dumpclass via the console, and is case sensitive.

The following example shows another version of a decal, which randomly selects between two different decals to paste. The decals are set up as usual, and a "decalgroup" header is added, with the names of the two (or more) decals to use. The generator then references the decalgroup.

   decal MyDecal1
   {
       pic PLASMA1
       shade "08 08 08"
       randomflipx
       randomflipy
   }
   decal MyDecal2
   {
       pic PLASMA2
       shade "08 08 08"
       randomflipx
       randomflipy
   }
   decalgroup MyDecal
   {
       MyDecal1        1
       MyDecal2        1
   }
   generator CFlameMissile        MyDecal

See Also

Personal tools