• 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

Custom armor power

AllusiveMan

Active member
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.
 
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.
 
Last edited:
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.
 
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:
Back
Top