Editing ExtraData

From Eternity Wiki
Jump to navigationJump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
With support of [[Universal Doom Map Format]] in releases of Eternity, ExtraData is now considered {{Deprecated}}. In the future new features introduced into UDMF will not be supported by ExtraData. ExtraData maps will still work, but new projects should use UDMF due to its greatly streamlined mapping experience, especially if using editors such as [https://www.doomworld.com/forum/topic/96943 Doom Builder X] or [https://forum.zdoom.org/viewtopic.php?t=54957 GZDoomBuilder-Bugfix] are used (the former including specific improvements for Eternity's UDMF, such as for [[linked portals]]).
ExtraData is a new data specification language for the [[Eternity Engine]] that allows arbitrary extension of mapthings, lines, and sectors with any number of new fields, with data provided in more or less any format. The use of a textual input language forever removes any future problems caused by binary format limitations. The ExtraData parser is based on the libConfuse configuration file parser library by Martin Hedenfalk, which is also used by GFS and EDF.  
 
Each section in this document deals with one of the ExtraData constructs, as well as how to embed ExtraData in a WAD and how to associate it with a given map.  


ExtraData is a new data specification language for the [[Eternity Engine]] that allows arbitrary extension of mapthings, lines, and sectors with any number of new fields, with data provided in more or less any format. The use of a textual input language forever removes any future problems caused by binary format limitations. The ExtraData parser is based on the libConfuse configuration file parser library by Martin Hedenfalk, which is also used by GFS and EDF.  
ExtraData will continue to be supported in future versions of Eternity, even though it will soon be superceded by support for the [[Universal Doom Map Format]].


Each section in this document deals with one of the ExtraData constructs, as well as how to embed ExtraData in a WAD and how to associate it with a given map.
{{Backto|Eternity Engine}}
{{editref}}
=General Syntax=
=General Syntax=
''See [[EDF#Syntax|EDF Syntax]], as it is the same.''
''See [[EDF#Syntax|EDF Syntax]], as it is the same.''
Line 11: Line 10:
=Embedding and Associating ExtraData =
=Embedding and Associating ExtraData =


ExtraData is embedded directly as a text script into a lump of any name. This can be done with any number of wad file management tools, such as SLumpEd, SLADE 3, or XWE.  
ExtraData is embedded directly as a text script into a lump of any name. This can be done with any number of wad file management tools, such as WinTex (though WinTex has some bugs which make the process more complicated), XWE or SLumpEd.  


An ExtraData script is associated with a map via use of the [[MapInfo]] variable '''extradata'''. A map can only have one ExtraData script, but it is possible for multiple maps to share the same script.  
An ExtraData script is associated with a map via use of the [[MapInfo]] variable '''extradata'''. A map can only have one ExtraData script, but it is possible for multiple maps to share the same script.  
Line 50: Line 49:
   // These fields are ExtraData extensions
   // These fields are ExtraData extensions
   tid      <number>
   tid      <number>
  special  <number>
   args      { <special field>, ... }
   args      { <special field>, ... }
   height    <number>
   height    <number>
Line 64: Line 62:


This field can also accept EDF thingtype mnemonics. EDF thingtype mnemonics must be prefixed with ''thing:'' -- this allows the parser to know it is dealing with a string instead of a number. EDF thingtypes must have a unique doomednum to be specified in an ExtraData mapthing record. If the specified EDF thingtype doesn't exist or has a doomednum of -1, an Unknown object will be spawned instead.  
This field can also accept EDF thingtype mnemonics. EDF thingtype mnemonics must be prefixed with ''thing:'' -- this allows the parser to know it is dealing with a string instead of a number. EDF thingtypes must have a unique doomednum to be specified in an ExtraData mapthing record. If the specified EDF thingtype doesn't exist or has a doomednum of -1, an Unknown object will be spawned instead.  
See [[Thing types]] for a list of potentially useful types, new to Eternity, to use here.


Example:  
Example:  
Line 71: Line 67:
      
      
     mapthing { type DoomImp } // This record specifies an Imp by its EDF mnemonic
     mapthing { type DoomImp } // This record specifies an Imp by its EDF mnemonic
 
   
====options====
====options====
Default: No flags are set by default.  
Default: No flags are set by default.  
Line 80: Line 76:


These are the flag values which are available for this field:  
These are the flag values which are available for this field:  
     Flag name  Meaning
     Flag name  Decimal  Hex    Meaning
     ------------------------------------------------------------------------------
     ------------------------------------------------------------------------------
     EASY        Thing appears in easy difficulties
     EASY        1        0x0001  Thing appears in easy difficulties
     NORMAL      Thing appears in "Hurt Me Plenty"
     NORMAL      2        0x0002  Thing appears in "Hurt Me Plenty"
     HARD        Thing appears in Ultra-Violence and Nightmare
     HARD        4        0x0004  Thing appears in Ultra-Violence and Nightmare
     AMBUSH      Thing is "deaf", will not wake up via sound
     AMBUSH      8        0x0008  Thing is "deaf", will not wake up via sound
     NOTSINGLE  Thing doesn't appear in single-player mode
     NOTSINGLE  16      0x0010  Thing doesn't appear in single-player mode
     NOTDM      Thing doesn't appear in deathmatch
     NOTDM      32      0x0020  Thing doesn't appear in deathmatch
     NOTCOOP    Thing doesn't appear in cooperative multiplayer
     NOTCOOP    64      0x0040  Thing doesn't appear in cooperative multiplayer
     FRIEND      Thing uses MBF friendly logic
     FRIEND      128      0x0080  Thing uses MBF friendly logic
     DORMANT    Thing is dormant at map startup (script feature)
     DORMANT    512      0x0200  Thing is dormant at map startup (script feature)
    STANDING    Currently only used for [[Thing_types#Sector_actions|sector actions]].
     ------------------------------------------------------------------------------
     ------------------------------------------------------------------------------
      
      
Line 110: Line 105:
     mapthing { options "EASY,NORMAL,HARD" }
     mapthing { options "EASY,NORMAL,HARD" }
     mapthing { options "EASY, NORMAL, HARD" }
     mapthing { options "EASY, NORMAL, HARD" }
====tid====
====tid====
Default: 0  
Default: 0  


The TID, or "Thing ID", is a tag for mapthings which is used for identification in [[ACS]] scripts. TID values must be positive numbers between 1 and 65535. The TID value zero means no TID. Negative TID values are reserved and are used to indicate special things within the engine. TIDs are not required to be unique, and most ACS functions that accept TIDs will perform an action on all mapthings which bear the same TID.
The TID, or "Thing ID", is a tag for mapthings which is used for identification in [[Small]] scripts. TID values must be positive numbers between 1 and 65535. The TID value zero means no TID. Negative TID values are reserved and are used to indicate special things within the engine. TIDs are not required to be unique, and most Small functions that accept TIDs will perform an action on all mapthings which bear the same TID. Things spawned within Small scripts can also be given TIDs.  
 
====special====
Default: 0
 
The thing special field, which will execute when thing dies if it's a monster or picked up if it's an item. Use '''args''' to control the parameters.


====args====
====args====
Line 166: Line 155:
   extflags <extended line flags list>
   extflags <extended line flags list>
   args { <special field>, ... }
   args { <special field>, ... }
  id <number>
  alpha <number>
  }
  }
===Explanation of fields: ===
===Explanation of fields: ===
Line 193: Line 180:


These are the flag values which are available for this field:  
These are the flag values which are available for this field:  
     Flag name  Meaning
     Flag name  Decimal  Hex    Meaning
     ---------------------------------------------------------------------------------------
     ---------------------------------------------------------------------------------------
     CROSS         Linedef can be activated by being crossed.
     CROSS       1        0x0001  Linedef can be activated by being crossed.
     USE           Linedef can be activated by being used.
     USE         2        0x0002  Linedef can be activated by being used.
     IMPACT        Linedef can be activated by being shot.
     IMPACT     4       0x0004  Linedef can be activated by being shot.
     PUSH         Linedef can be activated by being pushed.
     PUSH       8        0x0008  Linedef can be activated by being pushed.
     PLAYER       Linedef can be activated by players.
     PLAYER     16      0x0010  Linedef can be activated by players.
     MONSTER      Linedef can be activated by objects with SPACMONSTER flag.
     MONSTER     32       0x0020  Linedef can be activated by objects with SPACMONSTER flag.
     MISSILE      Linedef can be activated by objects with SPACMISSILE flag.
     MISSILE     64       0x0040  Linedef can be activated by objects with SPACMISSILE flag.
    POLYOBJECT    Linedef can be activated by polyobjects (only works with CROSS)
     REPEAT     128      0x0080  Linedef action is repeatable.
     REPEAT       Linedef action is repeatable.
     1SONLY     256      0x0100  Linedef can only be activated from first side.
     1SONLY       Linedef can only be activated from first side.
    ADDITIVE      Linedef's midtexture is drawn with additive blending.
    BLOCKALL      Linedef will block everything that can be clipped.
    ZONEBOUNDARY  Linedef will work as a reverb effect boundary. Not needed for one-sided lines.
    CLIPMIDTEX    Linedef middle texture will not "bleed" on floor and ceiling.
    LOWERPORTAL  Linedef copies floor portal from its backside to its lower visible edge
    UPPERPORTAL  Linedef copies ceiling portal from its backside to its upper visible edge
     ---------------------------------------------------------------------------------------
     ---------------------------------------------------------------------------------------
      
      
Notes: IMPACT is currently only implemented for bullet weapons.
Notes: IMPACT is currently only implemented for bullet weapons. The ability to use IMPACT with MISSILE will be added in the near future. The PUSH style of activation is not implemented at all yet, so this flag currently does nothing.  
 
LOWERPORTAL and UPPERPORTAL are used to enable portals on the front side's upper and/or lower edges of a linedef, if the sector in front of the linedef is tall enough compared to the back sector to expose them. It is the only way to enable such portals, which will copy the sector portal(s) from the backside, if any.


Example flags fields -- All of these are equivalent:  
Example flags fields -- All of these are equivalent:  
Line 240: Line 218:
     linedef { args { 0, 1, 2, 3, 4 } }
     linedef { args { 0, 1, 2, 3, 4 } }


====id====
:''Default: 0''
This field is equivalent to '''tag'''. It will only have effect if '''tag''' is not already set.
====alpha====
:''Default: Alpha defaults to 1.0.''
The alpha field takes a value from 0.0 to 1.0 to set the opacity at which this linedef's midtexture is drawn. When combined with the ADDITIVE extflag, this can be used for additive-blended translucency as well.


=Sectors=
=Sectors=
Line 274: Line 244:
   // These fields are ExtraData extensions to sector data
   // These fields are ExtraData extensions to sector data
   flags <sector flag list>
   flags <sector flag list>
   flags.add <sector flag list>
   flagsadd <sector flag list>
   flags.remove <sector flag list>
   flagsremove <sector flag list>
   damage <integer>
   damage <integer>
   damagemask <integer>
   damagemask <integer>
   damagemod <method of damage type>
   damagemod <method of damage type>
   damageflags <sector damage flags list>
   damageflags <sector damage flags list>
   damageflags.add <sector damage flags list>
   damageflagsadd <sector damage flags list>
   damageflags.remove <sector damage flags list>
   damageflagsremove <sector damage flags list>
   floorterrain <terrain name>
   floorterrain <terrain name>
   floorangle <float>   
   floorangle <float>   
   flooroffsetx <float>
   flooroffsetx <float>
   flooroffsety <float>
   flooroffsety <float>
  floorscalex <float>
  floorscaley <float>
   ceilingterrain <terrain name>
   ceilingterrain <terrain name>
   ceilingangle <float>
   ceilingangle <float>
   ceilingoffsetx <float>
   ceilingoffsetx <float>
   ceilingoffsety <float>
   ceilingoffsety <float>
  ceilingscalex <float>
  ceilingscaley <float>
   colormaptop <lump name>
   colormaptop <lump name>
   colormapmid <lump name>
   colormapmid <lump name>
   colormapbottom <lump name>
   colormapbottom <lump name>
  portalflags.floor <portal flags list>
  portalflags.ceiling <portal flags list>
  overlayalpha.floor <percentage or value from 0 to 255>
  overlayalpha.ceiling <percentage or value from 0 to 255>
  portalid.floor <number>
  portalid.ceiling <number>
  }
  }
===Explanation of fields: ===
===Explanation of fields: ===
Line 322: Line 282:
     KILLSOUND    Objects in sector cannot make sounds.
     KILLSOUND    Objects in sector cannot make sounds.
     KILLMOVESOUND Sector makes no movement sounds, even if it has a special sound sequence
     KILLMOVESOUND Sector makes no movement sounds, even if it has a special sound sequence
    PHASEDLIGHT  Sector is phased light sequence start
    LIGHTSEQUENCE Sector is phased light sequence step (alternates with below flag)
    LIGHTSEQALT  Sector is phased light sequence alternate step (alternates with above flag)
     ---------------------------------------------------------------------------------------
     ---------------------------------------------------------------------------------------
      
      
Line 342: Line 299:
     sector { flags "SECRET, FRICTION, KILLMOVESOUND" }
     sector { flags "SECRET, FRICTION, KILLMOVESOUND" }


====flags.add====
====flagsadd====
:''Default: No flags are set by default. ''
:''Default: No flags are set by default. ''


This is a list of sector flags to add to the sector. This is supported because some sector specials (such as sector special 9, "Secret") imply that certain sector flags will be set on the sector before ExtraData is applied. If you wish to only add flags and not override any that may have been set by sector specials, use this field to specify only the flags that you wish to be added to the sector.
This is a list of sector flags to add to the sector. This is supported because some sector specials (such as sector special 9, "Secret") imply that certain sector flags will be set on the sector before ExtraData is applied. If you wish to only add flags and not override any that may have been set by sector specials, use this field to specify only the flags that you wish to be added to the sector.


====flags.remove====
====flagsremove====
:''Default: No flags are set by default. ''
:''Default: No flags are set by default. ''


Line 365: Line 322:
:''Default: "Unknown"''
:''Default: "Unknown"''


Specifies the type of damage done by this sector. If "Unknown" is specified, the damage done is generic. The value specified should be a valid EDF damagetype mnemonic. If it is not, "Unknown" will be used. This can be used to have a sector type trigger special pain and death states when it deals damage. For example, you can use '''slime''' or '''lava''' damagemod.
Specifies the type of damage done by this sector. If "Unknown" is specified, the damage done is generic. The value specified should be a valid EDF damagetype mnemonic. If it is not, "Unknown" will be used. This can be used to have a sector type trigger special pain and death states when it deals damage.


====damageflags====
====damageflags====
Line 383: Line 340:
     ---------------------------------------------------------------------------------------
     ---------------------------------------------------------------------------------------


====damageflags.add====
====damageflagsadd====
:''Default: No flags are set by default.''
:''Default: No flags are set by default.''


Because some sector types imply the activation of various sector damageflags (for example, DOOM sector type 11 sets sector damageflags ENDGODMODE and EXITLEVEL), this field is supported to add additional damageflags to any that may have been set by the  map itself. Simply specify whatever flags you wish to have added to those that are already set.
Because some sector types imply the activation of various sector damageflags (for example, DOOM sector type 11 sets sector damageflags ENDGODMODE and EXITLEVEL), this field is supported to add additional damageflags to any that may have been set by the  map itself. Simply specify whatever flags you wish to have added to those that are already set.


====damageflags.remove====
====damageflagsremove====
:''Default: No flags are set by default.''
:''Default: No flags are set by default.''


As with damageflags.add, it may be desirable to turn off some flags that were set by sector specials or other portions of the map data. Use this field to specify any sector damage flags you want to remove from sectors.
As with damageflagsadd, it may be desirable to turn off some flags that were set by sector specials or other portions of the map data. Use this field to specify any sector damage flags you want to remove from sectors.


====floorterrain====
====floorterrain====
Line 407: Line 364:


Specifies the x and y offsets of the floor flat, relative to the normal floor grid, in floating point units.
Specifies the x and y offsets of the floor flat, relative to the normal floor grid, in floating point units.
====floorscalex/floorscaley====
:''Default: 1.0''
Specifies the x and y offsets of the floor flat. A higher number means a smaller texture.


====ceilingterrain====
====ceilingterrain====
Line 423: Line 375:
Specifies the angle of the ceiling flat in floating-point degrees from 0 to 359. Note that for compatibility with ZDoom, the angle specified advances in a '''clockwise''' fashion, contrary to most other angles in the DOOM engine.
Specifies the angle of the ceiling flat in floating-point degrees from 0 to 359. Note that for compatibility with ZDoom, the angle specified advances in a '''clockwise''' fashion, contrary to most other angles in the DOOM engine.


====ceilingoffsetx/ceilingoffsety====
====flooroffsetx/flooroffsety====
:''Default: 0''
:''Default: 0''


Specifies the x and y offsets of the ceiling flat, relative to the normal ceiling grid, in floating point units.
Specifies the x and y offsets of the ceiling flat, relative to the normal ceiling grid, in floating point units.
====ceilingscalex/ceilingscaley====
:''Default: 1.0''
Specifies the x and y offsets of the ceiling flat. A higher number means a smaller texture.


====colormaptop====
====colormaptop====
Line 447: Line 394:


Specifies the colormap lump to use when a player's viewpoint is below the fake floor of a BOOM 242 "deep water" effect applying to this sector. If left to default, the global colormap from MapInfo will be used as normal, unless one is specified by the 242 effect.
Specifies the colormap lump to use when a player's viewpoint is below the fake floor of a BOOM 242 "deep water" effect applying to this sector. If left to default, the global colormap from MapInfo will be used as normal, unless one is specified by the 242 effect.
====portalflags.floor/portalflags.ceiling====
:''Default: No flags are set by default.''
These two fields (portalflags.floor and portalflags.ceiling) specify portal property flag values which affect the rendering and behavior of portals attached to this sector's surfaces. These fields use the same syntax as BEX/EDF flag strings.
These are the flag values which are available for this field:
    Flag name    Meaning
    ---------------------------------------------------------------------------------------
    DISABLED        Portal is completely disabled
    NORENDER        Portal will not be rendered, but may still be interactive
    NOPASS          Objects cannot pass through the portal even if it is a linked portal
    BLOCKSOUND      Sound will not traverse through a linked portal
    OVERLAY        The portal will render the sector's flat as a blended overlay
    ADDITIVE        If OVERLAY is also specified, the overlay will use additive blending
    USEGLOBALTEX    Reserved for future per-portal texture specification
    ATTACHEDPORTAL  If a linked portal is on the respective floor or ceiling, move it along
                    with the surface. Useful for vertically moving platforms.
    ---------------------------------------------------------------------------------------
====overlayalpha.floor/overlayalpha.ceiling====
:''Default'': 100%
These two fields (overlayalpha.floor and overlayalpha.ceiling) specify the opacity of the corresponding portal overlay, if any exists. You can specify either a percentage value from 0% to 100%, or a plain integer number from 0 to 255. 100%/255 are completely solid, while 0% is invisible.
====portalid.floor/portalid.ceiling====
:''Default'': 0
These two fields control the placement of portals defined by [[Portal_Define]] on the floor or ceiling of this sector. Values can be positive (in which case the direct portal will be used) or negative (in which case the opposite direction portal will be used, ''if'' applicable).
Please note that all contributions to Eternity Wiki are considered to be released under the GNU Free Documentation License 1.2 (see Eternity Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)