Ive started doing some tinkering to support a SW Homebrew setting with a few of the optional rules from Savage Worlds Deluxe and the savageopedia. Thought I'd post some of what I've done here in case it helps anyone here. I'm including code snippets (not sure if that's allowed, let me know).
First item was to add the option to make Pace based on Strength (3+Strength Dice) rather than the fixed 6". It's a pretty straightforward change which involves adding a flag for the setting and a separate eval() method for Pace. The timing took a little while to get right.
1) Add a separate setting.aug file with a StrPace source:
<source
id="StrPace"
name="Strength Based Pace"
abbrev="Strength Based On Pace"
parent="SetRules"
reportable="yes"
sortorder="37"
description="Pace is based on Strength (Default = 3 plus Strength Dice).">
</source>
2) To the Pace section in things.traits.dat I added the following eval before the existing ones (I increased the index for the other two). This is basically the same way that toughness works except I set the final value rather than adding a bonus:
<!-- Pace based on Strength -->
<eval index="1" phase="Traits" priority="4000" name="Calc Derived Bonus">
<before name="Derived trtFinal"/>
<after name="Calc trtFinal"/><![CDATA[
if (hero.tagis[source.StrPace] <> 0) then
if (hero.tagis[Hero.Creature] = 0) then
~Pace is 3 plus half the character's Strength, but we track attributes at
~the half value (2-6), so we add Strength directly; we get the Strength by using
~the "#trait" macro
~Note: We must also handle an overage beyond d12 on a +1 per 2 full points basis.
~Note: We ADD the amount in case other effects have already applied adjustments.
var paceBonus as number
paceBonus = #trait[attrStr]
if (paceBonus >= 6) then
paceBonus = 6 + round(hero.child[attrStr].field[trtRoll].value / 2,0,-1)
endif
field[trtBonus].value = 3 + paceBonus
endif
endif
]]></eval>
<!-- Pace based on Strength -->
First item was to add the option to make Pace based on Strength (3+Strength Dice) rather than the fixed 6". It's a pretty straightforward change which involves adding a flag for the setting and a separate eval() method for Pace. The timing took a little while to get right.
1) Add a separate setting.aug file with a StrPace source:
<source
id="StrPace"
name="Strength Based Pace"
abbrev="Strength Based On Pace"
parent="SetRules"
reportable="yes"
sortorder="37"
description="Pace is based on Strength (Default = 3 plus Strength Dice).">
</source>
2) To the Pace section in things.traits.dat I added the following eval before the existing ones (I increased the index for the other two). This is basically the same way that toughness works except I set the final value rather than adding a bonus:
<!-- Pace based on Strength -->
<eval index="1" phase="Traits" priority="4000" name="Calc Derived Bonus">
<before name="Derived trtFinal"/>
<after name="Calc trtFinal"/><![CDATA[
if (hero.tagis[source.StrPace] <> 0) then
if (hero.tagis[Hero.Creature] = 0) then
~Pace is 3 plus half the character's Strength, but we track attributes at
~the half value (2-6), so we add Strength directly; we get the Strength by using
~the "#trait" macro
~Note: We must also handle an overage beyond d12 on a +1 per 2 full points basis.
~Note: We ADD the amount in case other effects have already applied adjustments.
var paceBonus as number
paceBonus = #trait[attrStr]
if (paceBonus >= 6) then
paceBonus = 6 + round(hero.child[attrStr].field[trtRoll].value / 2,0,-1)
endif
field[trtBonus].value = 3 + paceBonus
endif
endif
]]></eval>
<!-- Pace based on Strength -->
Last edited: