I've been messing around with how armor works, and tweaked it a good bit. I added prot2 and prot3 for head and extremity protection, changed the hit location checks to use them, and shifted the hit location checks above quality/damage so that it would affect all 3. I also upped armor values a little, doubled the effect of mod2, and added 2 extra tiers for very low mod values in order to make armor more effective against small arms and a bit more effective in general (right now a lucky roll tears through armor even with a weak gun). The armor piercing guns still tear you apart, it just helps vs pistols and such - and even the non-piercing guns like shotguns and pistols can still do serious damage and kill you (shotgun blew my arm off even with the extremity protection of army armor), you just live a little bit longer with armor.
Heres the code I used, just in case you'd want to use any of it (or if any other forum users want to). Parts I changed/added/moved are in red. It all seems to be working fine, but this is the first time I've done any coding in C++ so it
could have some unforseen problem.
void damagemod(creaturest &t,char &damtype,int &damamount,
char hitlocation,char armorpenetration,int mod)
{
int prot=0;
int prot2=0;
int prot3=0;
switch(t.armor.type)
{
case ARMOR_CLOTHES:prot=0;break;
case ARMOR_OVERALLS:prot=0;break;
case ARMOR_WIFEBEATER:prot=0;break;
case ARMOR_TRENCHCOAT:prot=0;break;
case ARMOR_WORKCLOTHES:prot=0;break;
case ARMOR_SECURITYUNIFORM:prot=0;break;
case ARMOR_POLICEUNIFORM:prot=0;break;
case ARMOR_CHEAPSUIT:prot=0;break;
case ARMOR_EXPENSIVESUIT:prot=0;break;
case ARMOR_BLACKSUIT:prot=0;break;
case ARMOR_CHEAPDRESS:prot=0;break;
case ARMOR_EXPENSIVEDRESS:prot=0;break;
case ARMOR_BLACKDRESS:prot=0;break;
case ARMOR_LABCOAT:prot=0;break;
case ARMOR_BLACKROBE:prot=0;break;
case ARMOR_CLOWNSUIT:prot=0;break;
case ARMOR_BONDAGEGEAR:prot=0;break;
case ARMOR_MASK:prot=0;break;
case ARMOR_MILITARY:prot=0;break;
case ARMOR_PRISONGUARD:prot=0;break;
case ARMOR_PRISONER:prot=0;break;
case ARMOR_TOGA:prot=0;break;
case ARMOR_MITHRIL:prot=0;break;
case ARMOR_CIVILLIANARMOR:prot=5;break;
case ARMOR_POLICEARMOR:prot=7;prot2=5;prot3=1;break;
case ARMOR_ARMYARMOR:prot=8;prot2=6;prot3=2;break;
case ARMOR_HEAVYARMOR:prot=10;prot2=8;prot3=4;break;
}
if(t.animalgloss==ANIMALGLOSS_TANK)prot=10;
else if(hitlocation==BODYPART_HEAD)prot=prot2;
else if(hitlocation!=BODYPART_BODY)prot=prot3;
if(t.armor.quality>'1')
prot-=t.armor.quality-'1';
if(t.armor.flag & ARMORFLAG_DAMAGED)
prot/=2;
int mod2=prot+LCSrandom(prot+1)-armorpenetration;
if(mod2>0)mod-=mod2*2;
if(mod<=-8)damamount>>=6;
else if(mod<=-6)damamount>>=5;
else if(mod<=-4)damamount>>=4;
else if(mod<=-3)damamount>>=3;
else if(mod<=-2)damamount>>=2;
else if(mod<=-1)damamount>>=1;
else if(mod>=10)damamount=(int)((float)damamount * 10.0f);
else if(mod>=9)damamount=(int)((float)damamount * 8.0f);
else if(mod>=8)damamount=(int)((float)damamount * 6.0f);
else if(mod>=7)damamount=(int)((float)damamount * 4.0f);
else if(mod>=6)damamount=(int)((float)damamount * 2.0f);
else if(mod>=5)damamount=(int)((float)damamount * 1.75f);
else if(mod>=4)damamount=(int)((float)damamount * 1.5f);
else if(mod>=3)damamount=(int)((float)damamount * 1.4f);
else if(mod>=2)damamount=(int)((float)damamount * 1.3f);
else if(mod>=1)damamount=(int)((float)damamount * 1.2f);
if(damamount<0)damamount=0;
}
My reasoning behind the changes in head/extremity protection: firstly I felt that the heavy armors should provide more than just a straight 1/2 head protection, and that the civilian armor shouldn't have any (just a bullet proof vest there).
I also felt that the armors should have a bit of extremity protection. I only gave 1 for police, as they probably wouldn't have any except for
maybe SWAT teams and such but in game they use the same armor. Army armor I gave 2 with the idea of it being a very light armor that helps a little on small arms but not at all on armor piercing stuff. Then heavy armor I put 4, which helps a good bit vs small arms and has a chance of helping a little even on armor piercing stuff.
Extremity armor isn't unheard of, just google LIMBS or QuadGard as two examples.