forked from DFHack/df-structures
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdf.military.xml
288 lines (231 loc) · 10.2 KB
/
df.military.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
<data-definition>
<bitfield-type type-name='uniform_indiv_choice'>
<flag-bit name='any'/>
<flag-bit name='melee'/>
<flag-bit name='ranged'/>
</bitfield-type>
<struct-type type-name='item_filter_spec'>
<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 $)'/>
<enum base-type='int16_t' name="material_class" type-name='entity_material_category'/>
<int16_t name='mattype' ref-target='material' aux-value='$$.matindex'/>
<int32_t name='matindex'/>
</struct-type>
<struct-type type-name='squad_uniform_spec'>
<int32_t name="item" ref-target='item'/>
<compound name='item_filter' type-name='item_filter_spec'/>
<int32_t name="color"/>
<stl-vector name="assigned">
<int32_t ref-target='item'/>
</stl-vector>
<compound name="indiv_choice" type-name='uniform_indiv_choice'/>
</struct-type>
<struct-type type-name='squad_ammo_spec'>
<compound name='item_filter' type-name='item_filter_spec'/>
<int32_t name="amount"/>
<bitfield name='flags' base-type='uint32_t'>
<flag-bit name='use_combat'/>
<flag-bit name='use_training'/>
</bitfield>
<stl-vector name="assigned">
<int32_t ref-target='item'/>
</stl-vector>
</struct-type>
<bitfield-type type-name='squad_use_flags' base-type='uint32_t'>
<flag-bit name='sleep'/>
<flag-bit name='train'/>
<flag-bit name='indiv_eq'/>
<flag-bit name='squad_eq'/>
</bitfield-type>
<enum-type type-name='uniform_category' base-type='int16_t'>
<enum-item name='body'/>
<enum-item name='head'/>
<enum-item name='pants'/>
<enum-item name='gloves'/>
<enum-item name='shoes'/>
<enum-item name='shield'/>
<enum-item name='weapon'/>
</enum-type>
<bitfield-type type-name='uniform_flags' base-type='uint32_t'>
<flag-bit name='replace_clothing'/>
<flag-bit name='exact_matches'/>
</bitfield-type>
<enum-type type-name='barrack_preference_category'>
<enum-item name='Bed'/>
<enum-item name='Armorstand'/>
<enum-item name='Box'/>
<enum-item name='Cabinet'/>
</enum-type>
<enum-type type-name='squad_event_type' base-type='int16_t'>
<enum-item name='None' value='-1'/>
<enum-item name='Unk0'/>
<enum-item name='Unk1'/>
<enum-item name='Unk2'/>
</enum-type>
<struct-type type-name='squad_position'>
<int32_t name='occupant' ref-target='historical_figure'/>
<code-helper name='describe'>(describe-obj @.occupant)</code-helper>
<stl-vector name="orders" pointer-type='squad_order'/>
<static-array name='preferences' count='4' index-enum='barrack_preference_category'>
<stl-vector type-name='int32_t' ref-target='building'/>
</static-array>
<static-array name='uniform' count='7' index-enum='uniform_category'>
<stl-vector pointer-type='squad_uniform_spec'/>
</static-array>
<stl-string name="unk_c4"/>
<compound name='flags' type-name='uniform_flags'/>
<stl-vector name='assigned_items'>
<int32_t ref-target='item'/>
</stl-vector>
<int32_t name="quiver" ref-target='item'/>
<int32_t name="backpack" ref-target='item'/>
<int32_t name="flask" ref-target='item'/>
-- May be invalid:
<static-array name='activities' count='3' index-enum='squad_event_type'
type-name='int32_t' ref-target='activity_entry'/>
<static-array name='events' count='3' index-enum='squad_event_type'
type-name='int32_t' ref-target='activity_event'
aux-value='$._global.activities[$._key]'/>
<int32_t name="unk_118"/>
<int32_t name="unk_11c"/>
</struct-type>
<struct-type type-name='squad_schedule_order'>
<pointer name="order" type-name='squad_order'/>
<int32_t name="min_count"/>
<stl-bit-vector name="positions"/>
</struct-type>
<struct-type type-name='squad_schedule_entry'>
<stl-string name='name'/>
<int16_t name='sleep_mode' comment='0 room, 1 barrack will, 2 barrack need'/>
<int16_t name='uniform_mode' comment='0 uniformed, 1 civ clothes'/>
<stl-vector name='orders' pointer-type='squad_schedule_order'/>
<stl-vector name='order_assignments' index-refers-to='$$._global._upglobal.positions[$]'>
-- weird change to pointer to int in v0.34.01
<pointer>
<int32_t refers-to='$$._parent._parent._parent.orders[$]'/>
</pointer>
</stl-vector>
</struct-type>
<struct-type type-name='squad' key-field='id' instance-vector='$global.world.squads.all'>
<int32_t name='id'/>
<compound name='name' type-name='language_name'/>
<stl-string name='alias' comment='if not empty, used instead of name'/>
<code-helper name='describe'>
(describe-obj $.name)
</code-helper>
<stl-vector name='positions' pointer-type='squad_position'/>
<stl-vector name="orders" pointer-type='squad_order'/>
<stl-vector name="schedule">
<pointer>
<static-array count='12' type-name='squad_schedule_entry'/>
</pointer>
</stl-vector>
<int32_t name="cur_alert_idx" refers-to='$$._parent.schedule[$]' init-value='0'/>
<stl-vector name="rooms">
<pointer>
<int32_t name='building_id' ref-target='building'/>
<compound name='mode' type-name='squad_use_flags'/>
</pointer>
</stl-vector>
<stl-vector name="rack_combat" type-name='int32_t' ref-target='building'/>
<stl-vector name="rack_training" type-name='int32_t' ref-target='building'/>
<int32_t name="uniform_priority"/>
<int32_t name="activity" ref-target='activity_entry'/>
<stl-vector name="ammunition" pointer-type='squad_ammo_spec'/>
<stl-vector name="train_weapon_free">
<int32_t ref-target='item'/>
</stl-vector>
<stl-vector name="train_weapon_inuse">
<int32_t ref-target='item'/>
</stl-vector>
<stl-vector name="ammo_items">
<int32_t ref-target='item'/>
</stl-vector>
<stl-vector name="ammo_units">
<int32_t ref-target='unit'/>
</stl-vector>
<int16_t name="carry_food"/>
<int16_t name="carry_water"/>
</struct-type>
<enum-type type-name='squad_order_type'>
<enum-item name='MOVE'/>
<enum-item name='KILL_LIST'/>
<enum-item name='DEFEND_BURROWS'/>
<enum-item name='PATROL_ROUTE'/>
<enum-item name='TRAIN'/>
</enum-type>
<enum-type type-name='squad_order_cannot_reason'>
text in viewscreen_unitlistst
<enum-item name='not_following_order'/>
<enum-item name='activity_cancelled'/>
<enum-item name='no_barracks'/>
<enum-item name='improper_barracks'/>
<enum-item name='no_activity'/>
<enum-item name='cannot_individually_drill'/>
<enum-item name='does_not_exist'/>
<enum-item name='no_archery_target'/>
<enum-item name='improper_building'/>
<enum-item name='unreachable_location'/>
<enum-item name='invalid_location'/>
<enum-item name='no_reachable_valid_target'/>
<enum-item name='no_burrow'/>
<enum-item name='not_in_squad'/>
<enum-item name='no_patrol_route'/>
<enum-item name='no_reachable_point_on_route'/>
</enum-type>
<class-type type-name='squad_order' original-name='squad_orderst'>
<virtual-methods>
<vmethod name='clone'> <ret-type><pointer type-name='squad_order'/></ret-type> </vmethod>
<vmethod name='write_file'> <pointer comment='file_compressorst'/> </vmethod>
<vmethod name='read_file'>
<pointer comment='file_compressorst'/>
<int32_t name='loadversion'/>
</vmethod>
<vmethod ret-type='squad_order_type' name='getType'/>
<vmethod name='isPatrol' ret-type='bool'/> whether or not dwarves get unhappy while doing this
<vmethod is-destructor='true'/>
<vmethod name='offsetPosition'>
<int16_t/> <int16_t/> <int16_t/>
</vmethod>
<vmethod ret-type='bool' name='process'>
<pointer name='soldier' type-name='unit'/>
</vmethod>
<vmethod ret-type='squad_order_cannot_reason' name='reasonCannot'>
<pointer name='soldier' type-name='unit'/>
</vmethod>
<vmethod ret-type='bool' name='decUniformLock'>
<pointer name='soldier' type-name='unit'/>
</vmethod>
<vmethod name='isFulfilled' ret-type='bool' comment='v0.34.11; true if all killed'/>
<vmethod name='getTargetUnits'>
<ret-type><pointer><stl-vector type-name='int32_t'/></pointer></ret-type>
</vmethod>
<vmethod ret-type='int16_t' name='getUniformType'>
<pointer name='soldier' type-name='unit'/>
</vmethod>
<vmethod name='getDescription'> <pointer type-name='stl-string'/> </vmethod>
<vmethod name='isInactive' ret-type='bool' comment='always false'/>
<vmethod name='isCombat' ret-type='bool' comment='not train'/>
</virtual-methods>
</class-type>
<class-type type-name='squad_order_trainst' inherits-from='squad_order'/>
<class-type type-name='squad_order_movest' inherits-from='squad_order'>
<compound name='pos' type-name='coord'/>
<int32_t name='unk'/>
</class-type>
<class-type type-name='squad_order_kill_listst' inherits-from='squad_order'>
<stl-vector name='units'>
<int32_t ref-target='unit'/>
</stl-vector>
<stl-vector name='histfigs'>
<int32_t ref-target='historical_figure'/>
</stl-vector>
<stl-string name='title'/>
</class-type>
</data-definition>
<!--
Local Variables:
indent-tabs-mode: nil
nxml-child-indent: 4
End:
-->