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:
Asimulator 1
Lower_X_Bound_Is_Known <0 | 1>
Upper_X_Bound_Is_Known <0 | 1>
Lower_Y_Bound_Is_Known <0 | 1>
Upper_Y_Bound_Is_Known <0 | 1>
Number_Of_Homes_Is_Known <0 | 1>
Number_Of_Items_Is_Known <0 | 1>
Number_Of_Enemies_Is_Known <0 | 1>
Number_Of_Dangers_Is_Known <0 | 1>
Score_Is_Limited <0 | 1>
Can_Recharge_Ammunition_At_Home <0 | 1>
Neutralized_Enemy_Becomes_Item <0 | 1>
Neutralization_Stops_At_First_Enemy <0 | 1>
Neutralization_Range <0 .. 255>
Ammunition_Capacity <0 .. 4294967295>
Cost_Limit <0 .. 4294967295>
Score_Limit <0 .. 2147483647>
Agent_Ammunition <0 .. 4294967295>
Agent_Cost <0 .. 4294967295>
Agent_Score <0 .. 2147483647>
Move_Cost <0 .. 65535>
Turn_Cost <0 .. 65535>
Grab_Cost <0 .. 65535>
Neutralize_Cost <0 .. 65535>
Item_Reward <0 .. 65535>
Neutralize_Reward <0 .. 65535>
Home_Reward <0 .. 65535>
Wall_Probability <0.0 .. 1.0>
Danger_Probability <0.0 .. 1.0>
Home_Probability <0.0 .. 1.0>
Item_Probability <0.0 .. 1.0>
Enemy_Probability <0.0 .. 1.0>
Know_Probability <0.0 .. 1.0>
Random_Clears <0 .. 65535>
Random_Walls <0 .. 65535>
Random_Dangs <0 .. 65535>
Random_Homes <0 .. 65535>
Random_Items <0 .. 65535>
Random_Enems <0 .. 65535>
Random_Knows <0 .. 65535>
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:
East
North
West
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:
Number | Character | Type | Home | Item | Enemy | Known |
33 | ! | Clear | No | No | No | No |
34 | " | Clear | No | No | No | Yes |
35 | # | Clear | No | No | No | Random |
36 | $ | Clear | No | No | Yes | No |
37 | % | Clear | No | No | Yes | Yes |
38 | & | Clear | No | No | Yes | Random |
39 | ' | Clear | No | No | Random | No |
40 | ( | Clear | No | No | Random | Yes |
41 | ) | Clear | No | No | Random | Random |
42 | * | Clear | No | Yes | No | No |
43 | + | Clear | No | Yes | No | Yes |
44 | , | Clear | No | Yes | No | Random |
45 | - | Clear | No | Yes | Yes | No |
46 | . | Clear | No | Yes | Yes | Yes |
47 | / | Clear | No | Yes | Yes | Random |
48 | 0 | Clear | No | Yes | Random | No |
49 | 1 | Clear | No | Yes | Random | Yes |
50 | 2 | Clear | No | Yes | Random | Random |
51 | 3 | Clear | No | Random | No | No |
52 | 4 | Clear | No | Random | No | Yes |
53 | 5 | Clear | No | Random | No | Random |
54 | 6 | Clear | No | Random | Yes | No |
55 | 7 | Clear | No | Random | Yes | Yes |
56 | 8 | Clear | No | Random | Yes | Random |
57 | 9 | Clear | No | Random | Random | No |
58 | : | Clear | No | Random | Random | Yes |
59 | ; | Clear | No | Random | Random | Random |
60 | < | Clear | Yes | No | No | No |
61 | = | Clear | Yes | No | No | Yes |
62 | > | Clear | Yes | No | No | Random |
63 | ? | Clear | Yes | No | Yes | No |
64 | @ | Clear | Yes | No | Yes | Yes |
65 | A | Clear | Yes | No | Yes | Random |
66 | B | Clear | Yes | No | Random | No |
67 | C | Clear | Yes | No | Random | Yes |
68 | D | Clear | Yes | No | Random | Random |
69 | E | Clear | Yes | Yes | No | No |
70 | F | Clear | Yes | Yes | No | Yes |
71 | G | Clear | Yes | Yes | No | Random |
72 | H | Clear | Yes | Yes | Yes | No |
73 | I | Clear | Yes | Yes | Yes | Yes |
74 | J | Clear | Yes | Yes | Yes | Random |
75 | K | Clear | Yes | Yes | Random | No |
76 | L | Clear | Yes | Yes | Random | Yes |
77 | M | Clear | Yes | Yes | Random | Random |
78 | N | Clear | Yes | Random | No | No |
79 | O | Clear | Yes | Random | No | Yes |
80 | P | Clear | Yes | Random | No | Random |
81 | Q | Clear | Yes | Random | Yes | No |
82 | R | Clear | Yes | Random | Yes | Yes |
83 | S | Clear | Yes | Random | Yes | Random |
84 | T | Clear | Yes | Random | Random | No |
85 | U | Clear | Yes | Random | Random | Yes |
86 | V | Clear | Yes | Random | Random | Random |
87 | W | Clear | Random | No | No | No |
88 | X | Clear | Random | No | No | Yes |
89 | Y | Clear | Random | No | No | Random |
90 | Z | Clear | Random | No | Yes | No |
91 | ] | Clear | Random | No | Yes | Yes |
92 | \ | Clear | Random | No | Yes | Random |
93 | [ | Clear | Random | No | Random | No |
94 | ^ | Clear | Random | No | Random | Yes |
95 | _ | Clear | Random | No | Random | Random |
96 | ` | Clear | Random | Yes | No | No |
97 | a | Clear | Random | Yes | No | Yes |
98 | b | Clear | Random | Yes | No | Random |
99 | c | Clear | Random | Yes | Yes | No |
100 | d | Clear | Random | Yes | Yes | Yes |
101 | e | Clear | Random | Yes | Yes | Random |
102 | f | Clear | Random | Yes | Random | No |
103 | g | Clear | Random | Yes | Random | Yes |
104 | h | Clear | Random | Yes | Random | Random |
105 | i | Clear | Random | Random | No | No |
106 | j | Clear | Random | Random | No | Yes |
107 | k | Clear | Random | Random | No | Random |
108 | l | Clear | Random | Random | Yes | No |
109 | m | Clear | Random | Random | Yes | Yes |
110 | n | Clear | Random | Random | Yes | Random |
111 | o | Clear | Random | Random | Random | No |
112 | p | Clear | Random | Random | Random | Yes |
113 | q | Clear | Random | Random | Random | Random |
114 | r | Wall | - | - | - | No |
115 | s | Wall | - | - | - | Yes |
116 | t | Wall | - | - | - | Random |
117 | u | Danger | - | - | No | No |
118 | v | Danger | - | - | No | Yes |
119 | w | Danger | - | - | No | Random |
120 | x | Danger | - | - | Yes | No |
121 | y | Danger | - | - | Yes | Yes |
122 | z | Danger | - | - | Yes | Random |
123 | { | Danger | - | - | Random | No |
124 | | | Danger | - | - | Random | Yes |
125 | } | Danger | - | - | Random | Random |
161 | ¡ | Random | No | No | No | No |
162 | ¢ | Random | No | No | No | Yes |
163 | £ | Random | No | No | No | Random |
164 | ¤ | Random | No | No | Yes | No |
165 | ¥ | Random | No | No | Yes | Yes |
166 | ¦ | Random | No | No | Yes | Random |
167 | § | Random | No | No | Random | No |
168 | ¨ | Random | No | No | Random | Yes |
169 | © | Random | No | No | Random | Random |
170 | ª | Random | No | Random | No | No |
171 | « | Random | No | Random | No | Yes |
172 | ¬ | Random | No | Random | No | Random |
173 | | Random | No | Random | Yes | No |
174 | ® | Random | No | Random | Yes | Yes |
175 | ¯ | Random | No | Random | Yes | Random |
176 | ° | Random | No | Random | Random | No |
177 | ± | Random | No | Random | Random | Yes |
178 | ² | Random | No | Random | Random | Random |
179 | ³ | Random | Random | No | No | No |
180 | ´ | Random | Random | No | No | Yes |
181 | µ | Random | Random | No | No | Random |
182 | ¶ | Random | Random | No | Yes | No |
183 | · | Random | Random | No | Yes | Yes |
184 | ¸ | Random | Random | No | Yes | Random |
185 | ¹ | Random | Random | No | Random | No |
186 | º | Random | Random | No | Random | Yes |
187 | » | Random | Random | No | Random | Random |
188 | ¼ | Random | Random | Random | No | No |
189 | ½ | Random | Random | Random | No | Yes |
190 | ¾ | Random | Random | Random | No | Random |
191 | ¿ | Random | Random | Random | Yes | No |
192 | À | Random | Random | Random | Yes | Yes |
193 | Á | Random | Random | Random | Yes | Random |
194 | Â | Random | Random | Random | Random | No |
195 | Ã | Random | Random | Random | Random | Yes |
196 | Ä | Random | Random | Random | Random | Random |
Would you like to make a comment or contribute an update to this page?
Send feedback to the KDE Docs Team