Documentation of file format

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@585 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-07-30 13:58:17 +00:00
parent 50153c9d26
commit 06770361ab
3 changed files with 90 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
Heirarchical files
The actual MSE data is stored in heirarchical data files, these are usually files with no extension.
For example <tt>set</tt> or <tt>locale</tt>.
These are just ordinary text files, but they use an UTF-8 encoding, that means you need to use an editor that supports UTF-8.
Most modern editors support UTF-8, Notepad does on Windows XP.
--Syntax--
The files use a heirarchical structure and are made up of keys and values.
A value can be either a simple text string:
>game: magic
Or a block containing more keys and values:
>card:
> name: My Card
> type: Creature
Indentation is used to find out what belongs to what block. Indentation must be exactly one <tt>TAB</tt> per level, spaces are not allowed.
When the value is longer then a single line it can be written indented on the following lines:
>text:
> T: Draw a card
> WW: Gain 1 life
--Example--
For example, a [[type:set]] might look like this:
>game: magic
>style: new
>card:
> name: My Card
> type: Creature
>card:
> name: Another card