• 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

Improving critical for all weapons

ynnswa

Active member
My homebrew system finished (hooray!) I have use the scripting momentum productively and start on the OOP Conan RPG from Mongoose, which we play quite a lot.

Things were humming along swimmingly until I started outlining the "Versatility" Class Special Abilily for the Barbarian class. The upgrades to the ability are described as follows:

At 14th level, the barbarian doubles the threat range when
wielding any melee weapon, including simple, martial, exotic
and improvised weapons, as well as unarmed attacks and
grapples. At 20th level this threat range is tripled.


Improved Critical for all weapons I can figure out, but I'm not sure how to handle it if they already have Improved Critical on a weapon. The game doesn't have Keen weapons, so I could use that, I assume. But I'm not sure how to assign that universally through the hero rather than the specific weapon.

Any thoughts would be greatly appreciated.
 
The threat range for a weapon is stored as a wCritMin tag. In the Develop menu at the top of the main Hero Lab window, make sure that "Enable Data File Debugging" is checked, and then add a selection of weapons with varying threat ranges, and for each, right-click it and select "Show Selection Tags for XXXXX" - look there for all the tags that are on that item. You'll see tags like wCritMin.20, wCritMin.18, etc.

Okay, so what you need to do with that is to figure out what range that represents (you want to turn wCritMin.20 into a 1 and wCritMin.18 into a 3) - then you can multiply that by either 2 or 3, then turn it back into a tag.

Code:
var threatrng as number
threatrng = 1 + 20 - tagvalue[wCritMin.?]

Next, multiply that by 2 or 3:

Code:
threatrng *= 2

And turn that into the lowest number of the threat range:

Code:
threatrng = 20 - threatrng + 1

After that, delete the wCritMin tag that's there, and assign a new wCritMin tag, based on the value you've calculated:

Code:
perform delete[wCritMin.?]
perform assignstr["wCritMin." & threatrng]

That script is something that would run on the weapon. Here's how to modify that to function from a class special:

Phase: Post-Levels, priority: 10000
Code:
~ If we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] = 0)
 
~if we're 20th level, our multipler is 3, otherwise, it's 2
var threatmult as number
if (field[xTotalLev].value >= 20) then
  threatmult = 3
else
  threatmult = 2
  endif
 
var threatrng as number
foreach pick in hero from BaseWep where "wClass.Melee"
  threatrng = 1 + 20 - eachpick.tagvalue[wCritMin.?]
  threatrng *= threatmult
  threatrng = 20 - threatrng + 1
  perform eachpick.delete[wCritMin.?]
  perform eachpick.assignstr["wCritMin." & threatrng]
  nexteach
 
I really appreciate your step-by-step explanations. As for the script, it worked like a charm. Thank you.
 
Back
Top