Commit d54b3a55 authored by twanvl's avatar twanvl

Some more documentation

parent e2e0b60f
...@@ -67,5 +67,13 @@ These functions are built into the program, other [[type:function]]s can be defi ...@@ -67,5 +67,13 @@ These functions are built into the program, other [[type:function]]s can be defi
| [[fun:symbol_variation]] Render a variation of a [[type:symbol]]. | [[fun:symbol_variation]] Render a variation of a [[type:symbol]].
| [[fun:built_in_image]] Return an image built into the program. | [[fun:built_in_image]] Return an image built into the program.
! HTML export <<<
| [[fun:to_html]] Convert [[type:tagged text]] to html.
| [[fun:symbols_to_html]] Convert text to html using a [[type:symbol font]].
| [[fun:to_text]] Remove all tags from tagged text.
| [[fun:copy_file]] Copy a file from the [[type:export template]] to the output directory.
| [[fun:write_text_file]] Write a text file to the output directory.
| [[fun:write_image_file]] Write an image file to the output directory.
! Other functions <<< ! Other functions <<<
| [[fun:trace]] Output a message for debugging purposes. | [[fun:trace]] Output a message for debugging purposes.
...@@ -3,6 +3,8 @@ Documentation ...@@ -3,6 +3,8 @@ Documentation
Welcome to the Magic Set Editor technical documentation. Welcome to the Magic Set Editor technical documentation.
These documents describe the file formats and scirpting language used by the program. These documents describe the file formats and scirpting language used by the program.
There is currently no information on how to ''use'' the program for making cards.
--Topics-- --Topics--
* [[doc/tutorial|Templating tutorial]] (comming soon) * [[doc/tutorial|Templating tutorial]] (comming soon)
* [[doc/file|File formats]] * [[doc/file|File formats]]
......
File type: Game
--Overview--
Games are part of the [[file:style triangle]]:
| Description Looks Data
| '''Game''' [[type:Stylesheet]] [[type:Set]]
| [[type:Field]] [[type:Style]] [[type:Value]]
Games provide the ''description'', i.e. what kinds of things are on a card.
--Package format--
A game is described in a [[file:package]] with the <tt>.mse-game</tt> file extension.
Such a package contains a data file called <tt>game</tt> that has the following properties.
--Properties--
! Property Type Default Description
| '''Common to all packages''' <<< <<< <<<
| @mse version@ [[type:version]] ''required'' Version of MSE this game is made for.
| @short name@ [[type:string]] file name A short name of this game, for the 'new set' list.
| @full name@ [[type:string]] file name A longer name of this game.
| @icon@ [[type:filename]] ''none'' Filename of an icon for this card, for the 'new set' list.
| @position hint@ [[type:int]] &infin; Where to place this item in the 'new set' list? Lower numbers come first.
| @version@ [[type:version]] @0.0.0@ Version number of this package.
| @depends on@ [[type:list]] of [[type:dependency]]s
Packages this package depends on.
| '''Specific to games''' <<< <<< <<<
| @init script@ [[type:script]] @;@ Script to run when this game is loaded, can set variables
to be used by other scripts in this game or stylesheets using it.
| @set fields@ [[type:list]] of [[type:field]]s Fields for the styling panel.
| @default set style@ [[type:indexmap]] of [[type:style]]s Default style for the set fields, can be overriden by the stylesheet.
| @card fields@ [[type:list]] of [[type:field]]s Fields for each card.
| @card list color script@ [[type:script]] from fields Script that determines the color of an item in the card list. If not set uses the @card list colors@ property of the first card field that has it.
| @statistics dimensions@ [[type:list]] of [[type:statistics dimension]]s from fields Dimensions for statistics, a dimension is rougly the same as an axis. By default all card fields with 'show statistics' set to true are used.
| @statistics categories@ [[type:list]] of [[type:statistics category]]s from dimensions Choices shown on the statistics panel. By default all statistics dimensions are used.
| @has keywords@ [[type:boolean]] @false@ Does this game use keywords? Should the keywords tab be available?
| @keyword match script@ [[type:script]] @;@ Script to apply to the @match@ property of keywords.
| @keyword modes@ [[type:list]] of [[type:keyword mode]]s Choices for the 'mode' property of keywords.
| @keyword parameter types@ [[type:list]] of [[type:keyword param type]]s Types of parameters available to keywords.
| @keywords@ [[type:list]] of [[type:keyword]]s Standard keywords for this game.
--Examples--
Look at the game files in the standard MSE distribution for examples.
...@@ -3,20 +3,18 @@ Data types ...@@ -3,20 +3,18 @@ Data types
Magic Set Editor uses many data types in the files and in scripting. Magic Set Editor uses many data types in the files and in scripting.
There are for instance [[type:card]]s in [[type:set]]s, [[type:stylesheet]]s describing the layout of [[type:field]]s, etc. There are for instance [[type:card]]s in [[type:set]]s, [[type:stylesheet]]s describing the layout of [[type:field]]s, etc.
--Styling trinity--
--File types-- --File types--
These are the 'major' data types that are written directly to [[file:package]]s. These are the 'major' data types that are written directly to [[file:package]]s.
| [[type:game]] What information is on each card? | [[type:Game]] What information is on each card?
| [[type:stylesheets]] What do cards look like? | [[type:Stylesheets]] What do cards look like?
| [[type:set]] Sets of cards. | [[type:Set]] Sets of cards.
| [[type:symbol_font]] Fonts consisting of symbols, for instance mana symbols. | [[type:Symbol font]] Fonts consisting of symbols, for instance mana symbols.
| [[type:export_template]] How to export sets to HTML files? | [[type:Export template]] How to export sets to HTML files?
| [[type:locale]] Translations of MSE. | [[type:Locale]] Translations of MSE.
| [[type:include]] Files to include in other templates. | [[type:Include]] Files to include in other templates.
| [[type:installer]] Installers containing several packages. | [[type:Installer]] Installers containing several packages.
| [[type:symbol]] Expansion symbols. | [[type:Symbol]] Expansion symbols.
| [[type:settings]] MSE settings. | [[type:Settings]] MSE settings.
--Compound types-- --Compound types--
These contain several properties, similair to the file types. But they are part of some other file type. These contain several properties, similair to the file types. But they are part of some other file type.
...@@ -26,8 +24,7 @@ These contain several properties, similair to the file types. But they are part ...@@ -26,8 +24,7 @@ These contain several properties, similair to the file types. But they are part
| [[type:card]] A card containing values. | [[type:card]] A card containing values.
| [[type:keyword]] A keyword. | [[type:keyword]] A keyword.
| [[type:font]] Description of a font. | [[type:font]] Description of a font.
| [[type:script]] A script to execute to update a field, or for initialization. | [[type:symbol part]] Part of a [[type:symbol]].
| [[type:symbol_part]] Part of a [[type:symbol]].
--Collection types-- --Collection types--
| [[type:list]] Lists of items | [[type:list]] Lists of items
...@@ -39,10 +36,14 @@ These contain several properties, similair to the file types. But they are part ...@@ -39,10 +36,14 @@ These contain several properties, similair to the file types. But they are part
<tr><td>type:</td><td>something</td></tr></table> <tr><td>type:</td><td>something</td></tr></table>
| [[type:map]] Lists indexed by other text | [[type:map]] Lists indexed by other text
--Script related--
| [[type:script]] A script to execute to update a field, or for initialization.
| [[type:scriptable]] A primitive type whose value can depend on a script.
| [[type:image]] An image defined by a script.
| [[type:function]] Functions in scripts. These have no direct representation in a file.
--Primitive types-- --Primitive types--
| [[type:string]] Text, @"abc"@ | [[type:string]] Text, @"abc"@
| [[type:int]] Integer numbers, @1, 2, 100@ | [[type:int]] Integer numbers, @1, 2, 100@
| [[type:double]] Real numbers, @1, 0.5, 21.3@ | [[type:double]] Real numbers, @1, 0.5, 21.3@
| [[type:color]] Colors | [[type:color]] Colors
| [[type:scriptable]] A primitive type whose value can depend on a script.
| [[type:function]] Functions in scripts. These have no direct representation in a file.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment