Some more documentation

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@567 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-07-13 19:05:42 +00:00
parent fe0de4893f
commit 700a941125
4 changed files with 72 additions and 16 deletions
+45
View File
@@ -0,0 +1,45 @@
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.
+17 -16
View File
@@ -3,20 +3,18 @@ Data types
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.
--Styling trinity--
--File types--
These are the 'major' data types that are written directly to [[file:package]]s.
| [[type:game]] What information is on each card?
| [[type:stylesheets]] What do cards look like?
| [[type:set]] Sets of cards.
| [[type:symbol_font]] Fonts consisting of symbols, for instance mana symbols.
| [[type:export_template]] How to export sets to HTML files?
| [[type:locale]] Translations of MSE.
| [[type:include]] Files to include in other templates.
| [[type:installer]] Installers containing several packages.
| [[type:symbol]] Expansion symbols.
| [[type:settings]] MSE settings.
| [[type:Game]] What information is on each card?
| [[type:Stylesheets]] What do cards look like?
| [[type:Set]] Sets of cards.
| [[type:Symbol font]] Fonts consisting of symbols, for instance mana symbols.
| [[type:Export template]] How to export sets to HTML files?
| [[type:Locale]] Translations of MSE.
| [[type:Include]] Files to include in other templates.
| [[type:Installer]] Installers containing several packages.
| [[type:Symbol]] Expansion symbols.
| [[type:Settings]] MSE settings.
--Compound types--
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
| [[type:card]] A card containing values.
| [[type:keyword]] A keyword.
| [[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--
| [[type:list]] Lists of items
@@ -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>
| [[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--
| [[type:string]] Text, @"abc"@
| [[type:int]] Integer numbers, @1, 2, 100@
| [[type:double]] Real numbers, @1, 0.5, 21.3@
| [[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.