Editing
EDF delta structures
From Eternity Wiki
Jump to navigation
Jump 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.
Anti-spam check. Do
not
fill this in!
Delta structures are an easier and more flexible way to edit existing [[Thingtype|thing type]], [[Frame|frame]], [[Sound|sound]], terrain and (upcoming) inventory definitions. Each delta structure for a thing type, frame, sound, or terrain specifies by mnemonic the section that it edits inside it. This allows for any number of delta structures to be defined. The structures are always applied in the order in which they are encountered during parsing, so that, like style sheets in HTML, delta structures cascade. This means you can load your own set of delta structures on top of an existing set in a modification. ===Delta structure syntax=== # A delta structure for a frame has this syntax: framedelta { name <frame mnemonic> <list of frame fields> } # A delta structure for a thing type has this syntax: thingdelta { name <thingtype mnemonic> <list of thingtype fields> } # A delta structure for a sound has this syntax: sounddelta { name <sound mnemonic> <list of sound fields> } # A delta structure for a terrain has this syntax: terraindelta { name <terrain mnemonic> <list of terrain fields> } The name field is required, and must be set to a valid terrain, sound, frame, or thingtype mnemonic in order to specify the definition that the delta structure edits. Along with the name, the delta structure can specify any field that is valid in that type of definition (see exceptions below). Any field not specified in a delta structure will not be affected, and retains the value that it had before the delta structure was applied. A delta structure must specify values explicitly, even if the new values are the usual defaults for those fields. Note that the frame args list must be completely specified. It is not possible to override only some of the values in that list. Fields not supported in delta structures: *The '''dehackednum''' field of any section edited by a delta structure cannot be changed. Although the field will be syntactically accepted by the parser, any value provided to it in a delta structure will have no effect. Only definition sections can provide a DeHackEd number. *The '''cmp''' field of the '''frame''' block is not supported in framedelta sections. *The '''inherits''' field of the '''thingtype''' block is not supported in '''thingdelta''' sections. ===Frame delta example=== # Change the Zombieman attack frame to use the shotgun zombie attack framedelta { name S_POSS_ATK2 action [[SPosAttack]] } ===Thing delta example=== # Change the Zombieman's drop type to MegaSphere, and his spawnhealth to 400 thingdelta { name Zombieman droptype MegaSphere spawnhealth 400 } # Later on, maybe in a different file, we change the spawnhealth again thingdelta { name Zombieman spawnhealth 20 } # At this point, the Zombieman drops MegaSpheres, but his spawnhealth is 20, not 400. ===Sound delta example=== # This changes the sound explod we defined earlier sounddelta { name = explod priority = 200 singularity = sg_getpow } ===Terrain delta example=== # Terrain deltas used by Heretic in terrain.edf to enable splash alerts: terraindelta { name = Water; splashalert = true } terraindelta { name = Lava; splashalert = true } terraindelta { name = Sludge; splashalert = true } ---- Back to [[Editing reference]].
Summary:
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)
Navigation menu
Page actions
Page
Discussion
Read
Edit
History
Page actions
Page
Discussion
More
Tools
Personal tools
Not logged in
Talk
Contributions
Log in
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Search
Tools
What links here
Related changes
Special pages
Page information