Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Mutants & Masterminds (http://forums.wolflair.com/forumdisplay.php?f=48)
-   -   (M&M 3e) Mecha Size and Toughness (http://forums.wolflair.com/showthread.php?t=57414)

Kenmis January 14th, 2017 07:45 PM

Mecha Size and Toughness
 
Helping a friend build his mecha unit in Hero Lab, and we're confused by something. Hero Lab seems to be adding the size bonus to toughness TWICE. It's got Growth 8, so the mecha is getting a +8 Size Bonus to Toughness, and a +8 Size to Toughness too, for a total of 16. Is this a bug, or is there something we're not understanding here?

Duggan January 16th, 2017 03:39 AM

That would be a bug. Growth is complicated, as you can see in the code in the editer. I suspect what's happening is that it's not processing the subtraction logic I bolded below:

Quote:

~ Calculate our bonuses
var strbonus as number
var stabonus as number
var intimbonus as number
var activepen as number
var stealthpen as number
var speedbonus as number
var massbonus as number
if (tagis[pwHasFlaw.pfGroSize] = 0) then
strbonus = field[pwRanks].value
stabonus = field[pwRanks].value
endif

~Calculate our mass bonus
if (tagis[pwHasFlaw.pfGroSize] = 0) then
massbonus = field[pwRanks].value
endif

if (tagis[Helper.GrwNoSkill] = 0) then
intimbonus = round(field[pwRanks].value / 2, 0, -1)
stealthpen = field[pwRanks].value
endif
if (tagis[Helper.GrwNoDefs] = 0) then
activepen = round(field[pwRanks].value / 2, 0, 1)
endif

~ Calculate our growth amount - every 4 ranks gives us a size increase
var sizebonus as number
if (tagis[Helper.GrwNoSize] = 0) then
sizebonus = minimum(field[pwRanks].value, 20) / 4
sizebonus = round(sizebonus, 0, -1)
endif

~ Calculate our speed bonus - this is half our size ranks, although we
~ don't actually apply it here (since it's applied automatically by our
~ size change)
if (tagis[Helper.GrwNoSpeed] = 0) then
speedbonus = round(sizebonus / 2, 0, -1)
endif


~ Calculate our speed penalty - this is 1/4 our power ranks
if (tagis[Helper.GrwSpdPen] <> 0) then
speedbonus = - round(field[pwRanks].value / 4, 0, -1)
endif

~ Work out if we get a Toughness bonus instead of a Stamina bonus
var istough as number
istough = hero.child[attrSta].tagis[Helper.NoScore]

~ Set our descriptive text
if (strbonus <> 0) then
field[pwInfo].text = "+" & strbonus & " STR"
endif
if (stabonus <> 0) then
var temp as string
if (istough <> 0) then
temp = " Tough"
else
temp = " STA"
endif
field[pwInfo].text = splice(field[pwInfo].text, "+" & stabonus & temp, ", ")
endif
if (intimbonus <> 0) then
field[pwInfo].text = splice(field[pwInfo].text, "+" & intimbonus & " Intimidate", ", ")
endif
if (stealthpen <> 0) then
field[pwInfo].text = splice(field[pwInfo].text, "-" & stealthpen & " Stealth", ", ")
endif
if (activepen <> 0) then
field[pwInfo].text = splice(field[pwInfo].text, "-" & activepen & " active defenses", ", ")
endif
if (sizebonus > 0) then
field[pwInfo].text = splice(field[pwInfo].text, "+" & sizebonus & " size rank", ", ")
if (sizebonus > 1) then
field[pwInfo].text &= "s"
endif
endif
if (massbonus > 0) then
field[pwInfo].text = splice(field[pwInfo].text, "+" & massbonus & " mass rank", ", ")
if (massbonus > 1) then
field[pwInfo].text &= "s"
endif
endif
if (speedbonus <> 0) then
var speedtext as string
speedtext = signed(speedbonus) & " speed ranks"
field[pwInfo].text = splice(field[pwInfo].text, speedtext, ", ")
endif

~ If we're not active, or if we're using an "attack only" version of this
~ power, there are no stat changes to apply
doneif (activated = 0)
doneif (tagexpr[Helper.AttackOnly | Helper.OthersOnly] <> 0)

~If we're a stacking power, stop here
doneif (tagis[Internal.StackWith] <> 0)

~Apply our knockback modifier
var knockmod as string
knockmod = field[pwRanks].value
perform hero.child[Knockback].field[PowerTemp].modify[-,knockmod,""]

~ We don't want to apply our bonuses twice, so for each size category we
~ grow, we lose 4 str / sta, 2 intimidate, and gain 2 active defenses
~ back.
if (tagis[pwHasFlaw.pfGroSize] = 0) then
strbonus -= sizebonus * 4
stabonus -= sizebonus * 4
else


~ If we're a size only growth, we don't count ourselves for increasing
~ Strength and Stamina
hero.child[Size].field[NoAttrRank].value += sizebonus
endif
if (tagis[Helper.GrwNoSkill] = 0) then
intimbonus -= sizebonus * 2
stealthpen -= sizebonus * 4
endif
activepen -= sizebonus * 2

~ Apply ability bonuses
var v_mod as number
perform hero.child[attrStr].setfocus
v_mod = strbonus
call ApplyPwEff
if (istough <> 0) then
perform hero.child[defTough].setfocus
else
perform hero.child[attrSta].setfocus
endif
v_mod = stabonus
call ApplyPwEff

~ Apply skill bonuses
perform hero.child[skIntim].setfocus
v_mod = intimbonus
call ApplyPwEff
perform hero.child[skStealth].setfocus
v_mod = -stealthpen
call ApplyPwEff

~ Apply active defense penalties
v_mod = -activepen
perform hero.child[defDodge].setfocus
call ApplyPwEff
perform hero.child[defParry].setfocus
call ApplyPwEff

~ Apply negative bonuses to all strength-based skills with the 'grow
~ exempt' tag, since they don't get any bonuses from Growth. Bonuses from
~ abilities always count as permanent, so we need to always apply a
~ permanent modifier to counter them.
var v_forceprm as number
v_mod = -1 * field[pwRanks].value
v_forceprm = 1
foreach pick in hero from Skill where "SklExempt.pwGrowth"
perform eachpick.setfocus
call ApplyPwEff
nexteach
v_forceprm = 0

~ Apply our size change
perform hero.child[Size].setfocus
v_mod = sizebonus
call ApplyPwEff

~ Apply our speed penalty
if (tagis[Helper.GrwSpdPen] <> 0) then
hero.child[Movement].field[Value].value += speedbonus
endif
Do you want to submit as a bug as per this thread or should I?


All times are GMT -8. The time now is 11:58 PM.

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