mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
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:
@@ -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
|
||||
@@ -0,0 +1,38 @@
|
||||
Data files
|
||||
|
||||
MSE uses several different types of [[file:format|data files]], usually organized into [[file:package]]s.
|
||||
|
||||
--File types--
|
||||
The following types are stored in [[file:package]]s in the:
|
||||
* [[type:game]]
|
||||
* [[type:stylesheet]]
|
||||
* [[type:symbol font]]
|
||||
* [[type:export template]]
|
||||
* [[type:locale]]
|
||||
|
||||
The following types are stored in [[file:package]]s that can be located anywhere:
|
||||
* [[type:set]]
|
||||
* [[type:installer]]
|
||||
|
||||
The following types are stored diractly in [[file:format|heirarchical files]], they can be located anywhere:
|
||||
* [[type:symbol]]
|
||||
|
||||
--Data directories--
|
||||
The data files that come with Magic Set Editor are stored in [[file:package]]s in the ''data directory'',
|
||||
these are usually subdirectories of that directory.
|
||||
|
||||
There are two data directories, a ''global'' one with data files installed with the program,
|
||||
and a ''local'' data directory for the current logged in user.
|
||||
The latter is used for installing packages if the user doesn't have administrator priviliges.
|
||||
|
||||
The location of the global data directory is
|
||||
! On windows <<<
|
||||
| Location <tt><i>%MSE_DIR%</i>\data</tt>
|
||||
| Usually <tt>C:\Program Files\Magic Set Editor 2\data</tt>
|
||||
! On linux/unix <<<
|
||||
| Location ???
|
||||
|
||||
The location of the local data directory is
|
||||
! On windows <<<
|
||||
| Location <tt><i>%USER_APPLICATION_DATA%</i>\Magic Set Editor\data</tt>
|
||||
| Usually <tt>C:\Documents and Settings\<i>%USERNAME%</i>\Application Data\Magic Set Editor\data</tt>
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
Packages
|
||||
|
||||
Most files used by Magic Set Editor are stored in ''packages''.
|
||||
|
||||
A package is either a zip file or simply a directory.
|
||||
|
||||
A package has an extension to indicate its type, for example @"*.mse-set"@ is a [[type:set]] file and @"*.mse-symbol-font"@ is a [[type:symbol font]].
|
||||
To open a zipped package using a program like winzip you may need to rename it to @"something.zip"@
|
||||
|
||||
--Contents--
|
||||
|
||||
A package always contains a [[file:format|heirarchical data file]] with the same name as the package type and no extension.
|
||||
For example @"my-set.mse-set"@ contains a file called @"set"@.
|
||||
|
||||
A package can also contain other files like images.
|
||||
|
||||
--Examples--
|
||||
|
||||
The [[file:index|data directory]] contains packages in the form of directories.
|
||||
Each of the subdirectories is a package.
|
||||
Reference in New Issue
Block a user