forked from DFHack/df-structures
-
Notifications
You must be signed in to change notification settings - Fork 0
/
df.units.xml
700 lines (569 loc) · 27 KB
/
df.units.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
<data-definition>
<bitfield-type type-name='unit_flags1' base-type='uint32_t'>
<flag-bit name='move_state'
comment='Can the dwarf move or are they waiting for their movement timer'/>
<flag-bit name='dead'
comment='Dead (might also be set for incoming/leaving critters that are alive)'/>
<flag-bit name='has_mood' comment='Currently in mood'/>
<flag-bit name='had_mood' comment='Had a mood already'/>
<flag-bit name='marauder' comment='wide class of invader/inside creature attackers'/>
<flag-bit name='drowning' comment='Is currently drowning'/>
<flag-bit name='merchant' comment='An active merchant'/>
<flag-bit name='forest'
comment='used for units no longer linked to merchant/diplomacy, they just try to leave mostly'/>
<flag-bit name='left' comment='left the map'/>
<flag-bit name='rider' comment='Is riding an another creature'/>
<flag-bit name='incoming'/>
<flag-bit name='diplomat'/>
<flag-bit name='zombie'/>
<flag-bit name='skeleton'/>
<flag-bit name='can_swap' comment='Can swap tiles during movement (prevents multiple swaps)'/>
<flag-bit name='on_ground' comment='The creature is laying on the floor, can be conscious'/>
<flag-bit name='projectile' comment='Launched into the air? Funny.'/>
<flag-bit name='active_invader' comment='Active invader (for organized ones)'/>
<flag-bit name='hidden_in_ambush'/>
<flag-bit name='invader_origin' comment='Invader origin (could be inactive and fleeing)'/>
<flag-bit name='coward' comment='Will flee if invasion turns around'/>
<flag-bit name='hidden_ambusher' comment='Active marauder/invader moving inward?'/>
<flag-bit name='invades' comment='Marauder resident/invader moving in all the way'/>
<flag-bit name='check_flows' comment='Check against flows next time you get a chance'/>
<flag-bit name='ridden'/>
<flag-bit name='caged'/>
<flag-bit name='tame'/>
<flag-bit name='chained'/>
<flag-bit name='royal_guard'/>
<flag-bit name='fortress_guard'/>
<flag-bit name='suppress_wield'/>
<flag-bit name='important_historical_figure' comment='Is an important historical figure'/>
</bitfield-type>
<bitfield-type type-name='unit_flags2' base-type='uint32_t'>
<flag-bit name='swimming'/>
<flag-bit name='sparring'/>
<flag-bit name='no_notify' comment='Do not notify about level gains (for embark etc)'/>
<flag-bit name='unused'/>
<flag-bit name='calculated_nerves'/>
<flag-bit name='calculated_bodyparts'/>
<flag-bit name='important_historical_figure'
comment='Is important historical figure (slight variation)'/>
<flag-bit name='killed'
comment='Has been killed by kill function (slightly different from dead, not necessarily violent death)'/>
<flag-bit name='cleanup_1' comment='Must be forgotten by forget function (just cleanup)'/>
<flag-bit name='cleanup_2' comment='Must be deleted (cleanup)'/>
<flag-bit name='cleanup_3' comment='Recently forgotten (cleanup)'/>
<flag-bit name='for_trade' comment='Offered for trade'/>
<flag-bit name='trade_resolved'/>
<flag-bit name='has_breaks'/>
<flag-bit name='gutted'/>
<flag-bit name='circulatory_spray'/>
<flag-bit name='locked_in_for_trading'
comment="Locked in for trading (it's a projectile on the other set of flags, might be what the flying was)"/>
<flag-bit name='slaughter' comment='marked for slaughter'/>
<flag-bit name='underworld' comment='Underworld creature'/>
<flag-bit name='resident' comment='Current resident'/>
<flag-bit name='cleanup_4'
comment='Marked for special cleanup as unused load from unit block on disk'/>
<flag-bit name='calculated_insulation' comment='Insulation from clothing calculated'/>
<flag-bit name='visitor_uninvited' comment='Uninvited guest'/>
<flag-bit name='visitor'/>
<flag-bit name='calculated_inventory' comment='Inventory order calculated'/>
<flag-bit name='vision_good' comment='Vision -- have good part'/>
<flag-bit name='vision_damaged' comment='Vision -- have damaged part'/>
<flag-bit name='vision_missing' comment='Vision -- have missing part'/>
<flag-bit name='breathing_good' comment='Breathing -- have good part'/>
<flag-bit name='breathing_problem' comment='Breathing -- having a problem'/>
<flag-bit name='roaming_wilderness_population_source'/>
<flag-bit name='roaming_wilderness_population_source_not_a_map_feature'/>
</bitfield-type>
<bitfield-type type-name='unit_flags3' base-type='uint32_t'>
<flag-bit name='unk0' comment='Is 1 for new and dead creatures, periodicaly set to 0 for non-dead creatures.'/>
<flag-bit name='unk1' comment='Is 1 for new creatures, periodically set to 0 for non-dead creatures.'/>
<flag-bit name='unk2' comment='Is set to 1 every tick for non-dead creatures.'/>
<flag-bit name='unk3' comment='Is periodically set to 0 for non-dead creatures.'/>
<flag-bit name='announce_titan' comment='Announces creature like an FB or titan.'/>
<flag-bit name='unk5'/>
<flag-bit name='unk6'/>
<flag-bit name='unk7'/>
<flag-bit name='unk8' comment='Is set to 1 every tick for non-dead creatures.'/>
<flag-bit name='unk9' comment='Is set to 0 every tick for non-dead creatures.'/>
<flag-bit name='scuttle'>
<comment>
Scuttle creature: causes creature to be killed, leaving a behind
corpse and generating negative thoughts like a real kill.
</comment>
</flag-bit>
<flag-bit name='unk11'/>
<flag-bit name='ghostly'/>
</bitfield-type>
<struct-type type-name='unit' key-field='id' instance-vector='$global.world.units.all'>
<compound type-name='language_name' name='name'/>
<code-helper name='describe'>
(describe-obj $.name)
(awhen (find-creature $.race)
(fmt "~:(~A ~A~)" $it.caste[$.caste].caste_id $it.creature_id))
</code-helper>
<stl-string name='custom_profession'/>
<enum base-type='int16_t' name='profession' type-name='profession'/>
<enum base-type='int16_t' name='profession2' type-name='profession'/>
<uint32_t name='race' ref-target='creature_raw'/>
<int16_t name='x'/>
<int16_t name='y'/>
<int16_t name='z'/>
<int16_t name='old_x'>
<comment>
E.g. for a dead miner, holds the place where he
was likely hanging around when he got the command
to mine in an aquifer.
</comment>
</int16_t>
<int16_t name='old_y'/>
<int16_t name='old_z'/>
<compound name='unknown1'>
<uint32_t name='unk_9c'/>
<int16_t name='unk_a0'/>
<padding size='2'/>
<int16_t name='unk_a4a'/>
<int16_t name='unk_a4b'/>
</compound>
<compound name='path'>
<int16_t name='dest_x'/>
<int16_t name='dest_y'/>
<int16_t name='dest_z'/>
<int16_t name='unk_ae' comment='-1 unless dest valid'/>
<stl-vector name='path_x' type-name='int16_t'/>
<stl-vector name='path_y' type-name='int16_t'/>
<stl-vector name='path_z' type-name='int16_t'/>
</compound>
<compound name='flags1' type-name='unit_flags1'/>
<compound name='flags2' type-name='unit_flags2'/>
<compound name='flags3' type-name='unit_flags3'/>
<compound name='unknown2'>
<int8_t name='unk_ec'/>
<int32_t name='unk_f0'/>
<int16_t name='unk_f4'/>
<padding size='2'/>
</compound>
<uint16_t name='caste' ref-target='caste_raw' aux-value='$$.race'/>
<uint8_t name='sex'/>
<int32_t name='id'/>
<int16_t name='unk_100'/>
<int32_t name='unk_104'/>
<int32_t name='civ_id' ref-target='historical_entity'/>
<int32_t name='population_id' ref-target='entity_population'/>
<compound name='unknown3'>
<int32_t name='unk_110'/>
<stl-vector name='unk_114'/>
<stl-vector name='unk_124'/>
<stl-vector name='unk_134'/>
<uint32_t name='unk_144'/>
</compound>
<stl-vector name='meetings'>
<pointer type-name='meeting_ref'/>
</stl-vector>
<stl-vector name='refs'>
<pointer type-name='general_ref'/>
</stl-vector>
<compound name='military'>
<int32_t name='squad_index' ref-target='squad'/>
<int32_t name='squad_position'/>
<int32_t name='unk_170'/>
<int32_t name='draft_timer'/>
<int16_t name='cur_uniform'/>
<static-array name='uniforms' count='4'>
<stl-vector>
<int32_t ref-target='item'/>
</stl-vector>
</static-array>
<bitfield name='pickup_flags'>
<flag-bit name='update'/>
</bitfield>
<stl-vector name='uniform_pickup'>
<int32_t ref-target='item'/>
</stl-vector>
<stl-vector name='uniform_drop'>
<int32_t ref-target='item'/>
</stl-vector>
<stl-vector name='individual_drills'>
<int32_t ref-target='activity_entry'/>
</stl-vector>
</compound>
<compound name='unknown4'>
<int16_t name='unk_1f0_a'/>
<int16_t name='unk_1f0_b'/>
<int16_t name='unk_1f4'/>
<int32_t name='unk_1f8'/>
<int32_t name='unk_1fc'/>
<int32_t name='unk_200'/>
<int16_t name='unk_204'/>
<uint32_t name='animal_leave_countdown'
comment='once 0, it heads for the edge and leaves'/>
<uint32_t name='unk_20c'/>
</compound>
<int16_t name='mood'/>
<int16_t name='unk_18e'/>
<compound name='relations'>
<uint32_t name='pregnancy_timer'/>
<pointer name='pregnancy_ptr'/>
<int16_t name='unk_21c_a'/>
<int16_t name='unk_21c_b'/>
<uint32_t name='unk_220'/>
<int32_t name='birth_year'/>
<int32_t name='birth_time'/>
<int32_t name='old_year' comment='could there be a death of old age time??'/>
<int32_t name='old_time'/>
<pointer type-name='unit' name='following'/>
<uint16_t name='unk_238'/>
<int32_t name='pet_owner_id' ref-target='unit'/>
<int32_t name='married_id' ref-target='unit'
comment='not used in relationship screen..'/>
<int32_t name='mother_id' ref-target='unit'/>
<int32_t name='father_id' ref-target='unit'/>
<int32_t name='last_attacker_id' ref-target='unit'/>
<int32_t name='enemy_group_leader_id' ref-target='unit'/>
<int32_t name='unk_254'/>
<int32_t name='unk_258'/>
<int32_t name='unk_25c_mother'/>
<int32_t name='lover_id' ref-target='unit'/>
<int16_t name='unk_264'/>
</compound>
<compound name='last_hit'>
<int32_t name='item' ref-target='item'/>
<enum base-type='int16_t' name='item_type' type-name='item_type'/>
<int16_t name='item_subtype' refers-to='(item-subtype-target $$._parent.item_type $)'/>
<int16_t name='mattype' ref-target='material' aux-value='$$.matindex'/>
<int32_t name='matindex'/>
-- If shot by a ranged weapon:
<int32_t name='bow_item' ref-target='item'/>
<enum base-type='int16_t' name='bow_item_type' type-name='item_type'/>
<int16_t name='bow_item_subtype' refers-to='(item-subtype-target $$._parent.bow_item_type $)'/>
<int16_t name='bow_mattype' ref-target='material' aux-value='$$.bow_matindex'/>
<int32_t name='bow_matindex'/>
</compound>
<stl-vector name='inventory'>
<pointer key-field='item'>
<pointer name='item' type-name='item'/>
<int16_t name='mode' comment='0 carried, 1 weapon, 2 worn, 9 sewn'/>
<int16_t name='body_part_id'/>
</pointer>
</stl-vector>
<stl-vector name='owned_items'>
<int32_t ref-target='item'/>
</stl-vector>
<stl-vector name='traded_items' comment='items brought to trade depot'>
<int32_t ref-target='item'/>
</stl-vector>
<stl-vector name='owned_buildings'>
<pointer type-name='building'/>
</stl-vector>
<stl-vector name='corpse_parts' comment='entries remain even when items are destroyed'>
<int32_t ref-target='item'/>
</stl-vector>
<compound name='job'>
<uint32_t name='unk_2d8'/>
<uint32_t name='unk_2dc'/>
<pointer type-name='unit' name='hunt_target'/>
<pointer type-name='building' name='destroy_target'/>
<int16_t name='unk_2e8'/> // fight related
<int16_t name='unk_2ea'/> // fight related
<uint16_t name='unk_2ec'/>
<uint16_t name='unk_2ee'/>
<uint16_t name='unk_2f0_cntr'/> // increments every tick
<pointer comment='df_job' name='current_job' type-name='job'/>
<uint16_t name='unk_2f8'/>
<uint32_t name='unk_2fc'/>
<uint32_t name='unk_300'/>
<uint32_t name='unk_304'/>
</compound>
<compound name='body'>
<stl-vector name='body_part_308' type-name='uint32_t'/> // 87*0 ?
<stl-vector name='unk_318'/>
<stl-vector name='body_layer_328' type-name='uint32_t'/>
<stl-vector name='body_layer_338' type-name='uint32_t'/> // 238*0
<stl-vector name='body_layer_348' type-name='uint32_t'/> // 238*0
<stl-vector name='body_layer_358' type-name='uint32_t'/> // 238*0
<stl-vector name='body_layer_368' type-name='uint32_t'/> // 238*0
<stl-vector name='body_layer_378' type-name='uint32_t'/> // 238*0
<stl-vector name='body_layer_388' type-name='pointer'/>
<uint32_t name='unk_398'/>
<int32_t name='unk_39c'/>
<int32_t name='unk_3a0'/>
<int32_t name='unk_3a4'/>
<int32_t name='unk_3a8'/>
<int32_t name='unk_3ac'/>
<int32_t name='unk_3b0'/>
<int32_t name='unk_3b4'/>
<int32_t name='unk_3b8'/>
<int32_t name='unk_3bc'/>
<int32_t name='unk_3c0'/>
<pointer name='body_plan' comment='points to the body_parts field of caste_raw'>
<stl-vector name='body_parts'>
<pointer type-name='body_part_raw'/>
</stl-vector>
</pointer>
<uint16_t name='unk_3c8'/>
<static-array type-name='unit_attribute' name='physical_attrs' count='6'/>
<uint32_t name='unk_474'/>
<uint32_t name='unk_478'/>
<uint32_t name='unk_47c'/>
<uint32_t name='unk_480'/>
<uint32_t name='unk_484'/>
<uint32_t name='unk_488'/>
<uint32_t name='blood_max'/>
<uint32_t name='blood_count'/> // 490
<uint32_t name='unk_494'/>
<stl-vector name='spatters'/>
</compound>
<compound name='unknown6'>
<stl-vector type-name='uint16_t' name='unk_4a8'/>
<stl-vector type-name='uint16_t' name='unk_4b8'/>
<uint32_t name='unk_4c8'/>
<stl-vector type-name='int16_t' name='unk_4cc'/>
<stl-vector type-name='int32_t' name='unk_4dc'/>
<stl-vector type-name='int32_t' name='unk_4ec'/>
<stl-vector type-name='int32_t' name='unk_4fc'/>
<stl-vector type-name='int16_t' name='unk_50c'/>
<pointer name='unk_51c'/>
<uint16_t name='unk_520'/>
<pointer name='unk_524'/>
<uint16_t name='unk_528'/>
</compound>
<stl-vector type-name='uint32_t' name='appearance'/>
<compound name='counters'>
<int32_t name='think_counter'/> // 53c decrements every job_counter reroll, set when changing jobs
<int32_t name='job_counter'/> // 540 current_job unit/walk done when reach -1, decremented every tick
<int32_t name='unk_544'/> // if set, decrements every job_counter reroll
<int16_t name='unk_548'/>
<int16_t name='winded'/>
<int16_t name='stunned'/> // 54c decrements every tick, unstun at 0
<int16_t name='unconscious'/>
<int16_t name='unk_550'/>
<int16_t name='webbed'/>
<int16_t name='unk_x554'/> // coords ? (-30.000x3)
<int16_t name='unk_y556'/>
<int16_t name='unk_z558'/>
<int16_t name='unk_x55a'/> // coords again
<int16_t name='unk_y55c'/>
<int16_t name='unk_z55e'/>
<int16_t name='soldier_mood_countdown'/>
<enum name='soldier_mood' base-type='int16_t'>
<enum-item name='None' value='-1'/>
<enum-item name='MartialTrance'/>
<enum-item name='Enranged'/>
<enum-item name='Tantrum'/>
</enum>
<uint32_t name='unk_564'/>
<uint32_t name='unk_568'/>
<uint32_t name='unk_56c'/>
<uint32_t name='unk_570'/>
<uint32_t name='unk_574'/>
<uint32_t name='unk_578'/>
<uint32_t name='unk_57c'/>
<uint32_t name='hunger_timer'/>
<uint32_t name='thirst_timer'/>
<uint32_t name='sleepiness_timer'/>
<uint32_t name='unk_58c'/> // counter, decrement to 0
<uint32_t name='unk_590'/> // same as 58c
<uint32_t name='unk_594'/>
<uint32_t name='unk_cntdn_598'/> // fluctuate
<uint32_t name='unk_59c'/>
</compound>
<compound name='status'>
<stl-vector name='misc_traits'>
<pointer type-name='unit_misc_trait'/>
</stl-vector>
<pointer name='unk_5b0'>
<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'/>
<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>
<uint32_t name='unk_5b4'/> // 0x3e8 (1000)
<uint32_t name='unk_5b8'/> // 0x3e8 (1000)
<stl-vector name='unk_5bc'/>
<stl-vector name='unk_5cc'/>
<int8_t name='unk_5dc'/>
<compound type-name='language_name' name='artifact_name'/>
<stl-vector name='souls'>
<pointer type-name='unit_soul'/>
</stl-vector>
<pointer name='current_soul' type-name='unit_soul'/>
<stl-vector name='unk_660'/>
<static-array type-name='bool' name='labors' index-enum='unit_labor' count='94'/>
<stl-vector name='unk_6d0'/>
<stl-vector name='unk_6e0'/> // item ids?
<stl-vector name='recent_events'/> // 6f0: dined in a legendary dinning room, etc
<stl-vector name='unk_700'/>
<uint32_t name='happiness'/> // 710
<uint16_t name='unk_714'/>
<stl-vector name='unk_718'/>
<stl-vector name='unk_728'/>
<stl-vector name='relationships'/> // 738
<stl-vector name='unk_748'/>
<uint16_t name='unk_758'/>
<int16_t name='unk_x75a'/> // coords (-30000*3)
<int16_t name='unk_y75c'/>
<int16_t name='unk_z75e'/>
<stl-vector type-name='uint16_t' name='unk_760'/>
<stl-vector type-name='uint16_t' name='unk_770'/>
<stl-vector type-name='uint16_t' name='unk_780'/>
</compound>
<int32_t name='hist_figure_id' ref-target='historical_figure'/>
<compound name='status2'>
<uint16_t name='able_stand'/> // 794
<uint16_t name='able_stand_impair'/> // 796
<uint16_t name='able_grasp'/> // 798
<uint16_t name='able_grasp_impair'/> // 79a
<uint32_t name='unk_79c'/>
<uint32_t name='unk_7a0'/>
<stl-vector name='body_part_temperature'>
<pointer>
<uint16_t name='whole'/>
<uint16_t name='fraction' comment='the unit is 1/temp_factor in body part'/>
</pointer>
</stl-vector>
<uint32_t name='unk_7b4'/>
<uint32_t name='unk_7b8'/>
<uint8_t name='unk_7bc'/>
<int32_t name='unk_7c0'/>
</compound>
<compound name='unknown8'>
<stl-vector name='unk_7c4'/>
<stl-vector name='unk_7d4' type-name='int32_t'/>
<stl-vector name='unk_7e4' type-name='int16_t'/>
<stl-vector name='unk_7f4' type-name='int32_t'/> // combat log?
<stl-vector name='unk_804' type-name='int32_t'/>
<stl-vector name='unk_814' type-name='int32_t'/>
<uint32_t name='unk_824'/>
<uint32_t name='unk_828'/>
<uint32_t name='unk_82c'/>
<uint32_t name='unk_830'/>
<uint32_t name='unk_834'/>
<uint32_t name='unk_838'/>
<pointer name='unk_83c'/>
<stl-vector name='unk_840' type-name='pointer'/> // item related
<stl-vector name='unk_850'/>
<stl-vector name='unk_860' type-name='int32_t'/>
<int32_t name='unk_870'/>
<int32_t name='unk_874_cntr'/> // age ? incremented every tick
<stl-vector name='body_part_878' type-name='uint8_t'/>
<stl-vector name='body_part_888' type-name='uint8_t'/>
<stl-vector name='body_part_898' type-name='uint32_t'/>
<stl-vector name='body_part_8a8' type-name='uint8_t'/>
<stl-vector name='body_part_8b8' type-name='uint16_t'/>
<stl-vector name='body_part_8c8' type-name='uint16_t'/>
<stl-vector name='body_part_8d8' type-name='uint16_t'/>
<stl-vector name='unk_8e8'/> // items ids?
<stl-vector type-name='uint16_t' name='unk_8f8'/> // same size as 8e8, soldier related?
<stl-vector name='body_layer_908' type-name='uint32_t'/>
<int32_t name='unk_918'/>
<int32_t name='unk_91c'/>
<int32_t name='unk_920'/>
<uint32_t name='unk_924'/>
<uint32_t name='unk_928'/>
</compound>
<stl-vector name='burrows'>
<int32_t ref-target='burrow'/>
</stl-vector>
<uint32_t name='unk_93c'/>
</struct-type>
<struct-type type-name='unit_attribute'>
<int32_t name='unk1'/>
<int32_t name='unk2'/>
<int32_t name='unk3'/>
<int32_t name='unk4'/>
<int32_t name='unk5'/>
<int32_t name='unk6'/>
<int32_t name='unk7'/>
</struct-type>
<struct-type type-name='unit_misc_trait'>
<enum base-type='int16_t' name='id'>
<enum-item name='ClaimCooldown' value='12'/>
<enum-item name='WantsDrink'/>
<enum-item name='LikesOutdoors'/>
<enum-item name='Hardened'/>
</enum>
<code-helper name='describe'>(fmt "id=~A value=~A" $.id $.value)</code-helper>
<int32_t name='value'/>
</struct-type>
<struct-type type-name='unit_soul'>
<int32_t name='unit_id' ref-target='unit'/>
<compound name='name' type-name='language_name'/>
<uint32_t name='race' ref-target='creature_raw'/>
<uint8_t name='sex'/>
<uint16_t name='caste' ref-target='caste_raw' aux-value='$$.race'/>
<code-helper name='describe'>
(describe-obj $.name)
(awhen (find-creature $.race)
(fmt "~:(~A ~A~)" $it.caste[$.caste].caste_id $it.creature_id))
</code-helper>
<int32_t name='unk1'/>
<int32_t name='unk2'/>
<int32_t name='unk3'/>
<int32_t name='unk4'/>
<static-array type-name='unit_attribute' name='mental_attrs' count='13'/>
<stl-vector name='skills'>
<pointer type-name='unit_skill'/>
</stl-vector>
<stl-vector name='preferences'>
<pointer type-name='unit_preference'/>
</stl-vector>
<static-array type-name='uint16_t' name='traits' count='30'/>
<stl-vector name='unk5'>
<pointer>
<int16_t name='unk1'/>
<int16_t name='unk2'/>
</pointer>
</stl-vector>
<stl-vector name='unk6'/>
</struct-type>
<struct-type type-name='unit_skill'>
<enum base-type='int16_t' name="id" type-name='job_skill'/>
<code-helper name='describe'>$.id</code-helper>
<int32_t name="rating"/>
<uint32_t name="experience"/>
<int32_t name="unk_c"/>
<int32_t name="rusty"/>
<int32_t name="unk_14"/>
<int32_t name="unk_18"/>
<int32_t name="unk_1c"/>
</struct-type>
<struct-type type-name='unit_preference'>
<enum base-type='int16_t' name="type">
<enum-item name='LikeMaterial'/>
<enum-item name='LikeCreature'/>
<enum-item name='LikeFood'/>
<enum-item name='HateCreature'/>
<enum-item name='LikeItem'/>
<enum-item name='LikePlant'/>
<enum-item name='LikePlant2' comment='likely 2nd prefstring'/>
<enum-item name='LikeColor'/>
<enum-item name='LikeShape'/>
</enum>
<code-helper name='describe'>$.type</code-helper>
<compound is-union='true'>
<int16_t name="item_type" refers-to='(enum-to-key $item_type $)'/>
<int16_t name='creature_id' ref-target='creature_raw'/>
<int16_t name='color_id' refers-to='$global.world.raws.color_words[$]'/>
<int16_t name='shape_id' refers-to='$global.world.raws.shape_words[$]'/>
<int16_t name='plant_id' ref-target='plant_raw'/>
</compound>
<int16_t name="item_subtype" refers-to='(item-subtype-target $$._parent.item_type $)'/>
<int16_t name='mattype' ref-target='material' aux-value='$$.matindex'/>
<int32_t name='matindex'/>
<bool name='active'/>
<uint32_t name='unk'/>
</struct-type>
</data-definition>
<!--
Local Variables:
indent-tabs-mode: nil
nxml-child-indent: 4
End:
-->