• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

wCritMin wCritMult wMain

lifer4700

Well-known member
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

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).
 
Well, on a side note, I just found the custom Mighty Fist type items in the Wondrous Items section, so the need for handwraps is now gone...

However, I still would like to know how to read a value or a string without using foreach.
 
Code:
~ Pull Crit tags from unarmed strike
perform hero.child[wUnarmed].pulltags[wCritMin.?]
All tags from wUnarmed are now going to be on the the Thing that is running this script. So if you are a weapon yourself you need to either NOT have these tags on the weapon or delete them before pulling from the other thing.
 
Back
Top