Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Umarian
Senior Member
 
Join Date: Apr 2010
Location: Lemont, IL
Posts: 320

Old July 4th, 2013, 11:11 AM
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&apos;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>
I put a shut-down code on the first Eval Script hoping that it would not run the setfocus, but I do still want the second eval script to run, so I left it off that one.

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>
How can I get the Trait to set the Ability scores, if it is selected, instead of the animal selection?
Umarian is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old July 4th, 2013, 12:03 PM
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.
Mathias is offline   #2 Reply With Quote
Umarian
Senior Member
 
Join Date: Apr 2010
Location: Lemont, IL
Posts: 320

Old July 4th, 2013, 01:36 PM
Gah! Thanks Mathias. The Helper.SpcDisable timing gets me every time.
Umarian is offline   #3 Reply With Quote
Reply


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 04:58 AM.


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