Author Topic: Item Property Function Question  (Read 342 times)

Legacy_Ralthis

  • Jr. Member
  • **
  • Posts: 90
  • Karma: +0/-0
Item Property Function Question
« on: May 21, 2011, 06:21:55 am »


               Hi all,

I'm using the IPGetItemHasProperty() function for the first time, and I'm confused about the SubType option that it checks for. I want to check to see if an item has already has a damage bonus against, say, shapeshifters. What is the subtype that the function checks: the IP_CONST_RACIALTYPE_*, IP_CONST_DAMAGETYPE_*, the IP_CONST_DAMAGEBONUS_*, or all three at the same time?

Thanks in advance!
               
               

               
            

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
Item Property Function Question
« Reply #1 on: May 21, 2011, 09:01:42 am »


               Hopefully this will help:
www.nwnlexicon.com/compiled/function.getitempropertysubtype.html
               
               

               
            

Legacy_Ralthis

  • Jr. Member
  • **
  • Posts: 90
  • Karma: +0/-0
Item Property Function Question
« Reply #2 on: May 21, 2011, 03:11:29 pm »


               Yeah, I already took a look at the 1.69 lexicon, and it doesn't explain it at all. Does anyone have some experience using it, or have a link to another site where they discuss it?
               
               

               


                     Modifié par Ralthis, 21 mai 2011 - 03:43 .
                     
                  


            

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
Item Property Function Question
« Reply #3 on: May 21, 2011, 07:52:11 pm »


               Did you actually click the link i posted and follow the instructions on the page? When you open the 2da it shows the subtypes, if any, that are returned for the item properties.
               
               

               
            

Legacy_Ralthis

  • Jr. Member
  • **
  • Posts: 90
  • Karma: +0/-0
Item Property Function Question
« Reply #4 on: May 21, 2011, 08:40:55 pm »


               Oops, my bad. I saw the word lexicon and assumed it was a link to the function...I'm sorry Ghost. I jumped to conclusions again.

So if I understand this right, I can use the itempropdef.2da to figure out what the subtype reference is. So, in the example I gave above, it would be the racial type and not the damage type or damage bonus.

Thank you Ghost for the help!
               
               

               
            

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
Item Property Function Question
« Reply #5 on: May 21, 2011, 09:32:13 pm »


               No worries. I've never actually had any experience with these. But from what I can tell by looking at the 2da, the sub types aren't any of the constants like IP_CONST_RACIALTYPE_*. But a unique type of subtype that is defined only in the 2da. Some of the different item properties share this same subtype, for others only one item property will return only one subtype and many will return none.
               
               

               
            

Legacy_Greyfort

  • Sr. Member
  • ****
  • Posts: 442
  • Karma: +0/-0
Item Property Function Question
« Reply #6 on: May 22, 2011, 08:24:29 pm »


               I have a module in the vault that can help you figure a items props.

file: "pw_cust_v101"
link:
http://nwvault.ign.c....Detail&id=6171

When you put a item in the chest and close it the debug gives you all the item info

type|table|tablevalue|durtype|param1|paramvalue|subtype|

I have been using this to work out storeing custom items your welcome to use it.  So when you want to know IPGetItemHasProperty()  damage bonus, shapeshift it will show up in the string.

EDIT:  If you download NWN Explorer you can view the 2da and find value. the link Ghost gave you realy is nice if you want a fast glance using NWN Explorer.  
               
               

               


                     Modifié par Greyfort, 22 mai 2011 - 07:31 .
                     
                  


            

Legacy_Ralthis

  • Jr. Member
  • **
  • Posts: 90
  • Karma: +0/-0
Item Property Function Question
« Reply #7 on: May 22, 2011, 09:02:42 pm »


               Thanks guys! Greyfort, I will probably give your file a try. I have a lot of items whose subtypes I will need to know.