Member
Join Date: Nov 2010
Posts: 70
|
I'm trying to create a favored class option for a new race/cleric. This option grants a particular domain ability if the character does not already have it, or adds to the number of uses per day if it does.
Code:
field[abValue].value += round(field[fcCount].value/2,0,-1) if (#hasability[dPlaFist] >=1) then #trkmax[dPlaFist] += field[abValue].value else perform hero.assign[HasAbility.dPlaFist] endif For the adding the ability if it isn't already on the character, this script just seems to have no effect. I assumed that I needed to bootstrap the relevant ability to the FCO, but when I do so and test, I get the error Code:
Attempt to access field 'cTotalLev' that does not exist for thing 'fcSC' Location: 'field calculate' script for Field 'xTotalLev' near line 28 Any assistance from anyone would be appreciated. |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,207
|
Correct, HasAbility is not established until very late, so that everything that might disable that ability can be taken into account, so find something else to test in order to figure out whether that character has that ability or not.
hero.childlives[dPlaFist] will test for its presence, but if there was ever an archetype added that replaced the level 1 ability of whatever cleric domain you had selected, that would still report that you had the ability. However, unless you want to replace dPlaFist with a copy that adds a Custom tag while present, that's the best you'll be able to do. HasAbility is not an instruction: "turn this on" - it's a report: "we're active", so assigning the tag means nothing. Class specials can only be added by classes, custom class abilities, or archetypes. They depend on that linkage to the thing that added them in order to figure out their effective class level. I think you'll need an archetype to handle the "add it if we don't have it" part. |
#2 |
Member
Join Date: Nov 2010
Posts: 70
|
Ok. So workaround for that one, I can manage that. Thanks.
Got another tricky one here. A bonus to effective druid level for animal companion. It seems to me that field[fcCount].value isn't being set in time to hit the First/497-499 range that's needed to affect the effective level. Is there another way that I can grab the count for how many of that particular favored class options are selected? First/499; Timing Before "Companion Level Needed" Code:
var idk as number idk = minimum(round(field[fcCount].value/2, 0, -1), 3) field[abValue].value = idk debug "idk = " & idk debug "hero.hasminion[AnimComp] = " & hero.hasminion[AnimComp] debug "field[fcCount].value = " & field[fcCount].value ~~Previous line returns 0 debug "hero.childlives[cAnimComp] = " & hero.childlives[cAnimComp] |
#3 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,207
|
I'm afraid fcCount is calculated at First/1100.
No favored class option in one of Paizo's books offers so powerful a benefit as increasing the effective level of the minion (they all add some HP, some SP, or some other minor benefit to the minion), so we didn't set it up for that capability. I think there may be some timing conflicts if it were moved earlier. |
#4 |
Member
Join Date: Nov 2010
Posts: 70
|
That's what I was afraid of.
(To be fair to the source material, the /2 was just so I could test quicker and easier to see if it was working.) |
#5 |
Thread Tools | |
Display Modes | |
|
|