forked from DFHack/df-structures
-
Notifications
You must be signed in to change notification settings - Fork 0
/
df.items.xml
1268 lines (1079 loc) · 58 KB
/
df.items.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>
-- MISC TYPES
<bitfield-type type-name='item_flags'>
<flag-bit name='on_ground' comment='Item on ground'/>
<flag-bit name='in_job' comment='Item currently being used in a job'/>
<flag-bit name='hostile' comment='Item owned by hostile'/>
<flag-bit name='in_inventory' comment='Item in a creature, workshop or container inventory'/>
<flag-bit name='removed' comment='completely invisible and with no position'/>
<flag-bit name='in_building' comment='Part of a building (including mechanisms, bodies in coffins)'/>
<flag-bit name='container' comment='Set on anything that contains or contained items?'/>
<flag-bit name='dead_dwarf' comment='Dwarfs dead body or body part'/>
<flag-bit name='rotten' comment='Rotten food'/>
<flag-bit name='spider_web' comment='Thread in spider web'/>
<flag-bit name='construction' comment='Material used in construction'/>
<flag-bit name='encased' comment='Item encased in ice or obsidian'/>
<flag-bit name='unk12' comment='unknown, unseen'/>
<flag-bit name='murder' comment='Implies murder - used in fell moods'/>
<flag-bit name='foreign' comment='Item is imported'/>
<flag-bit name='trader' comment='Item ownwed by trader'/>
<flag-bit name='owned' comment='Item is owned by a dwarf'/>
<flag-bit name='garbage_collect' comment='Marked for deallocation by DF it seems'/>
<flag-bit name='artifact' comment='Artifact'/>
<flag-bit name='forbid' comment='Forbidden item'/>
<flag-bit name='already_uncategorized' comment='unknown, unseen'/>
<flag-bit name='dump' comment='Designated for dumping'/>
<flag-bit name='on_fire' comment='Indicates if item is on fire, Will Set Item On Fire if Set!'/>
<flag-bit name='melt' comment='Designated for melting, if applicable'/>
<flag-bit name='hidden' comment='Hidden item'/>
<flag-bit name='in_chest' comment='Stored in chest/part of well?'/>
<flag-bit name='use_recorded' comment='transient in unit.used_items update'/>
<flag-bit name='artifact_mood' comment='created by mood/named existing item'/>
<flag-bit name='temps_computed' comment='melting/boiling/ignite/etc. points'/>
<flag-bit name='weight_computed'/>
<flag-bit name='unk30' comment='unknown, unseen'/>
<flag-bit name='from_worldgen' comment='created by underground critters?'/>
</bitfield-type>
<bitfield-type type-name='item_flags2'>
<flag-bit name='has_rider' comment='vehicle with a rider'/>
<flag-bit name='unk1'/>
<flag-bit name='grown'/>
</bitfield-type>
<enum-type type-name='item_magicness_type' base-type='int16_t'>
<enum-item name='Sparkle'/>
<enum-item name='AirWarped'/>
<enum-item name='Whistle'/>
<enum-item name='OddlySquare'/>
<enum-item name='SmallBumps'/>
<enum-item name='EarthSmell'/>
<enum-item name='Lightning'/>
<enum-item name='GrayHairs' comment='with value of 10 or higher, creatures that look at the item cannot think negative thoughts'/>
<enum-item name='RustlingLeaves'/>
</enum-type>
<struct-type type-name='item_magicness'>
<enum base-type='int16_t' name="type" type-name='item_magicness_type'/>
<int16_t name='value' comment='boosts item value by 50*this'/>
<int16_t/>
<int32_t name='flags' comment='1=does not show up in item description or alter item value'/>
</struct-type>
<struct-type type-name='temperaturest'> seems like a convenient name
<uint16_t name='whole' init-value='10050'/>
<int16_t name='fraction' init-value='0'/>
</struct-type>
<struct-type type-name='spatter_common'>
<int16_t name='mat_type' ref-target='material' aux-value='$$.mat_index'/>
<int32_t name='mat_index'/>
<enum type-name='matter_state' base-type='int16_t' name='mat_state'/>
<compound name='temperature' type-name='temperaturest'/>
<int32_t name='size' comment='1-24=spatter, 25-49=smear, 50-* = coating'/>
<bitfield base-type='uint16_t' name='base_flags' comment='v0.40.13'>
<flag-bit name='evaporates' comment='does not contaminate tile when washed away'/>
</bitfield>
<padding size='2' comment='needed for proper alignment of spatter on gcc'/>
</struct-type>
<struct-type type-name='spatter' inherits-from='spatter_common'>
<int16_t name='body_part_id'
refers-to='$$._global._parent._global.body.body_plan.body_parts[$]'/>
<bitfield base-type='uint16_t' name='flags'>
<flag-bit name='water_soluble'/>
</bitfield>
</struct-type>
<enum-type type-name='item_quality' base-type='int16_t'>
<enum-item name='Ordinary'/>
<enum-item name='WellCrafted'/>
<enum-item name='FinelyCrafted'/>
<enum-item name='Superior'/>
<enum-item name='Exceptional'/>
<enum-item name='Masterful'/>
<enum-item name='Artifact'/>
</enum-type>
<enum-type type-name='slab_engraving_type' base-type='int16_t'>
<enum-item name='Slab' value='-1'/>
<enum-item name='Memorial'/>
<enum-item name='CraftShopSign'/>
<enum-item name='WeaponsmithShopSign'/>
<enum-item name='ArmorsmithShopSign'/>
<enum-item name='GeneralStoreSign'/>
<enum-item name='FoodShopSign'/>
<enum-item name='Secrets' comment='from the gods?'/>
<enum-item name='FoodImportsSign'/>
<enum-item name='ClothingImportsSign'/>
<enum-item name='GeneralImportsSign'/>
<enum-item name='ClothShopSign'/>
<enum-item name='LeatherShopSign'/>
<enum-item name='WovenClothingShopSign'/>
<enum-item name='LeatherClothingShopSign'/>
<enum-item name='BoneCarverShopSign'/>
<enum-item name='GemCutterShopSign'/>
<enum-item name='WeaponsmithShopSign2'/>
<enum-item name='BowyerShopSign'/>
<enum-item name='BlacksmithShopSign'/>
<enum-item name='ArmorsmithShopSign2'/>
<enum-item name='MetalCraftShopSign'/>
<enum-item name='LeatherGoodsShopSign'/>
<enum-item name='CarpenterShopSign'/>
<enum-item name='StoneFurnitureShopSign'/>
<enum-item name='MetalFurnitureShopSign'/>
<enum-item name='DemonIdentity' comment='when a demon assumes identity?'/>
<enum-item name='TavernSign'/>
</enum-type>
-- CORE ITEM
<class-type type-name='item' original-name='itemst'
instance-vector='$global.world.items.all' key-field='id'>
<compound name='pos' type-name='coord'/>
<compound name='flags' type-name='item_flags'/>
<compound name='flags2' type-name='item_flags2' comment='v0.34.08'/>
<uint32_t name='age'/>
<int32_t name='id'/>
<stl-vector name='specific_refs' pointer-type='specific_ref'/>
<stl-vector name='general_refs' pointer-type='general_ref'/>
<int32_t name='world_data_id' ref-target='world_object_data' comment='v0.34.01'/>
<int32_t name='world_data_subid' init-value='-1' comment='v0.34.01'/>
<uint8_t name='stockpile_countdown' comment='-1 per 50 frames; then check if needs moving'/>
<uint8_t name='stockpile_delay' comment='used to reset countdown; randomly varies'/>
<int16_t name='unk2'/>
<int32_t name='base_uniform_score'/>
<int16_t name='walkable_id' comment='from map_block.walkable'/>
<uint16_t name='spec_heat'/>
<uint16_t name='ignite_point'/>
<uint16_t name='heatdam_point'/>
<uint16_t name='colddam_point'/>
<uint16_t name='boiling_point'/>
<uint16_t name='melting_point'/>
<uint16_t name='fixed_temp'/>
<int32_t name='weight' comment='if flags.weight_computed'/>
<int32_t name='weight_fraction' comment='1e-6'/>
<virtual-methods>
<vmethod ret-type='item_type' name='getType'/>
<vmethod ret-type='int16_t' name='getSubtype'/>
<vmethod ret-type='int16_t' name='getMaterial'/>
<vmethod ret-type='int32_t' name='getMaterialIndex'/>
<vmethod name='setSubtype'> <int16_t/> </vmethod>
<vmethod name='setMaterial'> <int16_t/> </vmethod>
<vmethod name='setMaterialIndex'> <int32_t/> </vmethod>
<vmethod ret-type='int16_t' name='getActualMaterial'
comment='returns an actual material type, never a race'/>
<vmethod ret-type='int32_t' name='getActualMaterialIndex'
comment='returns an actual material index, never a caste'/>
<vmethod ret-type='int16_t' name='getRace'
comment='only if the object is made of a "specific creature mat"'/>
-- 10
<vmethod ret-type='int16_t' name='getCaste'
comment='only if the object is made of a "specific creature mat"'/>
<vmethod ret-type='int16_t' name='getPlantID'
comment='only if the object is made of a plant material'/>
<vmethod comment='v0.40.01'/>
<vmethod comment='v0.40.01'><int32_t/></vmethod>
<vmethod comment='v0.40.01'/>
<vmethod ret-type='int32_t' name='getTotalDimension'/>
<vmethod name='setDimension'> <int32_t name='amount'/> </vmethod>
<vmethod ret-type='bool' name='subtractDimension'> <int32_t name='amount'/> </vmethod>
<vmethod ret-type='bool' name='isFoodStorage'/>
<vmethod ret-type='bool' name='isTrackCart'/>
<vmethod ret-type='bool' name='isWheelbarrow'/>
<vmethod ret-type='int32_t' name='getVehicleID'/>
<vmethod name='getStockpile'>
<ret-type><pointer type-name='item_stockpile_ref'/></ret-type>
</vmethod>
<vmethod ret-type='bool' name='containsPlaster'/>
<vmethod ret-type='bool' name='isPlaster'/>
<vmethod ret-type='bool' name='getColorOverride'> <pointer/> </vmethod>
-- 26
<vmethod name='getHistoryInfo'>
<ret-type><pointer><pointer type-name='item_history_info'/></pointer></ret-type>
</vmethod>
<vmethod ret-type='bool' name='hasToolUse'> <int16_t/> </vmethod>
<vmethod ret-type='bool'/>
<vmethod name='becomePaste'/>
<vmethod name='becomePressed'/>
<vmethod name='calculateWeight'/>
<vmethod ret-type='bool' name='isSharpStone'/>
<vmethod ret-type='bool' name='isCrystalGlassable'/>
<vmethod ret-type='bool' name='isMetalOre'> <int16_t name='matIndex'/> </vmethod>
<vmethod name='clearLastTempUpdateTS'/>
<vmethod name='listNotableKills'> <pointer type-name='stl-string' name='string_ptr'/> </vmethod>
-- 37
<vmethod ret-type='uint16_t' name='getSpecHeat'/>
<vmethod ret-type='uint16_t' name='getIgnitePoint'/>
<vmethod ret-type='uint16_t' name='getHeatdamPoint'/>
<vmethod ret-type='uint16_t' name='getColddamPoint'/>
<vmethod ret-type='uint16_t' name='getBoilingPoint'/>
<vmethod ret-type='uint16_t' name='getMeltingPoint'/>
<vmethod ret-type='uint16_t' name='getFixedTemp'/>
<vmethod ret-type='int32_t' name='getSolidDensity'/>
<vmethod ret-type='bool' name='materialRots'/>
<vmethod ret-type='uint16_t' name='getTemperature'/>
-- 47
<vmethod ret-type='bool' name='adjustTemperature'>
<uint16_t name='target'/>
<int32_t name='unk'/>
</vmethod>
<vmethod/>
<vmethod name='extinguish'/>
<vmethod ret-type='int8_t' name='getGloveHandedness'/>
<vmethod name='setGloveHandedness'> <int8_t/> </vmethod>
<vmethod ret-type='bool' name='isSpike'/>
<vmethod ret-type='bool' name='isScrew'/>
<vmethod ret-type='bool' name='isBuildMat'/>
<vmethod ret-type='bool' name='isTemperatureSafe'> <int8_t comment='1 fire, 2 magma'/> </vmethod>
<vmethod name='setRandSubtype'> <int32_t name='entity_id'/> </vmethod>
-- 57
<vmethod ret-type='int8_t' name='getWeaponSize' comment='weapon racks have capacity 5'/>
<vmethod ret-type='int16_t' name='getWear'/>
<vmethod name='setWear'> <int16_t/> </vmethod>
<vmethod ret-type='int32_t' name='getMaker'/>
<vmethod name='setMaker'> <int32_t name='unit_id'/> </vmethod>
<vmethod name='getCorpseInfo'>
<pointer type-name='int16_t' name='prace'/>
<pointer type-name='int16_t' name='pcaste'/>
<pointer name='phfig'> <pointer type-name='historical_figure'/> </pointer>
<pointer name='punit'> <pointer type-name='unit'/> </pointer>
</vmethod>
<vmethod/>
<vmethod name='getGloveFlags'>
<ret-type><pointer><df-flagarray/></pointer></ret-type>
</vmethod>
<vmethod name='getItemShapeDesc' comment='a statue/figurine of "string goes here"'>
<ret-type><pointer type-name='stl-string'/></ret-type>
</vmethod>
<vmethod ret-type='bool' name='isMatchingAmmoItem'> <pointer type-name='item_filter_spec'/> </vmethod>
-- 67
<vmethod><pointer/><pointer/></vmethod>
<vmethod><int32_t/><int32_t/></vmethod>
<vmethod><int32_t/><int32_t/></vmethod>
<vmethod name='setSeedsPlantSkillLevel'> <int32_t name='level'/> </vmethod>
<vmethod ret-type='int16_t' name='getCorpseSize' comment='size_info.size_cur'/>
<vmethod ret-type='bool' name='ageItem'><int32_t name='amount'/></vmethod>
<vmethod ret-type='int32_t' name='getCritterAirdrownTimer'/>
<vmethod name='setCritterAirdrownTimer'> <int32_t/> </vmethod>
<vmethod name='incrementCritterAirdrownTimer'/>
<vmethod ret-type='int32_t' name='getRotTimer'/>
-- 77
<vmethod name='setRotTimer'> <int32_t name='val'/> </vmethod>
<vmethod name='incrementRotTimer'/>
<vmethod ret-type='bool' name='isBogeymanCorpse'/>
<vmethod><int32_t/></vmethod>
<vmethod name='getAmmoType'>
<ret-type><pointer type-name='stl-string'/></ret-type>
<pointer type-name='stl-string'/>
</vmethod>
<vmethod ret-type='bool' name='isLiquidPowder'/>
<vmethod ret-type='bool' name='isLiquid'/>
<vmethod ret-type='bool'/>
<vmethod ret-type='int32_t' name='getVolume' comment='for putting in containers, building clutter'/>
<vmethod name='addImprovementFromJob'>
<ret-type><pointer type-name='itemimprovement'/></ret-type>
<enum base-type='int32_t' type-name='improvement_type'/>
<pointer type-name='job'/>
<pointer type-name='unit'/>
<int16_t name='mat_type'/>
<int32_t name='mat_index'/>
<int32_t name='shape' ref-target='descriptor_shape'/>
<pointer type-name='historical_entity'/>
<pointer type-name='world_site'/>
<int16_t name='unk' comment='used to compute quality if !job||!unit'/>
<bool name='unshaped' comment='glazed'/>
</vmethod>
<vmethod ret-type='bool' name='isWeapon'/>
-- 88
<vmethod ret-type='bool' name='isArmorNotClothing'/>
<vmethod ret-type='bool' name='isMillable'/>
<vmethod ret-type='bool' name='isProcessableThread'/>
<vmethod ret-type='bool' name='isProcessableVial'/>
<vmethod ret-type='bool' name='isProcessableBarrel'/>
<vmethod ret-type='bool' name='isEdiblePlant'/>
<vmethod ret-type='bool' name='isEdibleRaw'> <int32_t name='hunger'/> </vmethod>
<vmethod ret-type='bool' name='isEdibleCarnivore'>
<comment>In item_foodst, requires MEAT or FISH ingredient.</comment>
<int32_t name='hunger'/>
</vmethod>
<vmethod ret-type='bool' name='isEdibleBonecarn'>
<comment>In item_foodst, requires CORPSEPIECE, MEAT or FISH ingredient.</comment>
<int32_t name='hunger'/>
</vmethod>
-- 97
<vmethod ret-type='bool' name='moveToGround'>
<int16_t name='x'/> <int16_t name='y'/> <int16_t name='z'/>
</vmethod>
<vmethod name='categorize' comment='Add item to world.items.other.*'> <bool name='in_play'/> </vmethod>
<vmethod name='uncategorize' comment='Remove item from world.items.other.*'/>
<vmethod ret-type='bool' name='isFurniture'> <bool name='empty'/> </vmethod>
<vmethod ret-type='bool' name='isPressed'/>
<vmethod ret-type='bool' name='isAnimal' comment='stored in Animal stockpiles'/>
<vmethod name='assignQuality'>
<pointer name='maker' type-name='unit'/>
<enum base-type='int16_t' name='job_skill' type-name='job_skill'/>
</vmethod>
<vmethod><int32_t/></vmethod>
<vmethod name='notifyLostMasterwork'/>
<vmethod name='addMagic'><int32_t/><int32_t/><int32_t/></vmethod>
<vmethod name='magic_unk1'><int32_t/><int32_t/></vmethod>
<vmethod name='magic_unk2'><int32_t/><int32_t/></vmethod>
-- 109
<vmethod name='magic_unk3'><int32_t/></vmethod>
<vmethod name='magic_unk4'><int32_t/><int32_t/><int32_t/></vmethod>
<vmethod name='setDisplayColor'><pointer/></vmethod>
<vmethod ret-type='bool' name='isDamagedByHeat'/>
<vmethod ret-type='bool' name='needTwoHandedWield'> <int32_t/> </vmethod>
<vmethod name='splitStack'>
<ret-type><pointer type-name='item'/></ret-type>
<int32_t name='stack_size'/>
<bool name='preserve_containment'/>
</vmethod>
<vmethod ret-type='bool' name='isTameableVermin'/>
<vmethod ret-type='bool' name='isDye'/>
<vmethod ret-type='bool' name='isMilkable'><int32_t/><int32_t/></vmethod>
-- 118
<vmethod ret-type='bool' name='isSandBearing'/>
<vmethod ret-type='bool' name='isLyeBearing'/>
<vmethod ret-type='bool' name='isAnimalProduct'/>
<vmethod name='getStorageInfo'>
<pointer type-name='int16_t' name='item_type'/>
<pointer type-name='int16_t' name='material_category'/>
</vmethod>
<vmethod ret-type='bool' name='addWear'>
<int32_t name='delta'/> <bool name='simple'/> <bool name='lose_masterwork'/>
</vmethod>
<vmethod ret-type='bool' name='incWearTimer'> <int32_t name='delta'/> </vmethod>
<vmethod ret-type='bool' name='checkWearDestroy'>
<bool name='simple'/> <bool name='lose_masterwork'/>
</vmethod>
<vmethod name='addContaminant'>
<int16_t name='mat_type'/> <int32_t name='mat_index'/>
<enum type-name='matter_state' base-type='int16_t' name='mat_state'/>
<uint16_t name='temp'/> <int32_t name='size'/>
<int16_t name='body_part_id'/> <uint16_t name='flags'/>
</vmethod>
<vmethod name='removeContaminantByIdx'>
<int32_t name='index'/> <int32_t name='amount'/>
</vmethod>
<vmethod name='removeContaminant'>
<int16_t name='mat_type'/> <int32_t name='mat_index'/>
<int32_t name='amount'/>
</vmethod>
-- 128
<vmethod name='tradeUnitContaminants'>
<pointer type-name='unit'/> <int16_t name='body_part_id'/>
</vmethod>
<vmethod name='tradeItemContaminants' comment='calls item.tIC2(this)'>
<pointer type-name='item'/>
</vmethod>
<vmethod name='tradeItemContaminants2'>
<pointer type-name='item_actual'/>
</vmethod>
<vmethod name='contaminateWound'>
<pointer type-name='unit'/> <pointer type-name='unit_wound'/>
<uint8_t name='shift'/> <int16_t name='body_part_id'/>
</vmethod>
<vmethod name='write_file'> <pointer name='file' type-name='file_compressorst'/> </vmethod>
<vmethod name='read_file'>
<pointer name='file' type-name='file_compressorst'/>
<int32_t name='loadversion'/>
</vmethod>
<vmethod name='getWeaponAttacks'>
<ret-type><pointer><stl-vector type-name='pointer'/></pointer></ret-type>
</vmethod>
<vmethod/>
<vmethod ret-type='bool' name='isSplittable' comment='if false, you throw the entire stack at once'/>
<vmethod/>
-- 138
<vmethod><int32_t/></vmethod>
<vmethod name='propagateUnitRefs'/> add to unit.owned_items/traded_items
<vmethod ret-type='bool' name='isBag' comment='BOX made of cloth'/>
<vmethod ret-type='bool' name='isSand'/>
<vmethod comment='returns item_actual.anon_1'/>
<vmethod ret-type='int32_t' name='getStackSize'/>
<vmethod name='addStackSize'> <int32_t name='amount'/> </vmethod>
<vmethod name='setStackSize'> <int32_t name='amount'/> </vmethod>
<vmethod ret-type='bool' name='isAmmoClass'> <pointer type-name='stl-string'/> </vmethod>
<vmethod ret-type='bool' name='isAutoClean'
comment='delete on_ground every season when in ANY_AUTO_CLEAN; default true'/>
-- 148
<vmethod ret-type='bool' name='setTemperatureFromMapTile'>
<int32_t name='x'/> <int32_t name='y'/> <int32_t name='z'/>
<bool name='local'/> <bool name='contained'/>
</vmethod>
<vmethod ret-type='bool' name='setTemperatureFromMap'>
<bool name='local'/> <bool name='contained'/>
</vmethod>
<vmethod ret-type='bool' name='setTemperature'>
<uint16_t name='temp'/> <bool name='local'/> <bool name='contained'/>
</vmethod>
<vmethod ret-type='bool' name='updateTempFromMap'>
<bool name='local'/> <bool name='contained'/> <bool name='adjust'/>
<int32_t name='multiplier'/>
</vmethod>
<vmethod ret-type='bool' name='updateTemperature'>
<uint16_t name='temp'/> <bool name='local'/>
<bool name='contained'/> <bool name='adjust'/>
<int32_t name='multiplier'/>
</vmethod>
<vmethod ret-type='bool' name='updateFromWeather'/>
<vmethod ret-type='bool' name='updateContaminants'/>
<vmethod ret-type='bool' name='checkTemperatureDamage'/>
<vmethod ret-type='bool' name='checkHeatColdDamage'/>
<vmethod ret-type='bool' name='checkMeltBoil'/>
-- 158
<vmethod ret-type='int16_t' name='getMeleeSkill'/>
<vmethod ret-type='int16_t' name='getRangedSkill'/>
<vmethod name='setQuality'> <int16_t name='quality'/> </vmethod>
<vmethod ret-type='int16_t' name='getQuality'/>
<vmethod ret-type='int16_t' name='getOverallQuality'/>
<vmethod ret-type='int16_t' name='getImprovementQuality'/>
<vmethod ret-type='int32_t' name='getProjectileSize'/>
<vmethod ret-type='bool' name='isImprovable'>
<pointer type-name='job'/>
<int16_t name='mat_type'/> <int32_t name='mat_index'/>
</vmethod>
<vmethod name='setSharpness'>
<int32_t name='unk1'/>
<int32_t name='unk2'/>
</vmethod>
<vmethod ret-type='int32_t' name='getSharpness'/>
-- 168
<vmethod ret-type='bool' name='isTotemable'/>
<vmethod ret-type='bool' name='isDyeable'/>
<vmethod ret-type='bool' name='isNotDyed'/>
<vmethod ret-type='bool' name='isDyed'/>
<vmethod ret-type='bool' name='canSewImage'/>
<vmethod ret-type='bool'/>
<vmethod ret-type='bool' name='isProcessableVialAtStill'/>
<vmethod ret-type='bool' name='isSimilarToItem'>
<enum base-type='int16_t' name='item_type' type-name='item_type'/>
<int16_t name='item_subtype'/>
<int16_t name='mat_type'/>
<int32_t name='mat_index'/>
</vmethod>
<vmethod ret-type='int32_t' name='getBlockChance'/>
<vmethod/>
-- 178
<vmethod ret-type='int16_t' name='getMakerRace'/>
<vmethod name='setMakerRace'> <int16_t/> </vmethod>
<vmethod ret-type='int8_t' name='getEffectiveArmorLevel'
comment="adds 1 if it has [METAL_ARMOR_LEVELS] and it's made of an inorganic mat"/>
<vmethod/>
<vmethod ret-type='bool' name='isItemOrganicCloth'/> only for item_cloth
<vmethod ret-type='bool' name='isMadeOfOrganicCloth'/> for all constructed items
<vmethod name='coverWithContaminant' comment='also stops fire; used for rain'>
<int16_t name='mat_type'/> <int32_t name='mat_index'/>
<enum type-name='matter_state' base-type='int16_t' name='mat_state'/>
<uint16_t name='temperature'/>
</vmethod>
<vmethod ret-type='bool' name='hasImprovements'/> any at all
<vmethod ret-type='bool' name='isImproved'/>
<vmethod name='getMagic'>
<ret-type><pointer><stl-vector pointer-type='item_magicness'/></pointer></ret-type>
</vmethod>
-- 188
<vmethod name='getItemDescription'>
<pointer type-name='stl-string'/>
<int8_t name='mode'/>
</vmethod>
<vmethod name='getItemDescriptionPrefix' comment='"a " or "the "'>
<pointer type-name='stl-string'/>
<int8_t name='mode'/>
</vmethod>
<vmethod name='getItemBasicName' comment='usually just "item"'>
<pointer type-name='stl-string'/>
</vmethod>
<vmethod ret-type='int32_t' name='getImprovementsValue'> <pointer type-name='caravan_state' name='caravan'/> </vmethod>
<vmethod ret-type='bool' name='isExtractBearingFish'/>
<vmethod ret-type='bool' name='isExtractBearingVermin'/>
<vmethod/>
<vmethod ret-type='int32_t' name='getBaseWeight'/>
<vmethod ret-type='int32_t' name='getWeightShiftBits'/>
<vmethod ret-type='bool' name='isCollected'/>
-- 198
<vmethod ret-type='bool' name='isEdibleVermin'/>
<vmethod ret-type='uint8_t' name='drawSelf'/>
<vmethod ret-type='bool' name='isRangedWeapon'/>
<vmethod ret-type='bool' name='isClothing'/>
<vmethod ret-type='bool' name='isWet'/>
<vmethod ret-type='int32_t' name='getCurrencyValue' comment='that is, value of coins'>
<pointer type-name='historical_entity' name='appraiser'/>
</vmethod>
<vmethod ret-type='bool' name='isAssignedToStockpile'/>
<vmethod ret-type='bool' name='isAssignedToThisStockpile'> <int32_t/> </vmethod>
<vmethod name='detachStockpileAssignment' comment='also removes links from the pile'/>
-- 207
<vmethod name='removeStockpileAssignment' comment='just wipes the fields'/>
<vmethod name='getStockpile2'>
<ret-type><pointer type-name='item_stockpile_ref'/></ret-type>
</vmethod>
<vmethod><int32_t/><int32_t/><int32_t/><int32_t/></vmethod>
<vmethod><int32_t/><int32_t/><int32_t/><int32_t/><int32_t/><int32_t/><int32_t/><int32_t/><int32_t/><int32_t/><int32_t/><int32_t/></vmethod>
<vmethod><int32_t/></vmethod>
<vmethod ret-type='int32_t' name='getThreadDyeValue'> <pointer type-name='caravan_state' name='caravan'/> </vmethod>
<vmethod name='getColorAndShape'>
<pointer name='colors'><stl-vector type-name='int16_t'/></pointer>
<pointer name='shapes'><stl-vector type-name='int16_t'/></pointer>
</vmethod>
<vmethod ret-type='bool'/>
<vmethod ret-type='bool' name='isArmor' comment='for armor user skill encumberance'/>
<vmethod ret-type='int32_t' name='calcUniformScore'>
<pointer type-name='squad_uniform_spec'/>
<bool name='exact_match'/>
<enum base-type='int16_t' type-name='job_skill' name='best_any'/>
<enum base-type='int16_t' type-name='job_skill' name='best_melee'/>
<enum base-type='int16_t' type-name='job_skill' name='best_ranged'/>
</vmethod>
-- 217
<vmethod ret-type='int32_t' name='calcBaseUniformScore'/>
<vmethod><int32_t/><int32_t/><int32_t/></vmethod>
<vmethod ret-type='bool'/>
<vmethod ret-type='bool'/>
<vmethod><int32_t/><int32_t/></vmethod> related to history_info
<vmethod><int32_t/><int32_t/><int32_t/><int32_t/><int32_t/><int32_t/><int32_t/><int32_t/></vmethod> also history_info
<vmethod/> history_info
<vmethod/> history_info
<vmethod name='getSlabEngravingType'>
<ret-type><enum base-type='int16_t' type-name='slab_engraving_type'/></ret-type>
</vmethod>
<vmethod ret-type='int32_t' name='getAbsorption'/>
-- 227
<vmethod ret-type='bool'/>
<vmethod ret-type='bool' name='isGemMaterial'/>
<vmethod name='setGemShape'> <int32_t name='shape' ref-target='descriptor_shape'/> </vmethod>
<vmethod ret-type='bool' name='hasGemShape'/>
<vmethod name='getGemShape'>
<ret-type><int32_t ref-target='descriptor_shape'/></ret-type>
</vmethod>
<vmethod ret-type='bool' comment='v0.40.01'/>
<vmethod is-destructor='true'/>
</virtual-methods>
</class-type>
-- ACTUAL ITEM
<struct-type type-name='item_kill_info'>
<compound name='targets' type-name='historical_kills'/>
-- Wielders
<stl-vector name="slayers" type-name='int32_t' ref-target='historical_figure'/>
<stl-vector name="slayer_kill_counts" type-name='int32_t'/> naming weight 1
</struct-type>
<struct-type type-name='item_history_info'>
<pointer name='kills' type-name='item_kill_info'/>
<int32_t name='unk1'/> naming weight 0.001
<int32_t name='unk2'/> naming weight 0.01
</struct-type>
<class-type type-name='item_actual' inherits-from='item' original-name='item_actualst'>
<int32_t name='stack_size' init-value='1'/>
<code-helper name='describe'>
(if (> $.stack_size 1) (fmt "stack: ~A" $.stack_size))
(if (> $.wear 0) (fmt "wear: ~A" $.wear))
</code-helper>
<pointer name='history_info'>
<pointer type-name='item_history_info'/>
</pointer>
<pointer name='magic'>
<stl-vector pointer-type='item_magicness'/>
</pointer>
<pointer name='contaminants'>
<stl-vector pointer-type='spatter'/>
</pointer>
<compound name='temperature' type-name='temperaturest'/>
<int16_t name='wear'/>
<int32_t name='wear_timer' comment='counts up to 806400'/>
<int32_t init-value='-1' comment='v0.34.01'/>
<int32_t name='temp_updated_frame' init-value='-1'/>
</class-type>
-- CRAFTED ITEM
<class-type type-name='item_crafted' inherits-from='item_actual'
original-name='item_craftedst'>
<int16_t name='mat_type' ref-target='material' aux-value='$$.mat_index'/>
<int32_t name='mat_index'/>
<code-helper name='describe'>
$.quality
(describe-obj (material-by-id $.mat_type $.mat_index))
</code-helper>
<int16_t name='maker_race' ref-target='creature_raw'/>
<enum base-type='int16_t' name='quality' type-name='item_quality'/>
<enum base-type='int32_t' name='skill_used' type-name='job_skill'/>
<int32_t name='maker' ref-target='historical_figure'/>
<int32_t name='masterpiece_event' ref-target='history_event'/>
</class-type>
-- CONSTRUCTED ITEM
<class-type type-name='item_constructed' inherits-from='item_crafted'
original-name='item_constructedst'>
<stl-vector name='improvements' pointer-type='itemimprovement'/>
</class-type>
-- BODY COMPONENT
<bitfield-type type-name='body_part_status'>
<flag-bit name='on_fire'/>
<flag-bit name='missing'/>
<flag-bit name='organ_loss' comment='cyan'/>
<flag-bit name='organ_damage' comment='yellow'/>
<flag-bit name='muscle_loss' comment='red'/>
<flag-bit name='muscle_damage' comment='yellow'/>
<flag-bit name='bone_loss' comment='red'/>
<flag-bit name='bone_damage' comment='yellow'/>
<flag-bit name='skin_damage' comment='brown'/>
<flag-bit name='motor_nerve_severed'/>
<flag-bit name='sensory_nerve_severed'/>
<flag-bit name='spilled_guts'/>
<flag-bit name='has_splint'/>
<flag-bit name='has_bandage'/>
<flag-bit name='has_plaster_cast'/>
<flag-bit name='grime' count='3'/>
<flag-bit name='severed_or_jammed'
comment='seen e.g. on ribs smashed by blunt attack, but quickly disappeared'/>
<flag-bit name='under_shell'/>
<flag-bit name='is_shell'/>
<flag-bit name='unk19' comment='on zombified head'/>
<flag-bit name='unk20' comment='on zombified head'/>
</bitfield-type>
<bitfield-type type-name='body_layer_status'>
<flag-bit name='gone'/>
<flag-bit name='leaking'/>
</bitfield-type>
<struct-type type-name='body_component_info'>
<stl-vector name='body_part_status' type-name='body_part_status'
index-refers-to='$$._global._upglobal.caste.ref-target.body_info.body_parts[$]'/>
<stl-vector name='numbered_masks' type-name='uint32_t'
comment='1 bit per instance of a numbered body part'/>
<stl-vector name='nonsolid_remaining' type-name='uint32_t' comment='0-100%'
index-refers-to='$$._global._upglobal.caste.ref-target.body_info.nonsolid_layers[$].refers-to'/>
<stl-vector name='layer_status' type-name='body_layer_status'
index-refers-to='$$._global._upglobal.caste.ref-target.body_info.layer_idx[$].refers-to'/>
<stl-vector name='layer_wound_area' type-name='uint32_t'
index-refers-to='$$._global._upglobal.caste.ref-target.body_info.layer_idx[$].refers-to'/>
Surface percentages for cuts/fractures, dents and effects (such as
bruises, burns, frostbite, melting, freezing, necrosis, and blistering)
<stl-vector name='layer_cut_fraction' type-name='uint32_t' comment='0-10000'
index-refers-to='$$._global._upglobal.caste.ref-target.body_info.layer_idx[$].refers-to'/>
<stl-vector name='layer_dent_fraction' type-name='uint32_t' comment='0-10000'
index-refers-to='$$._global._upglobal.caste.ref-target.body_info.layer_idx[$].refers-to'/>
<stl-vector name='layer_effect_fraction' type-name='uint32_t' comment='0-1000000000'
index-refers-to='$$._global._upglobal.caste.ref-target.body_info.layer_idx[$].refers-to'/>
</struct-type>
<struct-type type-name='body_size_info'>
<int32_t name='size_cur'/>
<int32_t name='size_base'/>
<int32_t name='area_cur' comment='size_cur^0.666'/>
<int32_t name='area_base' comment='size_base^0.666'/>
<int32_t name='length_cur' comment='(size_cur*10000)^0.333'/>
<int32_t name='length_base' comment='(size_base*10000)^0.333'/>
</struct-type>
<enum-type type-name='corpse_material_type'>
<enum-item name='Plant'/>
<enum-item name='Silk'/>
<enum-item name='Leather'/>
<enum-item name='Bone'/>
<enum-item name='Shell'/>
<enum-item/>
<enum-item name='Soap'/>
<enum-item name='Tooth'/>
<enum-item name='Horn'/>
<enum-item name='Pearl'/>
<enum-item name='HairWool'/>
<enum-item name='Yarn'/>
</enum-type>
<class-type type-name='item_body_component' inherits-from='item_actual'
original-name='item_body_componentst'>
<int16_t name='race' ref-target='creature_raw'/>
<int32_t name='hist_figure_id' ref-target='historical_figure'/>
<int32_t name='unit_id' ref-target='unit'/>
<int16_t name='caste' ref-target='caste_raw' aux-value='$$.race'/>
<int8_t name='sex' comment='-1 n/a, 0 female, 1 male'/>
<int16_t name='race2' ref-target='creature_raw'/>
<int16_t name='caste2' ref-target='caste_raw' aux-value='$$.race2'/>
<int32_t name='rot_timer'/>
<int8_t name='unk_8c'/>
<compound name='body'>
<stl-vector name='wounds' pointer-type='unit_wound'/>
<static-array name='unk_100' type-name='int32_t' count='10'/>
<int32_t name='unk_c8'/>
<compound name='components' type-name='body_component_info'/>
<static-array type-name='int32_t' name='physical_attr_value'
count='6' index-enum='physical_attribute_type'/>
<static-array type-name='int32_t' name='physical_attr_unk2'
count='6' index-enum='physical_attribute_type'/>
<compound name='size_info' type-name='body_size_info'/>
<stl-vector name='body_part_relsize' type-name='int32_t' comment='=unit.enemy.body_part_relsize'/>
<stl-vector name='body_modifiers' type-name='int32_t'
index-refers-to='$$._global.caste.ref-target.body_appearance_modifiers[$]'/>
<stl-vector name='bp_modifiers' type-name='int32_t'
index-refers-to='$$._global.caste.ref-target.bp_appearance.modifier_idx[$].refers-to'/>
<int32_t name="size_modifier" comment='=unit.appearance.size_modifier'/>
</compound>
<int32_t name="birth_year"/>
<int32_t name="birth_time"/>
<int32_t name='curse_year' comment='v0.34.01'/>
<int32_t name='curse_time' comment='v0.34.01'/>
<int32_t name='birth_year_bias' init-value='0' comment='v0.34.01'/>
<int32_t name='birth_time_bias' init-value='0' comment='v0.34.01'/>
<int32_t name="death_year"/>
<int32_t name="death_time"/>
<compound name='appearance'>
<stl-vector name='colors' type-name='int32_t'/>
<stl-vector name='unk_1e8' type-name='int16_t'/>
<stl-vector name='unk_1f8' type-name='int32_t'/>
<stl-vector name='unk_208' type-name='int32_t'/>
<stl-vector name='unk_218' type-name='int32_t'/>
</compound>
<int32_t name="blood_count"/>
<int32_t name="stored_fat"/>
<int32_t name='hist_figure_id2' ref-target='historical_figure'/>
<int32_t comment='v0.34.01, actual offset unknown'/>
<int32_t name='unit_id2' ref-target='unit'/>
<bitfield name='corpse_flags'>
<flag-bit name='unbutchered'/>
<flag-bit/>
<flag-bit/>
<flag-bit/>
<flag-bit name='bone'/>
<flag-bit name='shell'/>
<flag-bit/>
<flag-bit/>
<flag-bit/>
<flag-bit/>
<flag-bit/>
<flag-bit/>
<flag-bit name='skull'/>
<flag-bit name='separated_part' comment='?'/>
<flag-bit name='hair_wool'/>
<flag-bit name='yarn'/>
</bitfield>
<static-array name='material_amount' type-name='int32_t'
count='19' index-enum='corpse_material_type'/>
<compound name='bone1'>
<int16_t name='mat_type' ref-target='material' aux-value='$$.mat_index'/>
<int32_t name='mat_index'/>
</compound>
<compound name='bone2'>
<int16_t name='mat_type' ref-target='material' aux-value='$$.mat_index'/>
<int32_t name='mat_index'/>
</compound>
</class-type>
<class-type type-name='item_corpsest' inherits-from='item_body_component'/>
<class-type type-name='item_corpsepiecest' inherits-from='item_body_component'/>
-- CRITTER
<class-type type-name='item_critter' inherits-from='item_actual' original-name='item_critterst'>
<int16_t name='race' ref-target='creature_raw'/>
<int16_t name='caste' ref-target='caste_raw' aux-value='$$.race'/>
<int32_t name='milk_timer'/>
<int32_t name='airdrown_timer'/>
<compound name='name' type-name='language_name'/>
</class-type>
-- LIQUID/POWER
<bitfield-type type-name='item_matstate'>
<flag-bit name='no_auto_clean' comment='isAutoClean returns false'/>
<flag-bit name='pressed'/>
<flag-bit name='paste'/>
</bitfield-type>
<class-type type-name='item_liquipowder' inherits-from='item_actual'
original-name='item_liquipowderst'>
<compound name='mat_state' type-name='item_matstate'/>
<int32_t name='dimension' init-value='150'/>
<int16_t name='mat_type' ref-target='material' aux-value='$$.mat_index'/>
<int32_t name='mat_index'/>
</class-type>
<class-type type-name='item_liquid' inherits-from='item_liquipowder' original-name='item_liquidst'/>
<class-type type-name='item_powder' inherits-from='item_liquipowder' original-name='item_powderst'/>
-- MISC
<class-type type-name='item_barst' inherits-from='item_actual'>
<int16_t name='subtype'/>
<int16_t name='mat_type' ref-target='material' aux-value='$$.mat_index'/>
<int32_t name='mat_index'/>
<int32_t name='dimension' init-value='150'/>
</class-type>
<class-type type-name='item_smallgemst' inherits-from='item_actual'>
<int16_t name='mat_type' ref-target='material' aux-value='$$.mat_index'/>
<int32_t name='mat_index'/>
<int32_t name='shape' ref-target='descriptor_shape'/>
</class-type>
<class-type type-name='item_blocksst' inherits-from='item_actual'>
<int16_t name='mat_type' ref-target='material' aux-value='$$.mat_index'/>
<int32_t name='mat_index'/>
</class-type>
<class-type type-name='item_roughst' inherits-from='item_actual'>
<int16_t name='mat_type' ref-target='material' aux-value='$$.mat_index'/>
<int32_t name='mat_index'/>
</class-type>
<class-type type-name='item_boulderst' inherits-from='item_actual'>
<int16_t name='mat_type' ref-target='material' aux-value='$$.mat_index'/>
<int32_t name='mat_index'/>
</class-type>
<class-type type-name='item_woodst' inherits-from='item_actual'>
<int16_t name='mat_type' ref-target='material' aux-value='$$.mat_index'/>
<int32_t name='mat_index'/>
</class-type>
<class-type type-name='item_rockst' inherits-from='item_actual'>
<int16_t name='mat_type' ref-target='material' aux-value='$$.mat_index'/>
<int32_t name='mat_index'/>
<int32_t name='sharpness'/>
<int32_t name='unk_84'/>
</class-type>
<class-type type-name='item_seedsst' inherits-from='item_actual'>
<int16_t name='mat_type' ref-target='material' aux-value='$$.mat_index'/>
<int32_t name='mat_index'/>
<int32_t name='grow_counter'/>
<int32_t name='planting_skill'/>
</class-type>
<class-type type-name='item_skin_tannedst' inherits-from='item_actual'>
<int16_t name='mat_type' ref-target='material' aux-value='$$.mat_index'/>
<int32_t name='mat_index'/>
<int32_t name='unk_80'/>
</class-type>
<class-type type-name='item_meatst' inherits-from='item_actual'>
<int16_t name='mat_type' ref-target='material' aux-value='$$.mat_index'/>
<int32_t name='mat_index'/>
<int32_t name='rot_timer'/>
</class-type>
<class-type type-name='item_plantst' inherits-from='item_actual'>
<int16_t name='mat_type' ref-target='material' aux-value='$$.mat_index'/>
<int32_t name='mat_index'/>
<int32_t name='rot_timer'/>
</class-type>
<class-type type-name='item_plant_growthst' inherits-from='item_actual'>
<int16_t name='subtype'/>
<int32_t/>
<int16_t name='mat_type' ref-target='material' aux-value='$$.mat_index'/>
<int32_t name='mat_index'/>
<int32_t name='rot_timer'/>
</class-type>
<class-type type-name='item_cheesest' inherits-from='item_actual'>
<int16_t name='mat_type' ref-target='material' aux-value='$$.mat_index'/>
<int32_t name='mat_index'/>
<int32_t name='rot_timer'/>
</class-type>
<class-type type-name='item_globst' inherits-from='item_actual'>
<int16_t name='mat_type' ref-target='material' aux-value='$$.mat_index'/>
<int32_t name='mat_index'/>