Senior Member
Join Date: Oct 2011
Location: Portland
Posts: 313
|
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. |
#1 |
Senior Member
Join Date: Sep 2017
Posts: 600
|
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. Found an issue with or have a suggestion for the 5e Community Pack? Please post it here at our GitHub. Feel free to stop by the Lone Wolf Development Subreddit, for discussion of any and all LWD products and community efforts! Last edited by Fenris447; May 15th, 2020 at 08:28 AM. |
#2 |
Senior Member
Join Date: May 2016
Posts: 608
|
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. |
#3 |
Senior Member
Join Date: Oct 2011
Location: Portland
Posts: 313
|
Thanks guys!
|
#4 |
Senior Member
Join Date: Oct 2011
Location: Portland
Posts: 313
|
Quote:
|
|
#5 |
Senior Member
Join Date: May 2016
Posts: 608
|
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. |
#6 |
Senior Member
Join Date: Oct 2011
Location: Portland
Posts: 313
|
Works perfectly! Thank you!
|
#7 |
Senior Member
Join Date: Sep 2017
Posts: 600
|
And this is why dungeonguru is the master.
Found an issue with or have a suggestion for the 5e Community Pack? Please post it here at our GitHub. Feel free to stop by the Lone Wolf Development Subreddit, for discussion of any and all LWD products and community efforts! |
#8 |
Senior Member
Join Date: Oct 2011
Location: Portland
Posts: 313
|
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.
|
#9 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633
|
Quote:
RavenX Pronouns: She/Her Please do not PM me to inquire about datafiles I coded "for personal use" such as Exalted, World of Darkness, AD&D, or Warhammer 40K Roleplaying. I appreciate your interest, but I do not own the Intellectual Property rights to these game systems. Nor do I have permission from any of the Publishers to distribute the data files. As such, I cannot distribute the work I have done with community on these files. They are "for personal use" only. Thank you. I am far too busy these days to answer emails. If you message me here there is no guarantee I will get back to you at all. |
|
#10 |
|
|