-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththing_miscellaneous.dat
320 lines (266 loc) · 8.88 KB
/
thing_miscellaneous.dat
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
<?xml version="1.0" encoding="UTF-8"?>
<!-- This file contains the assortment of miscellaneous things that are required for
the game system. Miscellaneous things include the mechanisms for managing applied
damage, user images, and personal info for each actor. It also includes things
used to track resource pools, such as those used for managing the available
attribute points, skill points, etc.
-->
<document signature="Hero Lab Data">
<!-- Damage transaction handler for use when applying damage on the In-Play tab -->
<thing
id="mscDamage"
name="Damage"
compset="Damage">
<!-- Automatically add the damage transaction to every actor -->
<tag group="Helper" tag="Bootstrap"/>
</thing>
<!-- Personal information details used on the Personal tab -->
<thing
id="mscPerson"
name="Personal"
compset="Personal">
</thing>
<!-- Basic user-added image that is managed through the gallery on Personal tab -->
<thing
id="mscUserImg"
name="User Image"
compset="UserImage">
</thing>
<!-- Character point resource to track the pool of character points being spent -->
<thing
id="resAttribute"
name="Attribute Points"
compset="Resource">
<!-- Automatically add the resource to every actor -->
<tag group="Helper" tag="Bootstrap"/>
<!-- Use the starting character points as our initial maximum -->
<eval index="1" phase="Setup" priority="1000"><![CDATA[
~if (#iscreature[] = 0) then
field[resMax].value = herofield[acStartAttr].value
~else
~ field[resMax].value = 7
~endif
]]></eval>
</thing>
<thing
id="resSkill"
name="Skill Points"
compset="Resource">
<!-- Automatically add the resource to every actor -->
<tag group="Helper" tag="Bootstrap"/>
<!-- Use the starting character points as our initial maximum -->
<eval index="1" phase="Setup" priority="1000"><![CDATA[
field[resMax].value = 9
]]></eval>
</thing>
<!-- Character point resource to track the pool of character points being spent -->
<thing
id="resCP"
name="Character Points"
compset="Resource">
<!-- Automatically add the resource to every actor -->
<tag group="Helper" tag="Bootstrap"/>
<!-- Use the starting character points as our initial maximum -->
<eval index="1" phase="Setup" priority="1000"><![CDATA[
field[resMax].value = herofield[acStartCP].value
]]></eval>
</thing>
<!-- Ability slot resource to track the pool of ability slots being spent -->
<thing
id="resAbility"
name="Ability Slots"
compset="Resource">
<fieldval field="resObject" value="Ability"/>
<!-- Automatically add the resource to every actor -->
<tag group="Helper" tag="Bootstrap"/>
<!-- Use the starting ability slots as our initial maximum -->
<eval index="1" phase="Setup" priority="1000"><![CDATA[
field[resMax].value = herofield[acStartAbi].value
]]></eval>
</thing>
<thing
id="resPerks"
name="Perk Slots"
compset="Resource">
<fieldval field="resObject" value="Perk"/>
<!-- Automatically add the resource to every actor -->
<tag group="Helper" tag="Bootstrap"/>
<!-- Use the starting ability slots as our initial maximum -->
<eval index="1" phase="Setup" priority="1000"><![CDATA[
field[resMax].value = herofield[acStartPerks].value
]]></eval>
</thing>
<!-- Experience points resource to track the pool of XP accrued and spent -->
<thing
id="resXP"
name="Experience Points"
compset="Resource">
<!-- Automatically add the resource to every actor -->
<tag group="Helper" tag="Bootstrap"/>
<!-- Do NOT require this resource to be fully utilized -->
<tag group="Helper" tag="NoMinimum"/>
<!-- Use the starting XP plus the accrued XP as our maximum -->
<eval index="1" phase="Setup" priority="1000" name="Calc XP Max"><![CDATA[
field[resMax].value = herofield[acStartXP].value + hero.usagepool[TotalXP].value
]]></eval>
<!-- If the trait is at its minimum/maximum, assign a tag to preclude further advancements -->
<eval index="2" phase="Setup" priority="1001" name="Calc Level"><![CDATA[
~base our test on the adjusted curMax value, sans any in-play adjustments
var curMax as number
var curLevel as number
var lvlDiff as number
curLevel = herofield[acLevel].value
call CalcLevel
herofield[acLevel].value = curMax
]]></eval>
</thing>
<!-- Advance resource to track the number of advances accrued/spent -->
<thing
id="resAdvance"
name="Advances"
compset="Resource"
panellink="advances">
<fieldval field="resObject" value="Advance"/>
<!-- Automatically add the resource to every actor -->
<tag group="Helper" tag="Bootstrap"/>
<!-- Base our maximum on the accrued XP -->
<eval index="1" phase="Setup" priority="2000">
<after name="Calc XP Max"/><![CDATA[
field[resMax].value = round(#resmax[resXP] / 20,0,-1)
]]></eval>
</thing>
<!-- Power points tracker so the user can manage the expenditure of power points -->
<thing
id="trkPower"
name="Power Points"
compset="Tracker">
<!-- Automatically add the tracker to every actor -->
<tag group="Helper" tag="Bootstrap"/>
<!-- Resetting the tracker sets the value to the maximum -->
<tag group="Helper" tag="ResetMax"/>
<!-- Use the starting power points as our initial maximum -->
<eval index="1" phase="Final" priority="1000"><![CDATA[
field[trkMin].value = 0
field[trkMax].value = #trait[trPowerPts]
]]></eval>
</thing>
<!-- Types of characters you might want to build -->
<thing
id="typHero"
name="Type: Hero (PC)"
compset="CharType">
<tag group="explicit" tag="1"/>
<tag group="HeroType" tag="PC"/>
</thing>
<thing
id="typNPC"
name="Type: Non-Player Character"
compset="CharType">
<tag group="explicit" tag="3"/>
<tag group="HeroType" tag="NPC"/>
</thing>
<thing
id="typCreature"
name="Type: Creature"
compset="CharType">
<tag group="explicit" tag="2"/>
<tag group="HeroType" tag="Creature"/>
</thing>
<!-- NPC Info to display on the NPC info tab - the final "Additional
Information" pick can be added multiple times and customised by the user. -->
<thing
id="npcDesc"
name="Description"
compset="NPCInfo"
uniqueness="unique">
<tag group="explicit" tag="5"/>
</thing>
<thing
id="npcGoals"
name="Motivations & Goals"
compset="NPCInfo"
uniqueness="unique">
<tag group="explicit" tag="10"/>
</thing>
<thing
id="npcSchemes"
name="Schemes, Plots & Adventure Hooks"
compset="NPCInfo"
uniqueness="unique">
<tag group="explicit" tag="15"/>
</thing>
<thing
id="npcTacBef"
name="Tactics - Before Combat"
compset="NPCInfo"
uniqueness="unique">
<tag group="explicit" tag="20"/>
</thing>
<thing
id="npcTacDur"
name="Tactics - During Combat"
compset="NPCInfo"
uniqueness="unique">
<tag group="explicit" tag="25"/>
</thing>
<thing
id="npcMorale"
name="Tactics - Morale"
compset="NPCInfo"
uniqueness="unique">
<tag group="explicit" tag="30"/>
</thing>
<thing
id="npcEnviron"
name="Ecology - Environment"
compset="NPCInfo"
uniqueness="unique">
<tag group="explicit" tag="35"/>
</thing>
<thing
id="npcOrganiz"
name="Ecology - Organization"
compset="NPCInfo"
uniqueness="unique">
<tag group="explicit" tag="40"/>
</thing>
<thing
id="npcTreas"
name="Ecology - Treasure"
compset="NPCInfo"
uniqueness="unique">
<tag group="explicit" tag="45"/>
</thing>
<thing
id="npcOther"
name="Additional Information"
compset="NPCInfo">
<tag group="Helper" tag="CustomItem"/>
<tag group="explicit" tag="50"/>
</thing>
<thing
id="ItemModHelper"
name="Item Mod helper fields"
compset="ItemModHelper">
<fieldval field="imhExpr" value="component.ItemMod"/>
<tag group="ItemMod" tag="ItemModHelper"/>
<eval index="1" phase="Effects" priority="2100"><![CDATA[
var expr as string
var skill as string
expr = parent.tagids[ItemModCatAllowed.?,"|"]
expr = replace(expr,"ItemModCatAllowed.","ItemModCat.",0)
~ notify "Mod Cats Allowed: " & expr
~if (parent.tagis[component.WeaponBase] <> 0) then
~ skill = parent.tagids[WeaponSkill.?,"|"]
~ skill = replace(skill,"WeaponSkill.sk","ItemModCat.",0)
~ expr = splice(expr,"ItemModCat.Weapon","|")
~ expr = splice(expr,skill,"|")
~ endif
field[imhExpr].text = expr
]]></eval>
<eval index="2" phase="Final" priority="5000"><![CDATA[
~field[imhMaxHP].value = parent.field[grHardpoints].value
~field[imhUsedHP].value = parent.field[grHardpointsUsed].value
]]></eval>
</thing>
</document>