I want to copy the three tags from one weapon to another.
I know timing is going to be a huge issue, since I have to perform the copy after the tags are set, but before the weapon damage is calculated.
I'm not even worried about that yet, since I'm having trouble figuring out how to do the copy in the first place.
I know tagreplace[] is likely going to make an appearance, but I don't know how to (programatically) figure out which tags exist in the first weapon. I can see them in the floating debug window. I can programatically check for a specific tag (hardcode wCritMin.20 for instance), or even check for wCritMin.?, but that won't help me assign or tagreplace on the target weapon.
I tried using idstring to get the ID, but that gives me the same error I always get when I try to read a value. Apparently, there's just something I'm missing
Below is the code that generates this error. This is an Eval Script on a Weapon.
My next question will have to do with the weapon being made Magic. It appears that setting these three tags manually (with script) works fine for the normal version of the weapon, but when I make it magic through the UI, the damage does not appear (blank).
P.S. My ultimate goal is to bring back the hated/loved handwraps. I have created a weapon that behaves just like any other monk melee weapon, but I want it to copy the damage, threat range, and crit multiple from the Unarmed Attack (wUnarmed).
I know timing is going to be a huge issue, since I have to perform the copy after the tags are set, but before the weapon damage is calculated.
I'm not even worried about that yet, since I'm having trouble figuring out how to do the copy in the first place.
I know tagreplace[] is likely going to make an appearance, but I don't know how to (programatically) figure out which tags exist in the first weapon. I can see them in the floating debug window. I can programatically check for a specific tag (hardcode wCritMin.20 for instance), or even check for wCritMin.?, but that won't help me assign or tagreplace on the target weapon.
I tried using idstring to get the ID, but that gives me the same error I always get when I try to read a value. Apparently, there's just something I'm missing
Hero Lab was forced to stop compilation after the following errors were detected:
Syntax error in 'eval' script for Thing 'wL47Hand' (Eval Script '#1') on line 2
-> Error in right-side expression of assignment
Below is the code that generates this error. This is an Eval Script on a Weapon.
Code:
var sCritMin as string
sCritMin = hero.childfound[wUnarmed].tagis[wCritMin.?].idstring
debug sCritMin
My next question will have to do with the weapon being made Magic. It appears that setting these three tags manually (with script) works fine for the normal version of the weapon, but when I make it magic through the UI, the damage does not appear (blank).
P.S. My ultimate goal is to bring back the hated/loved handwraps. I have created a weapon that behaves just like any other monk melee weapon, but I want it to copy the damage, threat range, and crit multiple from the Unarmed Attack (wUnarmed).