Senior Member
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975
|
Yeah, sorry about that. I meant to include it.
Code:
~only perform the rest on the first copy doneif (tagis[Helper.FirstCopy] = 0) foreach pick in hero from BaseNatWep where "IsWeapon.wBite" ~ Get our unarmed strike pick, delete the damage tag from it, and assign ~ a new damage tag. var dice as string perform eachpick.delete[wMain.?] if (field[xAllLev].value < 4) then perform eachpick.assign[wMain.1d4_4] dice = "1d4" elseif (field[xAllLev].value < 8) then perform eachpick.assign[wMain.1d6_5] dice = "1d6" elseif (field[xAllLev].value < 12) then perform eachpick.assign[wMain.1d8_6] dice = "1d8" elseif (field[xAllLev].value < 16) then perform eachpick.assign[wMain.2d6_104] dice = "2d6" elseif (field[xAllLev].value < 20) then perform eachpick.assign[wMain.2d8_204] dice = "2d8" else perform eachpick.assign[wMain.4d6_106] dice = "4d6" endif field[livename].text = "Bite " & " (" & dice & ")" ~field[livename].text = "" field[listname].text = field[livename].text nexteach The only real difference between the script that sets the initial bite damage and this one is the damage is moved down one degree. |
#41 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
I don't see anything wrong with that script. Did you give it the same phase & priority as your claw script? (What is that phase & priority?)
Where exactly is the error? Does the livename of this thing change to include the dice variable you're setting up? |
#42 |
Senior Member
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975
|
The eval script on the ability where the wBite is bootstrapped is Post-Levels Priority 5000 (which sets the initial damage properly). The ability that replaces the damage is Post-Levels 6000. The livename is not changing.
|
#43 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
You mentioned two scripts, what's the other one doing?
Let's work on figuring out where the problem's occuring. Code:
debug "start" ~only perform the rest on the first copy doneif (tagis[Helper.FirstCopy] = 0) debug "we're running" foreach pick in hero from BaseNatWep where "IsWeapon.wBite" debug "in the foreach" ~ Get our unarmed strike pick, delete the damage tag from it, and assign ~ a new damage tag. var dice as string perform eachpick.delete[wMain.?] debug "Level: " & field[xAllLev].value if (field[xAllLev].value < 4) then debug "4th" perform eachpick.assign[wMain.1d4_4] dice = "1d4" elseif (field[xAllLev].value < 8) then debug "8th" perform eachpick.assign[wMain.1d6_5] dice = "1d6" elseif (field[xAllLev].value < 12) then debug "12th" perform eachpick.assign[wMain.1d8_6] dice = "1d8" elseif (field[xAllLev].value < 16) then debug "16th" perform eachpick.assign[wMain.2d6_104] dice = "2d6" elseif (field[xAllLev].value < 20) then debug "20th" perform eachpick.assign[wMain.2d8_204] dice = "2d8" else debug "Epic levels" perform eachpick.assign[wMain.4d6_106] dice = "4d6" endif field[livename].text = "Bite " & " (" & dice & ")" ~field[livename].text = "" field[listname].text = field[livename].text nexteach |
#44 |
Senior Member
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975
|
ok the script I posted earlier also is a "Custom Ability", that is the ability that can be selected to up the damage of the bite. This is the original ability that bootstraps wBite and sets its original damage. Post-levels 5000.
Code:
~only perform the rest on the first copy doneif (tagis[Helper.FirstCopy] = 0) foreach pick in hero from BaseNatWep where "IsWeapon.wBite" ~ Get our unarmed strike pick, delete the damage tag from it, and assign ~ a new damage tag. var dice as string perform eachpick.delete[wMain.?] if (field[xAllLev].value < 8) then perform eachpick.assign[wMain.1d4_4] dice = "1d4" elseif (field[xAllLev].value < 12) then perform eachpick.assign[wMain.1d6_5] dice = "1d6" elseif (field[xAllLev].value < 17) then perform eachpick.assign[wMain.1d8_6] dice = "1d8" elseif (field[xAllLev].value < 20) then perform eachpick.assign[wMain.2d6_104] dice = "2d6" else perform eachpick.assign[wMain.2d8_204] dice = "2d8" endif field[livename].text = "Bite" & " (" & dice & ")" ~field[livename].text = "" field[listname].text = field[livename].text nexteach says it every time I add the ability. |
#45 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Try checking for Helper.ShowSpec, rather than Helper.FirstCopy - knowing which is the main copy of an ability is important for class specials, which often have 3-5 copies, each added at a different level, but it's not as important in other cases, and other editor tabs may not have scripts to assign Helper.FirstCopy.
|
#46 |
Senior Member
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975
|
Alright, a little more happens in the debug, but changing to Helper.ShowSpec caused a few errors too. It didn't like xAllLev (and debug was reporting level 0) so I changed it to #levelcount[GargParag] and its reporting the proper level now.
From the debug window: ********** Start Evaluation Cycle ********** stafrt we're running in the foreach Level: 9 12th The damage dice are still not changing. |
#47 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
xAllLev only works in class specials. In a custom ability, the corresponding field's name is xTotalLev (yes, it's wierd, and if I could change that, I would).
|
#48 |
Senior Member
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975
|
Alright, I changed those to xAllLev but the dice type still aren't changing.
|
#49 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Change them from xAllLev to xTotalLev
|
#50 |
|
|