OK, this one was easy. I just tested it to make sure that I am not pulling things out of my rear.
Inside the Zen Archery edge that lets you use the zen archery skill, make an eval script
Phase: Final
Priority: 10000
Code:
var finalbonus as number
var thisbonus as number
var finaldie as string
var finaltext as string
var bonustext as string
var dieNumber as number
finalbonus = hero.child[skZen].field[trtNetRoll].value
thisbonus = 0
finaldie = ""
finaltext = ""
bonustext = ""
dieNumber = #trait[skZen]
~ Cap die number at 12
if (dieNumber >= 6) then
dieNumber = 6
endif
~ Double the dieNumber so that it will be a die
dieNumber = dieNumber * 2
finaldie = "d" & dieNumber
foreach pick in hero from WeapRange
if (eachpick.tagis[Weapon.Bow] = 1) then
bonustext = ""
thisbonus = finalbonus
thisbonus += eachpick.field[wpBonus].value
thisbonus += eachpick.field[wpPenalty].value
if (thisbonus > 0) then
bonustext = "+" & thisbonus
endif
if (thisbonus < 0) then
bonustext = thisbonus
endif
finaltext = finaldie & bonustext
eachpick.field[wpNetAtk].text = finaltext
endif
nexteach
You might have to change the skill tag from skZen to whatever you have it as. If you DO have it as skZen, it is done for you.
It is in two places towards the start of the script. One for the die rating, the other for any modifiers to it (for example, d12 +1 has a +1).