Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
BloodAngel099
Member
 
Join Date: Apr 2014
Posts: 90

Old May 22nd, 2017, 07:29 PM
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
BloodAngel099 is offline   #1 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old May 23rd, 2017, 12:31 PM
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
I can't find in my notes a Helper.? tag that forces a Natural Attack to do full damage. Maybe Aaron/Mathis knows one because I "thought" such a tag existed.

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.
ShadowChemosh is offline   #2 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old May 23rd, 2017, 12:41 PM
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.
Mathias is offline   #3 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old May 23rd, 2017, 03:07 PM
Quote:
Originally Posted by Mathias View Post
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.
From what I got they have 3 rules.

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.
ShadowChemosh is offline   #4 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old May 23rd, 2017, 03:11 PM
Okay, from what I read in the original post, #2 and #3 were done, and this script was only trying to implement #1
Mathias is offline   #5 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old May 23rd, 2017, 03:39 PM
Quote:
Originally Posted by Mathias View Post
Okay, from what I read in the original post, #2 and #3 were done, and this script was only trying to implement #1
Ahh yeah. I could be wrong but I took it that #1 & #2 where done and they need #3.

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.
ShadowChemosh is offline   #6 Reply With Quote
Mystic Lemur
Senior Member
 
Join Date: Aug 2013
Location: Alabama
Posts: 254

Old May 23rd, 2017, 10:05 PM
Quote:
Originally Posted by ShadowChemosh View Post
I can't find in my notes a Helper.? tag that forces a Natural Attack to do full damage. Maybe Aaron/Mathis knows one because I "thought" such a tag existed.
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
Mystic Lemur is offline   #7 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old May 24th, 2017, 12:36 PM
Quote:
Originally Posted by Mystic Lemur View Post
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
Yeah but if I remove the Helper.NatSecondary tag then the -5 to hit will also go away. BloodAngel099 didn't mention anything about removing the -5 to hit so I don't want to remove the tag.

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.
ShadowChemosh is offline   #8 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old May 24th, 2017, 12:53 PM
Looks like there is a tag for it - Helper.NoHalfStr.
Mathias is offline   #9 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old May 24th, 2017, 02:52 PM
Quote:
Originally Posted by Mathias View Post
Looks like there is a tag for it - Helper.NoHalfStr.
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.
ShadowChemosh is offline   #10 Reply With Quote
Reply


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 01:37 AM.


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