Junior Member
Join Date: Apr 2009
Location: Eindhoven, The Netherlands
Posts: 11
|
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 --> Last edited by technorat; May 12th, 2012 at 12:13 AM. |
#1 |
Senior Member
Volunteer Data File Contributor
Join Date: Aug 2009
Posts: 1,550
|
When you say "3+StrDie" do you mean Str+4, Str+6. Str+8, etc.. ?
Or do you mean "3+(StrDie/2)", like the other Derived Traits? |
#2 |
Junior Member
Join Date: Apr 2009
Location: Eindhoven, The Netherlands
Posts: 11
|
Sorry for not explaining that well. It's actually half the maximum dice amount. So an average person with Strength=d6 will have Pace=6 (3 + 6/2). It's one of the optional rules from the savageopedia.
|
#3 |
Junior Member
Join Date: Apr 2009
Location: Eindhoven, The Netherlands
Posts: 11
|
One issue with changing the things_traits.dat file is that it's one of the base files for Savage Worlds. If you just want to add this for a setting you can put it in a .user file for your settiing as a mechanic and change it slightly:
<thing id="mechPace" name="Modified Pace" compset="Mechanics"> <usesource source="mySetting"/> <eval index="2" phase="Traits" priority="4000"><![CDATA[ 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 hero.child[trPace].field[trtBonus].value = 3 + paceBonus endif]]></eval> </thing> |
#4 |
Senior Member
Volunteer Data File Contributor
Join Date: Aug 2009
Posts: 1,550
|
I agree, editing the base files is something that should be avoided. User files are wonderful things.
|
#5 |
|
|