Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game

Notices

Reply
 
Thread Tools Display Modes
2goth4U
Junior Member
 
Join Date: Mar 2012
Location: Vancouver BC
Posts: 6

Old March 2nd, 2012, 09:41 AM
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>

Last edited by 2goth4U; March 5th, 2012 at 12:26 PM.
2goth4U is offline   #1 Reply With Quote
Aaron
Senior Member
Lone Wolf Staff
 
Join Date: Oct 2011
Posts: 6,776

Old March 2nd, 2012, 10: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
Aaron is offline   #2 Reply With Quote
2goth4U
Junior Member
 
Join Date: Mar 2012
Location: Vancouver BC
Posts: 6

Old March 5th, 2012, 11: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?
2goth4U is offline   #3 Reply With Quote
Aaron
Senior Member
Lone Wolf Staff
 
Join Date: Oct 2011
Posts: 6,776

Old March 5th, 2012, 05: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.
Aaron is offline   #4 Reply With Quote
2goth4U
Junior Member
 
Join Date: Mar 2012
Location: Vancouver BC
Posts: 6

Old March 6th, 2012, 06: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.

Last edited by 2goth4U; March 6th, 2012 at 07:04 AM.
2goth4U is offline   #5 Reply With Quote
Aaron
Senior Member
Lone Wolf Staff
 
Join Date: Oct 2011
Posts: 6,776

Old March 6th, 2012, 12:53 PM
Then to my knowledge you can get the maximum of variables, but not other arguments.
Aaron is offline   #6 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,701

Old March 6th, 2012, 01:05 PM
You may wish to check out the wiki and THIS link that shows some of HL's built in functions.

Hero Lab Resources:
Pathfinder - d20pfsrd and Pathfinder Pack Setup
3.5 D&D (d20) - Community Server Setup
5E D&D - Community Server Setup
Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources.
Created by the community for the community
- Realm Works kickstarter backer (Alpha Wolf) and Beta tester.
- d20 HL package volunteer editor.
ShadowChemosh is offline   #7 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 12,627

Old March 6th, 2012, 01: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.
Mathias is offline   #8 Reply With Quote
2goth4U
Junior Member
 
Join Date: Mar 2012
Location: Vancouver BC
Posts: 6

Old March 7th, 2012, 09: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

Last edited by 2goth4U; March 8th, 2012 at 03:34 PM.
2goth4U is offline   #9 Reply With Quote
BloodAngel099
Member
 
Join Date: Apr 2014
Posts: 90

Old June 1st, 2014, 12:01 PM
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
BloodAngel099 is offline   #10 Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 04:53 PM.


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