DECORATE keys

GZDoom Builder includes a DECORATE parser used to obtain relevant information (such as editor number, Radius, Height, Scale, and so on) from custom actors.


Global definitions (GZDB only):
Additional information can be conveyed with keys in the form of special comments inserted in the global DECORATE block:

//$GZDB_SKIP
DECORATE parser will stop parsing a file after encountering this comment. This can be used to speedup the parsing process by skipping files, which don't contain placeable actor definitions.


Actor definitions:
Additional information can be conveyed with keys in the form of special comments inserted within an actor's declaration block:

//$Angled - GZDB only.
//$NotAngled - GZDB only.
Specifies whether the direction matters (angled) or not. Things that are not angled are represented without a direction arrow.

//$Category <category>
Specifies in which category (Monsters, Weapons, etc.) it should be sorted. By default, a custom actor not identified in a configuration file will be put in the Decorate category.
GZDoom Builder supports hierarchical subgroups, using the backslash separator. For example, //$Category "Decorations/Tech" will put the actor within the "Tech" subgroup of the "Decorations" group.

//$Sprite <sprite>
Specifies which sprite to use to represent the actor in the editor. By default, a custom actor not identified in a configuration file will use the first suitable sprite it finds in the actor definition, trying first the states in the sequence Idle, See, Inactive, Spawn, and if all these fail, the first defined state. This key is therefore especially useful for stateless actor definitions. Keep in mind that this sprite name must match an image in the wad (i.e., if the sprite in your wad is named JUNKA0D0, you need to put JUNKA0D0, JUNKA0 won't work).

//$Title <title>
Specifies which name to give to the actor. By default, a custom actor not identified in a configuration file will use the Tag property, and if not present, will default to the class name.

//$IgnoreRenderstyle - GZDB only.
"RenderStyle" DECORATE property will be ignored by the editor. Helpful when you want to see the sprite of an invisible actor in Visual mode.

//$ArgN <name> - GZDB only.
Allows to override default argument names for this actor.

//$ArgNDefault <integer> - GZDB only.
Allows to set the default value for this argument. This property must be used in conjunction with the "//$ArgN" property.

//$ArgNTooltip <text> - GZDB only.
Allows to specify a tooltip text displayed for this argument. Newline character ("\n") can be used to format the text. This property must be used in conjunction with the "//$ArgN" property.
Argument tooltips can be also set for things and linedefs in a Game Configuration.

//$ArgNType <integer> - GZDB only.
Allows to specify an argument type for this argument. This property must be used in conjunction with the "//$ArgN" property.

//$ArgNRenderStyle <string> - GZDB only.
Allows to specify a rendering shape to display the value of this argument. Supported values are:

Rendering shapes can be toggled using "Toggle Event Lines" action/menu button.
This property must be used in conjunction with the "//$ArgN" property.

//$ArgNRenderColor <integer> - GZDB only.
Allows to specify a color used by rendering shape. Supported values are hex color (like "FF0000"), HTML-formatted hex color (like "#F00" or "#FF0000") or color name (like "Red").
By default rendering shapes will use Event line editor color.
This property must be used in conjunction with "//$ArgN" and "//$ArgNRenderStyle" properties.

//$ArgNEnum <string or structure> - GZDB only.
Allows to specify an enum for this argument. This can be either a name of an enum defined in the Game Configuration, or an explicit enum definition. This property must be used in conjunction with the "//$ArgN" property.

//$Color <color index> - GZDB only.
Allows to override category color for this actor. Possible values are: //$Obsolete <reason> - GZDB only.
Marks the thing as obsolete. It will be detected by "Check obsolete things" Map Analysis Mode check and will be marked in the Thing Properties Window and the Thing Info panel.

Note: It is a good idea to include the Doom Editor Number after the actor definition if you want it to show in Doom Builder, even if it is replacing a standard Doom actor.

Example:
Actor ChexShield : ResistanceRune replaces ResistanceRune 5104
{
  //$Category "Pickups/Chex Powerups"
  //$Sprite ARMXA0
  //$IgnoreRenderstyle
  //$Title "Chex Shield"
  //$Color 12
  //$NotAngled
  //$Obsolete "That's a strange powerup. Consider replacing it with something else..."
  
  //$Arg0 "Respawn Delay"
  //$Arg0ToolTip "Positive values specify delay in tics.\nNegative - in seconds."
  
  //$Arg1 "Enum Example 1"
  //$Arg1ToolTip "Config enum example"
  //$Arg1Type 11
  //$Arg1Enum "keys"
	
  //$Arg2 "Enum Example 2"
  //$Arg2ToolTip "Explicit enum example"
  //$Arg2Type 11
  //$Arg2Enum { 1 = "First option"; 2 = "Second option"; 667 = "Option 667"; }
  
  //$Arg3 "Radius"
  //$Arg3Type 23
  //$Arg3Default 32
  //$Arg3RenderStyle "Circle"
  //$Arg3RenderColor #ff00ff
	
  //$Arg4 "Height"
  //$Arg4Type 24
  //$Arg4Default 64

  Height 44
  Radius 26
  RenderStyle None
  Inventory.PickupMessage "Picked up the energized Chex armor!"

  States
  {
    Spawn:
      ARMX A 1
      Loop
  }
}

//$GZDB_SKIP
actor SuperGiantImpBall : DoomImpBall
{
  Scale 8.0
  Damage 30
}


Category definitions (GZDB only):

Thing categories can be defined in DECORATE using #region / #endregion blocks. Region name is used as thing category title. "//$Category" actor block definition overrides these. Additional information can be conveyed with keys in the form of special comments inserted within #region / #endregion block (these keys replicate Game Configuration thing category properties with a slightly different syntax):

//$Sorted (integer) [0 .. 1]
When set to 1, items in this category will be sorted by title.

//$Color (integer) [0 .. 19]
Sets the color used by things in this category.
Uses the same values as "//$Color" thing definition.

//$Arrow (integer) [0 .. 1]
When set to 1, thing angle will be shown as an arrow in Classic and Visual modes.

//$Sprite (string)
Sets the sprite graphic to use when rendering this thing or things in this category. This should be fully qualified sprite name without file extension, like "CPOSA2".
You can also use images from the"Sprites" directory by prefixing an image name without extension with "internal:", like so: "internal:Actor".

//$Error (integer) [0 .. 2]
Sets the stuck things error checking mode to use on this thing.
Possible values are:

Default value is 1.

//$FixedSize (boolean)
When set to true, thing will be rendered as sizeless in Classic and Visual modes.

//$FixedRotation (boolean)
When set to true, thing's angle won't be changed when rotating things using Edit Selection mode.

//$AbsoluteZ (boolean)
When set to true, thing's vertical position will be used as an absolute value instead of distance from floor/ceiling in Visual mode.

Example:
#region Imp Balls
//$Color 4
//$Sprite "BALLS0"

  actor SuperGiantImpBall : DoomImpBall
  {
    //$Title "I'm in the 'Imp Balls' group!"
    Scale 8.0
    Damage 30
  }

#endregion