Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - D&D 5th Edition SRD (http://forums.wolflair.com/forumdisplay.php?f=89)
-   -   Script for AC = DEX mod + CHA mod (http://forums.wolflair.com/showthread.php?t=64915)

hammerrw October 15th, 2020 04:11 PM

Script for AC = DEX mod + CHA mod
 
I'm trying to figure out an Eval Script to get the Armor class to include the dexterity and charisma modifiers with no luck. Any assistance would be appreciated.

dungeonguru October 16th, 2020 05:29 AM

You can try something like:

Code:

field[abValue].value = #attrmod[aCHA]
hero.childfound[ArmorClass].field[Bonus].value += field[abValue].value


This would add the charisma modifier as an additional bonus to the AC. By default AC automatically uses DEX for the AC calculation on a PC unless you have something unusual going on or are wearing heavy/medium armor.

Fenris447 October 20th, 2020 09:25 AM

Pretty much the same thing, just a little simpler:

Code:

hero.childfound[ArmorClass].field[Bonus].value += #attrmod[aCHA]
As dungeonguru said, DEX is already included in AC calculations automatically. But if for some reason it isn't in this particular creature, you could do:

Code:

field[abValue].value = #attrmod[aCHA]
field[abValue].value += #attrmod[aDEX]
hero.childfound[ArmorClass].field[Bonus].value += field[abValue].value



All times are GMT -8. The time now is 11:00 AM.

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