forked from DFHack/df-structures
-
Notifications
You must be signed in to change notification settings - Fork 0
/
df.world-site.xml
1236 lines (1122 loc) · 54.9 KB
/
df.world-site.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<data-definition>
<struct-type type-name='scribejob'>
<int32_t name='idmaybe'/>
<int32_t comment='not locationid'/>
<int32_t name='item_id'/>
<int32_t name='written_content_id'/>
<int32_t name='unit_id'/>
<int32_t name='activity_entry_id'/>
<int32_t/>
</struct-type>
<struct-type type-name='site_reputation_report'>
<int32_t name='site_id'/>
<int32_t name='location_id'/>
<int32_t/>
<int32_t/>
<int32_t name='year'/>
<int32_t name='tickmaybe'/>
<static-array type-name='int32_t' count='8'/>
</struct-type>
<struct-type type-name='site_reputation_info'>
<stl-vector name='reports' pointer-type='site_reputation_report'/>
</struct-type>
<struct-type type-name='location_scribe_jobs'>
<stl-vector name='scribejobs' pointer-type='scribejob'/>
<int32_t name='nextidmaybe'/>
<int32_t name='year'/>
<uint16_t/>
<int16_t/>
<int32_t/>
<int32_t/>
<int32_t/>
</struct-type>
<enum-type type-name='abstract_building_type'>
<enum-item name='MEAD_HALL'/>
<enum-item name='KEEP'/>
<enum-item name='TEMPLE'/>
<enum-item name='DARK_TOWER'/>
<enum-item name='MARKET'/>
<enum-item name='TOMB'/>
<enum-item name='DUNGEON'/>
<enum-item name='UNDERWORLD_SPIRE'/>
<enum-item name='INN_TAVERN'/>
<enum-item name='LIBRARY'/>
<enum-item name='COUNTING_HOUSE'/>
<enum-item name='GUILDHALL'/>
<enum-item name='TOWER'/>
</enum-type>
<enum-type type-name='abstract_building_flags'>
<enum-item name='Unk0'/>
<enum-item name='Unk1'/>
<enum-item name='Unk2' comment="gets toggled when an adventurer has visited it."/>
<enum-item name='Unk3'/>
<enum-item name='AllowVisitors'/>
<enum-item name='AllowResidents'/>
<enum-item name='OnlyMembers'/>
<enum-item name='Unk7'/>
</enum-type>
<struct-type type-name='abstract_building_entombed' comment='used within Tomb and Dungeon'>
<stl-vector name='populations'>
<pointer>
<int32_t name='count'/>
<int32_t name='race' ref-target='creature_raw'/>
<int32_t name='population' ref-target='entity_population'/>
<int32_t name='unk_4' init-value='-1'/>
<int32_t name='unk_5' comment='min year?'/>
<int32_t name='unk_6' comment='max year? seems to always be slightly before the construction of the building for tombs'/>
<int32_t name='unk_7' comment='seen equal to count'/>
<int32_t name='unk_8' since='v0.40.01' comment='seen values 0, 6'/>
</pointer>
</stl-vector>
<stl-vector name='histfigs' ref-target='historical_figure' type-name='int32_t'/>
</struct-type>
<struct-type type-name='abstract_building_contents' comment='used within Temple, Library, and Inn/Tavern'>
<bitfield name='need_more'>
<flag-bit name='goblets'/>
<flag-bit name='instruments'/>
<flag-bit name='paper'/>
</bitfield>
<enum name='profession' type-name='profession' since='v0.47.01'/>
<int32_t name='desired_goblets'/>
<int32_t name='desired_instruments'/>
<int32_t name='desired_paper'/>
<int32_t name='desired_copies' init-value='2'/>
the following is not saved:
<int32_t name='location_tier'/>
<int32_t name='location_value'/>
<int32_t name='count_goblets'/>
<int32_t name='count_instruments'/>
<int32_t name='count_paper'/>
<int32_t name='unk_v47_2' init-value='100'/>
<int32_t name='unk_v47_3'/>
<stl-vector name='building_ids' type-name='int32_t' ref-target='building'/>
</struct-type>
<class-type type-name='abstract_building' original-name='abstract_buildingst' key-field='id'>
<int32_t name='id'/>
<code-helper name='find-instance'>
(find-by-id $(find-instance $world_site $$).buildings $id $)
</code-helper>
<stl-vector name='inhabitants'>
<pointer>
<int16_t/>
<int32_t name='histfig_id' ref-target='historical_figure'/>
</pointer>
</stl-vector>
<df-flagarray name='flags' index-enum='abstract_building_flags'/>
<pointer name='unk1' comment='in temples; hfig is the god'>
<stl-vector name='hfig' ref-target='historical_figure' type-name='int32_t'/>
<int32_t/>
<stl-vector name='architectural_elements' comment='used by temples' type-name='architectural_element'/>
<int16_t name='mat_type' ref-target='material' aux-value='$$.mat_index' comment='just a guess'/>
<int32_t name='mat_index'/>
</pointer>
<stl-vector name='unk2' type-name='int32_t'/>
<int32_t name='parent_building_id' ref-target='abstract_building' comment='Tombs use this to hold which catacomb they are part of.'/>
<stl-vector name='child_building_ids' type-name='int32_t' ref-target='abstract_building' comment='Used by catacombs to hold their tombs'/>
<int32_t name='site_owner_id' ref-target='historical_entity' comment='entity that constructed the building'/>
<pointer name='scribeinfo' since='v0.42.01' type-name='location_scribe_jobs'/>
<pointer name='reputation_reports' since='v0.42.01' type-name='site_reputation_info'/>
<pointer name='unk_v42_3' since='v0.42.01'>
<static-array type-name='int32_t' count='8'/>
</pointer>
<int32_t name='site_id' ref-target='world_site'
comment='not initialized/saved/loaded, assumed member of base class'/>
<compound name='pos' type-name='coord2d' since='v0.42.01'/>
<stl-vector name='occupations' pointer-type='occupation' since='v0.42.01'/>
<virtual-methods>
<vmethod ret-type='abstract_building_type' name='getType'/>
<vmethod name='getDisplayTile' comment='on navigation minimap'>
<pointer type-name='uint8_t' name='tile'/>
<pointer type-name='uint16_t' name='fg'/>
<pointer type-name='uint16_t' name='bg'/>
<pointer type-name='uint16_t' name='bright'/>
</vmethod>
<vmethod name='getName'><ret-type><pointer type-name='language_name'/></ret-type></vmethod>
<vmethod name='getContents'><ret-type><pointer type-name='abstract_building_contents'/></ret-type></vmethod>
<vmethod name='write_file'> <pointer name='file' type-name='file_compressorst'/> </vmethod>
<vmethod name='read_file'>
<pointer name='file' type-name='file_compressorst'/>
<enum name='loadversion' type-name='save_version'/>
</vmethod>
<vmethod is-destructor='true'/>
<vmethod ret-type='int32_t' name='getReligionID'/>
<vmethod ret-type='bool' comment='returns false for dark tower, dungeon, keep, market, tomb, and underworld spire; true for all others'/>
<vmethod ret-type='bool' comment='returns true for dark tower, tavern, keep, library, temple, and underworld spire; false for all others'/>
<vmethod ret-type='int32_t' comment='possibly related to importance; return values include 20, 50, 100'/>
<vmethod name='getEntombed'><ret-type><pointer type-name='abstract_building_entombed'/></ret-type></vmethod>
<vmethod name='generate_xml'>
<pointer type-name='stl-fstream'/>
<int32_t name='indent'/>
</vmethod>
</virtual-methods>
</class-type>
<class-type type-name='abstract_building_mead_hallst' inherits-from='abstract_building'>
<compound name='name' type-name='language_name'/>
<compound name='item1' type-name='site_building_item'/>
<compound name='item2' type-name='site_building_item'/>
</class-type>
<class-type type-name='abstract_building_keepst' inherits-from='abstract_building'>
<compound name='name' type-name='language_name'/>
</class-type>
<enum-type type-name='temple_deity_type' base-type='int32_t'>
<enum-item name='None' value='-1'/>
<enum-item name='Deity'/>
<enum-item name='Religion'/>
</enum-type>
<struct-type type-name='temple_deity_data' is-union='true'>
<int32_t name='Deity' ref-target='historical_figure'/>
<int32_t name='Religion' ref-target='historical_entity'/>
</struct-type>
<class-type type-name='abstract_building_templest' inherits-from='abstract_building'>
<enum name='deity_type' type-name='temple_deity_type'/>
<compound name='deity_data' type-name='temple_deity_data'/>
<compound name='name' type-name='language_name'/>
<compound name='contents' type-name='abstract_building_contents'/>
</class-type>
<class-type type-name='abstract_building_dark_towerst' inherits-from='abstract_building'>
<compound name='name' type-name='language_name'/>
</class-type>
<class-type type-name='abstract_building_marketst' inherits-from='abstract_building'>
<compound name='name' type-name='language_name'/>
</class-type>
<class-type type-name='abstract_building_tombst' inherits-from='abstract_building'>
<compound name='name' type-name='language_name'/>
<compound name='entombed' type-name='abstract_building_entombed'/>
<int32_t name='precedence'/>
</class-type>
<class-type type-name='abstract_building_dungeonst' inherits-from='abstract_building'>
<compound name='name' type-name='language_name'/>
<enum base-type='int16_t' name='dungeon_type'>
<enum-item name='DUNGEON'/>
<enum-item name='SEWERS'/>
<enum-item name='CATACOMBS'/>
</enum>
<int32_t/>
<compound name='entombed' type-name='abstract_building_entombed'/>
<int32_t/>
<int32_t comment='not saved'/>
<int32_t comment='not saved'/>
</class-type>
<class-type type-name='abstract_building_underworld_spirest' inherits-from='abstract_building'>
<compound name='name' type-name='language_name'/>
<int32_t name="unk_bc"/>
</class-type>
<class-type type-name='abstract_building_inn_tavernst' inherits-from='abstract_building'>
<compound name='name' type-name='language_name'/>
<compound name='contents' type-name='abstract_building_contents'/>
<stl-vector name='room_info'>
<pointer>
<int32_t name='id'/>
<stl-string/>
<int32_t name='world_x'/>
<int32_t name='world_y'/>
<int32_t name='world_z'/>
</pointer>
</stl-vector>
<int32_t name='next_room_info_id'/>
</class-type>
<class-type type-name='abstract_building_libraryst' inherits-from='abstract_building'>
<compound name='name' type-name='language_name'/>
<stl-vector name='copied_artifacts' type-name='int32_t' ref-target='artifact_record'/>
<int32_t/>
<int32_t/>
<int32_t/>
<int32_t/>
<compound name='contents' type-name='abstract_building_contents'/>
</class-type>
<class-type type-name='abstract_building_counting_housest' inherits-from='abstract_building'>
<compound name='name' type-name='language_name'/>
</class-type>
<class-type type-name='abstract_building_guildhallst' inherits-from='abstract_building'>
<compound name='name' type-name='language_name'/>
<compound name='contents' type-name='abstract_building_contents'/>
</class-type>
<class-type type-name='abstract_building_towerst' inherits-from='abstract_building'>
<compound name='name' type-name='language_name'/>
<int32_t/>
</class-type>
<enum-type type-name='world_site_type' base-type='int16_t'>
<enum-item name='PlayerFortress'/>
<enum-item name='DarkFortress'/>
<enum-item name='Cave'/>
<enum-item name='MountainHalls'/>
<enum-item name='ForestRetreat'/>
<enum-item name='Town'/>
<enum-item name='ImportantLocation'/>
<enum-item name='LairShrine'/>
<enum-item name='Fortress'/>
<enum-item name='Camp'/>
<enum-item name='Monument'/>
</enum-type>
<enum-type type-name='world_site_flags'>
<enum-item name='Undiscovered'/>
<enum-item/>
<enum-item/>
<enum-item name='Town' comment='not hamlet'/>
<enum-item/>
<enum-item/>
<enum-item/>
<enum-item/>
<enum-item/>
<enum-item name='CaveCapital' comment="set on caves (only) that have capital entity links, i.e. Kobold civs in vanilla"/>
<enum-item/>
</enum-type>
<enum-type type-name='fortress_type' base-type='int16_t'>
<enum-item name='NONE' value='-1'/>
<enum-item name='CASTLE'/>
<enum-item name='TOWER'/>
<enum-item name='MONASTERY'/>
<enum-item name='FORT'/>
</enum-type>
<enum-type type-name='monument_type' base-type='int16_t'>
<enum-item name='NONE' value='-1'/>
<enum-item name='TOMB'/>
<enum-item name='VAULT'/>
</enum-type>
<enum-type type-name='lair_type' base-type='int16_t'>
<enum-item name='NONE' value='-1'/>
<enum-item name='SIMPLE_MOUND' comment='Night creatures'/>
<enum-item name='SIMPLE_BURROW' comment='animal, (semi)megabeast, night creature(!)'/>
<enum-item name='LABYRINTH'/>
<enum-item name='SHRINE'/>
<enum-item name='WILDERNESS_LOCATION' comment='In mountains, hosting Rocs in vanilla'/>
</enum-type>
<struct-type type-name='property_ownership'>
<int32_t name="index"/>
<bool name="is_concrete_property" comment="true if house [property_index = 4 only one seen], or index into buildings"/>
<padding size='3'/>
<int32_t name='property_index' comment="index into buildings when is_concrete_property is false. Only seen 4 = house with is_concrete_property = true"/>
<int32_t name="unk_hfid" ref-target='historical_figure' comment="Always same as owner_hfid when set, but not always set when that field is."/>
<int32_t name="owner_entity_id" ref-target='historical_entity' comment='Mutually exclusive with owner_hfid. All seen were merchant companies.'/>
<int32_t name="owner_hfid" ref-target='historical_figure'/>
<int32_t name="unk_owner_entity_id" ref-target='historical_entity' comment="Seen only in subset of owner_entity_id case, and always same value"/>
</struct-type> -- Cannot rule out the type having additional fields, although the 8 following bytes were all 0 in all cases in the save examined.
<struct-type type-name='world_site' key-field='id'
instance-vector='$global.world.world_data.sites'>
<compound name='name' type-name='language_name'/>
<code-helper name='describe'>(describe-obj $.name)</code-helper>
<int32_t name="civ_id" ref-target='historical_entity'/>
<int32_t name="cur_owner_id" ref-target='historical_entity'/>
<enum base-type='int16_t' name="type" type-name='world_site_type'/>
<compound name='pos' type-name='coord2d'/>
<int32_t name="id"/>
<compound name='unk_1'>
<stl-vector name="nemesis" type-name='int32_t' ref-target='nemesis_record'/>
<stl-vector name="artifacts" pointer-type='artifact_record'/>
<stl-vector name="animals" pointer-type='world_population'/>
<stl-vector name="inhabitants" pointer-type='world_site_inhabitant'/>
<stl-vector name="units">
<pointer>
<int32_t name="unit_id" ref-target='unit'/>
<int32_t name="pos_x"/>
<int32_t name="pos_y"/>
<int32_t name="pos_z"/>
<int32_t name="unk_10" init-value='-1'/>
</pointer>
</stl-vector>
<stl-vector name="unk_d4" type-name='int32_t'/>
<stl-vector name="unk_v40_1a" since='v0.40.01' pointer-type='historical_figure'/> during worldgen only
<padding size='4'/>
<stl-vector name="unk_v40_1b" since='v0.40.01' pointer-type='nemesis_record'/> this and below: at the end of worldgen only
<stl-vector name="unk_v40_1c" since='v0.40.01' pointer-type='nemesis_record'/>
<stl-vector name="unk_v40_1d" since='v0.40.01' pointer-type='nemesis_record'/>
<stl-vector name="unk_v40_1e" since='v0.40.01' pointer-type='nemesis_record'/>
<stl-vector name="unk_v40_1f" since='v0.40.01' pointer-type='nemesis_record'/>
<stl-vector name="unk_v40_1g" since='v0.40.01' pointer-type='nemesis_record'/>
<stl-vector name="unk_v40_1h" since='v0.40.01' pointer-type='nemesis_record'/>
</compound>
<int32_t name="index"/>
<int16_t name="rgn_min_x" comment='in embark tiles'/>
<int16_t name="rgn_max_x"/>
<int16_t name="rgn_min_y"/>
<int16_t name="rgn_max_y"/>
<int16_t name="rgn_min_z"/>
<int16_t name="rgn_max_z"/>
<int32_t name="global_min_x" comment='in embark tiles'/>
<int32_t name="global_min_y"/>
<int32_t name="global_max_x"/>
<int32_t name="global_max_y"/>
<uint32_t name="seed1" comment='random'/>
<uint32_t name="seed2" comment='random'/>
<int32_t name="resident_count" comment='count living in houses and shops'/>
<int32_t name="unk_110"/>
<int32_t name="unk_114"/>
<pointer name="unk_118">
<stl-vector type-name='int16_t'/>
<stl-vector type-name='int16_t'/>
<stl-vector type-name='int16_t'/>
<stl-vector type-name='int32_t'/>
<stl-vector type-name='int32_t'/>
<stl-vector type-name='int32_t'/>
</pointer>
<int32_t name="unk_11c" comment='Caves have non zero numbers. No others.'/>
<int32_t name="unk_120" comment='Subset of caves can have non zero.'/>
<int32_t name="unk_124" comment='Monument 0, LairShrine 5, Camp 20, others varying'/>
<int32_t name="unk_128" comment=' "site_level" is in here somewhere. Same as for unk_124, but varying ones always less/equal'/>
<static-array type-name='int32_t' count='8' comment="Has all zero for Fortress, Camp, PlayerFortress, Monument, and LairShrine. Cave can have value, while DarkFortress, MountainHalls, ForestRetreat and Town all have at least one non zero value"/>
<stl-vector name="unk_13c" comment='MountainHall, Town, DarkFortress, but not all'>
<pointer>
<int32_t name="unk_0"/>
<int32_t name="unk_4"/>
<int32_t name="unk_8"/>
<int32_t name="unk_c"/>
<stl-vector name="unk_10" type-name="int32_t"/>
<stl-vector name="unk_20" type-name="int32_t"/>
<int32_t name="unk_30"/>
</pointer>
</stl-vector>
<stl-vector name="unk_v40_2" since='v0.40.01' comment='forest retreat'>
<pointer>
<int32_t name="unk_0"/>
<int32_t name="unk_4"/>
<int32_t name="unk_8"/>
<int32_t name="unk_c"/>
<stl-vector name="unk_10" type-name="int32_t"/>
<stl-vector name="unk_20" type-name="int32_t"/>
<int32_t name="unk_30"/>
</pointer>
</stl-vector>
<stl-vector name="unk_v47_1" since='v0.47.01' comment='Varying types of habitation can have this. It seems new elements are added to hold all required data as all are full except the last one'>
<pointer>
<compound>
<static-array name='unk_1' count='20'>
<compound>
<int32_t name='unk_1' init-value='-1'/>
<int32_t name='unk_2' init-value='0'/>
<int32_t name='unk_3' init-value='0'/>
</compound>
</static-array>
<int32_t name='count' comment="Number of entries in the array above"/>
</compound>
</pointer>
</stl-vector>
<df-flagarray name='flags' index-enum='world_site_flags'/>
<stl-vector name="buildings" pointer-type='abstract_building'/>
<int32_t name="next_building_id"/>
<stl-vector name="property_ownership" since='v0.47.01' pointer-type='property_ownership'/>
<int32_t name="next_property_ownership_id" since='v0.47.01'/>
<int32_t name="created_tick"/>
<int32_t name="created_year"/>
<int32_t name="unk_170" comment='constant 0'/>
<int32_t name="unk_174" comment='constant 0'/>
<compound name='unk_178' type-name='coord'/>
<pointer name="realization" type-name='world_site_realization'/>
<pointer name="subtype_info">
<enum base-type='int16_t' name="fortress_type" type-name='fortress_type' init-value='NONE' comment='Only when site.type=Fortress'/>
<enum base-type='int16_t' name="monument_type" type-name='monument_type' init-value='NONE' comment='Only when site.type=Monument'/>
<enum base-type='int16_t' name="lair_type" type-name='lair_type' init-value='NONE' comment='Only when site.type=LairShrine'/>
<stl-vector name="unk_night_creature_lair" type-name='int16_t' comment="only on SIMPLE_MOUND and SIMPLE_BURROW, all mounds but not all burrows, all had night creatures. All instances seen had single element with value 0"/>
<int32_t name="unk_14" init-value='-1000000'/>
<int32_t name="unk_18" init-value='-1000000'/>
<int32_t name="unk_1c" init-value='-1000000'/>
<int32_t name="creator" ref-target='historical_figure' since='v0.40.01' comment="all vaults, no others seen"/>
<int32_t name="unk_vault" init-value='0' since='v0.40.01' comment="all vaults, no others seen, always 100"/>
<int32_t name='tower_seed' init-value='0' comment="all towers, no others. Seed is a guess based on the very large numbers"/>
<int32_t name='unk_monastery' init-value='-1' comment="all monasteries, no others. Only seen '1'"/>
<int32_t name='founding_entity' ref-target='historical_entity' comment="all monasteries, no others"/>
</pointer>
<stl-vector name='unk_21c' since='v0.34.01'>
<pointer>
<int32_t name="unk_0"/>
<int32_t name="race"/>
<int32_t name="entity_id" ref-target='historical_entity' comment="failed to see any connections between these entities and the sites. Might be something else"/>
<int32_t name="unk_c"/>
<int32_t name='unk_10' comment="might be start year"/>
<int32_t name='unk_14' comment="might be end year"/>
<int32_t name="unk_18"/>
<int32_t name="unk_1c"/>
</pointer>
</stl-vector>
<stl-vector name='deaths' type-name='int32_t' ref-target='historical_figure' since='v0.34.01' comment="killed by rampaging monster, murder, execution, old age seen. Note that most HFs seem to have been culled"/>
<int32_t name='is_mountain_halls' since='v0.40.01'/>
<int32_t name='is_fortress' since='v0.40.01'/>
<int32_t name='unk_v47_2' init-value='0' comment="only MountainHalls, but only subset of them"/>
<stl-vector name="unk_v40_4a" since='v0.40.01'>
<pointer>
<int32_t name="unk_0" init-value='0'/>
<int32_t name="entity_id" ref-target='historical_entity'/>
<int32_t name="year"/>
<int32_t name="year_tick" init-value='-1'/>
<int32_t name="unk_10" init-value='0'/>
<int32_t name="unk_14" init-value='0' since="v0.44.07"/>
</pointer>
</stl-vector>
<stl-vector name="unk_v40_4b" since='v0.40.01'>
<pointer>
<int32_t/>
<int32_t/>
</pointer>
</stl-vector>
<stl-vector name="unk_v40_4c" since='v0.40.01'>
<pointer>
<int32_t/>
<int32_t/>
<stl-vector type-name='int32_t'/>
<int32_t/>
<int32_t/>
</pointer>
</stl-vector>
<stl-vector name="unk_v40_4d" since='v0.40.01' comment="only seen once, 13 long, corresponding to 13 attacks from the same entity_id resulting in site taken over in 'might bey year'">
<pointer>
<int32_t name='id'/>
<stl-vector>
<pointer>
<int32_t/>
<int32_t comment="might be race"/>
<int32_t/>
<int32_t/>
<int32_t comment="might be year"/>
<int32_t comment="might be year"/>
<int32_t/>
<int32_t/>
</pointer>
</stl-vector>
<stl-vector type-name='int32_t'/>
<int32_t name='entity_id' ref-target='historical_entity' comment="single attacking site civ is only one seen"/>
</pointer>
</stl-vector>
<int32_t name='unk_v40_4d_next_id' init-value='0' since='v0.43.01' comment="only single non zero entry, matching vector above. Might guess 'since' is scrambled"/>
<stl-vector name='unk_v43_2' since='v0.43.01'>
<pointer>
<int32_t/>
<int32_t/>
<int32_t/>
<static-array count='16'><static-array count='16' type-name='int32_t'/></static-array>
<static-array count='16'><static-array count='16' type-name='int32_t'/></static-array>
<static-array count='16'><static-array count='16' type-name='int32_t'/></static-array>
<static-array count='16'><static-array count='16' type-name='int32_t'/></static-array>
<static-array count='16'><static-array count='16' type-name='int32_t'/></static-array>
<static-array count='16'><static-array count='16' type-name='int32_t'/></static-array>
<static-array count='16'><static-array count='16' type-name='int32_t'/></static-array>
<static-array count='16'><static-array count='16' type-name='int32_t'/></static-array>
<static-array count='16'><static-array count='16' type-name='int32_t'/></static-array>
<static-array count='16'><static-array count='16' type-name='int32_t'/></static-array>
<static-array count='16'><static-array count='16' type-name='int32_t'/></static-array>
<static-array count='16'><static-array count='16' type-name='int32_t'/></static-array>
<static-array count='16'><static-array count='16' type-name='int32_t'/></static-array> not initialized OR saved
<static-array count='16'><static-array count='16' type-name='int32_t'/></static-array>
</pointer>
</stl-vector>
<int32_t name='unk_v43_3' comment='constant 0?' since='v0.43.01'/>
<int32_t name='unk_v40_5' comment='constant -1?' since='v0.40.01'/>
<pointer name="unk_188" comment="Seen monster in lair, first settler in site, killed defender in site, artifact created in player fortress, (player) created artifact claimed by villain for unrelated cave/villain settled in cave">
<stl-vector>
<pointer>
<int32_t name='unk_2' comment="looks random"/>
<int32_t name='unk_3' init-value='0'/>
<int32_t name='unk_4' init-value='0'/>
<int32_t name='unk_5' comment="might be year"/>
<compound name='unk1'>
<int32_t name='unk_1'/>
<int32_t name='unk_2' init-value='-1'/>
<int32_t name='hfid' ref-target='historical_figure'/>
<int32_t name='artifact_id' ref-target='artifact_record'/>
<int32_t name='site_id' ref-target='world_site'/>
</compound>
<int32_t name='unk_6' init-value='-1' comment="1, 2, 3, 5, 11 seen"/>
<int32_t name='unk_7' init-value='-1'/>
</pointer>
</stl-vector>
</pointer>
<int32_t name='unk_3a8' since='v0.44.06'/>
<pointer name='unk_3b0' since='v0.44.01' type-name='world_site_unk130'/>
<stl-vector name="unk_18c"/>
<stl-vector name="unk_19c"/>
<stl-vector name="entity_links" pointer-type='entity_site_link' since='v0.40.01'/>
<stl-vector name="cultural_identities" pointer-type='cultural_identity' since='v0.40.01'/>
<stl-vector name="unk_v42_1" since='v0.42.01' pointer-type='occupation'/> during worldgen only
<int32_t name='unk_v43_4' since='v0.43.01' comment='uninitialized'/>
<stl-vector since='v0.44.01'/>
<pointer type-name='historical_figure' has-bad-pointers='true'/>
<pointer type-name='historical_figure' has-bad-pointers='true'/>
<pointer type-name='historical_figure' has-bad-pointers='true'/>
<pointer type-name='historical_figure' has-bad-pointers='true'/>
<pointer type-name='historical_figure' has-bad-pointers='true'/>
<pointer/>
<pointer/>
<pointer/>
<pointer/>
<pointer/>
<pointer/>
<pointer/>
<pointer/>
<pointer/>
<pointer/>
<pointer/>
<pointer/>
<pointer/>
<pointer/>
<pointer/>
<int32_t/>
<pointer>
<stl-vector/>
</pointer>
</struct-type>
<struct-type type-name='cultural_identity' key-field='id'
instance-vector='$global.world.cultural_identities.all'>
<int32_t name="id"/>
<int32_t name="site_id" ref-target='world_site'/>
<int32_t name="civ_id" ref-target='historical_entity'/>
<stl-vector name='group_log' comment='the circumstances of groups joining or leaving this culture'>
<pointer>
<int32_t name="group_id" ref-target='historical_entity'/>
<int32_t name='start_year' init-value='-1' comment='when the group joined the culture, or -1 if it founded the culture'/>
<int32_t name='start_tick' init-value='-1'/>
<int32_t name='end_year' init-value='-1' comment='when the group left the culture, or -1 if it has not left'/>
<int32_t name='end_tick' init-value='-1'/>
<int32_t name='unk_14' init-value='-1' comment='copy of start_year'/>
<int32_t name='unk_18' init-value='-1' comment='copy of start_tick'/>
<enum name='join_type'>
<enum-item name='Peaceful'/>
<enum-item name='CompleteTakeOver' comment='The previous group left the culture.'/>
<enum-item name='TakeOver' comment="The previous group's end_year is still -1."/>
</enum>
<int32_t name="unk_20"/>
<stl-vector name="unk_24" type-name="int32_t"/>
<stl-vector name='unk_34' type-name='int32_t' comment='same length as unk_24; elements always sum to 10000'/>
<int32_t name="unk_44" init-value='100'/>
</pointer>
</stl-vector>
<static-array name='ethic' count='22' index-enum='ethic_type'>
<enum base-type='int16_t' type-name='ethic_response'/>
</static-array>
<static-array name='values' type-name='int32_t' count='64' index-enum='value_type'/>
<stl-vector name='events' pointer-type='entity_event'/>
<int32_t name='unk_d8' init-value='-1'/>
<stl-vector name="unk_dc" type-name='int32_t'/>
<int32_t name='unk_ec' init-value='-1'/>
<int32_t name='unk_f0' init-value='-1'/>
<int32_t name='unk_f4' comment='0 or 800000'/>
<stl-vector>
<pointer>
<int32_t/>
<int32_t/>
<int32_t/>
</pointer>
</stl-vector>
<stl-vector>
<pointer>
<int32_t/>
<int32_t/>
<int32_t/>
<int32_t/>
<int32_t/>
</pointer>
</stl-vector>
<int32_t name="unk_f8"/>
</struct-type>
<struct-type type-name='world_site_inhabitant'>
<int32_t name="count"/>
<int32_t name="race" ref-target='creature_raw'/>
<int32_t name='population_id' ref-target='entity_population'/>
<int32_t name="outcast_id" ref-target='historical_entity' comment="can be Religion, Civilization, and SiteGovernment as well as Outcast"/>
<int32_t name="unk_10" init-value='-1' since='v0.40.01'/>
<int32_t name='cultural_identity_id' ref-target='cultural_identity' since='v0.40.01'/>
<int32_t name="unk_18" init-value='-1' since='v0.40.01'/>
<int32_t name="unk_1c" init-value='-1' since='v0.40.01' comment="0 only other value seen"/>
<int32_t name='founder_outcast_entity_id' ref-target='historical_entity' since='v0.40.01' comment="Founder if outcast_id=-1, else Outcast and equal to outcast_id"/>
<int32_t name="unk_24" init-value='-1' since='v0.40.01' comment="0 and 1 seen"/>
<int32_t name="unk_28" init-value='-1' since='v0.40.01'/>
</struct-type>
<struct-type type-name='world_site_realization'>
<stl-vector name='buildings' pointer-type='site_realization_building'/>
<int32_t name="num_buildings"/>
<int32_t name="unk_14"/>
<int32_t name="num_areas"/>
<static-array name='mini_rivers' count='17'>
<static-array count='17' type-name='int8_t'
comment='2 for river tiles'/>
</static-array>
<static-array name='mini_tiles' count='17'>
<static-array count='17' type-name='uint8_t'/>
</static-array>
<static-array name='mini_colors' count='17'>
<static-array count='17' type-name='int16_t'
comment='bold shl 6|bg shl 3|fg'/>
</static-array>
2601 = 51*51 = 17*3*17*3
<static-array name='road_map' count='51'>
<static-array count='51' pointer-type='site_realization_crossroads'/>
</static-array>
<static-array name='river_map' count='51'>
<static-array count='51'>
<pointer>
<static-array name='start' type-name='int32_t' count='48'/>
<static-array name='end' type-name='int32_t' count='48'/>
<int32_t name="unk_180"/>
<int32_t name="unk_184"/>
<int32_t name="start_array_limits"/>
<int32_t name="end_array_limits"/>
<int32_t name="unk_190"/>
<static-array type-name='int32_t' name='unk_194' count='9'/> uncertain, might actually be 4 pointers
<int8_t name='unk_1b8'/>
<int8_t name='unk_1b9'/>
<int8_t name='unk_1ba'/>
<int8_t name='unk_1bb'/>
<int8_t name='unk_1bc'/>
<int16_t name='unk_1be'/>
</pointer>
</static-array>
</static-array>
<static-array name='unk_55e8' count='17'>
<static-array count='17'>
<int32_t name="unk_55e8" init-value='-30000'/>
<int32_t name="unk_55ec" init-value='-30000'/>
<int32_t name='unk_v40_1a' init-value='-30000' since='v0.40.01'/>
<int32_t name='unk_v40_1b' init-value='-30000' since='v0.40.01'/>
<int32_t name='unk_v40_1c' init-value='-30000' since='v0.40.01'/>
<int32_t name='unk_v40_1d' init-value='-30000' since='v0.40.01'/>
<stl-vector name='unk_v40_2'>
<pointer>
<int32_t name="unk_0"/>
<int32_t name="unk_4"/>
<int16_t name="unk_8"/>
<int16_t name="unk_a"/>
<int32_t name="unk_c"/>
<int32_t name="unk_10"/>
<int16_t name="unk_14"/>
<int16_t name="unk_16"/>
<int32_t name="unk_18"/>
<int32_t name="unk_1c"/>
</pointer>
</stl-vector>
<stl-vector since='v0.44.01'/>
<int32_t name="unk_55f0" init-value='-30000'/>
<int32_t name="unk_55f4" init-value='-30000'/>
<int16_t name="unk_55f8"/>
<int16_t name="unk_55fa"/>
<int32_t name="unk_55fc"/>
<int32_t name="unk_5600"/>
<int32_t name="unk_5604"/>
<int32_t name="unk_5608"/>
<int32_t name="unk_560c"/>
<int32_t name="unk_5610"/>
<int32_t name="unk_5614"/>
<stl-vector name="unk_5618"/>
<int32_t name="unk_5628"/>
<int32_t name="unk_562c"/>
<int32_t name="unk_5630"/>
<int32_t name="unk_5634"/>
<int32_t name='unk_v40_3a' init-value='-1' since='v0.40.01'/>
<int32_t name='unk_v40_3b' init-value='-1' since='v0.40.01'/>
<int32_t name='unk_v40_3c' init-value='-1' since='v0.40.01'/>
<int32_t name='unk_v40_3d' init-value='-1' since='v0.40.01'/>
</static-array>
</static-array>
<static-array name='building_map' count='17'>
<static-array count='17'>
<int32_t name='unk0'/>
<stl-vector name='buildings' pointer-type='site_realization_building'/>
<int32_t name='unk4'/>
<uint32_t name='unk5'/>
<stl-vector type-name='int32_t' name='unk6'/>
</static-array>
</static-array>
<static-array name='flags_map' count='51' since='v0.40.01'>
<static-array count='51' type-name='uint32_t'/>
</static-array>
<static-array name='zoom_tiles' count='51'>
<static-array count='51' type-name='uint8_t'/>
</static-array>
<static-array name='zoom_colors' count='51'>
<static-array count='51' type-name='int16_t'/>
</static-array>
<static-array name='zoom_movemask' count='51'>
<static-array count='51' type-name='int8_t'
comment='8 left, 4 right, 2 down, 1 up; -1 any dir'/>
</static-array>
2704 = 52*52
<static-array name='area_map' count='52'>
<static-array count='52' type-name='int32_t' refers-to='$$._global.areas[$]'/>
</static-array>
<stl-vector name='areas'>
<pointer>
<enum base-type="int32_t" name="type">
<enum-item name="Crops1"/>
<enum-item name="Crops2"/>
<enum-item name="Crops3"/>
<enum-item name="Meadow"/>
<enum-item name="Pasture"/>
<enum-item name="Orchard"/>
<enum-item name="Woodland"/>
<enum-item name="Waste"/>
<enum-item name="Unknown1"/>
</enum>
<int32_t name="index"/>
<int32_t name="unk_8"/>
<int32_t name="min_x"/>
<int32_t name="max_x"/>
<int32_t name="min_y"/>
<int32_t name="max_y"/>
<int32_t name="unk_1c" init-value='-1' since='v0.40.01'/>
<int32_t name="unk_20" since='v0.40.01'/>
</pointer>
</stl-vector>
<int32_t/>
<int32_t name="army_controller_pos_x"/>
<int32_t name="army_controller_pos_y"/>
<static-array name='unk_193bc' count='500'>
<int32_t name='nemesis_id' ref-target='nemesis_record'/>
<int32_t/>
<compound name='unk_8'>
<int32_t/>
<int32_t/>
<int32_t/>
<int32_t/>
<int32_t/>
<int32_t/>
<int32_t/>
<int32_t/>
<int32_t/>
</compound>
<int32_t/>
<int32_t name='building_id' ref-target='site_realization_building'/>
<compound type-name='coord' name='pos'/>
<int16_t/>
<int32_t/>
<int32_t/>
<int32_t/>
<static-array type-name='int32_t' count='20'/>
<static-array type-name='int32_t' count='20'/>
<int16_t/>
<int16_t/>
<int32_t/>
<int32_t/>
</static-array>
<int32_t name='num_unk_193bc'/>
<int32_t/>
<int32_t/>
<static-array count='2' since='v0.47.01'>
<static-array type-name='int32_t' count='300'/>
</static-array>
<int32_t since='v0.47.01'/>
<static-array type-name='pointer' count='20'/>
<int32_t/>
<static-array type-name='pointer' count='20'/>
<int32_t/>
<static-array type-name='pointer' count='20'/>
<int32_t/>
<static-array type-name='pointer' count='20'/>
<int32_t/>
<static-array type-name='pointer' count='20'/>
<int32_t/>
<static-array type-name='pointer' count='20'/>
<int32_t/>
<static-array type-name='pointer' count='20'/>
<int32_t/>
<static-array type-name='pointer' count='20'/>
<int32_t/>
<static-array name='building_well' pointer-type='site_realization_building' count='20'/>
<int32_t name='num_building_well'/>
<static-array name='building_temple' pointer-type='site_realization_building' count='20'/>
<int32_t name='num_building_temple'/>
<static-array name='building_type22' pointer-type='site_realization_building' count='20'/>
<int32_t name='num_building_type22'/>
<static-array name='building_type21' pointer-type='site_realization_building' count='20'/>
<int32_t name='num_building_type21'/>
<static-array type-name='pointer' count='16'/>
<int32_t/>
<stl-vector name="unk_wsr_vector"/>
</struct-type>
<struct-type type-name='site_realization_crossroads'>
<static-array name='road_min_y' count='48' type-name='int32_t'/>
<static-array name='road_max_y' count='48' type-name='int32_t'/>
<static-array name='road_min_x' count='48' type-name='int32_t'/>
<static-array name='road_max_x' count='48' type-name='int32_t'/>
<int32_t name="idx_x"/>
<int32_t name="idx_y"/>
<int32_t name="tile_width"/>
<int32_t name="tile_height"/>
<int32_t name="unk_310"/>
<int32_t name="unk_314"/>
<int32_t name="unk_318"/>
<int32_t name="unk_31c"/>
<int32_t name="unk_320"/>
<int32_t name="unk_324"/>
<int32_t name="unk_328"/>
<int32_t name="unk_32c"/>
<int32_t name="center_x_tile"/>
<int32_t name="center_y_tile"/>
<pointer name="up" type-name="site_realization_crossroads"/>
<pointer name="down" type-name="site_realization_crossroads"/>
<pointer name="right" type-name="site_realization_crossroads"/>
<pointer name="left" type-name="site_realization_crossroads"/>
<int8_t name="unk_348"/>
<int8_t name="unk_349"/>
<int32_t name='unk_34c'/>
<int8_t/>
<int8_t/>
<int8_t/>
<int8_t/>
<int8_t/>
<int8_t/>
<int32_t since='v0.47.01'/>
<int32_t since='v0.47.01'/>
<static-array name='unk_370' count='48' type-name='int16_t'/>
<static-array name='unk_3d0' count='48' type-name='int16_t'/>
</struct-type>
<enum-type type-name='site_realization_building_type'>
<enum-item name='cottage_plot'/>
<enum-item name='castle_wall'/>
<enum-item name='castle_tower'/>
<enum-item name='castle_courtyard'/>
<enum-item name='house'/>
<enum-item name='temple'/>
<enum-item name='tomb'/>
<enum-item name='shop_house'/>
<enum-item name='warehouse'/>
<enum-item name='market_square'/>
10
<enum-item name='pasture'/>
<enum-item name='waste'/>
<enum-item name='courtyard'/>
<enum-item name='well'/>
<enum-item name='vault'/>
<enum-item name='great_tower'/>
<enum-item name='trenches'/>
<enum-item name='tree_house'/>
<enum-item name='hillock_house'/>
<enum-item name='mead_hall'/>
20
<enum-item name='fortress_entrance'/>
<enum-item name='library'/>
<enum-item name='tavern'/>
<enum-item name='counting_house'/>
<enum-item name='guild_hall'/>
<enum-item name='city_tower'/>
<enum-item name='shrine'/>
<enum-item />
<enum-item name='dormitory'/>
<enum-item name='dininghall'/>
30
<enum-item name='necromancer_tower'/>
<enum-item name='barrow'/>
</enum-type>
<struct-type type-name='site_realization_building' key-field='id'>
<int32_t name="id"/>
<code-helper name='find-instance'>
(find-by-id $(find-instance $world_site $$).realization.buildings $id $)
</code-helper>
<enum name='type' type-name='site_realization_building_type'/>
<int32_t name="min_x" comment='in tiles relative to site'/>
<int32_t name="min_y"/>
<int32_t name="max_x"/>
<int32_t name="max_y"/>
<int32_t name="unk_18"/>
<stl-vector name="inhabitants" pointer-type='world_site_inhabitant'/>
<int32_t name="unk_2c"/>
<compound name='item' type-name='site_building_item'/>
<int32_t name="abstract_building_id" comment='used for temple and mead hall'/>
<int32_t name="unk_44"/>
<pointer name="building_info" type-name='site_realization_building_infost'/>
<stl-vector name="unk_4c">