Senior Member
Join Date: Nov 2011
Location: Michigan
Posts: 182
|
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 Quote:
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). |
|
#1 |
Senior Member
Join Date: Nov 2011
Location: Michigan
Posts: 182
|
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. |
#2 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Code:
~ Pull Crit tags from unarmed strike perform hero.child[wUnarmed].pulltags[wCritMin.?] Hero Lab Resources: Pathfinder - d20pfsrd and Pathfinder Pack Setup 3.5 D&D (d20) - Community Server Setup 5E D&D - Community Server Setup Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources. Created by the community for the community - Realm Works kickstarter backer (Alpha Wolf) and Beta tester.- d20 HL package volunteer editor. |
#3 |
Senior Member
Join Date: Nov 2011
Location: Michigan
Posts: 182
|
Wow, nice, thanks!
|
#4 |
|
|