Member
Join Date: Aug 2013
Posts: 30
|
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:
|
|
#1 |
Member
Join Date: Aug 2013
Posts: 30
|
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.
|
#2 |
Member
Join Date: Aug 2013
Posts: 30
|
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[].
|
#3 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Quote:
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. |
|
#4 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
Quote:
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 |
|
#5 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
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. |
#6 |
Member
Join Date: Aug 2013
Posts: 30
|
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 Last edited by bertraze; June 2nd, 2014 at 02:09 PM. Reason: Acknowledged other solution |
#7 |
Thread Tools | |
Display Modes | |
|
|