Senior Member
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265
|
Quote:
Yes. And it worked as intended. Dormio Forte Somnio Community Created Resources : Data Package Repositories : d20pfsrd Custom Character Sheets Community Server Setup (Packs) Hero Lab Help- Video Tutorials and Pathfinder FAQ Created by the community for the community
|
|
#11 |
Senior Member
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265
|
Newest iteration of the working script
Code:
~if we've been replaced, get out now doneif (tagis[Helper.SpcReplace] <> 0) doneif (tagis[Helper.SpcDisable] <> 0) ~if we aren't our chosen race get out now doneif (#hasrace[rFCOphiAng] = 0) ~ We need to be proficient with these weapons foreach thing in BaseWep where "wFtrGroup.Flails" perform eachthing.pulltags[WepProf.?] nexteach perform hero.pushtags[WepProf.?] ~ Now assign the One Handed tag whilst deleting the ~ tag Two Handed but we need to check that we are not a light ~ or One handed weapon first doneif (tagis[wClass.OneHanded] <> 0) doneif (tagis[wClass.Light] <> 0) foreach pick in hero from BaseWep where "wFtrGroup.Flails" perform eachpick.tagreplace[wClass.?,wClass.OneHanded] nexteach ~ Cycle through and apply the Helper.ExoticProf tag ~ to all examples of the chosen weapon on the hero. ~ This could be important for the future. var searchexpr as string searchexpr = tagids[WepProf.?,"|"] foreach pick in hero from BaseWep where searchexpr perform eachpick.assign[Helper.ExoticProf] nexteach Dormio Forte Somnio Community Created Resources : Data Package Repositories : d20pfsrd Custom Character Sheets Community Server Setup (Packs) Hero Lab Help- Video Tutorials and Pathfinder FAQ Created by the community for the community
|
#12 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
I think to help everyone lets go through this script in small pieces...
Code:
~if we've been replaced, get out now doneif (tagis[Helper.SpcReplace] <> 0) doneif (tagis[Helper.SpcDisable] <> 0) Quote:
Code:
~if we've been disabled, get out now! doneif (tagis[Helper.SpcDisable] <> 0) Code:
~if we aren't our chosen race get out now doneif (#hasrace[rFCOphiAng] = 0) Code:
~ We need to be proficient with these weapons foreach thing in BaseWep where "wFtrGroup.Flails" perform eachthing.pulltags[WepProf.?] nexteach perform hero.pushtags[WepProf.?] Code:
~ Now assign the One Handed tag whilst deleting the ~ tag Two Handed but we need to check that we are not a light ~ or One handed weapon first doneif (tagis[wClass.OneHanded] <> 0) doneif (tagis[wClass.Light] <> 0) So these checks just need to go away. Code:
foreach pick in hero from BaseWep where "wFtrGroup.Flails" perform eachpick.tagreplace[wClass.?,wClass.OneHanded] nexteach So the above has no comments but my take is that you are trying to convert all Fails (including Light, One-handed, and Two-Handed) into One Handed fails. Cause that is what the above is doing. From earlier posts your idea is to ONLY convert Two-handed flails. So you want the following: Code:
~ Find all Two-Handed fails on the Hero and change them to one-handed weapons foreach pick in hero from BaseWep where "wFtrGroup.Flails & wClass.TwoHanded" perform eachpick.tagreplace[wClass.TwoHanded,wClass.OneHanded] nexteach Code:
~ Cycle through and apply the Helper.ExoticProf tag ~ to all examples of the chosen weapon on the hero. ~ This could be important for the future. var searchexpr as string searchexpr = tagids[WepProf.?,"|"] foreach pick in hero from BaseWep where searchexpr perform eachpick.assign[Helper.ExoticProf] nexteach Here is a final script. I just tested it out and it works and only converts two-handed weapons to one-handed but makes the character proficient with all flails. Code:
~ If we've been disabled, get out now! doneif (tagis[Helper.SpcDisable] <> 0) ~ Pull all the Flail proficincy tags to ourself. ~ Note: This is pulling from Things not Picks. This means ~ the weapons do NOT have to be live on the character. foreach thing in BaseWep where "wFtrGroup.Flails" perform eachthing.pulltags[WepProf.?] nexteach ~ Push all the Wepon Proficiency tags to the hero. ~ This will make our character proficient with all flails. ~ Note: This means the script should run as early as possiable. perform hero.pushtags[WepProf.?] var searchexpr as string ~ Build a search sting of all the Fail Weapons we pulled above searchexpr = tagids[WepProf.?,"|"] ~ Loop through all the weapons that are actually present on the ~ character based on the search expression built from the WepProf tags. ~ We can only modify tags on a Pick which is why we are doing a 2nd ~ foreach loop. foreach pick in hero from BaseWep where searchexpr ~ If we are a two-handed weapon convert us to a one-handed perform eachpick.tagreplace[wClass.TwoHanded,wClass.OneHanded] ~ If we are an exotic weapon assign helper tag to make us ~ proficient If (eachpick.tagis[wProfReq.Exotic] <> 0) Then perform eachpick.assign[Helper.ExoticProf] Endif nexteach 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. |
|
#13 |
Senior Member
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265
|
I doff my cap to the codemeiester.
Nicely done Shadow, This is for a specific variant of race however there are 3 types but only one can wield Spiked chains or similar weapons, ie Flails one handed. The rest just need to be proficient with them. Also Double weapons aren't affected by this either. Dormio Forte Somnio Community Created Resources : Data Package Repositories : d20pfsrd Custom Character Sheets Community Server Setup (Packs) Hero Lab Help- Video Tutorials and Pathfinder FAQ Created by the community for the community
|
#14 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Thanks but was just trying to be helpful in going over the code. I figured that it may help you or others. Guess it sort looks like I was showing off but that was not the case.
Quote:
Is this just a statement or asking for help to change the script to not affect double weapons? 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. |
|
#15 |
Senior Member
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265
|
Quote:
However I tinkered around with this but of code, plugged it into the optimised script Code:
If (eachpick.tagis[wCategory.Double] <> 0) Then perform eachpick.tagreplace[wClass.?,wClass.TwoHanded] Endif Dormio Forte Somnio Community Created Resources : Data Package Repositories : d20pfsrd Custom Character Sheets Community Server Setup (Packs) Hero Lab Help- Video Tutorials and Pathfinder FAQ Created by the community for the community
|
|
#16 |
|
|