]> Dogcows Code - chaz/carfire/commitdiff
modified leveleditor documentation
authorCharles <Charles@92bb83a3-7c8f-8a45-bc97-515c4e399668>
Mon, 12 Apr 2010 00:52:07 +0000 (00:52 +0000)
committerCharles <Charles@92bb83a3-7c8f-8a45-bc97-515c4e399668>
Mon, 12 Apr 2010 00:52:07 +0000 (00:52 +0000)
moved the sandbox map into the CarFire project

git-svn-id: https://bd85.net/svn/cs3505_group@61 92bb83a3-7c8f-8a45-bc97-515c4e399668

CarFire/CarFire/CarFire/Content/Maps/sandbox.cfmap [moved from CarFire/leveleditor/sandbox.ini with 88% similarity]
CarFire/leveleditor/doc/leveleditor.txt
CarFire/leveleditor/readme.txt

similarity index 88%
rename from CarFire/leveleditor/sandbox.ini
rename to CarFire/CarFire/CarFire/Content/Maps/sandbox.cfmap
index 97c0198b3eb4f979601cccc6d880c9993ee775ef..f537127a2342610d807b6d2c8cb89064a6c92d26 100644 (file)
@@ -6,13 +6,13 @@
 [metadata]\r
        author = Chaz McGarvey\r
        levelname = Sandbox\r
 [metadata]\r
        author = Chaz McGarvey\r
        levelname = Sandbox\r
-    type = Campaign\r
+       type = Campaign\r
        dimensions = [80,21]\r
        dimensions = [80,21]\r
-    tileset = FuturisticBuilding\r
-    numplayers = <1-4>\r
+       tileset = FuturisticBuilding\r
+       numplayers = <1,4>\r
 \r
 [A]\r
 \r
 [A]\r
-    entity = SaberMonster\r
+       entity = SaberMonster\r
        path = [1,1] [5,6] wait(5) [45,2]\r
        loop = true\r
 [B]\r
        path = [1,1] [5,6] wait(5) [45,2]\r
        loop = true\r
 [B]\r
 ; Function ideas:\r
 ; has(entity)           Player has given entity in his inventory.\r
 ; wait(seconds)         Pause for some number of seconds.\r
 ; Function ideas:\r
 ; has(entity)           Player has given entity in his inventory.\r
 ; wait(seconds)         Pause for some number of seconds.\r
-; remove(entity)        Remove an entity from the game.\r
+; remove(entity)        Remove entities of a certain type from the game.\r
 ; remove(coord)         Remove whatever is at the given coordinates.\r
 ; remove(coord)         Remove whatever is at the given coordinates.\r
-; create(entity, coord) Create an entity at some location\r
+; create(entity, coord) Create an entity at some location.\r
+; play(soundname)       Play a sound.\r
 \r
 [maptable]\r
 +------------------------------------------------------------------------------+\r
 \r
 [maptable]\r
 +------------------------------------------------------------------------------+\r
@@ -53,3 +54,5 @@
 ; [-+|]     Place wall segments.\r
 ; [1-4]     Identify the player starting positions.\r
 ; [A-Za-z]  Place a defined game entity.\r
 ; [-+|]     Place wall segments.\r
 ; [1-4]     Identify the player starting positions.\r
 ; [A-Za-z]  Place a defined game entity.\r
+\r
+; vi:ft=dosini\r
index 46cfb6392ab89f364ace8046390aedb5fffd590e..377cbf95125457319b27a501c7a3b5d17780649e 100644 (file)
@@ -33,10 +33,15 @@ vim directory; usually:
     $HOME/.vim/doc or\r
     $HOME/vimfiles/doc\r
 \r
     $HOME/.vim/doc or\r
     $HOME/vimfiles/doc\r
 \r
-You're done!  To use the level editor without installing the plugin, just\r
-|source| the plugin in vim:\r
+Alternatively, you can use the level editor without installing the plugin,\r
+just |source| the plugin in vim:\r
 \r
 \r
-    :source path/to/leveleditor.vim\r
+    :so /path/to/leveleditor.vim\r
+\r
+Or setup Vim to do it automagically with |:autocmd|; put this in your user\r
+Vim config file:\r
+\r
+    au BufNewFile,BufRead *.cfmap so /path/to/leveleditor.vim\r
 \r
 ===========================================================================\r
 3. Features                                          *leveleditor-features*\r
 \r
 ===========================================================================\r
 3. Features                                          *leveleditor-features*\r
@@ -68,6 +73,9 @@ A. Map File Format                                 *leveleditor-fileformat*
 \r
 The format of the CarFire map file follows the de facto standard INI file\r
 format, with at least one notable exception which we'll get to shortly.\r
 \r
 The format of the CarFire map file follows the de facto standard INI file\r
 format, with at least one notable exception which we'll get to shortly.\r
