EDF lockdefs

From Eternity Wiki
(Redirected from Lockdef)
Jump to navigationJump to search

EDF lockdefs define what happens when locked lines are activated. For Doom and Heretic map formats, the lockdef IDs used by certain linedefs are hardcoded. For ACS_LockedExecute and Door_LockedRaise, it is possible to use it as a number parameter.

A lockdef defining the same unique ID number as a previous definition will overwrite that previous definition.

A lockdef which specifies neither "require" keys nor "any" keys can be activated by possession of any one Key type artifact, period.

Default lock identifiers are listed on this wiki.

Syntax[edit]

lockdef <unique id number>
{
  require <item name 1>
  require <item name 2>
  ...
  
  any { keys: <key> [, <key>]* }
  any { keys: <key> [, <key>]* }
  ...
  
  message <text>
  remotemessage <text>
  lockedsound <name>
  mapcolor <string>
}

Explanation[edit]

  • require
Name of a Key artifact type the player must have in his/her inventory for the lock to activate. Any number of keys can be required by specifying this field more than once.
  • any
Defines a set of keys out of which the player must possess at least one in each any section. There can be any number of these sections defined.
  • message
Default: (don't show message)
Message to give if manual lock activation fails. If this string starts with a $, it is a BEX string mnemonic.
  • remotemessage
Default: (show message instead)
Message to give if remote lock activation fails. If this string starts with a $, it is a BEX string mnemonic.
  • lockedsound
Default: (none)
Name of EDF sound to play when lock activation fails. If unspecified, the player's skin "oof" sound is used as normal.
  • mapcolor
Mapcolor may have one of three possible values (all are treated as strings and then interpreted according to their contents):
  • If the value begins with #, it will be treated as a 6-digit hexadecimal number specifying a 24-bit RGB color value. This value will be matched to the closest index in the PLAYPAL. That color will be used to display any linedefs in the automap using this lockdef.
  • If the value begins with $, it will be treated as the name of a console variable which holds a palette index (0-255) to use. Only integer cvars with a range of 0-255 can be specified here.
  • Otherwise, the value is treated as an integer which should be in the range from 0 to 255, and is used as a palette index for the color to use.