Member
Join Date: Apr 2014
Posts: 90
|
We run with a house rule that you use full strength on off-hand/secondary attacks and double strength on two-handed. I got help from here before for adding full strength to off-hand and double on two-handed, can someone tell me what I need to get full strength on secondary attacks? Thanks!
Pre-levels 5000 ~ If we're disabled, do nothing doneif (tagis[Helper.FtDisable] <> 0) perform hero.assign[Hero.DblSlice] Post-attributes 10000 var bonus as number ~ Calculate the extra .5 of the strength modifier. This added to the ~ normal 1.5 bonus will give us 2x Str bonus. bonus += round(#attrmod[aSTR]/2,0,1) ~ This will only affect two-handed melee weapons foreach pick in hero from BaseWep where "wClass.TwoHanded & wCategory.Melee" ~ Give a unnamed bonus to Damage Melee eachpick.field[dmmBonus].value += bonus nexteach Post-attributes 10000 var bonus as number ~ Calculate the extra .5 of the strength modifier. This added to the ~ normal 1.5 bonus will give us 2x Str bonus. bonus += round(#attrmod[aSTR]/2,0,1) ~ One handed weapons wielded in two-hands don't get the above ~ damage bonus. So we have to loop through all the active weapons ~ and give the bonus individually. ~ Loop through only the melee weapons foreach pick in hero from BaseWep where "wCategory.Melee" ~we are a one handed weapon equipped in two hands If (eachpick.tagis[wClass.OneHanded] + eachpick.field[gIsEquip].value + eachpick.field[wIs2nd].value = 3) Then ~ Give a bonus eachpick.field[wDamBonus].value += bonus Endif nexteach |
#1 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
I assume when you say secondary attacks you mean "Secondary Natural Attacks". That is what the below script assumes. I have combined your multiple scripts into one foreach loop because foreach loops are very CPU intensive to run.
This a full replacement for both scripts running at Post-attributes 10000 Code:
var bonus as number ~ Calculate the extra .5 of the strength modifier. bonus += round(#attrmod[aSTR]/2,0,1) ~ Loop through all weapons on the character foreach pick in hero from BaseWep ~ We are a two-handed melee weapon if (eachpick.tagexpr[wClass.TwoHanded & wCategory.Melee] <> 0) then ~ Add to the normal 1.5 bonus will give us 2x Str bonus eachpick.field[dmmBonus].value += bonus ~..We are a one handed melee weapon equipped in two hands elseif (eachpick.tagexpr[wCategory.Melee & wClass.OneHanded & fieldval:gIsEquip = 1 & fieldval:wIs2nd = 1] <> 0) Then ~ Add to the 1.5 bonus to give us a 2x Str bonus eachpick.field[wDamBonus].value += bonus ~..We are a secondary natural attack elseif (eachpick.tagexpr[wFtrGroup.Natural & Helper.NatOverSec] <> 0) Then ~ Tell the weapon to not be half str damage perform eachpick.assign[Helper.NoHalfStr] endif nexteach The above script just adds back the .5 to the secondary natural attacks. NOTE: I wrote this without access to HL so tweaking maybe needed. 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. Last edited by ShadowChemosh; May 27th, 2017 at 02:30 PM. |
#2 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Isn't this house rule effectively the same as saying "everyone gets the effects of the double slice feat"? The script on Double Slice is a lot simpler.
|
#3 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Quote:
1) Manufactured off-hand attacks are at full Str. This is easy to do with applying Hero.DblSlice tag to the hero. 2) Manufactured Two-handed weapons (and 1H weapons in 2 hands) get 2x Str not 1.5x Str. 3) Secondary Natural Attacks which normally are at .5 Str need to be 1x Str. Based on the question and that Hero.DblSlice is already in use I assume Hero.DblSlice does not affect Natural Attacks. If a tag exists for situation #2 & #3 to remove the foreach loop great but I couldn't find any in my notes.... 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. |
|
#4 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Okay, from what I read in the original post, #2 and #3 were done, and this script was only trying to implement #1
|
#5 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Quote:
Guess we will know for sure once BloodAngel099 replies. 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. |
|
#6 |
Senior Member
Join Date: Aug 2013
Location: Alabama
Posts: 254
|
Helper.NatPrimary is what causes it to not have the -5 to attack and to have full strength to damage. Equipping a weapon removes Helper.NatPrimary leaving only Helper.NatSecondary
|
#7 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Quote:
In my notes I have "Helper.NatHalfStr" which forces a Primary attack to get half damage. I was hoping there was a Helper.NatFullStr tag to make a secondary get full damage. 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. |
|
#8 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Looks like there is a tag for it - Helper.NoHalfStr.
|
#9 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Nice! I updated the script above to use the tag instead of adding "back" the half-strength bonus.
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. |
#10 |
|
|