I got this on the new Vault forums. I'm not seeing where it ties what you are trying to add to the already existing item, but I'll see what can find in testing.
Quote:You'll need to pass the requested item property type to the function as a second parameter:
int IsModMax(object oTarget, int ipTypeRequested)
then add it to the list of properties that don't count:
if( ipType == ipTypeRequested ||
ipType == ITEM_PROPERTY_VISUALEFFECT ||
ipType == ITEM_PROPERTY_USE_LIMITATION_ALIGNMENT_GROUP ||
ipType == ITEM_PROPERTY_USE_LIMITATION_CLASS ||
ipType == ITEM_PROPERTY_USE_LIMITATION_RACIAL_TYPE ||
ipType == ITEM_PROPERTY_USE_LIMITATION_SPECIFIC_ALIGNMENT)
Of course, the limit of 4 is an arbitrary cap on the Forge. To reflect the Bioware rules, you could read the MaxProps from baseitems.2da, which would give 8 in many cases, but personally I agree that 4 is plenty, for game balance.