-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefinition.def
358 lines (302 loc) · 11.5 KB
/
definition.def
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
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- This is the definition file that provides the basis for everything else. All of
the Skeleton data files contain examples of the most common behaviors you'll
need and can be readily adapted to the game system you want to support. You'll
find inline comments throughout all of the Skeleton data files that describe
what is being done, as well as external documentation that outlines how
everything is structured and how all the pieces fit together. A detailed
example is also provided that outlines how to adapt these Skeleton data files
for use with the Savage Worlds game system.
-->
<document signature="Hero Lab Definition">
<!-- The "game" element is where you'll define the basics for the game system.
-->
<game
game="Genesys"
publisher="TBD"
website="http://www.domain.com/"
copyright="TBD"
legaloutput="TBD">
</game>
<!-- The "author" element is where you'll provide details about yourself as the
author of the data files.
-->
<author
author="TBD"
email="[email protected]"
website="www.domain.com">
</author>
<!-- The "release" element specifies the details for each new revision of the data
files that you make available to others. This makes it easy to track the
version of the data files in which problems occur and ensures that other
users can verify that they update to new versions when you publish them.
-->
<release
major="0"
minor="1"
required="6.0"
summary="HLExport will use this text automatically"><![CDATA[{b}{text clrglow}Skeleton data files for Hero Lab{text clrreset}{/b}
These data files provide a starting framework for implementing support for any game system of your choice. Adapt these data files as necessary. A detailed example is provided for adapting these files to the Savage Worlds game system.
]]>
</release>
<!-- The "structure" element defines special structural details about the data files
and how Hero Lab should manage them.
-->
<structure
folder="starwars_ffg">
</structure>
<!-- The "behavior" element specifies assorted behavioral aspects of the data files
that reflect the nuances of both the game system and the data files your create.
-->
<behavior>
<!-- Configure how the integrated dice roller should behave for this game system. -->
<diceroller mode="totals" dietype="6" quantity="1"/>
<!-- Define how each lead is displayed to the user when importing from a portfolio. -->
<leadsummary><![CDATA[
~start with the race
var txt as string
txt = hero.findchild[Archetype].field[name].text
if (empty(txt) <> 0) then
txt = "No Archetype"
endif
@text &= txt
~append the XP rating of the character
@text &= " - XP: " & hero.child[resXP].field[resMax].text
]]></leadsummary>
<!-- Handle the start of a new combat -->
<newcombat><![CDATA[
~reset the abandon state in case it's still set from the previous combat
herofield[acAbandon].value = 0
]]></newcombat>
<!-- Define how the initiative is auto-calculated by the Tactical Console. -->
<initiative><![CDATA[
~calculate the primary initiative rating
@initiative = random(10) + 1
~calculate the tiebreaker initiative rating
@tiebreaker = 0
]]></initiative>
</behavior>
<!-- Define an assortment of macros that will make writing scripts faster and easier. -->
<scriptmacro
name="attrscore"
param1="attribute"
result="hero.child[#attribute].field[trtFinal].value"/>
<scriptmacro
name="attrmin"
param1="attribute"
result="hero.child[#attribute].field[trtMinimum].value"/>
<scriptmacro
name="trait"
param1="trait"
result="hero.child[#trait].field[trtFinal].value"/>
<scriptmacro
name="traitmin"
param1="trait"
result="hero.child[#trait].field[trtMinimum].value"/>
<scriptmacro
name="traitfound"
param1="trait"
result="hero.childfound[#trait].field[trtFinal].value"/>
<scriptmacro
name="traitbonus"
param1="trait"
result="hero.child[#trait].field[trtBonus].value"/>
<scriptmacro
name="traitinplay"
param1="trait"
result="hero.child[#trait].field[trtInPlay].value"/>
<scriptmacro
name="traituser"
param1="trait"
result="hero.child[#trait].field[trtUser].value"/>
<scriptmacro
name="childname"
param1="child"
result="hero.childfound[#child].field[name].text"/>
<scriptmacro
name="resmax"
param1="resource"
result="hero.child[#resource].field[resMax].value"/>
<scriptmacro
name="resspent"
param1="resource"
result="hero.child[#resource].field[resSpent].value"/>
<scriptmacro
name="resleft"
param1="resource"
result="hero.child[#resource].field[resLeft].value"/>
<scriptmacro
name="resextra"
param1="resource"
result="hero.child[#resource].field[resExtra].value"/>
<scriptmacro
name="ressummary"
param1="resource"
result="hero.child[#resource].field[resSummary].text"/>
<scriptmacro
name="resshort"
param1="resource"
result="hero.child[#resource].field[resShort].text"/>
<scriptmacro
name="trkmax"
param1="tracker"
result="hero.child[#tracker].field[trkMax].value"/>
<scriptmacro
name="issplitmelee"
result="hero.tagis[SettingRule.SplitMelee]"/>
<scriptmacro
name="issplitranged"
result="hero.tagis[SettingRule.SplitRanged]"/>
<scriptmacro
name="isusemagic"
result="hero.tagis[SettingRule.UseMagic]"/>
<scriptmacro
name="silhouette"
result="herofield[acSil].value"/>
<scriptmacro
name="meleedefense"
result="hero.child[trDefenseMel].field[trtFinal].value"/>
<scriptmacro
name="meleedefensebonus"
result="hero.child[trDefenseMel].field[trtBonus].value"/>
<scriptmacro
name="rangeddefense"
result="hero.child[trDefenseRng].field[trtFinal].value"/>
<scriptmacro
name="rangeddefensebonus"
result="hero.child[trDefenseRng].field[trtBonus].value"/>
<scriptmacro
name="archetypename"
param1="archetype"
result="hero.childfound[#archetype].field[name].text"/>
<scriptmacro
name="hasarchetype"
result="hero.tagis[Archetype.?]"/>
<scriptmacro
name="makecareerskill"
param1="skill"
result="perform hero.childfound[#skill].assign[SkillType.CareerSkill]"/>
<scriptmacro
name="addedadvantage"
param1="skill"
result="hero.childfound[#skill].field[sklAddedAdvantage].value"/>
<scriptmacro
name="removedadvantage"
param1="skill"
result="hero.childfound[#skill].field[sklRemovedAdvantage].value"/>
<scriptmacro
name="addedboost"
param1="skill"
result="hero.childfound[#skill].field[sklAddedBoost].value"/>
<scriptmacro
name="removedadboost"
param1="skill"
result="hero.childfound[#skill].field[sklRemovedBoost].value"/>
<scriptmacro
name="addedsetback"
param1="skill"
result="hero.childfound[#skill].field[sklAddedSetback].value"/>
<scriptmacro
name="removedsetback"
param1="skill"
result="hero.childfound[#skill].field[sklRemovedSetback].value"/>
<scriptmacro
name="addedsuccess"
param1="skill"
result="hero.childfound[#skill].field[sklAddedSuccess].value"/>
<scriptmacro
name="removedsuccess"
param1="skill"
result="hero.childfound[#skill].field[sklRemovedSuccess].value"/>
<!-- Decoration character used in summary panel headertitle scripts -->
<scriptmacro
name="summtitle_decoration" result="chr(150)"/>
<!-- The "advancement" element controls whether serialized advancement logic is enabled
and how the advancement mechanisms should behave for the game system.
-->
<advancement
enable="yes">
<!-- Verify that the character can be transitioned to advancement mode -->
<canadvance><![CDATA[
var bullet as string
bullet = "{bmp bullet_red}{horz 4}"
@message = ""
~perform tests to assure all starting resources have been assigned
if (#resleft[resXP] <> 0) then
@message &= bullet & "Character points must be assigned for the character.{br}"
endif
if (#resleft[resAbility] <> 0) then
@message &= bullet & "Ability slots must be assigned for the character.{br}"
endif
]]></canadvance>
<!-- Handle the transition to/from advancement mode -->
<transition><![CDATA[
if (state.iscreate <> 0) then
@message = "{b}{text clrprompt}Creation Phase{text clrreset}{/b}"
@message &= "{br}{br}"
@message &= "{align left}You have unlocked your character, thereby exiting the Character Advancement phase and moving back to the Character Creation phase. "
@message &= "{br}{br}"
@message &= "While unlocked, traits defined during character creation can be adjusted, as long as those traits have not yet been altered on the Advances tab. "
@message &= "Traits that already have advancements applied to them will remain locked unless those advancements are deleted. "
@message &= "{br}{br}"
@message &= "Lock your character and remove any advancements on a trait if you wish to revise the rating that trait was given during character creation. "
else
@message = "{b}{text clrprompt}Advancement Phase{text clrreset}{/b}"
@message &= "{br}{br}"
@message &= "{align left}You have locked your character creation traits. "
@message &= "{br}{br}"
@message &= "By locking your character creation traits, you have begun the Character Advancement phase of play. "
@message &= "While locked, you cannot alter traits defined during character creation. "
@message &= "Use the Advances tab while the character is locked to allocate advances to new abilities or to increase existing traits. "
@message &= "{br}{br}"
@message &= "Unlock the character to go back to the Character Creation phase. "
endif
]]></transition>
</advancement>
<!-- The "phase" elements define the various evaluation stages that all processing of
scripts will be channeled through. Each phase identifies a stage, with the list
of phases being processed in the order specified below. Within each phase, the
priority value assigned controls the processing order.
-->
<phase
id="Initialize"
name="Initialization"
description="Anything that has to happen before everything else">
</phase>
<phase
id="Setup"
name="Setup"
description="Anything that has to be processed before normal processing gets underway">
</phase>
<phase
id="Effects"
name="Effects"
description="Apply derived effects that influence equipment modifiers and the like">
</phase>
<phase
id="PreTraits"
name="Pre-Traits"
description="Adjustments to traits before they are finalized">
</phase>
<!-- NOTE! All Health calculations are assumed to occur within the 5000-5999 priority range during this phase. -->
<phase
id="Traits"
name="Traits"
description="Finalization of trait values">
</phase>
<phase
id="Final"
name="Final"
description="Any last-minute processing that must happen after everything else">
</phase>
<phase
id="Validate"
name="Validation"
description="Validation tests that occur after all evaluation processing">
</phase>
<phase
id="Render"
name="Render"
description="Any processing that simply renders values for use by the UI or processes last-minute validation - no calculations">
</phase>
</document>