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.
|
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. |
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.
|
Okay, I figured it out. Expr-req: Picklives[eAdamant] > 0
|
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 |
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.