Member
Join Date: Aug 2018
Location: Texas
Posts: 87
|
I tried both final lines you suggested, but nothing changed.
|
#11 |
Member
Join Date: Aug 2018
Location: Texas
Posts: 87
|
I do appreciate your help by-the-way
|
#12 |
Senior Member
Join Date: May 2016
Posts: 608
|
Yes, thanks Mergon, I was away most of today.
I see from your test case that you have a 10th level character and you want to add 2 levels and this is your if statement right? Quote:
This won't work to add 2 levels as if you have grappler, it will add 1 and then drop out and never check for tavern brawler. Here's how I figure it might work. You need to figure out the act_level First, then send it through your if statements that look at the act_level, not the original field level passed in: Code:
~ If we're not shown, just get out now doneif (tagis[Helper.ShowSpec] = 0) ~ If we're disabled, do nothing doneif (tagis[Helper.Disable] <> 0) ~ first we have to establish our benchmark, based on our level ~ all comparisons are made assuming that the wielder is medium, ~ because ~ that is what wMain tags assume. Damage dice are then adjusted up ~ or down ~ appropriately based on size. ~ There are two feats that can increase the level upward. var act_level as number act_level = field[xAllLev].value ~ Checking for Grappler or Tavern Brawler feats if (#hasability[fGrappler] <> 0) then act_level += 1 endif if (#hasability[ft5CTaverB] <> 0) then act_level += 1 endif if (act_level >= 23) then ~ Medium folks get 1d12 at this level. Avg = 6.5 field[wDieCount].value = 1 field[wDieSize].value = 12 field[abValue].value += 6.5 elseif (act_level >= 18) then ~ Medium folks get 1d10 at this level. Avg = 5.5 field[wDieCount].value = 1 field[wDieSize].value = 10 field[abValue].value += 5.5 elseif (act_level >= 12) then ~ Medium folks get 1d8 at this level. Avg = 4.5 field[wDieCount].value = 1 field[wDieSize].value = 8 field[abValue].value += 4.5 elseif (act_level >= 6) then ~ Medium folks get 1d6 at this level. Avg = 3.5 field[wDieCount].value = 1 field[wDieSize].value = 6 field[abValue].value += 3.5 elseif (act_level >= 3) then ~ Medium folks get 1d4 at this level. Avg = 2.5 field[wDieCount].value = 1 field[wDieSize].value = 4 field[abValue].value += 2.5 else ~ Medium folks get 1d1 at this level. Avg = 1 field[wDieCount].value = 1 field[wDieSize].value = 1 field[abValue].value += 1 endif var v_text as string call wMainText field[abText].text = v_text |
|
#13 |
Member
Join Date: Aug 2018
Location: Texas
Posts: 87
|
Thank you. I will try this out once I get home.
|
#14 |
Member
Join Date: Aug 2018
Location: Texas
Posts: 87
|
@dungeonguru
I had copied and pasted what you had suggested and it wasn't working. After looking over the script I changed one thing in two spots and it is now working. I changed this Code:
~ Checking for Grappler or Tavern Brawler feats if (#hasability[fGrappler] <> 0) then act_level += 1 endif if (#hasability[ft5CTaverB] <> 0) then act_level += 1 endif Code:
~ Checking for Grappler or Tavern Brawler feats if (#hasability[fGrappler] = 0) then act_level += 1 endif if (#hasability[ft5CTaverB] = 0) then act_level += 1 endif Neither of those worked properly as they would +1 even when not present. However, using #hasfeat fixed the problem! Thanks so much for all the help so far. I do have one more question. The Pugilist information states: "Whenever you make an unarmed strike with nothing in either your main hand or off-hand, your unarmed strike’s damage die increases by one step (from 1d4 to 1d6, 1d6 to 1d8, and so on)." Any ideas on how I do this? Last edited by spannclann; August 31st, 2018 at 12:57 PM. |
#15 |
Member
Join Date: Aug 2018
Location: Texas
Posts: 87
|
I tested this in the script and it worked, but I know the level progression may not make it accurate at the lower levels. Any thoughts?
Code:
if (tagis[IsWeapon.wUnarmed] = 0) then act_level += 6 endif Code:
if (tagis[IsWeapon.wUnarmed] = 0) then if (act_level >= 18) then act_level += 6 elseif (act_level >= 11) then act_level += 6 elseif (act_level >= 6) then act_level += 6 elseif (act_level >= 3) then act_level += 3 else act_level += 2 endif endif Last edited by spannclann; August 31st, 2018 at 10:19 AM. Reason: added information |
#16 |
Member
Join Date: Aug 2018
Location: Texas
Posts: 87
|
Okay, just realized that using = 0 for the Grappler or Tavern Brawler feats check turns it on even if you do not have the feat, but <> 0 turns it off even if you have the feat.
using #hasfeat fixed the problem! Last edited by spannclann; August 31st, 2018 at 12:58 PM. |
#17 |
Member
Join Date: Aug 2018
Location: Texas
Posts: 87
|
the only other thing I need is to fix Fisticuffs. Its supposed to add 2 to unarmed damage.
I found something that worked. I used a variant of one i found on another page. Code:
hero.child[wUnarmed].field[Bonus].value += 2 Last edited by spannclann; August 31st, 2018 at 06:30 PM. Reason: added code |
#18 |
|
|