• 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

Dynamic RaceSize and tGearSize

cgcurrie

Member
I'm working on a set of races that share common rules. It's not a new subtype, though, so the best way I found to implement it was to put the common rules in one big Custom Race Trait that is bootstrapped by all the variant races. It's worked well so far, though the code could probably use some cleanup.

The Custom Race Trait has an Array Based Menu that, among other effects, changes the RaceSize.? tag on the BaseRace. For the most part, no problems; almost every size-based effect is updated automatically as menu is changed.

The one thing that looks funny now is a Racial Special with the SpecType.Attack tag. When the size of the race is increased, the Racial Special appears to remain the same size, because it gains a size indicator in parentheses which indicates the attack is a different size than the creature.

I've tried a number of different approaches to setting the size of the Racial Special, without much success. The one odd thing I see in the debug windows is that, even though tSize and tBaseSize change correctly on the Hero when the RaceSize is modified, tGearSize does not; it remains at the base value. I'm not sure if there's anything I can do to correct that, as an old thread on the forum seemed to imply that there is some complexity under the hood around gear size.

Any thoughts on what I might add or do differently would be welcome.
 
So this racial special is a weapon like special ability which shows on the weapons tab? And it should be adjusting it's damage up and down as your size changes?

When is your script replacing RaceSize running, and what does it look like?
 
It's less about the damage (though that is a factor, but one I think is tied to the gear size issue), and more about the weapon being "marked" as the incorrect size, and the gSize field being incorrect.

Right now I have it running at First/95. It uses the index from the Array Based Menu to compute the desired size as a string on the raceSize variable, and then ends with:


hero.findchild[BaseRace].setfocus
focus.delete[RaceSize.?]
focus.assignstr[raceSize]
state.clearfocus


This happens in a Procedure with 'pick' context.
 
As it turns out, I had forgotten that the model I was using for the attack (the dragon Crush attack) had both a weapon and a special attack entry. Adding Helper.GearNoSize to the weapon, rather than to the special ability, fixed issue with the display of the weapon entry.

There is still the lingering issue that the value of tGearSize doesn't get updated, so the dropdown for adding new weapons is the wrong size. But I suspect this is one of those items, like rHPStart, that gets loaded when the race is loaded and can't be later controlled.
 
Back
Top