• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Size Changing Racial Ability

AndrewD2

Well-known member
I'm working on implementing an ability that changes a gnome from small to diminutive.

My code is currently
Code:
  <thing id="raRPGnoTri" name="Trixie Transformation" compset="RaceSpec" summary="you become diminuative and may grow wings" uniqueness="unique">
    <tag group="Helper" tag="ShowSpec"/>
    <tag group="AbilType" tag="Super"/>
    <tag group="User" tag="Activation"/>
    <tag group="User" tag="Tracker"/>
    <eval phase="UserFirst" priority="2000">doneif (field[abilActive].value = 0)

hero.child[aDEX].field[Bonus].value += 4
hero.child[aSTR].field[Penalty].value -= 6
 
~we want to decrease our size by -2
      var sizemod as number
      sizemod = -2
      call SizeChange</eval>
    </thing>

I based that on the adjustment for Reduce Person and Enlarge person, changing the appropriate values to adjust the strength lower and the dexterity higher and adjusting the size down 2 so be diminutive instead of tiny.

Anyways, when activated as it is currently everything seems to update properly, except the AC. Currently I get the +3 AC for the size change, but not the bonus from the dexterity increase. If I comment out the size change I get the bonus from dexterity. I can't see what I am missing here.

Any ideas?

Andrew
 
Does it lower the encumbrance limit so far that the test character becomes encumbered, and starts taking Max Dex limits from the encumbrance (if you're testing on a PC, the 3 lbs of coins that's the default starting cash would be medium encumbrance to a diminutive creature with an effective strength of 2). Medium encumbrance's max dex of +3 may be limiting the effectveness of the DEX bonus you're adding.
 
Doh, yeah that was it. Now this ability is supposed to resize all equipment with the character. Is there a way to do that?
 
Doh, yeah that was it. Now this ability is supposed to resize all equipment with the character. Is there a way to do that?
You have the script set to phase="UserFirst" priority="2000". For size change stuff I have always used "First 1,000".

See if that fixes the equipment not changing size.
 
This is the script I use in d20. You may be able to port it over to pathfinder, but I haven't checked. Might at least be a starting point:

Code:
     foreach pick in hero from MyGear
        eachpick.field[gSizeMod].value += field[pAdjust].value
        nexteach
 
Sendric, the SizeChange procedure in Pathfinder, which he's calling, includes that code. That's why ShadowChemosh is trying to help him track down why it isn't having the effect it's supposed to.

ShadowChemosh and AndrewD2 - I'd look into which items you're testing this on - double check that they're ones that are supposed to be changing size, rather than items whose size is fixed.
 
Sendric, the SizeChange procedure in Pathfinder, which he's calling, includes that code. That's why ShadowChemosh is trying to help him track down why it isn't having the effect it's supposed to.

Man...your Pathfinder code is so much cooler than d20.
 
ShadowChemosh and AndrewD2 - I'd look into which items you're testing this on - double check that they're ones that are supposed to be changing size, rather than items whose size is fixed.
Yea good suggestion also is the size changes going smaller but are they still putting your character over weight because the Str is going down so much?

From my quick testing last night everything was changing size correctly.

@AndrewD2 do you have any specific examples of equipment, armor, magic items, or something that is NOT changing size?
 
Well I just tried with padded armor, which weighs 5 lbs as small, and should only weigh 1lb as diminutive, and it stayed 5lbs when I clicked the box to change size.
 
Ok some slight changes to the code so I figured I'd put those up. Its supposed to be an alternate racial ability and previously I was creating a racial ability and bootstrapping it into the alternate, now I've just got it all in the alternate. As my testing for the size change doesn't seem to be doing anything I've moved on to adding flight with 5 or more HD. It compiles fine, but the flight doesn't show up.

