View Single Post
jjashley
Senior Member
 
Join Date: Jan 2017
Posts: 139

Old March 11th, 2018, 04:06 PM
Quote:
Originally Posted by dungeonguru View Post
It's good code, but I think we'll wind up going with adding an independant temporary hp pool with the min/max hp granted set statically to level count plus CHA mod.

Since all class special abilities are added with a field: xTotalLev, it's slightly better to use it just in case you wanted to just let another class have the same ability (like Channel Divinity) rather than #levelcount[].

So, I'll probably build a temp hp pool called thp5CCelRa or call a copy of the existing Dark One's Blessing pool and overwrite the livename and then in a script post-attribute (15000) do the following:

Code:
doneif (tagis[Helper.Disable] <> 0)
doneif (field[xTotalLev].value <= 10)

var BonusHP as number
BonusHP = #attrmod[aCHA] + field[xTotalLev].value

hero.childfound[thp5CCelRa].field[thpMinAllw].value = BonusHP
hero.childfound[thp5CCelRa].field[thpMaxAllw].value = BonusHP
It requires the person to activate the pool when it's on, but at least it makes clear what type of hit points are available.

I can throw the same code into an adjustment if people want to add it to another character and have something less generic than a generic temporary hit points pool.
Problem is BonusHP aren't temp hit points, they get added to the total hit point count as bonus hit points. That's where the tTempHP comes in and shows as temp hit points and they are subtracted before your hit points are, the only thing I wonder and have to ask. Is xTotalLev the total levels for the character because in this case it is only looking at the warlock level.

I read thru your snippet of code to fast, and see you set BonusHP as a variable. Wouldn't multi-classing then affect the xTotalLev when the calculation should only be looking at the Warlock levels? Just want to make sure I understand the difference between xTotalLev and #Levelcount.

J

Last edited by jjashley; March 11th, 2018 at 04:16 PM.
jjashley is offline   #33 Reply With Quote