Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - D&D 5th Edition SRD

Notices

Reply
 
Thread Tools Display Modes
CNYGamer
Member
 
Join Date: Aug 2009
Location: Finger Lakes Region, New York
Posts: 59

Old November 11th, 2017, 06:06 AM
Hi all.

I'm trying to set up the Tortle race and I'm having some difficulty with regards to AC calculation. A Tortle has a natural AC of 17, can't wear armor (but can use shields), and gains no AC bonus from Dexterity.

I found the following script in another race's natural armor:

Code:
if (hero.tagis[Hero.EquipArmor] = 0) then
     hero.child[ArmorClass].field[tACUnarDef].value = maximum(hero.child[ArmorClass].field[tACUnarDef].value,field[abValue].value)
endif
It doesn't explicitely prevent the character from equipping armor, but it does set base AC to whatever value is stored in abValue (in this case, 7).

Unfortunately, it also increases AC by the character's Dexterity modifier. So my two questions are:

1. Is there a way for me to exclude the Dexterity modifier from AC?

2. Is there a way to explicitely prevent the character from equipping armor?

Thanks much!
CNYGamer is offline   #1 Reply With Quote
CNYGamer
Member
 
Join Date: Aug 2009
Location: Finger Lakes Region, New York
Posts: 59

Old November 11th, 2017, 07:00 AM
Update:

I added the following line to the scriptand chnged it's phase from Post-Attributes to Attributes, and it seems to work:

Code:
hero.herofield[tMaxDex].value = 0 to the script
I then checked to see if the Dex modifier was still being added to dex-based weapon attack and damage rolls, and that seem to be unaffected, so that is a plus.

This feels a little ham-handed and I'm wondering if there is a more elegant way to handle this.
CNYGamer is offline   #2 Reply With Quote
dungeonguru
Senior Member
 
Join Date: May 2016
Posts: 608

Old November 11th, 2017, 08:13 AM
What we did for the community tortle (which will come out next update) was to catch the DEX modifier and subtract it when unarmored, if armored, we set any worn armor bonuses to 0. This leaves shields and magic bracers/rings alone as is indicated by the tortle. It's not beautiful, but it works. It also allows a tortle to wear armor of resistance and get the resistance granted, but not the AC.

Post-attributes/5000
Code:
~ If we're not shown, just get out now
doneif (tagis[Helper.Disable] <> 0)

var dexmod as number

dexmod = #attrmod[aDEX]
~ turn it into a penalty
dexmod *= -1

if (hero.tagis[Hero.EquipArmor] = 0) then
     ~ we are unarmored, remove Dex bonus by adding it's negative value back
     hero.child[ArmorClass].field[tACUnarDef].value += dexmod
else
     ~ we are armored, strip all armor bonuses
     hero.child[ArmorClass].field[tACDexMod].value = 0
     foreach pick in hero from BaseArmor where "Helper.CurrArmor"
     ~ kill off any type of AC modifier
          eachpick.field[arAC].value = 0 
          eachpick.field[arBonus].value = 0
          eachpick.field[Bonus].value = 0
     nexteach
endif

Last edited by dungeonguru; November 11th, 2017 at 08:16 AM.
dungeonguru is offline   #3 Reply With Quote
CNYGamer
Member
 
Join Date: Aug 2009
Location: Finger Lakes Region, New York
Posts: 59

Old November 11th, 2017, 08:49 AM
Quote:
Originally Posted by dungeonguru View Post
What we did for the community tortle (which will come out next update) was to catch the DEX modifier and subtract it when unarmored, if armored, we set any worn armor bonuses to 0. This leaves shields and magic bracers/rings alone as is indicated by the tortle. It's not beautiful, but it works. It also allows a tortle to wear armor of resistance and get the resistance granted, but not the AC.

Interesting. That didn't work for me. I set it to the Post-Attributes phase with a timing of 5000 as indicated, and it left the character's AC at 10. If I wasn't cramming to get several characters set up in Hero Lab for my game this evening, I would tinker with it more.
CNYGamer is offline   #4 Reply With Quote
dungeonguru
Senior Member
 
Join Date: May 2016
Posts: 608

Old November 11th, 2017, 09:10 AM
Quote:
Originally Posted by CNYGamer View Post
, and it left the character's AC at 10.
The code I provided just negates armor and dex, so if you start with AC10, it stays AC 10. The +7 is added later in another script.

Final/1000
Code:
doneif (tagis[Helper.Disable] <> 0)

      if (hero.tagis[Hero.EquipArmor] = 0) then
        hero.child[ArmorClass].field[tACNatural].value = 7
        endif
dungeonguru is offline   #5 Reply With Quote
CNYGamer
Member
 
Join Date: Aug 2009
Location: Finger Lakes Region, New York
Posts: 59

Old November 11th, 2017, 09:18 AM
Quote:
Originally Posted by dungeonguru View Post
The code I provided just negates armor and dex, so if you start with AC10, it stays AC 10. The +7 is added later in another script.
Thanks very much for that additional information. I appreciate your time.

Last edited by CNYGamer; November 11th, 2017 at 09:19 AM. Reason: typo
CNYGamer is offline   #6 Reply With Quote
Reply

Thread Tools
Display Modes

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 03:55 AM.


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