User Tools

Site Tools


ded:altering_and_copying_definitions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
altering_and_copying_definitions [2015-06-02 22:51] danijded:altering_and_copying_definitions [2017-03-13 18:31] (current) skyjake
Line 1: Line 1:
 +====== Altering and copying definitions ======
 +
 +===== Copy =====
 +
 +The definition should be based on the preceding definition. If this directive is used, all the properties of the previous definition are copied to this one. For the first definition in a file a "Copy" has no effect.
 +
 +<code>
 +# Apply a weak green glow to Doom's nukage barrel.
 +Light {
 +  State = "BAR1";
 +  Flags = nohalo;
 +  Color { .2 .4 .22 };
 +  Size = 0.21;
 +  Y Offset = -6;
 +}
 +
 +# Barrels use two states - copy the previous definition and add a subtle flicker effect.
 +Copy Light {
 +  State = "BAR2";
 +  Size = 0.22;
 +}
 +</code>
 +
 +
 +===== Mods =====
 +
 +
 +The definition should alter the contents of a previously created definition.
 +
 +<code>Thing Mods "POSSESSED" {
 +    Spawn Health = 1000;
 +}
 +</code>
 +
 +==== Conditions (1.15 →) ====
 +
 +Presently only [[map_info|Map Info]] definitions support conditions.
 +
 +An optional conditional expression can be used to instruct the DED parser to only apply the modification if the expression matches. The expression can be negated using the keyword 'not'.
 +
 +^ Expression ^ Description |
 +| custom | True if the definition has been previously modified by an add-on.(Whenever a definition is modified, Doomsday checks the source of the modification and will flag the definition as "custom" if the source is a user-supplied add-on). |
 +
 +For example:
 +
 +  Map Info mods "E1M1" if not custom {
 +       Music = "mysong";
 +   }
  
ded/altering_and_copying_definitions.txt · Last modified: 2017-03-13 18:31 by skyjake