Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game

Notices

Reply
 
Thread Tools Display Modes
AllusiveMan
Junior Member
 
Join Date: Sep 2018
Posts: 13

Old July 22nd, 2021, 08:34 PM
Hi. Let's say I wanted to create a custom armor power (under the Item Power tab) that only works on armor made from a particular material (adamantine, for example). Is there a way to test for that? I assume it would involve a simple bit of script in the "Expr-reqs" button? Thanks in advance.
AllusiveMan is offline   #1 Reply With Quote
Dami
Senior Member
 
Join Date: Mar 2013
Location: Melbourne, Australia
Posts: 889

Old July 23rd, 2021, 02:27 AM
When making an 'Item Power' there is a "Requirement" button where you can select such things as "metal".
You could go further and check if a particular material is present with a Pick-reqs or Expr-reqs. Adamantine for example, has the ID eAdamant. (You can check IDs for materials by going to the Material tab, and clicking "New (Copy)".
I'm not aware of an existing power that requires a material, or I recommend looking at that for how its done.

Current RPG's: Pathfinder (GM), Pathfinder (Player), Gamma World (GM, Pathfinder homebrew).
HeroLab: 3.5 & Pathfinder. HL User Files for PF: Greyhawk Setting, Gamma World (WIP).

DM and player of D&D since 1980.

Last edited by Dami; July 23rd, 2021 at 05:30 PM.
Dami is offline   #2 Reply With Quote
AllusiveMan
Junior Member
 
Join Date: Sep 2018
Posts: 13

Old July 23rd, 2021, 07:55 AM
Thank you for the response. I did actually check for those things. Under the "Requirements" button, you can check for a variety of things such as cloth, leather, and metal, but not for adamantine or any other specific metal. I also checked for other item powers that required a specific material such as adamantine or mithral, but alas I found none that I could copy from.
AllusiveMan is offline   #3 Reply With Quote
AllusiveMan
Junior Member
 
Join Date: Sep 2018
Posts: 13

Old July 23rd, 2021, 08:20 AM
Okay, I figured it out. Expr-req: Picklives[eAdamant] > 0
AllusiveMan is offline   #4 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 12,948

Old July 23rd, 2021, 08:48 AM
Picklives should only be a last resort - if you see it used for something basic like a prereq, that's bad coding style that we haven't gotten rid of yet. Always look for a tag-based method first.

Here's the expr-req I'd use:

tagis[IsMaterial.eAdamant] <> 0

Last edited by Mathias; July 23rd, 2021 at 08:52 AM.
Mathias is online now   #5 Reply With Quote
AllusiveMan
Junior Member
 
Join Date: Sep 2018
Posts: 13

Old July 23rd, 2021, 08:58 AM
Okay. Got it. Thank you!
AllusiveMan is offline   #6 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 02:18 PM.


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