Aller au contenu

Photo

Quick question about ItemProperty data type & custom content!


  • Veuillez vous connecter pour répondre
3 réponses à ce sujet

#1
Chaszmyr

Chaszmyr
  • Members
  • 12 messages

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!



#2
meaglyn

meaglyn
  • Members
  • 804 messages

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



#3
Shadooow

Shadooow
  • Members
  • 4 465 messages

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


  • meaglyn aime ceci

#4
Chaszmyr

Chaszmyr
  • Members
  • 12 messages

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