Same error... But if you look the value is getting changed correctly.... This is really strange...
Bow still goes from 19-20 (with Imp Crit) to 17-20 ... but works for anything else that doesn't have Imp Crit or Keen seemingly just fine.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Same error... But if you look the value is getting changed correctly.... This is really strange...
I think I have an idea about what is happening - the only wCritMin tags that are defined are 17-20, so if you're trying to use assignstr to assign a tag that hasn't been formally defined, like wCritMin.16, that would be an error.
Here's an idea on how to fix this - set up formal definitions of the tags you need.
Find the Simple tab in the editor (it's in the General grouping). Create a new item there, and give it a name like "Helper for my crit range ring", and give it an Id. Then, click its "Tags" button at the top right. Add a new tag to that, and enter wCritMin as the Group Id, and 16 as the Tag Id. Then add a second new tag, and add wCritMin.15. I think that should cover all the possibilities your item will need. Use "Test Now!" to add that helper object, and see if that fixes things.
Should we define the lower wCritMin tags in core perhaps, Mathias?
Actually, it look like if you have ShadowChemosh's adjustments installed, my workaround isn't needed.I put Shadow's updated script in ... still doubles crit for bow as you noted. I do have that add-in installed.
The second new tag ... Group Id wCritMin and Tag Id 15 ... ?
doneif (field[gIsEquip].value = 0)
[COLOR="Green"][B]~ Loop through all ranged weapons except Rays[/B][/COLOR]
foreach pick in hero from BaseWep where "wCategory.RangeProj|wCategory.RangeThrow & !thingid.wRay"
[COLOR="Green"][B]~ Calc defult range[/B][/COLOR]
field[abValue].value = 20 - eachpick.tagvalue[wCritMin.?]
[COLOR="Green"][B]~ Keen or Improved Crit change the value to include this[/B][/COLOR]
If (eachpick.tagis[Helper.Keen] + eachpick.tagis[Broadcast.ImpCrit] <> 0) Then
field[abValue].value = (field[abValue].value * 2) + 1
Endif
[B][COLOR="Green"]~ Increase amount by one more[/COLOR][/B]
field[abValue].value += 1
[COLOR="Green"][B]~ Calc new CritMin tag[/B][/COLOR]
field[abValue2].value = 20 - field[abValue].value
[B][COLOR="Green"]~ Remove Keen and Improved Crit tags[/COLOR][/B]
perform eachpick.delete[Helper.Keen]
perform eachpick.delete[Broadcast.ImpCrit]
[B][COLOR="Green"]~ Remove old Crit tag[/COLOR][/B]
perform eachpick.delete[wCritMin.?]
[COLOR="Green"][B] ~ Assign new tag including any Keen/Improved Crit values
~ and the +1 from the ring[/B][/COLOR]
perform eachpick.assignstr["wCritMin." & field[abValue2].value]
nexteach