Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System

Notices

Reply
 
Thread Tools Display Modes
Kendall-DM
Spy
 
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220

Old January 23rd, 2012, 09:21 AM
As in, is there a way to identify a weapon as being masterwork so that I can check it in a conditional statement?
Kendall-DM is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old January 23rd, 2012, 10:31 AM
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.
Mathias is offline   #2 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old January 23rd, 2012, 01:20 PM
Quote:
Originally Posted by Mathias View Post
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.
Yea happy dance! So could use that.

Hero Lab Resources:
Pathfinder - d20pfsrd and Pathfinder Pack Setup
3.5 D&D (d20) - Community Server Setup
5E D&D - Community Server Setup
Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources.
Created by the community for the community
- Realm Works kickstarter backer (Alpha Wolf) and Beta tester.
- d20 HL package volunteer editor.
ShadowChemosh is offline   #3 Reply With Quote
Kendall-DM
Spy
 
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220

Old January 23rd, 2012, 01:32 PM
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.
Kendall-DM is offline   #4 Reply With Quote
roshne
Junior Member
 
Join Date: Jul 2014
Posts: 1

Old August 1st, 2014, 02:49 PM
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.
roshne is offline   #5 Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 12:56 PM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.