Lone Wolf Development Forums  

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

Notices

Reply
 
Thread Tools Display Modes
Anpumes
Member
 
Join Date: Sep 2012
Posts: 57

Old October 8th, 2015, 12:28 PM
Alright, I'm at this again after a long break. I thought I'd start by refreshing some of my older custom stuff to get myself back into the hang of coding and while I've had some decent luck and am starting to understand things again, I'm also finding myself confused on some issues.

Before anything else let me apologize for rehashing things that have already been covered but in light of obvious recent changes to HL, maybe it is warranted. Also allow me to apologize for the length of this post but I wanted to provide as much detail as possible and show that I've done quite a bit of research.

Let me start with what I'm trying to do, or figure out as the case may be.
  • Use Charisma rather than Wisdom for the monks class specials of AC Bonus, Ki Pool and DC's.

Now, I've done my searching and have come across two threads that pertained to this but neither really seem to really answer the questions posed. In fact these previous threads prompted me to dig deeper to find answers on my own but this has simply led to more questions and confusion, maybe due to some of the changes in HL that I mentioned above.

The first one, Charisma based monk, dated February 2011, showed the most promise and in fact is what I've currently implemented on my monk archetype for AC. However, I noticed some code that proved difficult to understand.

Post-attributes:20000 - this is a snippet that caused the most confusion.
Code:
      ~ Apply our AC bonus to all our armor scores
      hero.child[ArmorClass].field[tACWisMod].value += field[abValue].value
Now, I've figured out that field[tACWisMod] is a new-ish field for ArmorClass that identifies this as a wisdom bonus, presumably to help with stacking. Leaving this field as is reports, on mouseover, AC field "+ X (wisdom)," changing this to field[bonus] changes the mouseover to "+ X untyped bonus," which works. However, I found that there is no Charisma equivalent to [tACWisMod] that would show "+ X (charisma)."

While I do have a working version of the monks AC Bonus class special, by recreating and modifying the monk class version, removing the monk version from the archetype and bootsrapping the new class special onto the archetype, I'd prefer a cleaner solution, similar to what's mentioned in this thread, Reasigning special ability linked attributes, dated March 2014. Here is is suggested that the Sage Sorcerer or the Scarred Witch Doctor might provide answers.

First I looked at the Sage Sorcerer and while it does have code to change the attribute from Charisma to Intelligence, it seems to only be for spell related abilities, which is not exactly useful in this case.

First:10000
Code:
      perform hero.childfound[cHelpSor].assign[SplAttr.aINT]
So I dug further and looked at Scarred Witch Doctor but I couldn't find anything that actually showed how they use "Constitution rather than Intelligence when determining the highest level of spell." I also couldn't find anything in the class specials specific to the Scarred Witch Doctor, so I call this path a bust.

I then dug further, looking for anything that changed an attribute for something to something else. I looked at the Ninja class but since it is a class and not an archetype the handling is probably implausible. Finally, I came to the Shigenjo archetype for Tengu. Here I found that the Ki Pool class special, while a class special in itself, had some code that I could adapt. The following code works wonderfully for getting Charisma into the Ki Pool class special with the side effect that when it is active on the character a context box appears on the class tab that lets the user select between Charisma and Wisdom. This is really a nonissue but one that I felt needed to be mentioned. I also had to run this at First:10000 not Post-attributes:5000, maybe I still have a timing problem...

First:10000
Code:
      ~ Check for monk's Ki Pool class feature, if we have it then change attribute use from Wisdom to Charisma
      if (hero.haschild[BaseClSpec,"thingid.cMnkKiPool"] <> 0) then
        perform hero.child[cMnkKiPool].assign[UseAttr.aCHA]
      endif
So, this leaves me without a clean answer to the monks AC Bonus class special, without rebuilding it as I have or how to handle any of the monk's DC's that rely on Wisdom.

Any help with these two problems would be greatly appreciated.

Again, sorry for the length (wall of text), that probably no one wants to read.

TL;DR
  • Can't find a way to make Charisma the primary stat for the monks AC Bonus, without custom rebuilding the class feature.
  • Found an interesting fix to make Charisma the primary stat for the monks Ki Pool.
  • Would like help resolving this once and for all

Last edited by Anpumes; October 9th, 2015 at 08:33 PM.
Anpumes is offline   #1 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,794

Old October 8th, 2015, 01:18 PM
For DCs, foreach through the monk's abilities replacing the existing StandardDC tags with your new attribute's tag.

For the AC bonus you're going to have to add it as an untyped bonus. I would zero out the field which the monk class ability applies to tACWisMod and add your new attributes modifier to the untyped bonus field.

If these changes apply to only certain monks, run the eval script from an archetype. If it is for all monks, then perhaps a mechanic would be better.
Aaron is offline   #2 Reply With Quote
Anpumes
Member
 
Join Date: Sep 2012
Posts: 57

Old October 8th, 2015, 02:32 PM
Quote:
Originally Posted by Aaron View Post
For DCs, foreach through the monk's abilities replacing the existing StandardDC tags with your new attribute's tag.
This sounds easy enough actually. I'll look into it more to see if I can figure it out.

