Senior Member
Join Date: Jul 2005
Posts: 181
|
That would be LOVELY.
------------- By Lenin's Beard Gel! |
#11 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
Alright, I found the issue on our end. It looks like in the calculation script we used a variable "bonus" which had already been used earlier and we forgot to remove the value from it's previous use. This it was always adding the value of the cPsiLevMax field if there were no bonus power points from your attribute.
Here's the offending bit of code, along with the debug statements I used to track the issue down: Code:
field[cPsiLevMax].value = bonus ~ If we have a link to an attribute for bonus power points, get the ~ attribute bonus now so we can calculate how many bonus PP we get. var bonus as number var attrbonus as number if (tagis[PsiAttr.?] <> 0) then debug "We have the tag" var searchexpr as string searchexpr = tagids[PsiAttr.?,"|"] attrbonus = hero.findchild[BaseAttr,searchexpr].field[aModBonus].value elseif (islinkage[psiattr] <> 0) then debug "We have the linkage" attrbonus = linkage[psiattr].field[aModBonus].value endif ~ Our bonus PP = (attribute bonus * level) / 2, rounded down if (attrbonus > 0) then debug "attrbonus is " & attrbonus bonus = (attrbonus * level) / 2 bonus = round(bonus, 0, -1) debug "bonus is " & bonus endif ~ Add our bonus power points to the maximum we have at this level debug "bonus is " & bonus debug "before add bonus, cPsiPPMax is " & field[cPsiPPMax].value field[cPsiPPMax].value = field[cPsiPPMax].value + bonus debug "after add bonus, cPsiPPMax is " & field[cPsiPPMax].value Here's the script I used: PostAttr 11000 Code:
var attrbonus as number foreach pick in hero from BaseClHelp where "Helper.Manifester" attrbonus = eachpick.linkage[psiattr].field[aModBonus].value if (attrbonus = 0) then ~ This part undoes the error on the total power points. hero.child[Psionics].field[tPPTotal].value -= eachpick.field[cPsiLevMax].value ~ It's too late to stop the points from being forwarded from this class, but this part at least fixes the display on our class tab. eachpick.field[cPsiPPMax].value -= eachpick.field[cPsiLevMax].value endif nexteach Last edited by Aaron; May 14th, 2013 at 01:39 PM. |
#12 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
Quote:
|
|
#13 |
|
|