<registry> element
The <registry>
XML element is used for savegame.xml
and options.xml
in %LOCALAPPDATA%/Teardown/
. It has one attribute, version
, which is the value of registry node game.version
.
The following registry layout:
SetString("foo", "1")
SetString("foo.bar", "2")
SetString("foo.baz", "")
would be saved like this:
<registry version="1.3.0">
<foo value="1">
<bar value="2"/>
<baz/>
</foo>
</registry>
Nodes with keys containing anything other than a letter or digit will be ignored. Keys will be forced lowercase. Keys starting with digits are okay, despite this not being legal XML (but the game is still able to parse the file fine).
There are no restrictions on values. Absolutely any byte will be put as-is into the XML (except for &
, <
, and >
, which will be escaped, obviously). (Null bytes cannot appear in registry values; the engine truncates strings with null bytes.) Values that are empty strings will not have a value
attribute.
There is no particular order to registry nodes. They seem to be saved in the same order they were read, or the order in which they were first set if they are new.
options.xml
- Has one child, an
options
element representing the options
registry node.
savegame.xml
- Has one child, a
savegame
element representing the savegame
registry node.