Marksmanship penalty for damaged weapons[message #102225]
|
Fri, 02 September 2005 13:33
|
|
Snap |
|
Messages:286
Registered:September 2000 Location: USA (by way of the Old Wo... |
|
|
When chance-to-hit (CTH) is calculated in JA2, the penalty for damaged weapon is calculated thus: if the shooter's effective marksm. is higher than the weapon status, then there is no penalty at all; if it is lower, then the penalty is equal to half the difference between the two:
Tactical/Weapons.cpp(2949)
if (iGunCondition >= iMarksmanship)
// base chance is equal to the shooter's marksmanship skill
iChance = iMarksmanship;
else
// base chance is equal to the average of marksmanship & gun's condition!
iChance = (iMarksmanship + iGunCondition) / 2; In practice, weapon repair status hardly ever matters, since players tend to keep their guns in pretty good shape. That is why I thought a penalty expressed as a coefficient might work better:
iChance = ( iMarksmanship * iGunCondition ) / 100; I.e. a gun in 80% condition will reduce effective marksmanship by 20% (there are many other factors that are factored into the CTH later on). If this seems too much, the penalty could be halved (say) as follows:
iChance = ( iMarksmanship * (iGunCondition + 100) ) / 200; One drawback of this scheme is that enemies will now incur penalty as well. Normally, automatically generated enemies have marksmanship equal to their main gun condition (or the other way around), so that according to the existing scheme they get practically no penalty for damaged guns.
Report message to a moderator
|
Master Sergeant
|
|
|
|
|
|
|
Re: Marksmanship penalty for damaged weapons[message #102230]
|
Sun, 04 September 2005 11:09
|
|
Snap |
|
Messages:286
Registered:September 2000 Location: USA (by way of the Old Wo... |
|
|
D'oh! OK, I'll think about this.
Report message to a moderator
|
Master Sergeant
|
|
|