How to get armor type? (light, medium, heavy, cloth)
ReachPW
Member Posts: 27
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 ?
0
Comments
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, ...:nDexBonus = StringToInt(Get2DAString("armor", "DEXBONUS", nAC)); nWeight = StringToInt(Get2DAString("armor", "WEIGHT", nAC)); ...