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
Valdacil
Senior Member
 
Join Date: Feb 2017
Posts: 119

Old March 24th, 2017, 01:44 PM
I'm trying to make Weapon Focus use Fighter Groups instead of individual weapons and I feel like I'm very close, but I can't seem to get the bonus to apply. I started by taking apart the Eval script on Weapon Focus to understand how it did what it did. I change the drop-down selection to use Weapon Groups instead of All Weapons. But I can't seem to properly scope the condition to apply the Broaddcast.WepFocus tag to the weapons. The name is properly updating to "Weapon Focus (heavy blades)" so I know part of the script is working. But the weapons in heavy blades group don't have the Broadcast.WepFocus tag and don't have a +1 att, so I know the condition is not working. My latest attempt:

Code:
      ~ If we're disabled, do nothing
      doneif (tagis[Helper.FtDisable] <> 0)

      ~ If we haven't chosen anything, get out now
      doneif (field[usrChosen1].ischosen = 0)

      ~ If we are a bonus feat which ignores pre-reqs, we don't want our weapons
      ~ to complain when they don't find those pre-reqs we skipped.
      if (tagis[thing.skipprereq] <> 0) then
        perform assign[Broadcast.NoPWepFocu]
        endif

      ~ Assign the appropriate tag to all weapons that meet the criteria
      var id as string
      var name as string

      call fTargetId

      foreach pick in hero from BaseWep where "wFtrGroup." & field[usrChosen1].chosen.idstring
        perform eachpick.assign[Broadcast.WepFocus]
        perform eachpick.pushtags[Broadcast.?]
        perform eachpick.pulltags[WepFocus.?]
        nexteach
      perform hero.pushtags[WepFocus.?]

      foreach thing in BaseWep where "wFtrGroup." & id
        perform eachthing.pulltags[wProfReq.?]
        nexteach

      ~ Set our 'short name'
      field[shortname].text = "Focus: " & name
      field[sbName].text = "Weapon Focus (" & lowercase(name) & ")"

      ~ If the selected weapon is a natural weapon, then apply the Hero.NatWpFocus
      ~ tag to the hero. We do this here so that the hero doesn't actually have
      ~ to have such a weapon on their character in order to get the tag and
      ~ qualify for pre-reqs based on it. For example, a Druid/Monk may want
      ~ to take Weapon Focus (Claw) in order to take Feral Combat Training, but
      ~ may not actually have claws most of the time (only when wild shaped).
      if (field[usrChosen1].chosen.tagis[wFtrGroup.Natural] <> 0) then
        perform hero.assign[Hero.NatWpFocus]
        endif

      ~ Choosing Grapple gives us a bonus on those checks
      if (field[usrChosen1].chosen.tagis[thingid.wGrapple] <> 0) then
        ~ Add a +1 bonus to the Grapple CMB
        hero.child[manGrapple].field[cmbBonus].value += 1
        endif

      ~ This is chiefly for the Low Templar PrC's pre-req (which requires weapon
      ~ focus in any martial weapon), but also checking Simple and Exotic as
      ~ well in case those are needed in the future.
      if (tagis[wProfReq.Simple] <> 0) then
        perform hero.assign[Hero.SimWpFocus]
        endif

      if (tagis[wProfReq.Martial] <> 0) then
        perform hero.assign[Hero.MrtWpFocus]
        endif

      if (tagis[wProfReq.Exotic] <> 0) then
        perform hero.assign[Hero.ExoWpFocus]
        endif
Valdacil is offline   #1 Reply With Quote
Valdacil
Senior Member
 
Join Date: Feb 2017
Posts: 119

Old March 24th, 2017, 02:00 PM
I cracked it and got an initial build working by taking apart Defensive Weapon Training feat. Now I just need to add conditions for Grapple and Spell as selections and to test that Natural special condition works properly. I'll post the finished result once I have those sorted out. Working so far:

