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)
-   -   Spell DCs linked to variable mental attribute (http://forums.wolflair.com/showthread.php?t=66393)

Lord Magus October 3rd, 2021 05:59 AM

Spell DCs linked to variable mental attribute
I am looking for a way to make a configurable figure spell DCs based on the highest mental attribute a character has (it is for a campaign where everyone has some sort of cantrip).

The way I see it, I have to...
1- go through mental attributes and pick the highest associated bonus, then
2- store that somewhere and
3- replace the StandardDC.? tag with the appropriate new tag

I have an idea how to do 3, but can't wrap my head around 1 and 2. Any pointers or existing examples I can base myself on?

Minous October 3rd, 2021 07:36 AM

with only three attributes its fairly easy. Set a max_casting_mod var to 0, and a second one to track the associated attr (max_attr). hero.child[aCHA].field[aModBonus].value is where the attr mod is stored. Then go thru the three (aCHA,aINT,aWIS) and then set check if that value is bigger than max_casting_mod, if it is update max_casting_mod to whatever the bonus is, and then set something like max_attr = "aCHA" or whatever. Then at the bottom compare the value of max_attr to the three stats in an if statement, and push the corresponding StandardDC tag

Lord Magus October 5th, 2021 04:45 PM

Thanks for these. However, I Am Not A Programmer, hence the second request for existing examples. (I don't want to have this script written for me, but as I just spent about an hour figuring what was wrong in a situational bonus macro, you can see I'm still pretty bad at this.)

All times are GMT -8. The time now is 07:26 AM.

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