Adding Tool Proficiency script not working
1 Attachment(s)
So I've got a subrace that adds Smith's Tools to the character and I used the script add that allows expertise if they already have it.
Phase: Post-levels Priority: 10000 Script: ~ If we're disabled, do nothing doneif (tagis[Helper.Disable] = 1) if (hero.tagis[ProfTool.gTooSmith] = 0) then perform hero.assign[ProfTool.gTooSmith] perform hero.child[gTooSmith].assign[Helper.TrainTool] perform hero.child[gTooSmith].assign[Hide.Tool] perform hero.child[gTooSmith].assign[Proficienc.Tool] else foreach pick in hero from BaseEquip where "ProfTool.gTooSmith" perform hero.assign[ProfTooDbl.gTooSmith] nexteach endif when I add the sub race I get errors. (attached as image) I cannot add the skill it's not listed with the tools. If I add the Smith's Tools gear it just kind of works. |
Try checking out how it was done for the Forge Cleric. it bootstraps the tool gear itself, then assigns it in an eval script with a linkage table (I don't know how that works, but I'm going to go see if I can search and find out).
Then the only thing you'll need to solve is the expertise thing. I'd pull that out, make sure just the proficiency part is working, then put it back in and work from there. |
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. |
Thanks guys!
|
Quote:
|
Yes, when you hit the timing button there are three fields you can fill in.
Type or paste Calc skProfBon into the Before Scripts box and hit OK. You don't need anything in the other two, although for troubleshooting you can type a script name to help if you know how to read the timing report or debug statements that might use it. |
Works perfectly! Thank you!
|
And this is why dungeonguru is the master. :D
|
I was getting an error because I literally pasted "Before Calc skProfBon" which still worked but the script would remind me I'd done a boner with every new add.
|
Quote:
|
All times are GMT -8. The time now is 11:34 AM. |
Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.