GetBaseItemType() just returns : BASE_ITEM_ARMOR for all types of armors. How do you determine if armor is in category of cloth, light, medium or heavy ?
int nTorso = GetItemAppearance(oItem, ITEM_APPR_TYPE_ARMOR_MODEL, ITEM_APPR_ARMOR_MODEL_TORSO);
to get the torso model. With the torso model you can get the base AC with
int nAC = FloatToInt(StringToFloat(Get2DAString("parts_chest", "ACBONUS", nTorso)));
and with the AC you can determine the category:
switch (nAC)
{
case 0: // clothing
break;
case 1:
case 2:
case 3: // light armor
break;
case 4:
case 5: // medium armor
break;
default: // heavy armor
break;
}
Also you can use "armor.2da" to get other stats like max DEX bonus, AC check penalty, Arcane Failure %, weight, base cost, ...:
Comments
to get the torso model. With the torso model you can get the base AC with and with the AC you can determine the category: Also you can use "armor.2da" to get other stats like max DEX bonus, AC check penalty, Arcane Failure %, weight, base cost, ...: