Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - D&D 5th Edition SRD (http://forums.wolflair.com/forumdisplay.php?f=89)
-   -   Adding Tool Proficiency (http://forums.wolflair.com/showthread.php?t=60162)

BobStumpp February 11th, 2018 03:03 PM

Adding Tool Proficiency
 
Okay, I am going to see how many people I can confuse. I am working on a subclass that grants you proficiency in your choice of two Artisan Tools. If I use the Item Selection in the Class Special with a custom expression of "component.BaseEquip & ToolCat.Artisan" I get the proper list of Artisan Tools. Applying the two scripts:

Post-levels - 10000
Code:

doneif (tagis[Helper.ShowSpec] = 0)
doneif (tagis[Helper.Disable] <> 0)

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

if (field[usrChosen2].ischosen <> 0) then
  perform field[usrChosen2].chosen.pulltags[ProfTool.?]
endif

perform forward[ProfTool.?]

and Post-levels - 10100
Code:

doneif (tagis[Helper.ShowSpec] = 0)
doneif (tagis[Helper.Disable] <> 0)

var tagexpr as string

if (field[usrChosen1].ischosen <> 0) then
  tagexpr = field[usrChosen1].chosen.tagids[ProfTool.?," | "]
  foreach pick in hero from BaseEquip where tagexpr
    perform eachpick.assign[Helper.TrainTool]
    perform eachpick.assign[Hide.Tool]
    perform eachpick.assign[Proficienc.Tool]
  nexteach
endif

if (field[usrChosen2].ischosen <> 0) then
  tagexpr = field[usrChosen2].chosen.tagids[ProfTool.?," | "]
  foreach pick in hero from BaseEquip where tagexpr
    perform eachpick.assign[Helper.TrainTool]
    perform eachpick.assign[Hide.Tool]
    perform eachpick.assign[Proficienc.Tool]
  nexteach
endif

The above kinda works. Your proficiency does not appear on the screen, or the printout, until you actually buy the Artisan Tool in question. Then it appears, and everything is correct. However, this does not happen for other proficiency's like a tool background proficiency.

So, trying other methods, I found this works:

Post-Levels 10000

Code:

~ If we're disabled, do nothing &
doneif (tagis[Helper.Disable] = 1)

var NumOfProf as number
var NumOfTool as number
~ Increase or decrease the number of proficiencies
NumOfTool = field[abValue].value

perform hero.childfound[cfg5CProf].assign[AllowTool2.gSupAlchem]
perform hero.childfound[cfg5CProf].assign[AllowTool2.gSupBrewer]
perform hero.childfound[cfg5CProf].assign[AllowTool2.gSupCaligr]
perform hero.childfound[cfg5CProf].assign[AllowTool2.gTooCarpen]
perform hero.childfound[cfg5CProf].assign[AllowTool2.gTooCartog]
perform hero.childfound[cfg5CProf].assign[AllowTool2.gTooCobble]
perform hero.childfound[cfg5CProf].assign[AllowTool2.gUtenCook]
perform hero.childfound[cfg5CProf].assign[AllowTool2.gTooGlassb]
perform hero.childfound[cfg5CProf].assign[AllowTool2.gTooJewele]
perform hero.childfound[cfg5CProf].assign[AllowTool2.gTooLeathe]
perform hero.childfound[cfg5CProf].assign[AllowTool2.gTooMason]
perform hero.childfound[cfg5CProf].assign[AllowTool2.gSupPainte]
perform hero.childfound[cfg5CProf].assign[AllowTool2.gTooPotter]
perform hero.childfound[cfg5CProf].assign[AllowTool2.gTooSmith]
perform hero.childfound[cfg5CProf].assign[AllowTool2.gTooTinker]
perform hero.childfound[cfg5CProf].assign[AllowTool2.gTooWeaver]
perform hero.childfound[cfg5CProf].assign[AllowTool2.gTooCarver]
call 5CAddProf

Anything I tried to assign the AllowTool2 to 5CAddProf using pulltags, and pushtags, failed, either failing in the script evaluation, or not restricting the list of tools on the proficiency tab. Any idea, on how I can restrict the available options in 5CAddProf without individually listing each artisan tool? Because what happens when more artisan tools are added?

Thanks,

Bob

dungeonguru February 11th, 2018 04:33 PM

Look at the class special "Student of War" for the Fighter Battlemaster to see a class ability that grants a tool proficiency almost exactly like you are wanting. You could easily copy and modify this ability to add two artisan tools by increasing the abValue field to 2.

BobStumpp February 11th, 2018 05:14 PM

Well, that was just too easy... :-P

Thank you very much...


All times are GMT -8. The time now is 10:16 PM.

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