View Single Post
dungeonguru
Senior Member
 
Join Date: May 2016
Posts: 608

Old May 16th, 2020, 09:21 AM
I don't think that the line that pushes the proficiency to the link table actually works (perform root.linkage[table].assign[ProfTool.gTooSmith]) -that looks like some leftover test code. If you play around, you can remove that line - it's the bootstrap that pushes the proficiency.

Tool proficiencies are a hack, wish that they had done them the way skill proficiencies are done.

One way to try and accomplish what you want would be to:
1. Bootstrap Smith's Tools with the Procienc.Tool tag, AND add a conditional that looks for a field value - like "fieldval:abValue = 1"

2. add your script (postlevel 10000, Before Calc skProfBon)
Look to see if you have the proficiency. If you don't, set abValue to 1 (enabling the bootstrapped tool skill) and EXIT.
Else,
perform hero.assign[ProfTooDbl.gTooSmith]

or

if (hero.tagis[ProfTool.gTooSmith] = 0) then
~ if I can't see that we have the proficiency, set abValue so that the bootstrap fires off
field[abValue].value = 1
else
~ I see that we already have the tool, so let the hero have double proficiency
perform hero.assign[ProfTooDbl.gTooSmith]
endif


What is very important is the extra timing on the script:
Before Calc skProfBon
forces the script to run before any proficiencies bonuses actually get added, without it your script could run after and never works.
dungeonguru is offline   #3 Reply With Quote