Junior Member
Join Date: Oct 2012
Location: Maine
Posts: 20
|
Why do I bang my head against the wall? Because it feels so good when I stop.
I'm trying to create a feat for a special circumstance in our game. What is stumping me is how to add the Charisma bonus on top of the existing save DC for a wizard. (in other words, the DC will be 10+INT+CHA+spell level; it'll only be for enchantments, btw). I'm sure this will come as a shock, but I'm no coder. At best, I pilfer what I can, rewrite, and insert. So, while the hard-core coders can have a big laugh at my expense, this is what I'm coming up with to do what I want: ~ If we're disabled, do nothing doneif (tagis[Helper.FtDisable] <> 0) ~ set our focus to the selected pick call fTargetFoc doneif (state.isfocus = 0) field[abValue].value += #attrbonus[aCHA] focus.field[schDC].value += field[abValue].value Obviously, this isn't working, otherwise I wouldn't be posting. But at least its not screwing anything else up, either. So, for my Wizard, is there a way of add that CHA bonus? Thanks! |
#1 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
What phase and timing is your script running at? And I assume you are having the feat choose among spell schools?
|
#2 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Quote:
I am not near HL so I don't know the correct Thing ID but the script would look like this and you would want to run in Post-Attributes/10000. This gives time for the Cha value to be calculated. Code:
~ Increase the DC of the Enchantment by the Charisma Bonus hero.child[Enchantment_School_ID].field[schDC].value += #attrbonus[aCHA] 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. |
|
#3 |
Junior Member
Join Date: Oct 2012
Location: Maine
Posts: 20
|
I'm sorry, but I could not respond any sooner.
I've tried the suggestions that you've posted, but I'm not having any luck. A few moments ago, I ran with your suggestions and when I tested the package, I ended up with this error: So, when I look at the eval script window...here's what I have: Soooo…what am I doing wrong? I'll bet its some minor thing, like inserting a period in the wrong place or something. Thanks for your help! |
#4 |
Member
Join Date: Sep 2012
Posts: 57
|
Quote:
I can't promise that'll fix it but that is what I see with my limited skills. |
|
#5 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
Also, you have the Phase set to first, you will need to change that to PostAttr
|
#6 |
Junior Member
Join Date: Oct 2012
Location: Maine
Posts: 20
|
How do I reset the Phase? or to change it to PostAttr?
BTW, using [wsEnchant] yielded this new error: Last edited by Shifty-eyes; March 25th, 2014 at 10:38 AM. |
#7 |
Member
Join Date: Sep 2012
Posts: 57
|
At the top of the Eval Scripts box, above where you input the scripts, is a dropdown menu next to the work Phase: This is where you would select PostAttr at, next to that is the Priority:
|
#8 |
Junior Member
Join Date: Oct 2012
Location: Maine
Posts: 20
|
Quote:
Now, if only I could get the script to work... |
|
#9 |
Member
Join Date: Sep 2012
Posts: 57
|
Ah, I think I see it... Again, limited skills here but you have "hero.child" as the start of your script to locate the Enchantment DC... I think it should instead be "hero.childfound"
|
#10 |
|
|