Matt listed a working script above and the Vital Steike addon would provide another working script example to accomplish this.
Perhaps I have done something wrong in attempting to apply the script. Here is what I did:
<thing id="wmLongswor" name="Longsword (modified)" description="This sword is about 3-1/2 feet in length." compset="Weapon">
<fieldval field="gWeight" value="4"/>
<fieldval field="gSizeCost" value="15"/>
<tag group="wClass" tag="OneHanded" name="One-Handed" abbrev="One-Handed"/>
<tag group="wCritMin" tag="19" name="19" abbrev="19"/>
<tag group="wCritMult" tag="2" name="2" abbrev="2"/>
<tag group="wFtrGroup" tag="BladeHeavy" name="Blades, Heavy" abbrev="Blades, Heavy"/>
<tag group="wMain" tag="1d8_6" name="1d8" abbrev="1d8"/>
<tag group="wProfReq" tag="Simple"/>
<tag group="wType" tag="S" name="Slashing" abbrev="S"/>
<tag group="EquipType" tag="Metal" name="Metal" abbrev="Metal"/>
<tag group="wCategory" tag="Melee" name="Melee Weapon" abbrev="Melee"/>
<eval phase="UserFinal"><![CDATA[var sDice as string
var nDice as number
var nDieSize as number
var dBreak as string
~ Pull out the number of dice
nDice = mid(field[wDamageTbl].arraytext[1],0,1)
~ Pull out the die size
nDieSize = mid(field[wDamageTbl].arraytext[1],2,2)
~ Check for d in damage code
dBreak = mid(field[wDamageTbl].arraytext[1],1,1)
~ Increase the number of dice
nDice *= 3
if (compare(dBreak,"d")=0) then
sDice = nDice & "d" & nDieSize
else
sDice = nDice
endif
if (nDice <> 0) then
field[wDamExtra].text = "+" & sDice
endif]]></eval>
</thing>
Yet when the weapon is displayed, it only shows damage as "1d8"