From 700a941125b2db515905116b9d66ab1a119a4066 Mon Sep 17 00:00:00 2001 From: twanvl Date: Fri, 13 Jul 2007 19:05:42 +0000 Subject: [PATCH] Some more documentation git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@567 0fc631ac-6414-0410-93d0-97cfa31319b6 --- doc/function/index.txt | 8 ++++++++ doc/index.txt | 2 ++ doc/type/game.txt | 45 ++++++++++++++++++++++++++++++++++++++++++ doc/type/index.txt | 33 ++++++++++++++++--------------- 4 files changed, 72 insertions(+), 16 deletions(-) diff --git a/doc/function/index.txt b/doc/function/index.txt index 9cc9358a..b07ad134 100644 --- a/doc/function/index.txt +++ b/doc/function/index.txt @@ -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: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 <<< | [[fun:trace]] Output a message for debugging purposes. diff --git a/doc/index.txt b/doc/index.txt index 89233ed9..270c6cf0 100644 --- a/doc/index.txt +++ b/doc/index.txt @@ -3,6 +3,8 @@ Documentation Welcome to the Magic Set Editor technical documentation. 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-- * [[doc/tutorial|Templating tutorial]] (comming soon) * [[doc/file|File formats]] diff --git a/doc/type/game.txt b/doc/type/game.txt index e69de29b..39bbd8c2 100644 --- a/doc/type/game.txt +++ b/doc/type/game.txt @@ -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 .mse-game file extension. +Such a package contains a data file called game 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]] ∞ 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. diff --git a/doc/type/index.txt b/doc/type/index.txt index 7c106db7..c208cac3 100644 --- a/doc/type/index.txt +++ b/doc/type/index.txt @@ -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 type:something | [[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.