Editing
EDF basics
(section)
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!
====Strings==== Many fields in EDF take strings. Strings, if they do not contain whitespace or any character that needs to be escaped, may be unquoted. Unquoted strings additionally cannot contain any of the following characters: " ' = { } ( ) + , # / ; If any of those characters are found, the unquoted string will be terminated at the last valid character. Example: spritenames += { SPR1, SPR2, SPR3 } The items SPR1, SPR2, and SPR3 are unquoted strings. Note how the commas serve to separate the items in a list, and therefore do not become part of the strings. Many fields more or less require quoted strings. Quoted strings must start and end with either single or double quotes (the beginning and ending quote types must match). Quoted strings may contain any character except a line break, including those not allowed in unquoted strings. In addition, quoted strings also support the following escape codes for non-typable characters: * \n : Hard line break * \t : Tab * \b : Backspace * \a : Beep (causes a sound when printed to the console) * \\ : Literal \ character. * \" : Literal ", necessary to use in double-quoted strings only * \' : Literal ', necessary to use in single-quoted strings only * \x80 : Changes text color to "brick" range where supported. * \x81 : Changes text color to "tan" range where supported. * \x82 : Changes text color to "gray" range where supported. * \x83 : Changes text color to "green" range where supported. * \x84 : Changes text color to "brown" range where supported. * \x85 : Changes text color to "gold" range where supported. * \x86 : Changes text color to "red" range where supported. * \x87 : Changes text color to "blue" range where supported. * \x88 : Changes text color to "orange" range where supported. * \x89 : Changes text color to "yellow" range where supported. * \x8a : Changes text color to CUSTOM COLOR 1. * \x8b : Changes text color to CUSTOM COLOR 2. * \x8c : Changes text color to CUSTOM COLOR 3. * \x8d : Changes text color to CUSTOM COLOR 4. * \xfa : Changes text color to "translucent" where supported. * \xfb : Changes text color to gamemode "normal" range where supported. * \xfc : Changes text color to gamemode "hilite" range where supported. * \xfd : Changes text color to gamemode "error" range where supported. * \xfe : Toggles text shadowing where supported. * \xff : Toggles absolute centering of text where supported. If \ is followed by any other character, the slash is discarded and the next character is treated normally (ie, \d becomes d). Avoid doing this, however, to maintain forward compatibility. Examples: thingtype w00t { obituary_normal = "w00ts" <nowiki>obituary_melee = 'says \'w00t\''</nowiki> } Line Continuation: Starting with Eternity Engine v3.31 Delta, line continuation can be used to split quoted strings across multiple lines. The syntax for doing this is demonstrated in the following example: frame S_MYFRAME { cmp = "TROO|A|*|6 \ TroopAttack|@next" } The "\" character, when followed immediately by a line break, signifies that line continuation should be triggered. Whitespace before the line continuation will be included in the string, but any spaces or tabs at the beginning of the next line will NOT be included (this is the same as line continuation in BEX files). This allows the following continued parts of the string to be arbitrarily indented for purposes of beautification. A string can be split across any number of lines in this fashion. NOTE: Simply adding "\" will not result in a newline character even if the continued string appears multiline in the EDF file. For text that is supposed to be multiline, use heredocs instead.
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