Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Pathfinder Roleplaying Game (http://forums.wolflair.com/forumdisplay.php?f=62)
-   -   Alternate Damage Bonus for TwoHand/OffHand (http://forums.wolflair.com/showthread.php?t=19915)

2goth4U March 2nd, 2012 08:41 AM

Alternate Damage Bonus for TwoHand/OffHand
 
is it possible to mod the calculation used for TwoHand/OffHand Damage Bonus?
Either through the Editor or by requesting an option in the options?

It seems logical to me that your off hand is half as strong as your primary hand and that two hands are stronger than one hand.

but Pathfinder only does this for positive strength bonuses (and really only for +2 or better)

the values should change for all strength mods

eg.
HTML Code:

<table>
<th><td>Strength</td><td>Off Handed</td><td>One Handed</td>Two Handed</td></th>
<tr><td>3-4</td><td>-6</td><td>-4</td><td>-2</td></tr>
<tr><td>4-5</td><td>-4</td><td>-3</td><td>-1</td></tr>
<tr><td>6-7</td><td>-3</td><td>-2</td><td>-1</td></tr>
<tr><td>8-9</td><td>-2</td><td>-1</td><td>+0</td></tr>
<tr><td>10-11</td><td>-1</td><td>+0</td><td>+1</td></tr>
<tr><td>12-13</td><td>+0</td><td>+1</td><td>+2</td></tr>
<tr><td>14-15</td><td>+1</td><td>+2</td><td>+3</td></tr>
<tr><td>16-17</td><td>+1</td><td>+3</td><td>+4</td></tr>
<tr><td>18-19</td><td>+2</td><td>+4</td><td>+6</td></tr>
<tr><td>20-21</td><td>+2</td><td>+5</td><td>+7</td></tr>
<tr><td>22-23</td><td>+3</td><td>+6</td><td>+9</td></tr>
</table>


Aaron March 2nd, 2012 09:39 PM

It is possible to do through the editor but I don't think this is something worthwhile enough to include in the core program, so I can guide you roughly how to do it yourself... You'd have to do a foreach to cycle through the weapons on the hero, negate the strength bonus for a weapon, and then add in your own values. Here is an example eval script I was doing to replace STR with CHA.

PostAttr 10000
~ DEFINE YOUR VALUES FOR DIFFERENT STR SCORES HERE
var my2H as number
var my1H as number
var myOff as number

if (hero.child[aSTR].field[aFinalVal].value >= 60) then
my2H = WHATEVER1
my1H = WHATEVER2
myOff = WHATEVER3
elseif (hero.child[aSTR].field[aFinalVal].value >= 58) then
BLAHBLAH SO ON AND SO FORTH
endif

~ REPLACE THE BELOW REFERENCES TO aCHA's ATTRIBUTE MODIFIER WITH YOUR OWN VALUES AS APPROPRIATE

~ Then search through all the weapons, adjust our damage from STR to mySTR
foreach pick in hero from BaseWep

~ Now we have to modify the damage
var strmod as number
var chamod as number

~ First negate the Str. If it is wielded 2 handed, if gets 1.5x Str,
~ unless it is light, or the Str mod is negative.
if (eachpick.tagis[Hero.MainHand] + eachpick.tagis[Hero.OffHand] = 2) then
if (eachpick.tagis[wClass.Light] <> 0) then
strmod = #attrmod[aSTR]
elseif (#attrmod[aSTR] < 0) then
strmod = #attrmod[aSTR]
else
strmod = #attrmod[aSTR] * 1.5
endif

if (eachpick.tagis[wClass.Light] <> 0) then
chamod = #attrmod[aCHA]
elseif (#attrmod[aCHA] < 0) then
chamod = #attrmod[aCHA]
else
chamod = #attrmod[aCHA] * 1.5
endif

~ If is is in the main hand, we get just the Str mod
elseif (eachpick.tagis[Hero.MainHand] = 1) then
strmod = #attrmod[aSTR]
chamod = #attrmod[aCHA]

~ If it is in the off hand, we get .5 Str unless the hero has the
~ Double Slice tag or the weapon has the Helper.NoHalfStr tag
elseif (eachpick.tagis[Hero.OffHand] = 1) then
if (hero.tagis[Hero.DblSlice] + eachpick.tagis[Helper.NoHalfStr] <> 0) then
strmod = #attrmod[aSTR]
chamod = #attrmod[aCHA]
else
if (#attrmod[aSTR] < 0) then
strmod = #attrmod[aSTR]
else
strmod = #attrmod[aSTR] * .5
endif

if (#attrmod[aCHA] < 0) then
chamod = #attrmod[aCHA]
else
chamod = #attrmod[aCHA] * .5
endif
endif
~ If it is not equipped at all, check if it is a 2 handed weapon, if
~ so treat is as being wielded 2 handed. Otherwise treat it as in 1
~ hand.
else
if (eachpick.tagis[wClass.TwoHanded] <> 0) then
if (#attrmod[aSTR] < 0) then
strmod = #attrmod[aSTR]
else
strmod = #attrmod[aSTR] * 1.5
endif

if (#attrmod[aCHA] < 0) then
strmod = #attrmod[aCHA]
else
strmod = #attrmod[aCHA] * 1.5
endif
else
strmod = #attrmod[aSTR]
chamod = #attrmod[aCHA]
endif
endif

eachpick.field[wDamBonus].value -= strmod
eachpick.field[wDamBonus].value += chamod
nexteach

2goth4U March 5th, 2012 10:41 AM

1) where would I put this script? in a mechanic?
2) does the scripting language have an absolute value function/macro
3) does it have a function/macro to determine the maximum value of two arguments?

Aaron March 5th, 2012 04:28 PM

1) If you want it to be present on all heroes you could create it as a mechanic, or if you want to only have it apply to some heroes you can add the script to an adjustment and apply that adjustment to whichever characters.

2) I don't think so, but you could easily convert something to its absolute value by checking if it is below 0, and multiplying by -1 if that is so.

3) I'm still pretty new to the programming, so I am not up on all the lingo. What do you mean by arguments?

If you mean 2 variables, yes. For example if you have val1 and val2 as your variables, maximum(val1, val2) will give you the higher value of the two variables.

2goth4U March 6th, 2012 05:59 AM

variable is a subset of argument

function (arg1, arg2, arg3)

the three arguments arg1, arg2 and arg3 could be variables, but they could also be pointers to objects (which means you can pass an object as an argument). They could also be literals.

Aaron March 6th, 2012 11:53 AM

Then to my knowledge you can get the maximum of variables, but not other arguments.

ShadowChemosh March 6th, 2012 12:05 PM

You may wish to check out the wiki and THIS link that shows some of HL's built in functions.

Mathias March 6th, 2012 12:22 PM

maximum() in HL does work on any numerical argument - you don't have to place the arguments into variables before using maximum.

maximum(#attrmod[aSTR],-#attrmod[aSTR]) should give you the absolute value of the strength modifier.

2goth4U March 7th, 2012 08:15 AM

I believe this will do what I want.



~ search through all the weapons, adjust our damage from STR to mySTR
foreach pick in hero from BaseWep

~ Now we have to modify the damage
var strmod as number
var myDmgAdj as number

~ First negate the Str. If it is wielded 2 handed, if gets 1.5x Str,
~ unless it is light, or the Str mod is negative.
if (eachpick.tagis[Hero.MainHand] + eachpick.tagis[Hero.OffHand] = 2) then
if (eachpick.tagis[wClass.Light] <> 0) then
strmod = #attrmod[aSTR]
myDmgAdj= #attrmod[aSTR]
elseif (#attrmod[aSTR] < 1) then
strmod = #attrmod[aSTR]
myDmgAdj= #attrmod[aSTR] + maximum(1, round(#attrmod[aSTR]/-2,0,0))
else
strmod = round(#attrmod[aSTR] * 1.5,0,-1)
myDmgAdj= #attrmod[aSTR] + maximum(1, round(#attrmod[aSTR]/2,0,-1))
endif



~ If is is in the main hand, we get just the Str mod
elseif (eachpick.tagis[Hero.MainHand] = 1) then
strmod = #attrmod[aSTR]
myDmgAdj = #attrmod[aSTR]

~ If it is in the off hand, we get .5 Str unless the hero has the
~ Double Slice tag or the weapon has the Helper.NoHalfStr tag
elseif (eachpick.tagis[Hero.OffHand] = 1) then
if (hero.tagis[Hero.DblSlice] + eachpick.tagis[Helper.NoHalfStr] <> 0) then
strmod = #attrmod[aSTR]
myDmgAdj = #attrmod[aSTR]
else
if (#attrmod[aSTR] < 1) then
strmod = #attrmod[aSTR]
myDmgAdj= #attrmod[aSTR] - maximum(1, round(#attrmod[aSTR]/-2,0,-1))
else
strmod = round(#attrmod[aSTR] * .5,0,-1)
myDmgAdj= #attrmod[aSTR] - maximum(1, round(#attrmod[aSTR]/2,0,0))
endif


endif
~ If it is not equipped at all, check if it is a 2 handed weapon, if
~ so treat is as being wielded 2 handed. Otherwise treat it as in 1
~ hand.
else
if (eachpick.tagis[wClass.TwoHanded] <> 0) then
if (#attrmod[aSTR] < 1) then
strmod = #attrmod[aSTR]
myDmgAdj= #attrmod[aSTR] + maximum(1, round(#attrmod[aSTR]/-2,0,0))
else
strmod = round(#attrmod[aSTR] * 1.5,0,-1)
myDmgAdj= #attrmod[aSTR] + maximum(1, round(#attrmod[aSTR]/2,0,-1))
endif

else
strmod = #attrmod[aSTR]
myDmgAdj = #attrmod[aSTR]
endif
endif

eachpick.field[wDamBonus].value -= strmod
eachpick.field[wDamBonus].value += myDmgAdj
nexteach

BloodAngel099 June 1st, 2014 11:01 AM

Double Strength
 
So I know I am pulling a necro on this thread but its the closest thing I have found to what I want to do. What would I have to do to just double strength when ever I two hand a weapon instead of the normal x1.5? Its a house rule that we use and I cant seem to figure out what to put into hero lab


All times are GMT -8. The time now is 02:09 PM.

Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.