Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Shifty-eyes
Junior Member
 
Join Date: Oct 2012
Location: Maine
Posts: 20

Old March 24th, 2014, 01:03 PM
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!
Shifty-eyes is offline   #1 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old March 24th, 2014, 02:18 PM
What phase and timing is your script running at? And I assume you are having the feat choose among spell schools?
Aaron is offline   #2 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old March 24th, 2014, 03:07 PM
Quote:
Originally Posted by Shifty-eyes View Post
(in other words, the DC will be 10+INT+CHA+spell level; it'll only be for enchantments, btw).
If its just for enchantments ALWAYS then you can just go right after the Enchantment school instead of doing the focus to it. The focus and logic would be if you are allowing a drop down box of choices of different schools of magic.

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]
@Aaron - Not to butt in. I had my post written but not submitted for awhile and didn't see you had responded.....

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.
ShadowChemosh is offline   #3 Reply With Quote
Shifty-eyes
Junior Member
 
Join Date: Oct 2012
Location: Maine
Posts: 20

Old March 25th, 2014, 10:13 AM
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!
Shifty-eyes is offline   #4 Reply With Quote
Anpumes
Member
 
Join Date: Sep 2012
Posts: 57

Old March 25th, 2014, 10:22 AM
Quote:
Originally Posted by Shifty-eyes View Post
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!
Where you have "[Enchantment_School_ID]," replace it with "[wsEnchant]"

I can't promise that'll fix it but that is what I see with my limited skills.
Anpumes is offline   #5 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old March 25th, 2014, 10:24 AM
Also, you have the Phase set to first, you will need to change that to PostAttr
Aaron is offline   #6 Reply With Quote
Shifty-eyes
Junior Member
 
Join Date: Oct 2012
Location: Maine
Posts: 20

Old March 25th, 2014, 10:33 AM
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.
Shifty-eyes is offline   #7 Reply With Quote
Anpumes
Member
 
Join Date: Sep 2012
Posts: 57

Old March 25th, 2014, 10:38 AM
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:
Anpumes is offline   #8 Reply With Quote
Shifty-eyes
Junior Member
 
Join Date: Oct 2012
Location: Maine
Posts: 20

Old March 25th, 2014, 10:45 AM
Quote:
Originally Posted by Anpumes View Post
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:
Wow! Never noticed that before. Thanks!

Now, if only I could get the script to work...

Shifty-eyes is offline   #9 Reply With Quote
Anpumes
Member
 
Join Date: Sep 2012
Posts: 57

Old March 25th, 2014, 10:46 AM
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"
Anpumes is offline   #10 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 02:03 PM.


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