• 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

Ring that provides +1 crit range to all ranged weapons

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.
 
Actually, the -1 that ShadowChemosh found is more likely to be the problem. So, I guess my response offers a solution to the 16-20 issue he identified.
 
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.

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 ... ?
 
Should we define the lower wCritMin tags in core perhaps, Mathias?

We might as well set up a full 1-20 set. Just a matter of deleting the existing ones and setting minvalue and maxvalue settings on the group's definition.
 
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 ... ?
Actually, it look like if you have ShadowChemosh's adjustments installed, my workaround isn't needed.
 
Blah so I can't find a timing that works. It would appear you will have to re-do the logic for Keen/Improved Crit and then include the +1 yourself. Its the only way I can get it work right.

This script will finally work but with this much work my adjustment would easier. :) Oh well maybe this example script will help someone in the future.

Final/50000
Code:
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
 
Last edited:
Back
Top