Quote:
Originally Posted by Aaron View Post
For the AC bonus you're going to have to add it as an untyped bonus. I would zero out the field which the monk class ability applies to tACWisMod and add your new attributes modifier to the untyped bonus field.
I get what you are saying but I have no idea how to implement that.
I'm also stuck trying to figure out how to get the monk's AC Bonus class feature to pick up that I want to use Charisma. I've tried the following code at different timings but I can't get it to work.

Code:
      ~ Change our monk AC Bonus to use Charisma rather than Wisdom
      perform hero.child[cMnkAC].assign[UseAttr.aCHA]
I've tried this at just about every timing I can think of...
  • Post-attributes:9900 - before AC Bonus sets #attrbonus[aWis]
  • Post-attributes:10100 - after AC Bonus sets #attrbonus[aWis]
  • First:10000 - where my Ki Pool Charisma swap takes place
  • Pre-level:10000
There are others but at this point I'm assuming my code while compiling correctly is wrong and not doing the thing I want it to do but I've looked through fields and tags for everything from the monks AC Bonus class special to the fields and tags on the hero and I can't find any reference that would help me figure this out on my own.

Quote:
Originally Posted by Aaron View Post
If these changes apply to only certain monks, run the eval script from an archetype. If it is for all monks, then perhaps a mechanic would be better.
This is just for this archetype. Normal monks and other archetypes are unchanged.
Anpumes is offline   #3 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,794

Old October 8th, 2015, 03:41 PM
If you copy the AC Bonus class special of the monk, and look at it's eval scripts, you can see when it calculates it's bonus, what field that bonus is stored in, and when that field is used to apply its effects. With that information, you should be able to intervene between those two points to zero out the effects of the class ability.

Then you can calculate a new value based on Charisma in a different script, and apply that as an untyped bonus to AC.
Aaron is offline   #4 Reply With Quote
Anpumes
Member
 
Join Date: Sep 2012
Posts: 57

Old October 9th, 2015, 08:40 PM
Quote:
Originally Posted by Aaron View Post
If you copy the AC Bonus class special of the monk, and look at it's eval scripts, you can see when it calculates it's bonus, what field that bonus is stored in, and when that field is used to apply its effects. With that information, you should be able to intervene between those two points to zero out the effects of the class ability.

Then you can calculate a new value based on Charisma in a different script, and apply that as an untyped bonus to AC.
I think I figured out how to intervene with the AC bonus calculation but it appears that by interceding, I've lost the bonuses applied by the bootstrapping of the monks AC Bonus on the monk. Should I figure that problem out, I'm still stuck on not being able to get Charisma to override Wisdom for the AC bonus and I don't know how to proceed.

Maybe it is just because I don't know what #attrbonus[] is doing but is more likely my inept skills at coding. Either way, the simplest fix is just to duplicate the Monks AC Bonus, change the two bits of code to snatch Charisma for AC and make it untyped, and bootstrap it to my archetype.

I'm disappointed that I could not find a cleaner solution.

Thanks for your help Aaron.
Anpumes is offline   #5 Reply With Quote
DeltaMasterMind
Senior Member
 
Join Date: Jul 2014
Posts: 412

Old October 10th, 2015, 11:36 AM
This code for AC on monk with eval scripts:
hero.child[ArmorClass].field[tACWisMod].value = #attrmod[aCHA]
With timing Final Phase (user) 1500 works although it shows as a Wis armor bonus but is using Cha.
Been playing with the Kipool scripts still not playing nice.

Edit: If you get farther with the other specials of monk post it. I am trying to rebuild the Kung Fu Genius Feat.

Edit2: I found that this code in eval scripts works the dc for stunning fist.
#dc[fStunFist] += #attrmod[aCHA]

so #dc[bootstrapthing] += #attrmod[aANY] for specific dc changes. No idea how to do it across the spectrum yet. Still working on it.

Edit3: Here is the Ki pool adjustment. Which is working as stated, but with CHA mod instead.
if (hero.haschild[BaseClSpec,"thingid.cMnkKiPool"] <> .5) then
#trkmax[cMnkKiPool] += #attrmod[aCHA]
endif

Last edited by DeltaMasterMind; October 11th, 2015 at 07:23 AM. Reason: Update
DeltaMasterMind is offline   #6 Reply With Quote
Anpumes
Member
 
Join Date: Sep 2012
Posts: 57

Old October 11th, 2015, 04:57 PM
Quote:
Originally Posted by DeltaMasterMind View Post
This code for AC on monk with eval scripts:
hero.child[ArmorClass].field[tACWisMod].value = #attrmod[aCHA]
With timing Final Phase (user) 1500 works although it shows as a Wis armor bonus but is using Cha.
Been playing with the Kipool scripts still not playing nice.
Thank you!
However, this is still not working as intended; well at least not how the monk's AC Bonus is supposed to. While this does change [tACWisMod].value to read Charisma modifier as the bonus to AC, it also destroys the monk's bonus AC gained at 4th, 8th, 12th, 16th, and 20th and more importantly, no longer disables when the monk is armored or encumbered. The script is running too late and is overriding everything previously sent to [tACWisMod].value. In fact, anything running after Post-attributes: 20000 that alters [tACWisMod].value renders the entire class feature broken...

