Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Pathfinder Roleplaying Game (http://forums.wolflair.com/forumdisplay.php?f=62)
-   -   Custom armor power (http://forums.wolflair.com/showthread.php?t=66151)

AllusiveMan July 22nd, 2021 08:34 PM

Custom armor power
 
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.

Dami 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.

AllusiveMan 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 July 23rd, 2021 08:20 AM

Okay, I figured it out. Expr-req: Picklives[eAdamant] > 0

Mathias 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

AllusiveMan July 23rd, 2021 08:58 AM

Okay. Got it. Thank you!


All times are GMT -8. The time now is 08:53 PM.

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