PDA

View Full Version : Racial fixed ability score


Caedhros
February 2nd, 2016, 04:26 PM
I am trying to implement a house rule subrace in 5e where the race sets your Dex score at 14 if it isn't there already. (We use reincarnation so dumping Dex and taking this race is not a concern). This means if you have an 8 Dex, it becomes 14 (post reincarnation) but if you have a 15 nothing happens. I cannot for the life of me figure out how to set a minimum like this and I could use a hand or direction.

Can someone help me out?

I have:

if (hero.child[aDEX].field[Bonus].value < 14) then
hero.child[aDEX].field[Bonus].value = 14
endif

This is adding 16 to all CHA scores period, and I don't see why...

Tamhansen
February 3rd, 2016, 01:32 AM
likely because you're adding 16 to the charisma bonus when the bonus is less than 16. If the character doesn't get a bonus of itself, it will add 16. If it does (Say Dragonborn) it will turn the bonus into 16.

Aaron
February 3rd, 2016, 07:24 AM
So like a minimum of 14? Couldn't you do something like:

hero.childfound[aDEX].field[aNormal].value = maximum(hero.childfound[aDEX].field[aNormal].value, 14)

Caedhros
February 3rd, 2016, 06:15 PM
Well, I tried. I apparently was not born to program! I can't get the "<" to work at all and nothing happens at all when I use the [aNormal] tag instead of [Bonus]. I'll keep playing with it and I'll let you know if I get anywhere.

Caedhros
February 3rd, 2016, 07:08 PM
I think I got it mostly:

hero.child[aDEX].field[Minimum].value = maximum(hero.child[aDEX].field[Minimum].value,14)
hero.child[aDEX].field[aMaxValue].value = maximum(hero.child[aDEX].field[aMaxValue].value,14)

This does everything but doesn't make it part of the starting stat the way using [aStartMod] does, but I can't figure out how to use [aStatMod] in this equation, HL keeps rejecting it. oh well.