View Single Post
Fenris447
Senior Member
 
Join Date: Sep 2017
Posts: 412

Old April 19th, 2021, 07:41 AM
The variant racial trait Thing has boxes for AC calculation. What you’ll want to do is set up an Array-based menu with Dex and Con as your options for what your AC is based on. If they select the first option, it’ll set a field called usrIndex to 0, and if they select the second drop down option, usrIndex will equal 1.

Check the box for “Armor Class Calculation” and in the AC modifiers menu, check “Constitution Modifier.” You’ll see that these add the Helper.ArmorClass and CalcAC.ConMod tags respectively.

Uncheck them, so they’re not on by default. Then your code should check for that usrIndex field. If it’s the selection for DEX, don’t do anything since that’s the default. If it’s selecting CON, perform.assign each of those tags.

As far as the feature that cancels it goes, just have the code also check to make sure that’s not present on the hero. So doneif (hero.childlives[IDofTheSubraceFeature] <> 0)

Now it’ll still show the array even if that subrace feature is present. If you really want to get fancy, use this code to set up the array (instead of having it present by default), with a doneif to prevent the code if that subrace feature is present.

Code:
doneif (hero.childlives[IDofTheSubraceFeature] <> 0)

field[usrArray].arraytext[0] = "Dexterity"
field[usrArray].arraytext[1] = “Constitution"

Found an issue with or have a suggestion for the 5e Community Pack? Please post it here at our GitHub.

Feel free to stop by the Lone Wolf Development Subreddit, for discussion of any and all LWD products and community efforts!

Last edited by Fenris447; April 19th, 2021 at 07:07 PM.
Fenris447 is offline   #2 Reply With Quote