+Because of that exception, a specialized loader is necessary, so map files\r
+should carry the extension `cfmap' so as not to have them be mistook as\r
+your everyday household variety INI file.\r
 \r
                                                      *leveleditor-metadata*\r
 The metadata section of the file contains just that: metadata.  Some of the\r
 \r
                                                      *leveleditor-metadata*\r
 The metadata section of the file contains just that: metadata.  Some of the\r
@@ -114,27 +122,34 @@ B. Basic Syntax                                        *leveleditor-syntax*
 \r
 To make parsing simple, the format of the values that make up a key-value\r
 pair follows a consistent pattern based on the type of thing being\r
 \r
 To make parsing simple, the format of the values that make up a key-value\r
 pair follows a consistent pattern based on the type of thing being\r
-described.  Here are the things that can appear on the right side of a\r
-key-value pair assignment:\r
+described.  Except in the case of strings, white space is ignored.  Here\r
+are the things that can appear in a map file.\r
+\r
+                                                         *leveleditor-keys*\r
+Keys are special strings that appear on the left side of a key-value pair,\r
+which combined is a key and value separated by an equals sign.  Keys are\r
+simply a sequence of alphabet characters.  No white space, digits, or\r
+punctuation is allowed in a key.\r
 \r
                                                       *leveleditor-strings*\r
 Strings are simply a sequence of characters.  If the key expects to be set\r
 to a string, then the right side of the assignment up to the line-end will\r
 be parsed as a string, including any white space.  If a string value is not\r
 \r
                                                       *leveleditor-strings*\r
 Strings are simply a sequence of characters.  If the key expects to be set\r
 to a string, then the right side of the assignment up to the line-end will\r
 be parsed as a string, including any white space.  If a string value is not\r
-necessarily expected, you can explicitly surround the string with quotes;\r
-otherwise, the value could be interpreted as a list if it contains any\r
-white space.\r
+necessarily expected, you can explicitly surround the string with double\r
+quotes; otherwise, the value could be interpreted as a list if it contains\r
+any white space.  The characters given as a string are interpreted as-is.\r
+No escape characters are ever parsed (i.e. \t or \n).\r
 \r
 \r
-The characters that make up the string are included in the string according\r
-to their literal characters; no escape characters are ever parsed (i.e. \t\r
-or \n).  Any value which does not follow any of the following formats will\r
-be read as a string.\r
-\r
-                                                      *leveleditor-numbers*\r
+                                                     *leveleditor-integers*\r
 Base-ten numbers are parsed as they appear.  The parser is allowed to read\r
 numbers with special characters such as -10e5.  Numbers cannot be specified\r
 in any other base than ten.\r
 \r
 Base-ten numbers are parsed as they appear.  The parser is allowed to read\r
 numbers with special characters such as -10e5.  Numbers cannot be specified\r
 in any other base than ten.\r
 \r
+                                                     *leveleditor-booleans*\r
+Boolean values are one of two keywords: `true' and `false.'  Case is\r
+ignored when parsing booleans, but abbreviations are not allowed.  For\r
+example, `TrUe' is okay, but `T' is not.\r
+\r
                                                   *leveleditor-coordinates*\r
 To specify a coordinate or location on the map, surround two\r
 comma-separated integers with square brackets.  For example,\r
                                                   *leveleditor-coordinates*\r
 To specify a coordinate or location on the map, surround two\r
 comma-separated integers with square brackets.  For example,\r
@@ -150,7 +165,7 @@ you go down.
 A range of integer values is parsed as two comma-separated integers with\r
 angular brackets.  For example,\r
 \r
 A range of integer values is parsed as two comma-separated integers with\r
 angular brackets.  For example,\r
 \r
-    <1-4>       Matches any integer between 1 and 4, inclusive.\r
+    <1,4>       Matches any integer between 1 and 4, inclusive.\r
 \r
 In this way, you could set a range as the value for the key `numplayers' in\r
 the |leveleditor-metadata| section, representing the minimum and maximum\r
 \r
 In this way, you could set a range as the value for the key `numplayers' in\r
 the |leveleditor-metadata| section, representing the minimum and maximum\r
@@ -159,16 +174,12 @@ number of players the map supports.
                                                     *leveleditor-functions*\r
 The syntax of a function call is familiar.  First comes the name of the\r
 function to be called, then an open parenthesis, followed by a\r
                                                     *leveleditor-functions*\r
 The syntax of a function call is familiar.  First comes the name of the\r
 function to be called, then an open parenthesis, followed by a\r
-comma-separated list of arguments before a closing parenthesis.  For\r
-example,\r
+whitespace-separated (no commas!) list of arguments before a closing\r
+parenthesis.  For example,\r
 \r
     wait(3)             Delay for 3 seconds.\r
     has(F)              Check if a player has an entity F in inventory.\r
 \r
     wait(3)             Delay for 3 seconds.\r
     has(F)              Check if a player has an entity F in inventory.\r
-    create(B,[2,3])     Create an entity B on the map at [2,3].\r
-\r
-Note, the file loader parses each group of characters between white space\r
-separately; therefore, do not include spaces between the arguments of the\r
-function call, only a single comma.\r
+    create(B [2,3])     Create an entity B on the map at [2,3].\r
 \r
                                                         *leveleditor-lists*\r
 Some keys can be assigned a list of things, such as functions to be called\r
 \r
                                                         *leveleditor-lists*\r
 Some keys can be assigned a list of things, such as functions to be called\r
index e9593d4b7e902808c225c072f9b5447ccf8754e4..fa3fcc3dba74678d0ed8ad6b6e724ccb377df387 100644 (file)
@@ -9,5 +9,5 @@ If you are not a Vim user or don't plan on being involved in any level
 design, you can safely ignore all of this.\r
 \r
 Maintainer: Chaz McGarvey\r
 design, you can safely ignore all of this.\r
 \r
 Maintainer: Chaz McGarvey\r
-      Date: 9 Apri 2010\r
+      Date: 9 Apr 2010\r
 \r
 \r
This page took 0.024555 seconds and 4 git commands to generate.