Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game

Notices

Reply
 
Thread Tools Display Modes
Bob G
Senior Member
 
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226

Old December 15th, 2017, 02:14 PM
Quote:
Originally Posted by Mathias View Post
Back to the scripting tutorials:
http://forums.wolflair.com/showthread.php?t=21688

You're doing math here, so what does the math tutorial say about how you can use an abbreviation to save yourself a lot of typing when doing arithmetic?

Once you've got that fixed, then we'll do another fix for this line - competence bonuses are non-stacking, so you're not actually adding a bonus in the correct way. As written, your bonus will stack with anything else that's adding a competence bonus. But still best to make sure you understand how to set up the basic math, and then we'll do a lesson on how to apply non-stacking bonuses.
Will do, sir!
Bob G is offline   #11 Reply With Quote
Bob G
Senior Member
 
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226

Old December 18th, 2017, 06:59 AM
Quote:
Originally Posted by Mathias View Post
Back to the scripting tutorials:
http://forums.wolflair.com/showthread.php?t=21688

You're doing math here, so what does the math tutorial say about how you can use an abbreviation to save yourself a lot of typing when doing arithmetic?

Once you've got that fixed, then we'll do another fix for this line - competence bonuses are non-stacking, so you're not actually adding a bonus in the correct way. As written, your bonus will stack with anything else that's adding a competence bonus. But still best to make sure you understand how to set up the basic math, and then we'll do a lesson on how to apply non-stacking bonuses.
I think the abbreviation you're referencing is something like this:
Code:
field[usrChosen1].value += field[BonComp].value += 5
But I know that's not exactly right. I want to point to the skill that the user selects, go to that skill, and add a +5 competence bonus to it. Is it better to do:
Code:
field[usrChosen1].field[BonComp].value +=5
Thanks for all your patience with me. I'm learning slowly, but surely.
Bob G is offline   #12 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old December 18th, 2017, 07:16 AM
The first of those will not work. The second one is close, but you've made a mistake in your transitions - there's something missing in-between field[usrChosen1] and field[BonComp].value.
Mathias is offline   #13 Reply With Quote
Bob G
Senior Member
 
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226

Old December 18th, 2017, 09:22 PM
Quote:
Originally Posted by Mathias View Post
The first of those will not work. The second one is close, but you've made a mistake in your transitions - there's something missing in-between field[usrChosen1] and field[BonComp].value.
Figured it out!
Code:
~Take the selection chosen by the user and grant a +5 competence bonus to the skills selected
     field[usrChosen1].chosen.field[BonComp].value +=5
There's one thing left to fix, and this ability is perfect:
1. If the user is selecting two skills to apply the bonus to, and choses the first skill, can we eliminate that choice from the list of candidates on the second list?
Bob G is offline   #14 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old December 18th, 2017, 10:26 PM
Eliminating the second one is more work than we consider it to be worth for our own material when writing abilities that make changes to two separate choices from the same list. If you want, you can write an eval rule to complain if the user selects the same thing twice (there should be several examples of that sort of thing out there).

Now, in the editor's help menu...help on using the editor, and then read the section named "Reference Information". Start with the "General Modifiers" section there, and then scroll back up a little ways, and look within "Useful Macros" for things that are designed to work along with those General Modifiers.
Mathias is offline   #15 Reply With Quote
Bob G
Senior Member
 
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226

Old December 19th, 2017, 04:05 AM
Quote:
Originally Posted by Mathias View Post
Eliminating the second one is more work than we consider it to be worth for our own material when writing abilities that make changes to two separate choices from the same list. If you want, you can write an eval rule to complain if the user selects the same thing twice (there should be several examples of that sort of thing out there).

Now, in the editor's help menu...help on using the editor, and then read the section named "Reference Information". Start with the "General Modifiers" section there, and then scroll back up a little ways, and look within "Useful Macros" for things that are designed to work along with those General Modifiers.
Right, so the #applybonus macro already has the Maximum function built in, so that non-stacking bonuses don't stack:
Code:
#applybonus[BonComp],field[usrChosen1].chosen, 5
Bob G is offline   #16 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old December 19th, 2017, 07:26 AM
You're closing the [ ] too early - you're closing it just after the bonus type, but you'll need to close it at the end.
Mathias is offline   #17 Reply With Quote
Bob G
Senior Member
 
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226

Old December 19th, 2017, 10:46 AM
Quote:
Originally Posted by Mathias View Post
You're closing the [ ] too early - you're closing it just after the bonus type, but you'll need to close it at the end.
Whoops. Got it. All working wonderfully now.
Bob G is offline   #18 Reply With Quote
Reply

Thread Tools
Display Modes

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:00 PM.


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