ItemPropertyMaterial(int)
Returns the itemproperty material.
itemproperty ItemPropertyMaterial( int nMaterialType );
Parameters
nMaterialType
The material type should be a positive integer between 0 and 77 based on iprp_matcost.2da.
Description
Creates and returns a material itemproperty. You need to specify the desired material type.
Remarks
The parameter you specify references the iprp_matcost.2da file (and so is the
cost table value for the item property). This file currently sets all
costs to 0. If you want the material property to affect the cost of the
item then you need to modify the cost in the iprp_matcost.2da and place the
modified file in your override folder.
The cost value can also
be used to look up a string reference (strRef) for the name of the material type
in iprp_material.2da.
Known Bugs:
Bioware failed to provide IP_CONST_MATERIAL_* constants in nwscript. The
material types can be found by looking at the cost table for materials,
iprp_matcost.2da.
GetItemPropertyCostTable returns 28 for this property, but there is no entry
for 28 in iprp_costtable.2da (the last entry is 27). You can add the
entry yourself and place your modified
iprp_costtable.2da in your override folder; or you can have any script that
tries to find the cost value associated with the quality type indicated catch
this value and use the correct cost table directly. As noted above, the
cost table for the quality property is iprp_matcost.2da.
Version
1.69
See Also
constants: | ITEM_PROPERTY_* |
functions: | AddItemProperty | IPSafeAddItemProperty |
categories: | Item Creation Functions |
author: Mistress, contributor: Cereborn