Code:
  <thing id="raRPTriAnc" name="Trixie Ancestry" description="Some gnomes have a spiritual or hereditary bond with an ancient relative that was transformed into the combination of a gnome and a pixie. As a full-round action, they can become Diminutive. They gain a +4 size bonus to their Dexterity, and &#150;6 penalty to their Strength, a +3 size bonus to attack rolls and armor class, a +4 size bonus to the Fly skill, a +6 size bonus to Stealth and a -3 size penalty to both CMB and CMD. Their gear is also changed appropriately for the character&#146;s new stature. If they possess at least 5 Hit Dice they gain thin, transparent wings that allow them to fly at a speed of 30 with perfect maneuverability, their gear is transformed to allow for and accommodate their wings, and they also gain Fly as a class skill. This racial trait replaces the\ngnomish magic racial trait." compset="AltRaceTrt" summary="can become Diminutive" uniqueness="unique">
    <fieldval field="actName" value="Trixie Transformation"/>
    <usesource source="bPF101_ART"/>
    <tag group="AllowRCust" tag="rGnome"/>
    <tag group="RaReplace" tag="raGnIllus"/>
    <tag group="RaReplace" tag="raGnDance"/>
    <tag group="RaReplace" tag="raGnGhost"/>
    <tag group="RaReplace" tag="raGnSpeak"/>
    <tag group="RaReplace" tag="raGnPrest"/>
    <tag group="User" tag="Activation"/>
    <tag group="ProductId" tag="PIdRitePub"/>
    <tag group="Custom" tag="Abil12"/>
    <bootstrap thing="xFly">
      <containerreq phase="First" priority="1000">hero#Custom.Abil12</containerreq>
      <autotag group="Value" tag="30"/>
      <autotag group="Maneuver" tag="Perfect"/>
      </bootstrap>
    <eval phase="First" priority="1000">doneif (field[abilActive].value = 0)

hero.child[aDEX].field[Bonus].value += 4
hero.child[aSTR].field[Penalty].value -= 6
 
~we want to decrease our size by -2
      var sizemod as number
      sizemod = -2
      call SizeChange</eval>
    <eval phase="UserPostLv" priority="1000" index="2"><![CDATA[if (#totallevelcount[] > 4) then
    perform hero.assign[Custom.Abil12] 
endif]]></eval>
    </thing>
 
Your Bootstrap condition is running at First 1000 looking for the Custom.Abil12 tag. However that tag isn't being assigned until UserPostLv 1000, which is much later than that. Assign the tag before First 1000 and the Fly special should show up.
 
As my testing for the size change doesn't seem to be doing anything I've moved on to adding flight with 5 or more HD. It compiles fine, but the flight doesn't show up.
This one is a little easier to figure out. Your script does not put the Custom.Abil12 tag on the hero until Post Level but the Container Script is looking for it to be there at first 1,000.

Though honestly this is the super hard way to do it. Much easier to not try and use bootstraps with Value.? tags as xFly is bootstrapped to all characters anyway. This works because xFly, xClimb, etc don't show themselves unless they have a value greater than zero.

So do this:
Code:
~ Post Level 10,000
if (#totallevelcount[] > 4) then
    ~ Give speed of 30
    #value[xFly] += 30
    ~ assign the Perfect Maneuver tag to Fly
    perform hero.child[xFly].assign[Maneuver.Perfect]
endif
 
Thanks. That works great. And I added: doneif (field[abilActive].value = 0) to the beginning to it turns on and off with the ability.
 
Well I just tried with padded armor, which weighs 5 lbs as small, and should only weigh 1lb as diminutive, and it stayed 5lbs when I clicked the box to change size.
So there does seem to be an issue. I just tried this out in my CORE data set and used the "Monstrous Physique II (Tiny)" spell mod for testing. And while everything is changing size the weight of armor and weapons are NOT changing.

So medium Padded Armor was staying 10 lbs even when shrunk down to size tiny.

I am not sure if the Procedure needs some additional code or if the Background/Skeletal scripts need to be changed/fixed to take into account weight changes when they item changes on the fly.
 
Please report this in the bug thread then and I will take a look in the runup to the next release.
 
Hey, you are advancing my RiP files? Maybe we can work together to get better and faster HL files for Rite Publishing?
 
Back
Top