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
Ecneconni
Junior Member
 
Join Date: Apr 2012
Location: Ohio
Posts: 15
Send a message via MSN to Ecneconni

Old June 10th, 2018, 02:08 PM
Please feel free to direct me towards the appropriate thread if I have made this in error. But I wasn't able to find anything on this particular subject.

I'm making a racial trait weakness, that affects certain skills, namely their Diplomacy and Stealth (-2 Racial Penalty). However, no matter what script I seem to run it doesn't apply the penalty.

Pre-Levels, 10000
-----------------------------------------------------------------------------

hero.child[skStealth].field[PenTrait].value = hero.child[skStealth].field[PenTrait].value - 2

hero.child[skDiplo].field[PenTrait].value = hero.child[skStealth].field[PenTrait].value - 2

------------------------------------------------------------------------------
Any help with this would be greatly appreciated. Thank you.
Ecneconni is offline   #1 Reply With Quote
Minous
Senior Member
 
Join Date: May 2015
Posts: 830

Old June 10th, 2018, 04:30 PM
use #applybonus macro, far easier and doesn't rely on direct manipulation of values.
Minous is offline   #2 Reply With Quote
Ecneconni
Junior Member
 
Join Date: Apr 2012
Location: Ohio
Posts: 15
Send a message via MSN to Ecneconni

Old June 10th, 2018, 05:54 PM
Would you be willing to supply me with an example of how it should look? I've not used many macros yet.
Ecneconni is offline   #3 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old June 10th, 2018, 07:18 PM
In this case the #applybonus macro will not work in this case. Its designed to apply a "bonus" and does not work with penalties. In addition its made to only add the "highest" bonus to the field. Meaning if you had to Things trying to give a +2 and +3 bonus you want to end with only the +3 bonus. But penalties in Pathfinder always stack so we don't want that logic either.

If what you posted is your exact script then part of the issue is that you didn't change the second skill to be -2 diplomacy:
Code:
hero.child[skStealth].field[PenTrait].value = hero.child[skStealth].field[PenTrait].value - 2
hero.child[skDiplo].field[PenTrait].value = hero.child[skStealth].field[PenTrait].value - 2
We don't have a specific racial penalty but since all penalties stack in Pathfinder its easier to just use the Penalty field. You can also shorten your script logic using the += (plus equal) feature:
Code:
hero.child[skStealth].field[Penalty].value += -2
hero.child[skDiplo].field[Penalty].value += -2

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   #4 Reply With Quote
Ecneconni
Junior Member
 
Join Date: Apr 2012
Location: Ohio
Posts: 15
Send a message via MSN to Ecneconni

Old June 10th, 2018, 09:08 PM
Do you have a phase suggestion for this? With what I have it at, it doesn't seem to work. Pre-Levels, 10,000.
Ecneconni is offline   #5 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old June 10th, 2018, 09:19 PM
Quote:
Originally Posted by Ecneconni View Post
Do you have a phase suggestion for this? With what I have it at, it doesn't seem to work. Pre-Levels, 10,000.
Pre-Levels/10000 is fine. If this is not working then one of two things:

1) You have this script on something that is not actually on the hero/character. In example you have this on a Feat but didn't add the feat to the character.
2) You have other logic in the script than what you posted. Maybe something to do with a "doneif()" statement?

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   #6 Reply With Quote
Ecneconni
Junior Member
 
Join Date: Apr 2012
Location: Ohio
Posts: 15
Send a message via MSN to Ecneconni

Old June 10th, 2018, 09:30 PM
It wasn't bootstrapped.... haha I've been struggling with it all day wondering why it didn't work. Ugh this hurts a little.
Ecneconni is offline   #7 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old June 10th, 2018, 09:54 PM
Quote:
Originally Posted by Ecneconni View Post
It wasn't bootstrapped.... haha I've been struggling with it all day wondering why it didn't work. Ugh this hurts a little.
LOL we have all done such stuff. At least you figured it out.

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   #8 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 05:57 AM.


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