Senior Member
Join Date: Jan 2011
Location: Quebec, QC, Canada
Posts: 475
|
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? |
#1 |
Senior Member
Join Date: May 2015
Posts: 830
|
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
|
#2 |
Senior Member
Join Date: Jan 2011
Location: Quebec, QC, Canada
Posts: 475
|
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.)
|
#3 |
|
|