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
Corwyn
Member
 
Join Date: Jul 2010
Posts: 42

Old April 10th, 2016, 09:43 AM
Hello everyone once again,
I'm making an item, and if it was a simple enhancement or even a one plus and one minus... however, this is an adjustable item. I got everything working but this part, which I know will be a script.

Item (got everything in except for this)
When chosen, must pick a mental stat, and a different stat. The first setting is a +2 bonus, second setting is a +4 bonus with a -2 to another, while the 3rd setting is a +6 bonus with a -4 to another.

Any help would be greatly appreciated,
Corwyn
Corwyn is offline   #1 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old April 10th, 2016, 10:12 AM
Quote:
Originally Posted by Corwyn View Post
When chosen, must pick a mental stat, and a different stat. The first setting is a +2 bonus, second setting is a +4 bonus with a -2 to another, while the 3rd setting is a +6 bonus with a -4 to another.
I would recommend making this three different magic items.
1) Gives +2 to the selected mental stat.
2) Gives +4 to selected mental stat and -2 to another mental stat.
3) Gives +6 to selected mental stat and -4 to another mental stat.

You will need a custom expression:
Attribute.jpg

Select From: - NONE -
Custom Expression:
Code:
component.BaseAttr & AttribCat.Mental
Restrict First List to: ALL Picks on Hero

Then the following script at like Post-Levels/10000:
Code:
      ~ If not equipped get out now!
      doneif (field[gIsEquip].value = 0)
      ~ If nothing chosen get out now!
      doneif (field[usrChosen1].ischosen = 0)

      ~ Increase Ability score bonus
      field[usrChosen1].chosen.field[Bonus].value += 2
For item 2 & 3 you need two custom expressions. So fill out the "2nd Custom Expression" and "Restrict Second List" to the same values.

Then you would need to add the 2nd chooser to the script:
Post-Levels/10000:
Code:
      ~ If not equipped get out now!
      doneif (field[gIsEquip].value = 0)
      ~ If nothing chosen get out now!
      doneif (field[usrChosen1].ischosen = 0)
      doneif (field[usrChosen2].ischosen = 0)

      ~ Increase Ability score
      field[usrChosen1].chosen.field[Bonus].value += 4

      ~ Decrease Ability score
      field[usrChosen1].chosen.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   #2 Reply With Quote
Corwyn
Member
 
Join Date: Jul 2010
Posts: 42

Old April 10th, 2016, 11:15 AM
awesome bud... thanks. I was yanking my hair out trying to make it one item, was giving me all sorts of errors.
Corwyn
Corwyn 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 April 10th, 2016, 11:59 AM
Quote:
Originally Posted by Corwyn View Post
I was yanking my hair out trying to make it one item, was giving me all sorts of errors.
No problem. Just as an FYI you "could" make it one item by making use of the "Activation Amount" feature. But its allot of extra scripting that just does not seem worth it in this case.

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
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 09:00 AM.


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