• 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

Masterwork Weapon Question

Code:
if (isgizmo <> 0) then
  if (gizmo.childlives[gCustMagic] <> 0) then
    if (gizmo.child[gCustMagic].field[gMaster].value + gizmo.child[gCustMagic].field[gMasterFor].value <> 0) then
      ~do whatever you wanted to do

It's unfortunately very limited - that will only work for the Custom/Magic Weapon and the Custom/Magic Armor. It won't be able to identify the "Silver Dagger, Masterwork" or any of the other specific magic weapons as being masterwork (although you can also check if the BonEnhance field is > 0 - all of those have to be masterwork)

Some universal tag to identify masterwork (for weapons, for armor, and for masterwork thieves' tools and masterwork musical instruments) is on the to-do list for both d20 and Pathfinder.
 
Thanks Mathias, at the moment I've been doing the check on the wAttBonus field (where masterwork weapons put their bonus) and seeing if it is greater than 0 to determine if something is a masterwork weapon. I'm doing this because masterwork weapons have been stacking with giving a weapon an enhancement bonus (say, through a magic weapon spell), when that should be coded not to do so. So I've been fixing it myself, but I realized that the wAttBonus might get a bonus from something other than a masterwork weapon. This code you supplied will work for now as a workaround until the masterwork thing hits on the to-do list. Thanks once again.

I didn't think to look at the gCustMagic fields. My bad. I always forget they are there.
 
Did this ever make it in? I've been trying to find a masterwork dagger in the gear for a bit now, thought it might be something from another source.
 
Back
Top