Save format
Prev
Next

Chapter 5. Save format

The worlds are saved in text format, which means only printable characters (the encoding is ISO 8859-1, which has a 1 to 1 relationship between character and byte). The basic rule is that each line contains an identifier and a value, separated by whitespace. The first identifier is Asimulator followed by the value 1. This indicates that the file is an asimulator world (or class of worlds) and that the save format version is 1.

Other identifier/value pairs may come in arbitrary order, but the simulator writes them in the following order when saving:

An additional constraint is that Wall_Probability + Dang_Probability must be <= 1.

If the agent is placed on the map it is saved as an identifier with 3 values, the x-coordinate, the y-coordinate and the direction; Agent <1 .. 127> <1 .. 127> <0 .. 3>. The directions are:

  1. East

  2. North

  3. West

  4. Sout

The last identifier in the file is Map. It is immediately followed by a newline. The rest of the file is interpreted as map data. Each map row is a row of characters immediately followed by a newline. Of course all map rows must have the same length. The length of a map row must be at least 3 and at most 129. The same constraints applies to the number of rows. The information about a tile is encoded in a character as in this table:

NumberCharacterTypeHomeItemEnemyKnown
33!ClearNoNoNoNo
34"ClearNoNoNoYes
35#ClearNoNoNoRandom
36$ClearNoNoYesNo
37%ClearNoNoYesYes
38&ClearNoNoYesRandom
39'ClearNoNoRandomNo
40 (ClearNoNoRandomYes
41)ClearNoNoRandomRandom
42*ClearNoYesNoNo
43+ClearNoYesNoYes
44,ClearNoYesNoRandom
45-ClearNoYesYesNo
46.ClearNoYesYesYes
47/ClearNoYesYesRandom
480ClearNoYesRandomNo
491ClearNoYesRandomYes
502ClearNoYesRandomRandom
513ClearNoRandomNoNo
524ClearNoRandomNoYes
535ClearNoRandomNoRandom
546ClearNoRandomYesNo
557ClearNoRandomYesYes
568ClearNoRandomYesRandom
579ClearNoRandomRandomNo
58:ClearNoRandomRandomYes
59;ClearNoRandomRandomRandom
60<ClearYesNoNoNo
61=ClearYesNoNoYes
62>ClearYesNoNoRandom
63?ClearYesNoYesNo
64@ClearYesNoYesYes
65AClearYesNoYesRandom
66BClearYesNoRandomNo
67CClearYesNoRandomYes
68DClearYesNoRandomRandom
69EClearYesYesNoNo
70FClearYesYesNoYes
71GClearYesYesNoRandom
72HClearYesYesYesNo
73IClearYesYesYesYes
74JClearYesYesYesRandom
75KClearYesYesRandomNo
76LClearYesYesRandomYes
77MClearYesYesRandomRandom
78NClearYesRandomNoNo
79OClearYesRandomNoYes
80PClearYesRandomNoRandom
81QClearYesRandomYesNo
82RClearYesRandomYesYes
83SClearYesRandomYesRandom
84TClearYesRandomRandomNo
85UClearYesRandomRandomYes
86VClearYesRandomRandomRandom
87WClearRandomNoNoNo
88XClearRandomNoNoYes
89YClearRandomNoNoRandom
90ZClearRandomNoYesNo
91]ClearRandomNoYesYes
92\ClearRandomNoYesRandom
93[ClearRandomNoRandomNo
94^ClearRandomNoRandomYes
95_ClearRandomNoRandomRandom
96`ClearRandomYesNoNo
97aClearRandomYesNoYes
98bClearRandomYesNoRandom
99cClearRandomYesYesNo
100dClearRandomYesYesYes
101eClearRandomYesYesRandom
102fClearRandomYesRandomNo
103gClearRandomYesRandomYes
104hClearRandomYesRandomRandom
105iClearRandomRandomNoNo
106jClearRandomRandomNoYes
107kClearRandomRandomNoRandom
108lClearRandomRandomYesNo
109mClearRandomRandomYesYes
110nClearRandomRandomYesRandom
111oClearRandomRandomRandomNo
112pClearRandomRandomRandomYes
113qClearRandomRandomRandomRandom
114rWall---No
115sWall---Yes
116tWall---Random
117uDanger--NoNo
118vDanger--NoYes
119wDanger--NoRandom
120xDanger--YesNo
121yDanger--YesYes
122zDanger--YesRandom
123{Danger--RandomNo
124|Danger--RandomYes
125}Danger--RandomRandom
161¡RandomNoNoNoNo
162¢RandomNoNoNoYes
163£RandomNoNoNoRandom
164¤RandomNoNoYesNo
165¥RandomNoNoYesYes
166¦RandomNoNoYesRandom
167§RandomNoNoRandomNo
168¨RandomNoNoRandomYes
169©RandomNoNoRandomRandom
170ªRandomNoRandomNoNo
171«RandomNoRandomNoYes
172¬RandomNoRandomNoRandom
173­RandomNoRandomYesNo
174®RandomNoRandomYesYes
175¯RandomNoRandomYesRandom
176°RandomNoRandomRandomNo
177±RandomNoRandomRandomYes
178²RandomNoRandomRandomRandom
179³RandomRandomNoNoNo
180´RandomRandomNoNoYes
181µRandomRandomNoNoRandom
182RandomRandomNoYesNo
183·RandomRandomNoYesYes
184¸RandomRandomNoYesRandom
185¹RandomRandomNoRandomNo
186ºRandomRandomNoRandomYes
187»RandomRandomNoRandomRandom
188¼RandomRandomRandomNoNo
189½RandomRandomRandomNoYes
190¾RandomRandomRandomNoRandom
191¿RandomRandomRandomYesNo
192ÀRandomRandomRandomYesYes
193ÁRandomRandomRandomYesRandom
194ÂRandomRandomRandomRandomNo
195ÃRandomRandomRandomRandomYes
196ÄRandomRandomRandomRandomRandom

Prev
Next
Home


Would you like to make a comment or contribute an update to this page?
Send feedback to the KDE Docs Team