Member
Join Date: Jul 2010
Posts: 33
|
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. |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
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.?] Code:
threatrng *= 2 Code:
threatrng = 20 - threatrng + 1 Code:
perform delete[wCritMin.?] perform assignstr["wCritMin." & threatrng] 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 |
#2 |
Member
Join Date: Jul 2010
Posts: 33
|
I really appreciate your step-by-step explanations. As for the script, it worked like a charm. Thank you.
|
#3 |
|
|