• 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

Need Help with Racial Ability Modifier

Maidhc O Casain

Well-known member
I'm working on creating a custom race. I'm trying to set it up so that the player can choose between adding +2 to either STR or CON, and I can't quite figure it out.

I've looked at the half-elf and human to see how the choice for ability score to modify is set up, and at the Gnome Obsessive special to see how to limit the choice. I thought I had it down:

I used the Field Id from raAttr2Sel, and added " & (Helper.rSTR | Helper.rCON) to the value.

I used the Eval Scripts and Tags from raAttr2Sel 'as is.'

When I saved and tested, I got the following errors:

File: MCP Races.user (line 434) - Thing 'rMCPGlth' (dynamic tag) - Group 'chooseSrc1' not defined
File: MCP Races.user (line 405) - Thing 'rMCPGlth' - Attempt to initialize field 'usrCandid1' that is not defined withing compset


I must be missing something, but can't figure out what it is . . .
 
Have you tried looking at the tags on Strength and CON?

Helper.rSTR and Helper.rCON don't exist - can you find identifying tags that do?

For those errors, this is on a racial special, right? And you aren't working in d20, right?
 
If you post the XML for this thing's definition, I'm willing to look at it for you. I'm no expert, but I might be able to puzzle through it.
 
OK, I figured out one thing I was doing terribly wrong - I was trying to code this directly into my race rather than making a racial special.

So I've made a racial special (I am working in Pathfinder).

It looks like the tags I was looking for were "aSTR" and "aCON"

I copied the racial special "+2 to One Ability Score," then replaced the custom expression with "component.BaseAttr & (Helper.aSTR | Helper.aCON)".

Doing this got rid of all of the errors, and the ability now appears on my character background tab under Racial Abilities when I select my custom race. It reads "+2 to STR or CON, and has a drop box for selection. However, the drop box reads "Nothing to Select!"

Am I at least on the right track?
 
Last edited:
If you post the XML for this thing's definition, I'm willing to look at it for you. I'm no expert, but I might be able to puzzle through it.

Thanks! It may come to that, and if it does I'll gladly take you up on your offer as I need the race for my game. If I can (w/ Matthias clues) figure it out I'd like to; maybe I'll learn a little something that way. I'll never have the time to become really proficient, but every little bit helps.
 
OK, I figured out one thing I was doing terribly wrong - I was trying to code this directly into my race rather than making a racial special.

So I've made a racial special (I am working in Pathfinder).

It looks like the tags I was looking for were "aSTR" and "aCON"

I copied the racial special "+2 to One Ability Score," then replaced the custom expression with "component.BaseAttr & (Helper.aSTR | Helper.aCON)".

Doing this got rid of all of the errors, and the ability now appears on my character background tab under Racial Abilities when I select my custom race. It reads "+2 to STR or CON, and has a drop box for selection. However, the drop box reads "Nothing to Select!"

Am I at least on the right track?

I also tried "hero.child[aXXX]" and "Helper.hero.child[aXXX]" Both of these populated the drop box with a huge number of choices, any of which resulted in one or two "Syntax error in dynamic 'candidate' tag expression" errors and two "Attempt to access field 'aStartMod' that does not exist for thing fcHP" errors.
 
Progress!

Restricting the "Select From..." box in the Editor to "Attributes" narrowed the choice to all six attributes, and applies the bonus correctly.

Now all I need to do is figure out how to limit the choices in the drop box to STR and CON.

EDIT: NOT Progress!

Using the "Select From..." box gives me the choice and modifies the attributes even when take out the custom expression completely.
 
Last edited:
Don't go with the "Select From..." - there's no way to further restrict that (to add the STR & CON only to the existing attributes restriction).

It looks like you were on the correct track before the "Select From..." - you just hadn't gotten the specific tags right.

aSTR and aCON are correct, but can you look up the tags that are present on strength and constitution to identify one that might work, because Helper.aSTR doesn't exist.
 
aSTR and aCON are correct, but can you look up the tags that are present on strength and constitution to identify one that might work, because Helper.aSTR doesn't exist.
Can you advise on how this is done? I tried the below without success:
Code:
notify hero.child[aSTR].tagnames[,"; "]
Code:
notify hero.child[aSTR].tagnames[?.?,"; "]
This worked, but there were no matching tags:
Code:
notify hero.child[aSTR].tagnames[Helper.?,"; "]
 
In the develop menu, make sure that you have "Enable Data File Debugging" (the first option) checked. Then, right-click the strength and constitution attributes and choose "Show Debug tags for XXXXX". In that list, you should be able to find some tags that seem to be good identifiers for strength and constitution.

(P.S. In the develop menu, among the floating info windows, is "show debug output". I find
Code:
debug "something"
easier to use than
Code:
notify "something"
when I'm figuring things out).
 
mmm... and if you make 2 custom race special, one for Strength and one for Con? and under race limit to "1" the custom ability total...
 
Remember, Adam, Mowgli's asked to figure this out on his own, so he can learn it for next time, so you may want to remove the answers from your post (you are correct, BTW).
 
mmm... and if you make 2 custom race special, one for Strength and one for Con? and under race limit to "1" the custom ability total...

This would also work. Since the "+2 to an attribute" option that humans use already exists, I think it's faster to modify that to only choose from those two attributes than to build a new set of abilities to pick from, so that's why I'm leading Mowgli through this method.
 
Got it!

Final solution:

  • Copy the "+2 to One Attribute" Racial Special
  • Change the Custom Expression to "component.BaseAttr & (thingid.aSTR | thingid.aCON)"
  • Give it a new name and unique ID
  • Save and test.

Thanks, Matthias!

(Thanks to Adam.Ormond and Screetch79 as well for your suggestions!)
 
Back
Top