initial commit, lordsawar source, slightly modified
[lordsawar] / doc / Savefile
1 Copyright (C) 2003, 2004, 2005 Ulf Lorenz
2 Copyright (C) 2004, 2005, 2006 Andrea Paternesi
3 Copyright (C) 2007, 2009 Ben Asselstine
4 This document describes the format of a lordsawar save game. 
5
6
7 The save game files are in uncompressed tar format. 
8 The first file is the scenario file, which is an xml file.  It is this scenario file format that is described in this document.
9 The rest of the files are in the tar file are: citysets, shieldsets, armysets, tilesets and their associated image (.png) files.
10
11
12 The scenario file is known as a "savegame" in this document.
13
14 The tags are displayed here as they appear in the save game.  
15 The text in between the tags are comments.  There are two kinds of tags:
16
17 - tags to structure the savefile
18 - data tags
19
20 The first kind of tags defines a structure for the savegames, which is 
21 important when loading it. The latter tags actually store the data. As 
22 an example, here is a draft of the list of players:
23
24 <playerlist>
25     <player>
26         <d_id>      player's Id     </d_id>
27         <d_name>    player's name   </d_name>
28         ...
29     </player>
30     <player>
31     ...
32     </player>
33     ...
34 </playerlist>
35
36 The player tags here enclose the definition of a single player. The 
37 actual name etc. of these players are stored within data tags. Data 
38 tags always start with a "d_".
39
40 Order of the data tags does not matter, but the order of the sections
41 does matter.
42
43 The version of the savegame is encoded in the first opening "lordsawar" tag.
44
45 <?xml version="1.0"?>
46
47 <lordsawar version="xxx">
48     <counter>
49         <d_curID>   This value should be always higher than the largest Id that
50                     has been assigned since new Id's will be assigned from this
51                     value on.
52                     Unique successive Ids are given to newly created game 
53                     objects, and this value holds the next Id to assign.
54         </d_curID>
55     </counter>
56     
57     <playerlist>
58         <d_active> the Id of the active player </d_active>
59         <d_neutral> the Id of the neutral player </d_neutral>
60         <player>
61             <d_id>      the Id of the player                    </d_id>
62             <d_name>    the name of the player                  </d_name>
63             <d_immortal> (boolean) player lives on after losing all cities</d_immortal>
64             <d_color>   the rgb values for the player separated 
65                         by spaces; e.g. "255 0 152"                       
66             </d_color>
67             <d_armyset> Id of the player's armyset
68                         Lines up with <d_id> in army/<name>/<name>.xml
69                                                                 </d_armyset>
70             <d_gold>    the gold owned by the player            </d_gold>
71             <d_dead>    true, if player is dead, false if not   </d_dead>
72             <d_type>    the type of the player
73                         0   human player
74                         1   ai player of type AI_Fast
75                         2   ai player of type AI_Dummy
76                         4   ai player of type AI_Smart
77             </d_type>
78  
79             <d_join>    if d_type=1 (boolean) the ai merges stacks together         </d_join>
80             <d_maniac>  if d_type=1 (boolean) the ai razes all cities it occupies   </d_maniac>
81             <d_upkeep>  number of gold pieces paid this turn for upkeep
82                                                                 </d_upkeep>
83             <d_fight_order> a space separated list of army type Ids that
84                             determine the order in which armies fight
85                             in battle.                          
86                             These Ids line up with order of armies in
87                             the armyset.                </d_fight_order>
88             <history>
89                 The only tag common to all history types is the tag "type".
90                 Everything else depends on the type of the history event. 
91                 The whole historylist of a player comes here with as many 
92                 tags as necessary.  For example purposes, one history tag
93                 will be shown for each kind of history event.  This data is
94                 used to populate the history reports.
95             </history>
96             <history>
97                 <d_type>1</d_type> (player starts a turn)
98             </history>
99             <history>
100                 <d_type>2</d_type> (player's hero finds a sage)
101                 <d_hero> the hero's name </d_name>
102             </history>
103             <history>
104                 <d_type>3</d_type> (player gold report)
105                 <d_gold> how much gold the player has </d_gold>
106             </history>
107             <history>
108                 <d_type>4</d_type> (player has a hero emerge somewhere)
109                 <d_hero> the hero's name </d_name>
110                 <d_city> the name of the city </d_name>
111             </history>
112             <history>
113                 <d_type>5</d_type> (player took over a city)
114                 <d_city> the Id of the city the player took over </d_city>
115             </history>
116             <history>
117                 <d_type>6</d_type> (player razed a city)
118                 <d_city> the Id of the city the player razed </d_city>
119             </history>
120             <history>
121                 <d_type>7</d_type> (player's hero starts a quest)
122                 <d_hero> the hero's name </d_name>
123             </history>
124             <history>
125                 <d_type>8</d_type> (player's hero completes a quest)
126                 <d_hero> the hero's name </d_name>
127             </history>
128             <history>
129                 <d_type>9</d_type> (player's hero killed in a city)
130                 <d_hero> the hero's name </d_name>
131                 <d_city> the name of the city </d_name>
132             </history>
133             <history>
134                 <d_type>10</d_type> (hero killed in battle outside of a city)
135                 <d_hero> the hero's name </d_name>
136             </history>
137             <history>
138                 <d_type>11</d_type> (hero killed while searching a ruin)
139                 <d_hero> the hero's name </d_name>
140             </history>
141             <history>
142                 <d_type>12</d_type> (hero takes over a city)
143                 <d_hero> the hero's name </d_name>
144             </history>
145             <history>
146                 <d_type>13</d_type> (player total score report)
147                 <d_score> an integer between 0 and 100 representing
148                           how well the player is doing </d_score>
149             </history>
150             <history>
151                 <d_type>14</d_type> (player is vanquished)
152             </history>
153
154             <stacklist>
155                 This list contains all stacks of the player.
156             
157                 <d_active> the Id of the current activestack   </d_active>
158
159                 <stack>
160                     <d_id>         the Id of the stack         </d_id>
161                     <d_player>     the Id of the stack's player</d_player>
162                     <d_x>          x position of the stack on the map </d_x>
163                     <d_y>          y position of the stack on the map </d_y>
164                     <d_defending>  is the stack defending? (defending stacks 
165                                    will be ignored if the player clicks 
166                                    on "next stack")
167                     </d_defending>
168                     <d_parked>  is the stack parked?  This just means the 
169                                 player doesn't want to deal with this 
170                                 stack again this turn.
171                     </d_parked>
172                     <d_moves_exhausted_at_point>
173                         Which point in the path we stop moving at because 
174                         we will run out of movement points.
175                         This value is an index, starting at 0.
176                     </d_moves_exhausted_at_point>
177                     
178                     <path>
179                         <d_size> how many items does the path contain </d_size>
180                         <d_x>   a space separated list of all x coordinates 
181                                 (in order) of the path's items
182                         </d_x>
183                         <d_y>   the same for the y coordinates   </d_y>
184                     </path>
185
186                     Up to eight army tags follow.  Order of armies is the
187                     order within the stack.
188                     
189                     <army>
190                         <d_id>     the Id of the army            
191                         </d_id>
192                         <d_type>   the type of the army (0 means first 
193                                    army type of the armyset, 1 second etc.)
194                         </d_type>
195                         <d_armyset>  Id of the army's armyset   
196                         </d_armyset>
197                         <d_hp>       how many hitpoints the army has 
198                         </d_hp>
199                         <d_moves>    how many movement points the 
200                                      army has left                   
201                         </d_moves>
202                         <d_max_moves> maximum number of movement 
203                                       points the army can move   
204                         </d_max_moves>
205                         <d_strength>  the strength of the army   
206                         </d_strength>
207                         <d_xp>        the experience points of the army </d_xp>
208                         <d_medals>   the value data tags are three boolean 
209                                      values separated by spaces one foreach 
210                                      medal type; 0 means no medal 1 means medal
211                         </d_medals>
212                         <d_numberbattles> how many battles this army has fought
213                         </d_numberbattles> 
214                         <d_sight>  the view radius on hidden map 
215                         </d_sight>
216                         <d_expvalue>  how many xp this army is worth if killed  
217                         </d_expvalue>
218                         <d_ship> whether or not this army is in a ship
219                         </d_ship>
220                         <d_hero> whether or not this army is a hero
221                         </d_hero>
222                         <d_visited_temples>
223                             a space separated list of temple Ids that the
224                             army has been blessed at
225                         </d_visited_temples>
226                     </army>
227
228                     <hero>
229                         <d_name>      the name of the hero     
230                         </d_name>
231                         <d_gender >      the gender of the hero     
232                         </d_gender>
233                         <backpack>
234                               <item>
235                                   <d_name> the name of the item              
236                                   </d_name>
237                                   <d_plantable> can this item be planted>
238                                   </d_plantable>
239                                   <d_plantable_owner>  this id of player who
240                                                        can plant this item
241                                   </d_plantable_owner>
242                                   <d_id>        a unique Id of the item 
243                                   </d_id>
244                                   <d_bonus>  type of the bonus for the item
245                                              See Item.h for a listing.
246                                   </d_bonus>
247                               </item>
248
249                               ...
250
251                         </backpack>
252
253                         ... the rest is the same as the army tag
254
255                     </hero>
256
257                     ...more armies or heroes...
258                 </stack>
259
260                 ...more stacks...
261
262             </stacklist>
263
264             <fogmap>
265                 <d_width> width of the map              </d_width>
266                 <d_height> height of the map            </d_height>
267                 <d_map>  fog of war information
268                          each line contains WIDTH numbers, and a new line
269                          there are a total of HEIGHT lines
270                          if a number is 0, then that tile is hidden
271                          if a number is 1, then that tile is exposed
272                                                         </d_map>
273             </fogmap>
274             <triumphs>
275                 The following data is used to fill out the triumphs report:
276                 <d_hero> a space separated list of the number of heroes
277                          we have killed, per player
278                 </d_hero>
279                 <d_special> a space separated list of the number of special
280                             armies (dragons, etc) that we have killed, per
281                             player
282                 </d_special>
283                 <d_normal>a space separated list of the number of normal
284                           armies we have killed per player
285                 </d_normal>
286                 <d_ship>a space separated list of the number of ships we have
287                         killed per player
288                 </d_ship>
289                 <d_flag>a space separated list of the number of times we have
290                         captured an enemy's standard, per player
291                 </d_flag>
292             </triumphs>
293
294             <action>
295                 The only tag common to all action types is the "d_type" tag.
296                 Everything else depends on the type of the action. The whole
297                 actionlist of a player comes here with as many tags as
298                 necessary.  For example purposes, one action tag
299                 will be shown for each kind of action event.
300             </action>
301
302             <action>
303                 <d_type>1</d_type> (.. stack moved ..)
304                 <d_stack>  the Id of the stack             </d_stack>
305                 <d_x>      x position of the destination   </d_x>
306                 <d_y>      y position of the destination   </d_y>
307             </action>
308
309             <action>
310                 <d_type>2</d_type> (.. stack split ..)
311                 <d_orig_stack> the Id of the original stack         </d_orig_army>
312                 <d_new_stack>  the Id of the freshly created stack  </d_new_army>
313                 <d_moved>      a space-separated list of the 8 figures.
314                                They describe the Id's of the armies which have
315                                been added to stack new_army. If <8 armies
316                                have moved, the rest of the fields are filled
317                                with zeros
318                 </d_moved>
319             </action>
320             
321             <action>
322                <d_type>3</d_tag> (.. stack fight ..)
323                <d_attackers> list of attacking stack's Ids separated by spaces </d_attackers>
324                <d_defenders> list of defending stack's Ids separated by spaces </d_defenders>
325
326                it can also have an arbitrary number of subtags built like this:
327
328                <item>
329                    <d_turn>   combat round           </d_turn>
330                    <d_id>     id of the damaged unit </d_id>
331                    <d_damage> amount of damage done  </d_damage>
332                </item>
333             </action>
334             
335             <action>
336                 <d_type>4</d_type> (.. stack joined ..)
337                 <d_receiver>  the Id of the army which survives the joining
338                 </d_receiver>
339                 <d_joining>   the Id of the army which is destroyd after the
340                               joining
341                 </d_joining>
342             </action>
343
344             <action>
345                 <d_type>5</d_type> (.. ruin searched ..)
346                 <d_ruin>     the Id of the searched ruin     </d_ruin>
347                 <d_seeker>   the Id of the searching stack   </d_seeker>
348                 <d_searched> has the keeper been defeated and the ruin
349                              successfully searched?
350                 </d_searched>
351             </action>
352
353             <action>
354                 <d_type>6</d_type> (.. temple searched ..)
355                 <d_temple> the Id of the visited temple    </d_temple>
356                 <d_stack>  the Id of the visiting stack    </d_stack>
357             </action>
358
359             <action>
360                 <d_type>7</d_type> (.. city occupied ..)
361                 <d_city> the Id of the occupied city </d_city>
362             </action>
363
364             <action>
365                 <d_type>8</d_type> (.. city pillaged ..)
366                 <d_city> the Id of the pillaged city </d_city>
367             </action>
368
369             <action>
370                 <d_type>9</d_type> (.. city razed ..)
371                 <d_city> the Id of the burnt down city </d_city>
372             </action>
373
374             <action>
375                 <d_type>10</d_type> (.. city upgraded defense ..)
376                 <d_city> the Id of the affected city </d_city>
377             </action>
378
379             <action>
380                 <d_type>11</d_type> (.. city buy production ..)
381                 <d_city>     the city Id we bought production for              </d_city>
382                 <d_slot>     the slot that got replaced                        </d_slot>
383                 <d_type>     the index of the army to be produced              </d_type>
384             </action>
385
386             <action>
387                 <d_type>12</d_type> (.. city change production ..)
388                 <d_city>     the city Id whose production is changed         </d_city>
389                 <d_prod>     selected slot index                             </d_prod>
390             </action>
391
392             <action>
393                 <d_type>13</d_type> (.. a reward is given ..)
394                 <reward>
395                   Look at lordsawar.rewardlist for a description of a reward.
396                 </reward>
397             </action>
398
399             <action>
400                 <d_type>14</d_type> (.. hero gets a quest ..)
401                 <d_hero>  the hero that has got the quest             </d_hero>
402                 <d_quest> 1,2,3, depends on the quest type            </d_quest>
403                 <d_data>  the Id of the object, depends on quest type </d_data>
404             </action>
405
406             <action>
407                 <d_type>15</d_type> (.. hero picks up/drops an item ..)
408                 <d_hero> the hero that equips the item </d_hero>
409                 <d_item> item that is equipped         </d_item>
410                 <d_dest> where the item is equipped    </d_dest>
411             </action>
412
413             <action>
414                 <d_type>16</d_type> (.. army level-up ..)
415                 <d_army> the army that has advanced a level </d_army>
416                 <d_stat> the stat that was raised           </d_stat>
417             </action>
418
419             <action>
420                 <d_type>17</d_type> (.. city sacked ..)
421                 <d_city> the Id of the sacked city </d_city>
422             </action>
423
424             <action>
425                 <d_type>18</d_type> (.. stack disbanded ..)
426                 <d_stack> the Id of the stack disbanded </d_stack>
427             </action>
428
429             <action>
430                 <d_type>19</d_type> (.. signpost changed ..)
431                 <d_signpost> the Id of the signpost changed </d_signpost>
432                 <d_message> the new message on the sign </d_message>
433             </action>
434
435             <action>
436                 <d_type>20</d_type> (.. city rename ..)
437                 <d_city> the Id of the city that was renamed </d_city>
438                 <d_name> the new name of the city </d_name>
439             </action>
440
441             <action>
442                 <d_type>21</d_type> (.. city vector ..)
443                 <d_city> the Id of the city being vectored from </d_city>
444                 <d_x> the x position being vectored to </d_x>
445                 <d_y> the y position being vectored to </d_y>
446             </action>
447
448             <action>
449                 <d_type>22</d_type> (.. fight order changed ..)
450                 <d_order > a space separated list of army type Ids that
451                            represent the order in which they will fight in 
452                            battle
453                 </d_order>
454                 <d_x> the x position being vectored to </d_x>
455                 <d_y> the y position being vectored to </d_y>
456             </action>
457
458             <action>
459                 <d_type>23</d_type> (.. player resigns ..)
460             </action>
461
462             <action>
463                 <d_type>24</d_type> (.. player plants an item ..)
464                 <d_hero> the id of the hero </d_hero>
465                 <d_item> the id of the item </d_item>
466             </action>
467
468             <action>
469                 <d_type>25</d_type> (.. city produces army ..) 
470                 <d_army_type > the id of the army type </d_army_type>
471                 <d_city > the id of the destination city </d_city>
472                 <d_vectored> was it vectored here? </d_vectored>
473             </action>
474
475             <action>
476                 <d_type>25</d_type> (.. vector army ..) 
477                 <d_army_type > the id of the army type </d_army_type>
478                 <d_x> the x position being vectored to </d_x>
479                 <d_y> the y position being vectored to </d_y>
480             </action>
481
482                
483         </player>
484
485         ...more players...
486         
487     </playerlist>
488     
489     <map>
490         <d_width>    the width of the map </d_width>
491         <d_height >    the height of the map </d_height >
492         <d_tileset> name of the tileset used   </d_tileset>
493         <d_types>
494             First, there is a newline sign at the end of the string.
495             Following this is a long long row of numbers indicating the type of
496             terrain. The saving goes [0,0],[1,0],[2,0],...[0,1],[1,1] etc., i.e.
497             first column 0, then column 1 etc.
498             The numbers for the terrain:
499                 0   grass
500                 1   water
501                 2   forest
502                 3   hills
503                 4   mountains
504                 5   swamp
505             each column ends with a newline
506         </d_types>
507         <d_styles>
508             an array of tilestyles.  Each tilestyle is stored as a 2 digit
509             hexadecimal number.
510             It is space separated like the d_types tag.
511         <d_styles>
512
513         <itemstack>
514            <d_x> the x location of the item </d_x>
515            <d_y> the y location of the item </d_y>
516            <item>
517                See lordsawar.playerlist.player.stacklist.stack.hero.backpack 
518                for a description of an "item".
519            </item>
520         </itemstack>
521         ... more itemstacks ...
522     </map>
523
524     <citylist>
525         <city>
526             <d_id>          the Id of the city
527             </d_id>
528             <d_name>        the name of the city
529             </d_name>
530             <d_x>           x position of the city on the map
531             </d_x>
532             <d_y>           y position of the city on the map
533             </d_y> 
534             <d_owner>       Id of the city's owning player
535             </d_owner>
536             <d_production>  The index of the current production slot
537             </d_production>
538             <d_gold>        the amount of gold the city provides each turn
539             </d_gold>
540             <d_burnt>       true if the city has been razed
541             </d_burnt>
542             <d_defense>     defense level of the city
543             </d_defense>
544             <d_capital>     true if this is a capital city
545             </d_capital>
546             <d_capital_owner> the Id of the player who's capital this is.
547                               only present if d_capital is true.
548             </d_capital_owner>
549             <d_vectoring>
550               space separated position of where this city is vectoring to.
551               x comes first, then y.
552               if the city is not vectoring, then the value is "-1, -1".
553             </d_vectoring>
554
555             Now up to 4 armies appear.  These aren't armies like they appear
556             in stacks.  These are army *templates* to be used to produce
557             new armies in cities.
558             <army>
559             </army>
560             ...more armies...
561         </city>
562
563         ...more cities...
564
565     </citylist>
566
567     <templelist>
568         <temple>
569             <d_id>     the Id of the temple        </d_id>
570             <d_name>   the name of the temple      </d_name>
571             <d_type>   the type of the temple      </d_type>
572             <d_x>      x position of the temple    </d_x>
573             <d_y>      y position of the temple    </d_y>
574         </temple>
575
576         ...more temples...
577
578     </templelist>
579
580     <ruinlist>
581         <ruin>
582             <d_id>         the Id of the ruin              </d_id>
583             <d_name>       the name of the ruin            </d_name>
584             <d_type>       the type of the ruin            </d_type>
585             <d_x>          x position of the ruin          </d_x>
586             <d_y>          y position of the ruin          </d_y>
587             <d_searched>   has the uin been searched yet?  </d_searched>
588             <d_sage>       is this ruin a sage? (boolean)  </d_sage>
589             <d_hidden>     is this ruin hidden? (boolean)  </d_hidden>
590             <d_owner>      player id of player who can see this ruin
591                            this value is the neutral player's id if the
592                            ruin is visible by all.
593             </d_owner>
594             <reward>
595               Look at lordsawar.rewardlist for a description of a reward.
596             </reward>
597             <stack>
598                 ....
599                 The stack the hero will fight (if not a sage)
600                 Here follows a complete description of the stack which guards
601                 the ruin.
602                 ....
603             </stack>
604         </ruin>
605
606         ...more ruins...
607
608     </ruinlist>
609
610     <rewardlist>
611         the one-time reward list, where random rewards are chosen from
612         <reward>
613             The only tags common to all reward types is the tag "type",
614             and "name".
615             Everything else depends on the type of the reward. 
616             For example purposes, one reward tag will be shown for 
617             each kind of reward.
618         </reward>
619         <reward>
620             <d_type>1</d_type> (..give gold..)
621             <d_name></d_name>
622
623             <d_gold>amount of gold</d_gold>
624         </reward>
625         <reward>
626             <d_type>2</d_type> (..give allies..)
627             <d_name></d_name>
628
629             <d_num_allies> give this many allies
630             </d_num_allies>
631             <d_ally_type> the allies have this army type id 
632             </d_ally_type>
633             <d_ally_armyset> the id of the armyset for this army type
634             </d_ally_armyset>
635         </reward>
636         <reward>
637             <d_type>3</d_type> (..give item..)
638             <d_name></d_name>
639
640             <item>
641                 the item to give
642                 See lordsawar.playerlist.player.stacklist.stack.hero.backpack
643                 for a description of an item.
644             </item>
645         </reward>
646         <reward>
647             <d_type>4</d_type> (..show a hidden ruin..)
648             <d_name></d_name>
649
650             <d_x> the x position of the hidden ruin </d_x>
651             <d_y> the y position of the hidden ruin </d_y>
652         </reward>
653         <reward>
654             <d_type>5</d_type> (..show a part of a hidden map..)
655             <d_name></d_name>
656
657             <d_height> the map is this many tiles high</d_height>
658             <d_width> the map is this many tiles wide</d_width>
659             <location>
660                 <d_id>id of the map</d_id>
661                 <d_name>name of the map</d_name>
662                 <d_x> the upper left corner of the map, x position </d_x>
663                 <d_y> the upper left corner of the map, y position </d_y>
664             </location>
665         </reward>
666         ...more rewards...
667     </rewardlist>
668
669     <signpostlist>
670         the list of signs on the map
671         <signpost>
672             <d_id>the id of the signpost</d_id>
673             <d_name>the message on the sign <d_name>
674             <d_x>the x position on the map<d_x>
675             <d_y>the y position on the map<d_y>
676         </signpost>
677         ...more signposts...
678     </signpostlist>
679
680     <roadlist>
681         the list of road tiles on the map
682         <road>
683             <d_id>the id of the road tile</d_id>
684             <d_name>the name of the road (unused) <d_name>
685             <d_type>the style of road<d_type>
686             <d_x>the x position on the map<d_x>
687             <d_y>the y position on the map<d_y>
688         </road>
689         ...more road tiles...
690     </roadlist>
691     <portlist>
692         the list of port tiles on the map
693         <port>
694             <d_id>the id of the port tile</d_id>
695             <d_name>the name of the port (unused) <d_name>
696             <d_x>the x position on the map<d_x>
697             <d_y>the y position on the map<d_y>
698         </port>
699         ...more port tiles...
700     </portlist>
701     <bridgelist>
702         the list of bridge tiles on the map
703         <bridge>
704             <d_id>the id of the bridge tile</d_id>
705             <d_name>the name of the bridge (unused) <d_name>
706             <d_type>the style of bridge <d_type>
707             <d_x>the x position on the map<d_x>
708             <d_y>the y position on the map<d_y>
709         </bridge>
710         ...more bridge tiles...
711     </bridgelist>
712     <questlist>
713         the list of outstanding quests
714         <quest>
715             Every quest contains a common section, and then a specific 
716             section that depends on that quest type.
717             The common section:
718             <d_type> Quest type.  For example purposes, one quest per type
719                      will follow.
720             </d_type>
721             <d_hero> the id of the hero
722             </d_hero>
723             <d_hero_name> the name of the hero
724             </d_hero_name>
725             <d_pending> whether or not this quest is pending deletion at the
726                         end of the round (boolean)
727             </d_pending>
728             <d_player> the id of the player owning the hero
729             </d_player>
730         </quest>
731         <quest>
732             <d_type>1</d_type> (..go kill a hero..)
733             <d_hero></d_hero>
734             <d_hero_name></d_hero_name>
735             <d_pending></d_pending>
736             <d_player></d_player>
737
738             <d_to_kill> id of hero to kill </d_to_kill>
739         </quest>
740         <quest>
741             <d_type>2</d_type> (..go kill some of a player's armies..)
742             <d_hero></d_hero>
743             <d_hero_name></d_hero_name>
744             <d_pending></d_pending>
745             <d_player></d_player>
746
747             <d_to_kill> kill this many armies </d_to_kill>
748             <d_killed> this many killed so far </d_killed>
749             <d_victim_player> only count killed armies from 
750                               th player with this id
751             </d_victim_player>
752         </quest>
753         <quest>
754             <d_type>3</d_type> (..go sack a city..)
755             <d_hero></d_hero>
756             <d_hero_name></d_hero_name>
757             <d_pending></d_pending>
758             <d_player></d_player>
759
760             <d_city> the id of the city to sack </d_city>
761         </quest>
762         <quest>
763             <d_type>4</d_type> (..go raze a city..)
764             <d_hero></d_hero>
765             <d_hero_name></d_hero_name>
766             <d_pending></d_pending>
767             <d_player></d_player>
768
769             <d_city> the id of the city to raze </d_city>
770         </quest>
771         <quest>
772             <d_type>5</d_type> (..go occupy a city..)
773             <d_hero></d_hero>
774             <d_hero_name></d_hero_name>
775             <d_pending></d_pending>
776             <d_player></d_player>
777
778             <d_city> the id of the city to occupy </d_city>
779         </quest>
780         <quest>
781             <d_type>6</d_type> (..go kill a particular kind of army..)
782             <d_hero></d_hero>
783             <d_hero_name></d_hero_name>
784             <d_pending></d_pending>
785             <d_player></d_player>
786
787             <d_type_to_kill> the army type id of the army to kill
788             </d_type_to_kill>
789         </quest>
790         <quest>
791             <d_type>7</d_type> (..go pillage a certain amount of gold..)
792             <d_hero></d_hero>
793             <d_hero_name></d_hero_name>
794             <d_pending></d_pending>
795             <d_player></d_player>
796
797             <d_to_pillage> the amount of gold to pillage</d_to_pillage>
798             <d_pillaged> the amount pillaged so far</d_pillaged>
799         </quest>
800         ...more quests...
801
802     </questlist>
803
804     <vectoredunitlist>
805         the list of vectored units that are "in the air"
806         <vectoredunit>
807           <d_id> the Id of the vectored unit </d_id>
808           <d_name> the name of the vectored unit (unused) </d_name>
809           <d_x> the source x position of the unit on the map </d_x>
810           <d_y> the source y position on the map </d_y>
811           <d_duration> how many more turns before the vectored unit shows up
812           </d_duration>
813           <d_dest_x> the destination x position on the map </d_dest_x>
814           <d_dest_y> the destination y position on the map </d_dest_y>
815           <d_player> the id of the player who is vectoring the unit
816           </d_player>
817           <army>
818               the army template to be vectored
819               this army layout is the same as the one in a city
820           </army>
821         </vectoredunit>
822         ...more vectored units...
823     </vectoredunitlist>
824     <scenario>
825         <d_name> name of the scenario  </d_name>
826         <d_comment> more info about the scenario </d_comment>
827         <d_turn> the current turn number of the scenario  </d_turn>
828         <d_turnmode> boolean value used to set the armies healing at 
829                      the beginning of the player's turn or at the 
830                      beginning of the new round
831         </d_turnmode>
832         <d_view_enemies> see enemy stack's contents.  (boolean)
833         </d_view_enemies>
834         <d_view_production> see enemy production. (boolean)
835         </d_view_enemies>
836         <d_quests> heroes can go on quests. (boolean)
837         </d_quests>
838         <d_hidden_map> fog of war. (boolean)
839         </d_hidden_map>
840         <d_diplomacy> declare war before attacking. (boolean)
841         </d_diplomacy>
842         <d_neutral_cities> a number between 0 and 2.
843             0 = Average
844             1 = Strong
845             2 = Active
846         </d_neutral_cities>
847         <d_intense_combat> make fights more difficult. (boolean)
848         </d_intense_combat>
849         <d_military_advisor> make battle advice available. (boolean)
850         </d_military_advisor>
851         <d_random_turns> switch-up player turns. (boolean)
852         </d_random_turns>
853
854     </scenario>
855 </lordsawar>