Code:
      ~ If we're disabled, do nothing
      doneif (tagis[Helper.FtDisable] <> 0)

      ~ If we haven't chosen anything, get out now
      doneif (field[usrChosen1].ischosen = 0)

      ~get the wFtrGroup tag from our choice
      perform field[usrChosen1].chosen.pulltags[wFtrGroup.?]

      ~if we didn't find a wFtrGroup tag, there's nothing more we can do
      doneif (tagis[wFtrGroup.?] = 0)	  
	  
      ~ If we are a bonus feat which ignores pre-reqs, we don't want our weapons
      ~ to complain when they don't find those pre-reqs we skipped.
      if (tagis[thing.skipprereq] <> 0) then
        perform assign[Broadcast.NoPWepFocu]
        endif

      ~ Assign the appropriate tag to all weapons that meet the criteria
      var id as string
      var name as string

      call fTargetId

      foreach pick in hero from BaseWep
        if (eachpick.tagmatch[wFtrGroup,wFtrGroup,initial] <> 0) then
          perform eachpick.assign[Broadcast.WepFocus]
          perform eachpick.pulltags[WepFocus.?]
          perform eachpick.pushtags[Broadcast.?]
          endif
        nexteach
      perform hero.pushtags[WepFocus.?]

      ~ Set our 'short name'
      field[shortname].text = "Focus: " & name
      field[sbName].text = "Weapon Focus (" & lowercase(name) & ")"

      ~ If the selected weapon is a natural weapon, then apply the Hero.NatWpFocus
      ~ tag to the hero. We do this here so that the hero doesn't actually have
      ~ to have such a weapon on their character in order to get the tag and
      ~ qualify for pre-reqs based on it. For example, a Druid/Monk may want
      ~ to take Weapon Focus (Claw) in order to take Feral Combat Training, but
      ~ may not actually have claws most of the time (only when wild shaped).
      if (field[usrChosen1].chosen.tagis[wFtrGroup.Natural] <> 0) then
        perform hero.assign[Hero.NatWpFocus]
        endif

      ~ Choosing Grapple gives us a bonus on those checks
      if (field[usrChosen1].chosen.tagis[thingid.wGrapple] <> 0) then
        ~ Add a +1 bonus to the Grapple CMB
        hero.child[manGrapple].field[cmbBonus].value += 1
        endif

      ~ This is chiefly for the Low Templar PrC's pre-req (which requires weapon
      ~ focus in any martial weapon), but also checking Simple and Exotic as
      ~ well in case those are needed in the future.
      if (tagis[wProfReq.Simple] <> 0) then
        perform hero.assign[Hero.SimWpFocus]
        endif

      if (tagis[wProfReq.Martial] <> 0) then
        perform hero.assign[Hero.MrtWpFocus]
        endif

      if (tagis[wProfReq.Exotic] <> 0) then
        perform hero.assign[Hero.ExoWpFocus]
        endif
Valdacil is offline   #2 Reply With Quote
Valdacil
Senior Member
 
Join Date: Feb 2017
Posts: 119

Old March 24th, 2017, 03:04 PM
New question: I went made a copy of a weapon and in Weapon Groups, selected New Tag to create a new weapon group. After saving, exiting, and reloading HL, when I go to add that weapon to my hero the description on the right pane does show my new Fighter Weapon Group, but the selection for Weapon Focus does not show the new weapon group. Any reason why and anything I can do to fix it?
Valdacil 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 March 24th, 2017, 03:45 PM
Quote:
Originally Posted by Valdacil View Post
New question: I went made a copy of a weapon and in Weapon Groups, selected New Tag to create a new weapon group. After saving, exiting, and reloading HL, when I go to add that weapon to my hero the description on the right pane does show my new Fighter Weapon Group, but the selection for Weapon Focus does not show the new weapon group. Any reason why and anything I can do to fix it?
You have created a "Tag" for a weapon group. But dropdown selectors are expressions for displaying Picks or Things not tags. You need to create the Thing for you new weapon group.

My "guess" is that this is a selection helper Thing. Which normally are not seen in the editor. But if you have the community Pack installed you can go to the zCommunity->Selection Helper tab to create new ones or copy ones. Take a look in that editor tab if you see an existing weapon group and you can copy it to make your new one.

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
Valdacil
Senior Member
 
Join Date: Feb 2017
Posts: 119

Old March 25th, 2017, 11:04 PM
@ShadowChemosh - Again, most helpful. I figured it out from what you said. I wasn't sure it would work at first, but after testing I was able to add multiple groups this way and have it all working. Thanks a bunch.
Valdacil is offline   #5 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:55 PM.


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