What I know for sure is: #attrbonus[aWIS] is assigned to AC Bonus at Post-attributes: 10000; Armor bonus is being reported to [tACWisMod].value and applied to the hero at Post-attributes: 20000; As far as I understand it, for the rest of the AC Bonus script to remain valid, the change to Charisma modifier must happen in that window. Now I could be completely wrong but nothing I've tried yet has truly worked as the feature is intended, aside from duplicating the class feature, removing the monks version, and bootstrapping the duplicated version to the archetype at 1st, 4th, 8th, 12th, 16th, and 20th.

---EDIT!!
I found a workaround, while not perfect, applies the hero's Charisma modifier in place of the Wisdom modifier.

Post-attributes: 11000
Code:
      ~ Change the monks AC bonus from Wisdom to Charisma
      hero.child[cMnkAC].field[abValue].value -= #attrbonus[aWIS]
      hero.child[cMnkAC].field[abValue].value += #attrbonus[aCHA]
This zero's out the Wisdom bonus gained in an earlier running script and applies Charisma modifier in it's place.

What I still don't know how to do without breaking the AC Bonus scripts is to change the bonus being reported to [tACWisBon]. Though I'm sure a script running after Post-attributes: 20000 could theoretically be used to forward [tACWisBon] to say [Bonus], then zero the original [tACWisBon] but at this point I don't know that I care enough to do that.
/EDIT---

Quote:
Originally Posted by DeltaMasterMind View Post
Edit: If you get farther with the other specials of monk post it. I am trying to rebuild the Kung Fu Genius Feat.

Edit2: I found that this code in eval scripts works the dc for stunning fist.
#dc[fStunFist] += #attrmod[aCHA]

so #dc[bootstrapthing] += #attrmod[aANY] for specific dc changes. No idea how to do it across the spectrum yet. Still working on it.

Edit3: Here is the Ki pool adjustment. Which is working as stated, but with CHA mod instead.
if (hero.haschild[BaseClSpec,"thingid.cMnkKiPool"] <> .5) then
#trkmax[cMnkKiPool] += #attrmod[aCHA]
endif
My code for changing the monk's Ki Pool to Charisma is different and works marvelously.

First: 10000
Code:
      ~ Check for monk's Ki Pool class feature, if we have it then change attribute use from Wisdom to Charisma
      if (hero.haschild[BaseClSpec,"thingid.cMnkKiPool"] <> 0) then
        perform hero.child[cMnkKiPool].delete[UseAttr.aWIS]
        perform hero.child[cMnkKiPool].assign[UseAttr.aCHA]
      endif
Now if only AC Bonus was simply tagged with a UserAttr.aWis tag...

Last edited by Anpumes; October 11th, 2015 at 05:15 PM. Reason: epiphany
Anpumes is offline   #7 Reply With Quote
DeltaMasterMind
Senior Member
 
Join Date: Jul 2014
Posts: 412

Old October 12th, 2015, 05:58 AM
Yeah your code is working as you say Marvelously. I honestly don't know much about how the timings within herolab work so alot of my work was in final phase and that seems troublesome now I that I've had a chance to play around more. The Monk AC is playing normally for me although I am using your scripts in a feat setting. Haven't been in the archetype area yet. Can't seem to figure out how to get #dc to play as I need it though. Trying to get fStunFist to not react to wis yet only thing I found so far to changing the DC is #dc.

Glad you had some success with your trials. Kudos!

Edit: To think after 10 tries I finally got the dc working, as intended still remains to be seen.
#dc[fStunFist] -= #attrmod[aWIS]
#dc[fStunFist] += #attrmod[aINT]
In Post Attributes 11000 with the AC scripts. Surely they probably should go elsewhere but just glad I finally got the WIS to stop affecting it. Correction only can get it to stop dropping on low Wis, no idea how to bring up the field menu for feats or the like so what to exact exactly is a mystery still. Thankfully your code showed me where my errors are in my setup.

Last edited by DeltaMasterMind; October 12th, 2015 at 07:00 AM.
DeltaMasterMind is offline   #8 Reply With Quote
Anpumes
Member
 
Join Date: Sep 2012
Posts: 57

Old October 12th, 2015, 08:25 AM
Thank you!

The timings are what I have the most trouble with. In this case at least, with some trial and error, I could determine when a thing had to happen so that it had the desired effect. Knowing that was only part of the solution as I couldn't find any code where this change was being done for the ability I was trying to alter. It just sort of came to me when I was digging into the debug fields.

The AC Bonus code should work at that timing on a feat just as well as on the archetype where I put it. It is just a matter of the right code at the right timing for most things.

As for your DC dilema, try looking at this thread, it might provide some insight. You can also look for other classes or archetypes that change something similar.
Anpumes is offline   #9 Reply With Quote
DeltaMasterMind
Senior Member
 
Join Date: Jul 2014
Posts: 412

Old October 12th, 2015, 08:45 AM
You are the best! Thank you! Yes that thread was exactly what I needed!
DeltaMasterMind 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 01:29 PM.


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