Senior Member
Join Date: Apr 2010
Location: Lemont, IL
Posts: 320
|
Working on a complex race, and trying to get an Alternate Racial Trait to reset the selection of ability modifiers similar to the Tiefling Heritages. The race has a selection of animals to choose from that adjusts the ability scores. One of the selections is below:
Code:
<thing id="rcMSApe" name="Ape" description="{b}{u}Ability Modifiers:{/b}{/u} +2 Str, +2 Con, -2 Cha\n\n{b}Ability Scores:{/b} In all forms, +2 to two physical ability scores and -2 to one mental ability score determined by the natural lycanthrope's Base Animal. Natural lycanthropes are physically robust, but are torn between their bestial and civilized natures and suffer conflicting impulses. See the accompanying table for a list of animal forms and their statistic adjustments." compset="RaceCustom" summary="{b}Ability Modifiers:{/b} +2 Str, +2 Con, -2 Cha"> <tag group="AllowRCust" tag="rMSLycNatu"/> <tag group="Helper" tag="Secondary"/> <tag group="Helper" tag="SpecUp"/> <eval phase="First" priority="602"><![CDATA[~If we have been replaced, then get out now doneif (tagis[Helper.SpcDisable] <> 0) ~set our focus to the hero's race perform hero.findchild[BaseRace].setfocus doneif (state.isfocus = 0) ~We need to add our animal abilities to our race. focus.field[rSTR].value += 2 focus.field[rCON].value += 2 focus.field[rCHA].value -= 2]]></eval> <eval phase="First" priority="601" index="2"><![CDATA[~set our focus to the hero's race perform hero.findchild[BaseRace].setfocus doneif (state.isfocus = 0) ~Now we want to add our Base Race (Animal) side to our race name also. focus.field[livename].text &= ", " & field[name].text & ")"]]></eval> </thing> The problem I am having, is that with the Alt Racial Trait I am working on, it replaces the scores set above. When I try to Replace the selection above, it is still running the focus for both abilities. I have set the timing for the trait both before (601) and after (603) the timing of the above Racial Special (602). Code:
<thing id="raMSRunLit" name="Runt of the Litter" description="The insular nature of natural lycanthropic society sometimes leads to inbreeding. Natural lycanthropes with this racial trait have the following modified base statistics: +2 Dexterity, +2 Intelligence, -2 Constitution. This replaces the normal statistics modifiers granted by their base animal." compset="AltRaceTrt" uniqueness="unique"> <tag group="AllowRCust" tag="rMSLycNatu"/> <tag group="RaReplace" tag="rcMSApe"/> <eval phase="First" priority="601"><![CDATA[~set our focus to the hero's race perform hero.findchild[BaseRace].setfocus doneif (state.isfocus = 0) ~We need to add our animal abilities to our race. focus.field[rDEX].value += 2 focus.field[rINT].value += 2 focus.field[rCON].value -= 2]]></eval> </thing> |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Focus is not retained between scripts. You've got each of your two scripts setting the focus itself.
If you're trying to keep the ability score modifier one from running in some circumstances, concentrate on when the Helper.SpcDisable tag is being added, compared to when this script is running. If you're counting on the normal ART mechanisms to handle that replacement, I'm sure it hasn't happened by the ultra-early phase you're using for your scripts. Try a more normal phase than First - that phase is supposed to be reserved for things that absolutely have to happen early, because everything else about the character depends on knowing those values. Setting the attribute modifiers on the race and setting livenames don't qualify as important enough to belong in the First phase. |
#2 |
Senior Member
Join Date: Apr 2010
Location: Lemont, IL
Posts: 320
|
Gah! Thanks Mathias. The Helper.SpcDisable timing gets me every time.
|
#3 |
|
|