Decorate

Definition

DECORATE is a text-format lump which allows one to define actors that can be placed in a level. DECORATE was originally intended to aid in the creation of decorative objects such as the lamps and torches in Doom and other games without using up extra frames in DeHacked. However, it has been expanded to create virtually anything you want, not just decorations.

For historical reasons there are two distinct ways to define actors here. However, the old method has been completely superseded by the new one and it is strongly advised not to use it anymore.

DECORATE lumps are cumulative, meaning several may be loaded at once without overwriting each other in memory. Therefore, adding new actors does not require editing the pre-existing actor definitions. Instead, authors should simply create a new text-format lump (WAD format) or file (PK3 format) called DECORATE and define only their new actors there.

A full DECORATE reference can be found on the ZDOOM wiki.

Note: Not all of the DECORATE features are actually supported by Vavoom engine, some of them will be added in future releases.

Additional Vavoom engine Extensions

Vavoom engine has added some extensions to DECORATE, so that it can be combined with any additions implemented via progs, like the additional DECORATE definitions (vavoom_decorate_defs.xml), that allows authors to use any new defined actor properties for custom games.

DECORATE definitions

Basic concept

vavoom_decorate_defs.xml” is a lump that has to be added to the root of basepak PK3 files that come with custom games, it’s a simple XML file that contains extra definitions for any new flags and properties that come from custom games.

It uses a simple XML syntax described below.

Every XML file should begin with the following:

<?xml version="1.0" encoding="UTF-8" ?>

They also should have an opening label like this one:

<vavoom_decorate_defs>

After this label, authors can define class properties and flags using the following definitions. When all definitions are finished, the file must end with the following label:

</vavoom_decorate_defs>

Properties Definition

All properties need to have 3 things: A type, a name for DECORATE and the name of the property they represent in progs, so for example we can define a property like Health for things like this:

<prop_int name="Health" property="Health" />

This syntax means that we are defining a property that will require integer numbers, named ”Health” in DECORATE and that affects the ‘Health’ property in progs.

Also notice from the above syntax that property definitions should begin with a < and they should end with />.

Here’s a list of available property types:

  • prop_int: Defines a property that will require ”integer” numbers.
  • prop_float: Defines a property that will require ”decimal” values.
  • prop_name: Defines a property that will require a ”name” type.
  • prop_string: Defines a property that will require a ”string” type (remember that strings should be between “).
  • prop_class: Defines a property that will require a ”class”.* ”’prop_state”’: Defines the name of a new state for the thing.

Flags Definition

Similarly, flags require 2 things: A ”’name”’ for DECORATE and the name of the ”’flag they represent in progs”’, we could define a flag like this:

<flag name="Solid" property="bSolid" />

This syntax example means that we are defining a property named ”Solid” in DECORATE and that will affect the ”bSolid” flag in progs.

Assigning Properties and Flags to Classes

To assign a property or flag to a certain class you should do something like this:

<class name="Actor">
<prop_int name="Health" property="Health" />
<prop_int name="GibHealth" property="GibsHealth" />
<prop_int name="WoundHealth" property="WoundHealth" />
<prop_int name="ReactionTime" property="ReactionCount" />
<flag name="Solid" property="bSolid" />
<flag name="Shootable" property="bShootable" />
<flag name="Float" property="bFloat" />
<flag name="NoGravity" property="bNoGravity" />
</class>

Notice that we have two new labels here: <class name=”Name”> indicates the name of the class the following properties and flags are defined for and </class> indicates the end of this class definition. You can use as many of these blocks as the authors wish, they just have to make sure that the class names are correctly defined in their DECORATE scripts.

Example

Finally, here’s a small example of Vavoom definitions for DECORATE:

<?xml version="1.0" encoding="UTF-8" ?>
<vavoom_decorate_defs>
<class name="HexenWeapon">
<prop_class name="HexenWeapon.AmmoType3" property="AmmoType3" />
<prop_int name="HexenWeapon.AmmoGive3" property="AmmoGive3" />
<prop_int name="HexenWeapon.AmmoUse3" property="AmmoUse3" />
</class>
</vavoom_decorate_defs>