IPGetItemPropertyByID(int, int, int, int, int)

Returns an itemproperty.

itemproperty IPGetItemPropertyByID(
    int nPropID,
    int nParam1 = 0,
    int nParam2 = 0,
    int nParam3 = 0,
    int nParam4 = 0
);

Parameters

nPropID

ITEM_PROPERTY_*

nParam1

First parameter. (Default: 0)

nParam2

Second parameter. (Default: 0)

nParam3

Third parameter. (Default: 0)

nParam4

Fourth parameter. (Default: 0)


Description

Returns an itemproperty.



Remarks

This is a wrapper function for creating an itemproperty based off of an ITEM_PROPERTY_* parameter. For each different value of the nPropID parameter, it calls the appropriate ItemProperty function with as many parameters as that function requires. Thus, if you pass ITEM_PROPERTY_TRUE_SEEING, you don't need to pass anything for either of the nParam parameters. If you pass, for instance, ITEM_PROPERTY_ABILITY_BONUS, you'll need both nParam1 and nParam2. It is recommended that you look under the individual ItemProperty functions for more information on which types of itemproperties require which types of parameters.


Known Bugs

According to BioWare, the following is not a bug, but it is still something to be aware of:

This function is quite incomplete. I ran a test, and about half of the valid ITEM_PROPERTY_* constants did either not return a valid itemproperty, or returned an itemproperty of the incorrect type.

I recommend against using this function, unless you are absolutely certain that all the inputs you give it will produce the desired output.


Requirements

#include "x2_inc_itemprop"

Version

1.61

See Also

categories: Item Creation Functions | Item Properties Functions
constants: ITEM_PROPERTY_* Constants


 author: Lilac Soul