Author Topic: Quick question about ItemProperty data type & custom content!  (Read 775 times)

Legacy_Chaszmyr

  • Newbie
  • *
  • Posts: 24
  • Karma: +0/-0


               

To jump right into it, I've been making an enchanting system for my persistent world, almost done with it, and down to itemproperty data types. They are all things like ItemPropertyAbilityBonus and ItemPropertyACBonusVsDmgType and the like, however, I have an enchantment that uses a custom item property that is defined in itempropdef.2da.


 


I cannot, for the life of me, find where the item property values such as ItemPropertyAbilityBonus are defined. Are these defined as constants somewhere, like a 'const itemproperty'? Or is it not possible to construct an itemproperty for an item prop that is not a base bioware itempropsdef.2da item property?


 


If I've presented my question poorly, let me use an example:


 


Haste


itemproperty IPExample = ItemPropertyHaste();


 


What if I have a custom property called 'Speedy' that I'd like to add to an item:


 


Speedy


itemproperty IPExample = ItemPropertySpeedy();


 


Where on earth do I define ItemPropertySpeedy as a valid itemproperty constructor, or is this impossible?


 


Thanks for your time!



               
               

               
            

Legacy_meaglyn

  • Hero Member
  • *****
  • Posts: 1451
  • Karma: +0/-0
Quick question about ItemProperty data type & custom content!
« Reply #1 on: April 30, 2016, 01:51:38 pm »


               

I believe that to be impossible with scripting. You can use your new itemprop in the toolset.  It's possible that NWNX has a way around that but I have not looked.


 


Edit: I may be thinking of the effect constructors though...



               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
Quick question about ItemProperty data type & custom content!
« Reply #2 on: April 30, 2016, 02:25:54 pm »


               


I believe that to be impossible with scripting. You can use your new itemprop in the toolset.  It's possible that NWNX has a way around that but I have not looked.


 


Edit: I may be thinking of the effect constructors though...




Its possible to do this. You can check either PRC or community patch for an implementation of this.


 


To do this.


 


create custom item with this itemproperty and save it into palette/hak


 


then the custom function to get itemproperty NewItemProperty() will look like this:


 


1. create the custom item with that itemproperty into system area


2. assign first item property into variable


3. delete item


4. return variable


               
               

               
            

Legacy_Chaszmyr

  • Newbie
  • *
  • Posts: 24
  • Karma: +0/-0
Quick question about ItemProperty data type & custom content!
« Reply #3 on: April 30, 2016, 06:29:05 pm »


               

Ohhhhhh it's kind of like how custom guard faction adjustment works! I see I see, thanks very much, I will try that out!