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 14th, 2017, 12:57 PM
Hi everyone, thanks to the invaluable help of the editor community, I have been able to fix about half of my bug list for my custom class on my own. It was a lot of trial and error, but I eventually arrived at a solution, and I did many happy dances.

But that still leaves 9 bugs in the class that I am at a loss on how to correct (or in some cases, even how to script). 'If' statements worked out okay for me, but foreach statements are still not sinking in.

If I could humbly ask for the communities help (and guidance) on how to fix these, I will gratefully share my work with any who want a copy. I can't promise elegant code, but it will hopefully work...

Thanks everyone!
Bob G is offline   #1 Reply With Quote
Bob G
Senior Member
 
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226

Old December 14th, 2017, 01:03 PM
Bug #1:

I want to code an ability that grants a +1 competence bonus to AC and saving throws to any creature that the character uses as a mount. I recognize that mounts fall into the gizmo category, but if a mount is not added to the character, I get error messages. Any ideas on how to make the bonus conditional based on whether a mount is added or not?

Gracias!
Bob G is offline   #2 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old December 14th, 2017, 02:07 PM
On the conditions tab there is a "mounted" condition, which points at any creature the hero is currently riding. You can transition from there to the other hero and make changes as necessary. Here is an example, from the Cavalier's Mounted Mastery ability:

Code:
      ~ get the strength bonus of our current mount
      if (hero.child[pstMounted].field[pMount].ischosen <> 0) then
        field[abValue3].value += hero.child[pstMounted].field[pMount].chosen.minion.child[aSTR].field[aModBonus].value
        endif
Aaron is offline   #3 Reply With Quote
Bob G
Senior Member
 
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226

Old December 18th, 2017, 11:34 AM
Quote:
Originally Posted by Aaron View Post
On the conditions tab there is a "mounted" condition, which points at any creature the hero is currently riding. You can transition from there to the other hero and make changes as necessary. Here is an example, from the Cavalier's Mounted Mastery ability:

Code:
      ~ get the strength bonus of our current mount
      if (hero.child[pstMounted].field[pMount].ischosen <> 0) then
        field[abValue3].value += hero.child[pstMounted].field[pMount].chosen.minion.child[aSTR].field[aModBonus].value
        endif
Okay, that gets me most of the way. The code I'm using is:
Code:
~ Calculate bonus
field[abValue2].value += round(field[xTotalLev].value / 4, 0, -1) + 1

~ Add AC bonus to mount if hero is mounted.
      if (hero.child[pstMounted].field[pMount].ischosen <> 0) then
        hero.child[pstMounted].field[pMount].chosen.minion.child[ArmorClass].field[BonComp].value += field[abValue2].value
        endif
The editor has no problems with the script, and the bonus is being recognized (when I look at the Armor Class breakdown, I see the competence bonus), but the actual armor class of the minion isn't changed.
Bob G is offline   #4 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old December 18th, 2017, 04:43 PM
Well, timing is the first thing that comes to mind. When are you running the script?

Also, mind your bonus types and stacking.
Aaron is offline   #5 Reply With Quote
Bob G
Senior Member
 
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226

Old December 18th, 2017, 07:29 PM
AAARRRGGGGHHHH!!!! I hate when I forget to check the timing. Changing it from Final/15000 to Post-Attributes/11000 did the trick. Thanks for the millionth save, Aaron!
Bob G is offline   #6 Reply With Quote
Bob G
Senior Member
 
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226

Old December 18th, 2017, 08:32 PM
Onward and upward!

Next issue:
Class special ability grants the Amateur Gunslinger feat, and creates a Grit pool with a maximum grit point total of 1+INT modifier.

I copied the Amateur Gunslinger feat, changed it so that INT is the attribute modifier, and the Amateur Gunslinger tab appeared, along with all Deeds that qualify as per the feat.

I then thought that maybe I needed to copy the Grit ability so that I could change the trkMax field. Did that, changed the attribute modifier to INT, set trkMax to aINT value, but grit is still tracking based on WIS instead of INT.

The code I am using is:
Code:
hero.child[trkGrit].field[trkMax].value += hero.child[aINT].field[aBonus].value

field[abText].text = hero.childfound[trkGrit].field[trkMax].value
What is causing the script to still look at WIS for trkMax?

Shalom.
Bob G is offline   #7 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old December 19th, 2017, 07:40 AM
Grit is a bit special because there are several pools which combine with it (luck and panache), so there are a series of Helper tags which govern how it works. You can copy trkGrit to see how it is calculating charges and based on what. Or take a look at the Holy Grit class ability, which switches grit to be based on Charisma.
Aaron is offline   #8 Reply With Quote
Bob G
Senior Member
 
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226

Old December 19th, 2017, 09:04 PM
Quote:
Originally Posted by Aaron View Post
Grit is a bit special because there are several pools which combine with it (luck and panache), so there are a series of Helper tags which govern how it works. You can copy trkGrit to see how it is calculating charges and based on what. Or take a look at the Holy Grit class ability, which switches grit to be based on Charisma.
Couldn't figure this one out. I tried using Holy Grit as a model, but I saw nothing in the eval script that referenced CHA and any tracker tags.
Bob G is offline   #9 Reply With Quote
charlieluce
Senior Member
 
Join Date: Jul 2008
Posts: 1,321

Old December 19th, 2017, 09:57 PM
It's in the Helper Tags on the Bootstrap trkGrit: GrtUseCHA

Currently Running: Pathfinder Second Edition
Currently Playing:
Pathfinder First Edition, Star Trek Adventures
Former HL Games: D&D 4e & 5e, Mutants & Masterminds 2E & 3E, Savage Worlds
charlieluce is offline   #10 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 06:07 PM.


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