Lone Wolf Development Forums  

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

Notices

Reply
 
Thread Tools Display Modes
bertraze
Member
 
Join Date: Aug 2013
Posts: 30

Old June 2nd, 2014, 07:08 AM
I'm currently working on building out the Machinesmith third-party class, and I'm having trouble with finding examples to cannibalize for one of the class's custom abilities:

Quote:
The machinesmith gains proficiency in a single firearm of his choice. In
addition he gains the Gunsmithing feat as a bonus feat.
There are two things that I want to do that I can't figure out:
  1. How to limit the selection list to only firearms. I can limit it to ranged weapons, but I couldn't find an example of a custom expression to limit the list.
  2. How to assign a weapon proficiency for the chosen weapon. I'm pretty sure it involves assigning WepProf.<thing chosen> to the hero, but I'm having a hard time figuring out the syntax to do that.
bertraze is offline   #1 Reply With Quote
bertraze
Member
 
Join Date: Aug 2013
Posts: 30

Old June 2nd, 2014, 10:38 AM
I managed to figure out the selection list bit myself. It took me a long time to figure out the right values for Select From (-none-, as All Weapons and Ranged Weapons seem to select ones on the hero), and Restrict First List To (All Things, as it doesn't seem the default is working the same way), but once I figured out that an "expression" really was what it said on the tin, I just needed wCategory.Firearm in order to only get firearms.
bertraze is offline   #2 Reply With Quote
bertraze
Member
 
Join Date: Aug 2013
Posts: 30

Old June 2nd, 2014, 10:46 AM
My main problem now is that I don't get how to use a tag name that I've constructed (such as "WepProf." & field[usrChosen1].chosen. As far as I know, you can only use literal tag names in assign[].
bertraze 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 June 2nd, 2014, 10:48 AM
Quote:
Originally Posted by bertraze View Post
I managed to figure out the selection list bit myself. It took me a long time to figure out the right values for Select From (-none-, as All Weapons and Ranged Weapons seem to select ones on the hero), and Restrict First List To (All Things, as it doesn't seem the default is working the same way), but once I figured out that an "expression" really was what it said on the tin, I just needed wCategory.Firearm in order to only get firearms.
Nice! Takes a bit to find what you need at first but it gets easier and easier. Allot of it because LW did a nice job on standards so after awhile you can even "guess" what a tag name is and good chance its correct.

Otherwise using "Debug" and looking at the tags/fields on your character is very useful. If you are not using this yet I recommend watching Video Three from the FAQ on the editor.

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
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old June 2nd, 2014, 01:27 PM
Quote:
Originally Posted by bertraze View Post
My main problem now is that I don't get how to use a tag name that I've constructed (such as "WepProf." & field[usrChosen1].chosen. As far as I know, you can only use literal tag names in assign[].
Use assignstr to assign a tag based on a string. For example:

Code:
      foreach pick in hero from BaseWep where "IsWeapon.wShuriken | IsWeapon.wShurikenM |(Helper.Improvised & wCategory.Range?)"
        ~ Reset the value for this pick
        range = 0

        ~ Set our expanded range.
        range = eachpick.tagvalue[wRangeInc.?] + 20

        ~ Delete the old tag
        perform eachpick.delete[wRangeInc.?]

        ~ Assign the new one
        perform eachpick.assignstr["wRangeInc." & range]

        nexteach
Aaron 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 June 2nd, 2014, 01:35 PM
Quote:
Originally Posted by Aaron View Post
Use assignstr to assign a tag based on a string.
The only "FYI" about assignstr[] is that if you try and assign a tag that does not exist you will get errors. It will not "dynamically" create the tag for you. I am pretty sure not every single range increment is in HL. So if you try and assign "wRangeInc.21" you will get a script error as 21 does not exist.

If you create the tag and place it on a weapon in the editor then it will be available to assign.

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
bertraze
Member
 
Join Date: Aug 2013
Posts: 30

Old June 2nd, 2014, 02:06 PM
And I finally found an example that tought me how to do what I needed to do: Here is the script on this ability, in case anyone wants to see how pulltags and pushtags works to generate a tag like this:

Code:
~ If we haven't chosen anything, get out now
doneif (field[usrChosen1].ischosen + tagis[Target.?] = 0)

if (field[usrChosen1].ischosen <> 0) then
  perform field[usrChosen1].chosen.pulltags[WepProf.?]

  perform hero.pushtags[WepProf.?]
endif
...and apparently I found something that worked around the same time Aaron was showing me something completely different that worked. Thanks, Aaron!

Last edited by bertraze; June 2nd, 2014 at 02:09 PM. Reason: Acknowledged other solution
bertraze is offline   #7 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 11:11 PM.


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