Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Pathfinder Roleplaying Game (http://forums.wolflair.com/forumdisplay.php?f=62)
-   -   Half-way done with custom class (http://forums.wolflair.com/showthread.php?t=59762)

Bob G December 14th, 2017 12:57 PM

Half-way done with custom class
 
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. :D

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 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!

Aaron 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


Bob G December 18th, 2017 11:34 AM

Quote:

Originally Posted by Aaron (Post 260182)
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.

Aaron 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.

Bob G 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 December 18th, 2017 08:32 PM

Bug #2
 
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.

Aaron 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.

Bob G December 19th, 2017 09:04 PM

Quote:

Originally Posted by Aaron (Post 260354)
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.

charlieluce December 19th, 2017 09:57 PM

It's in the Helper Tags on the Bootstrap trkGrit: GrtUseCHA


All times are GMT -8. The time now is 10:34 AM.

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