Home » MODDING HQ 1.13 » v1.13 Modding, Customising, Editing » v1.13 Time Capsule (How-to Library) » "How does it work?" Part 10: HAM Suppression
"How does it work?" Part 10: HAM Suppression[message #222803]
||Tue, 23 June 2009 15:10 |
||In September 2008, I wrote an article about "Suppression Fire in JA2 1.13". The purpose of that
article was to figure out not only how Suppression Fire works in the game, but also how we could
improve its barely noticeable effect. During research I discovered that the JA2 Suppression System
was in fact TOTALLY F***ED. It actually didn't work at all! Since then, I created HAM Suppression:
a completely revamped system that not only works but actually changes the way that the game is
played. Now, many months later, it is time to explain how Suppression really works, with all its
new bells and whistles.
This article explores Suppression Fire in JA2 1.13 and HAM 3. It is an in-depth look at the inner
workings of the entire system, from the moment a bullet whizzes by your head, to the moment you
curl into a ball and cry for mommy. Suppression Points, Shock, Cowering, Pin-Downs, and even
Explosive Suppression are all covered here.
Due to the fact that the vanilla JA2 Suppression System doesn't actually work, this article covers
the HAM Suppression System exclusively. If you're using any version of JA2 1.13 made after
March 2009, then you've already got HAM 2.8 included. You can activate HAM suppression through your
JA2_Options.INI file. HAM Suppression is NOT turned on by default, because of the massive effect
that it has on gameplay.
Like all other "How Does It Work" articles, this piece includes bits from the actual 1.13 code,
translated into something resembling plain english. It's hard to follow at times, but I do my best
to explain it in the simplest terms I can find. Bear with me, and if there's something you don't
understand, you can always ask!
Some of the features explained below are not included in 1.13 yet (as of the time of writing). They
are parts of HAM's newer version, "HAM 3". I'll do my best to make it clear when I'm discussing a
feature that is exclusive to HAM 3. To use such features, you would have to download the newest
version of HAM.
What is Suppression Fire in the real world?
Despite the slew of hollywood movies made about pretty much every war in the last century, a modern
battlefield in the REAL world is dominated less by accurate hi-tech weaponry and cool-looking
futuristic equipment, and more by numerical superiority coupled with good tactics. While superior
technology on the battlefield can really help even the odds, a small group in an unprepared
position is usually no match for an enemy group twice its size. Training can also help
overcome the odds, but when the bullets start flying, most of the training goes out the window.
This is because of that timeless truth: "Bullets can kill you".
In contrast, in the world of Jagged Alliance, high experience combined with an accurate weapon and
a good scope usually spell victory, even when the odds are insanely against you. At some point in
the game, you'll probably end up with a few characters who can snipe the head off an enemy in one
shot, from significantly beyond sight-range, and keep picking off heads as the confuzzled enemies
try to rush you. Put a couple of these pseudo-snipers in a tight group, cover all avenues of
approach, and watch the bloodshed begin. Unless the enemy resorts to cheating it would have a hard
time countering this tactic without MASSIVE numbers on his side. The "Headshot Game", as it is
called, becames a well-known exploit - an easy winner tactic. If it was possible to win a battle
this way in the real world, wars would probably take much less time. Fortunately (or
unfortunately), combat in the real world is far less percise, calculated, or simple. A battlefield,
modern or otherwise, is a big ball of chaos. You don't want to be in it.
The idea of "Suppression Fire" is based around one thing - FEAR. Say you're out on a mission,
walking point for your platoon. Suddenly, a bullet whizzes by your head. At this point, your primal
instinct of survival kicks in almost immediately, and usually it panics the crap out of you. Your
entire body wants to get the f*** out of the way, no matter where to. The result is, usually, that
you do what your body tells you to do, which most often would be to duck aside or down to the
ground, and protect your head as best as you can. This is because you are fully aware of the damage
a bullet can do to you, so at that point in time, nothing is as important as basic survival.
Much of the combat training one gets during military combat-service is designed to prepare you for
that moment of pant-shitting terror, so that you can resist the overwhelming instincts - at least
to some degree. That's the only way to keep you alive, really, because if you react to whizzing
bullets the WRONG way, you're increasing the chance for of getting killed, dramatically. (Haha! bad
If a machine gun opens fire at you, the wrong move is definitely going to get you killed. An MG
opening up on your position would scare the crap out of you even if you're a badass elite with not
a worry in the world. The trick is, naturally, to retain a sufficient degree of coolness that would
allow you to choose the best course of action to avoid the incoming bullets, rather than some
random dive that could get you killed. Of course, if you reach the pinnacle of calm, you could
shoot the machine-gunner in the face before he even finishes the first volley, but only Shadow is
THAT calm .
Naturally, there's also the other side of the equation, I.E. the person who is actually firing the
scary bullets. Suppression fire is one of the most important tools on a modern battlefield, and a
unit commander needs to understand the principles of laying down suppression in the proper manner
at the proper time, if he is to lead troops into battle. If you can get your enemies to duck out of
the way of the bullets, you've cost them some time, disorganized them, and made them very reluctant
to advance at you. You then try to "saturate" the enemy with bullets - even if all you do is miss -
no matter how many bullets it takes to keep the enemy from advancing. That's when a second force
maneuvers to a better tactical position and closes the range, taking advantage of the fact that the
enemy is busy with surviving rather than watching its flanks.
This sort of tactic, often called "Fire and Maneuver", has been in practice since before the First
World War, and is naturally used even today. Suppression is such a succesful instrument on the
battlefield that by far most common weapon of modern infantry is an automatic rifle of some sort.
The machine-gun is still one of the most fearsome weapons in infantry combat, despite being
inaccurate and ungainly, because it can easily "saturate" the enemy for a long period of time. Even
the incredible noise of a machine-gun adds to the effect, and the many bullets it produces are a
good recipe for scaring people shitless. As a matter of fact, any loud noise can cause suppression
- especially if that noise is "BOOOOOOMMMMMMMMMMMM!!!!!".
What does suppression do to its target?
As I said, suppression is geared towards the effect of "pinning down" enemies so that they can't
advance and do not present a threat, while a second force flanks the enemies and eliminates them
from a better angle. Here's a short list of what it means to be Suppressed in the real world:
- You duck out of the way, fall prone, or at least stop in your tracks ("Incoming!!!")
- You waste time trying to your wits back ("OHSHITOHSHITOHSHIT!!")
- You protect your head more carefully the rest of your body (it's the part you don't want them to hit)
- You're very reluctant to pop your head out to look around (it could get blown off!)
- You lose the will to fight ("What the f*** am I doing here?!")
- You find it harder to aim your weapon properly (shaking arms! And yeah not wanting to pop your head up)
- You're harder to hit (You ARE hiding from the bullets...)
- If you're scared enough, additional suppression fire can easily freak you out even more. ("GOD, MAKE THEM STOP!")
- (There's even more to it, but I'll save that for later.)
HAM Suppression strives to mimick ALL of these points.
What are the IN-GAME effects of suppression?
This is an important bit to understand, so read closely.
HAM Suppression Fire creates the following effects on the target:
- Target loses APs
- This is the primary effect of any and all suppression fire. A suppressed character loses
APs, which he otherwise could spend on things like shooting back.
- Target becomes inaccurate
- If the suppressed character still has enough APs to shoot back, he can't possibly be very
accurate when all hell is being fired at him.
- Target becomes harder to hit
- A suppressed character is more interested in protecting oneself, and so will try to keep
the majority of his/her body out of harm's way.
- Target loses morale
- It's not fun being shot at repeatedly. It makes you remember that you can die. It
definitely does NOT make you think that you're winning.
- Target loses situational awareness
- Aside from the terror of being fired at, you're also trying to keep your head in a safe
place, I.E. not popping it out behind corners to see if there's anyone there who might blow it off
- Target drops a stance
- The ground is sometimes your best bet for finding cover. Most of the time though, it's
simply the closest cover you can find (It's always down there!).
- Target becomes even more vulnerable to suppression
- If they keep shooting at you, they obviously mean business.
HAM Suppression as a whole
The HAM Suppression system covers everything from the moment a bullet is fired to the moment when
all effects of suppression disappear. It keeps track of several different things, and works over a
period of several turns. This is really why it changes the tactical gameplay so much: if you use
suppression effectively, it opens up the way to FAR more tactical diversity and interesting
aggressive combat. Using suppressors and flankers and even snipers takes on a whole new meaning,
because the whole squad has to work together very tightly to survive the battle. In most cases
you'll need a much larger group of mercs to accomplish certain things than you did in older
versions of JA2, even if the enemies you're facing are not particularly numerous.
Rough outline of how the system works: The suppression system tracks bullets as they fly,
recording the amount of suppression they deliver to each target. It then measures how well the
target reacts to this suppression, based on his or her combat experience, and inflicts penalties
accordingly. The suppressed target then becomes much less dangerous until such time that these
effects can clear up on their own (this can take several turns!). If more suppression fire is
poured at this target, it will help keep the enemy harmless long enough for it to be destroyed.
Here's the broken-down list:
- A bullet in flight passes by enemies and inflicts suppression points on them.
- Alternately, explosions can also inflict suppression points to nearby characters.
- Tally up all suppression caused by a single attack to a single target.
- Calculate how "vulnerable" the target is to the effects of suppression.
- Determines how many APs are lost due to the attack.
- Cause fear to the target (in the form of "Suppression Shock").
- Cause morale drop and stance drop proportional to the number of APs lost.
- While suppression is in effect, it factors into other things such as accuracy.
- All accumulated effects will slowly clear up over the next few rounds.
- Eventually, either the target is dead, or suppression effects have cleared away.
- At any given point, additional suppression fire at the target will start the cycle all over
again, probably exacerbating any existing effects.
Here's a short explanation of the various concepts you'll come across many times in this article.
A suppressive attack will inflict these on a character. Passing bullets and nearby explosions both
give suppression points. They are then converted into actual effects, and disappear at the end of
Your ability to resist the effects of suppression. Based mainly on Experience Level, but takes a
lot of modifiers from morale, attitude, and the condition of nearby friendlies and leaders.
The fear of bullets. This accumulates whenever you suffer suppression, and causes many secondary
effects like the loss of accuracy and sightrange. Shock is halved at the start of your turn, and
will eventually disappear if it doesn't keep getting piled up on you.
A state where so much shock has been piled up that you become panicked. Causes increased
vulnerability to further suppression fire. This is just a "Stage" at which several effects of
suppression shock kick in.
Pinned Down / Neutralized
A character who's suffered so much suppression in a single turn that they have lost their entire
next turn. This character starts his next turn with 0 APs.
Continued in next post...
[Updated on: Mon, 27 April 2015 23:44] by Moderator
Re: "How does it work?" Part 10: HAM Suppression[message #222807]
||Tue, 23 June 2009 15:16 |
||Step 1A: Suppression due to gunfire
Any bullet in the game has a chance to cause some degree of suppression, assuming that it passes
sufficiently close to any character. The program will keep track of the location of the bullet as
it flies through the air - any character it passes by has some chance of acquiring "suppression
points" from the bullet. This check, and the Suppression Points it inflicts, runs every time the
bullet's position is updated. This could be dozens of times for each bullet. Remember, only enemies
that are in the same tile as the bullet, or any adjacent tiles, are checked here.
Each time this code runs, it has a certain chance to inflict one suppression point on those
characters who are nearby. You will understand the nature of suppression points later. For now, all
you need to know is that a single point is nothing serious. However, this check runs many times
during the bullet's flight, so it has the potential of dishing out lots of suppression points,
especially if it flies past a large group of enemies.
Let's see how it's done in the code itself. It begins with a series of conditions which I'll
explain one by one. Please note that if any of the conditions below are NOT fulfilled, then the
character suffers no suppression at all during this check. Again, since the check runs many times
as the bullet is flying, a single character might have to go through the check several times and
may either fail all checks (getting several Suppression Points) or win them all (avoiding
suppression from the bullet entirely) or fail some and win some.
Each time the bullet is repositioned along its flight path, do the following:
If there is a character in the same tile as the bullet, then
We begin with affecting any character who is in the same tile as the bullet.
If the character is an enemy, or if it is a friend who isn't close enough to the shooter, then
Enemies are always eligible for suppression when the bullet passes near them. Friendlies can also
suffer, it's called "Friendly Suppression". But it only happens if the friendly character was
sufficiently far away from the shooter. By default, the maximum distance within which friendlies
are immune to suppression is 3 tiles. With newer versions of HAM, you can set this distance to
whatever you'd like.
If the bullet is not a buckshot pellet, or 50% chance if it is a buckshot pellet, then
Buckshot pellets are great for suppression, because there's 9 of them whizzing past the character
all at once, and all of them are likely to cause suppression points. This is because each pellet is
considered a separate bullet, so if all 9 pellets are passing through the enemy's tile, they would
cause 9 times as much suppression as a single rifle bullet. The code tones this down a bit by
giving each pellet a 50% chance of causing any suppression at all (instead of the normal 100%
chance...). Therefore, on average, a shotgun buckshot blast is "only" 4.5 times as suppressive as a
single "regular" bullet (9 * 50% = 4.5).
If the character is prone, then
He has a 25% chance of avoiding suppression
Prone characters have a 25% chance here to avoid the check. This makes them harder to suppress.
If the character is prone or crouced, then
He has another 25% chance of avoiding suppression
Crouched characters only get this one chance to avoid getting a suppression point. For prone
characters, this is the SECOND opportunity to avoid getting a suppression point. Statistically,
this means that prone characters should be able to avoid about 50% of all suppression points, while
crouched characters will statistically avoid only 25%. Standing characters have no chance to avoid
a point. If the bullet passes by them, they will surely get one.
If the character has failed his chances (or is Standing), then
The character's Suppression Point tally is increased by 1 point.
Naturally, you only get this far if you haven't succeeded one of those chances to avoid suppression
due to your stance.
Again I'll restate that this happens every time the bullet is moved along the flightpath, which
happens several times a second. Therefore, on average, a single bullet passing through a
character's tile could cause anywhere between 1 and 5 suppression points, if not more. Against
prone characters this is much less, with an average of only 1 or 2 points per bullet.
Let's see what happens when the bullet is passing in the tile ADJACENT to the character.
For each tile adjacent to the bullet, do:
If there's a character in this tile, then
If there's no wall or other impassable obstacle between the bullet's tile and the character's tile, then
If the character is an enemy, or if he is a friend that is too far away to avoid Friendly Suppression, then
If the bullet is not a buckshot pellet, or is a buckshot pellet but succeeds a 50/50 chance roll, then
If the character is prone, then
He has a 25% chance of avoiding suppression
If the character is prone or crouced, then
He has another 25% chance of avoiding suppression
If the character has failed his chances (or is Standing), then
The character's Suppression Point tally is increased by 1 point.
This is almost the same as the previous check we've made. The key difference is a check to see
whether there's a wall between the bullet and the character. If so, the character will not suffer
suppression from this bullet. This helps avoid situations where a character indoors will be scared
by bullets flying outside, or vice versa. Other than this, there is absolutely no difference.
Now that we've seen how this stuff works, I hope it's easier to understand that a single bullet can
cause more than a couple of suppression points. As it flies by a character, there could be several
checks like the ones above, and each check has the potential of causing a suppression point. And
that's only one bullet - an autofire volley can have a dozen bullets flying through nearby tiles,
each of them causing suppression points independetly to whomever it passes by.
At the end of this ordeal, the affected characters will have accumulated "Suppression Points" from
all bullets that passed near them. When we reach step 3, we'll need to know how many suppression
points the character has racked up so far.
Step 1B: Suppression due to explosions
As of HAM 3.2, explosions will also cause large amounts of suppression to anyone nearby. They
inflict suppression points based on the size of the explosion and the distance between the blast-
center and the afflicted character. Only BLAST-TYPE explosions (like frag grenades, stun grenades,
and flashbangs) will cause suppression. Gas does not.
Suppression_Points = (Explosion_Radius * 3) - Distance between Blast_Center and the affected character
Suppression_Points are multiplied by 3 OR affected by external percentage (see below)
Suppression from an explosion is caused even beyond the range of the blast itself. It's the sound
and pressure of a nearby explosion that has soldiers ducking for cover, not necessarily the damage.
X in the above formula used to be 3. With HAM 3.5, this value is externalized as a percentage, so
you can decide for yourself.
As you can see, the further away you are, the less suppression you will receive. However, the
larger the blast, the more suppression it delivers.
Explosions in general cause a lot more suppression than bullets. A single explosion can easily
shock anyone in the vicinity, even battle-hardened veterans. On average, a frag grenade can cause
as much suppression as a long volley of bullets from a machine gun.
In addition, there are even more severe effects to the Flashbang grenade:
If outdoors and more than half-radius distance away from the flashbang's center, then
Receive anywhere between 0 and 5 suppression points
Normally, flashbangs would have no effect on characters who are standing sufficiently far away
(more than half the radius of the explosion). HAM suppression does deliver some effect at this
If indoors and less than half-radius distance away from the flashbang's center, then
Receive 15 extra suppression points
In close quarters, flashbangs will freak the s*** out of anyone close enough to the center of the
Step 2: Calculating the character's Suppression Tolerance
By now we know how much suppression our character is receiving - that's the amount of Suppression
Points he or she has accumulated. The next step is to figure out how susceptible this character is.
This is called "Suppression Tolerance". The higher it goes, the more RESISTANT a character will be
to the effects of suppression fire. The most influential factor for this is the character's
Experience level, followed closely by Morale and the proximity of teammates.
There are several steps to this calculation:
- Base value depends on the character's Experience Level
- Morale may affect this positively or negatively, as appropriate
- Some personality traits affect tolerance as well
- Nearby friendlies with high leadership rating can help increase tolerance by instilling
confidence (HAM 3 only)
- Nearby dead bodies of friends will instill more fear, reducing tolerance considerably (HAM 3
- Moving rapidly helps increase tolerance as well (HAM 3 only)
Basic_Tolerance = Experience_Level * 2
This kicks off the formula with a very simple number. Since Experience level can be anywhere
between 1 and 10, the result here is anywhere between 2 and 20.
If character is player controlled, then
Morale_Modifier = (Current_Morale - 50) / 10
Basic_Tolerance is increased by Morale_Modifier
This is the calculation for morale effects on Player Characters. For every 10 points of morale
above 50 ("Normal" morale), the character gets +1 tolerance. For every 10 points below 50, the
character receives -1 tolerance. Therefore, the range of the Morale Modifier is anywhere between -4
If character is not Player Controlled, then
Morale Modifier = (Current_Morale - 2) * 2
Morale for NPCs and Enemies works differently than Player-character morale. It's not on a scale of
1-100, but instead works in "stages". There are 5 stages of morale. From worst to best, they are:
Hopeless (0), Worried (1), Normal (2), Confident (3), and Fearless (4).
Therefore, an NPC with Fearless morale will get (4 - 2) * 2 = +4 Tolerance points.
Conversely, an NPC with Hopeless morale will get (0 - 2) * 2 = -4 Tolerance points.
So even though the calculation is different, the end result is very similar to that experienced by
Let's move on to personality quirks.
If the character is "Aggressive", then
Tolerance is increased by 2 points.
If the character is a "Coward", then
Tolerance is decreased by 2 points.
These are basic personality traits like the ones our mercs have.
If the character is a generic AI-controlled unit, then
If set to "BRAVE SOLO" or "BRAVE AID" then
Tolerance is increased by 2 points.
If set to "AGGRESSIVE", then
Tolerance is increased by 1 point.
If set to "DEFENSIVE", then
Tolerance is decreased by 1 point.
The code above only affects characters who are AI-controlled and do not have a profile in PROF.DAT.
This means "generic" enemies, militia, civilians, crepitus, and anything else of that sort. The
attitude of a generic character can decide a lot of different things, not just tolerance bonuses,
but that is really not important right now.
Next up we're going to check the effect of nearby friendlies on our tolerance value. PLEASE NOTE:
This feature is only enabled in HAM 3! If you are not using HAM 3, ignore this calculation.
( for the purpose of this formula, "Base_Character" is the name of the person whose tolerance we are calculating! )
For EACH AND EVERY character on the same team as Base_Character, do:
We've started a check of every single character on the same team. We'll want to find out their
current condition, and whether or not they can do anything to help negate suppression.
Particularly, good leaders can inspire their fellows to fight on or even advance under fire.
From now on, "Teammate" will refer to the current character whose stats we are checking.
The first thing we do is to try and see whether the Teammate is alive and has high enough
experience and leadership to provide assistance against suppression. We do this with a series of
checks which I will explain one by one.
If Teammate is alive and conscious, then
Obviously, if the teammate is not conscious, he can't help. We'll see what happens with unconscious
If Teammate's EXPERIENCE level is higher than Base_Character's EXPERIENCE level, then
Only a character of higher experience level can help out.
If Teammate's Shock Value is lower than his (Leadership/5)
Yes, I have yet to explain what Shock is, and some of you may not yet know how it works. That's
alright, it's not crucial at the moment, but the jist of it is that shock is one of the most
important effects of suppression. So basically what we are doing here is checking whether the
teammate has been suppressed or not, compared to his leadership skill. A suppressed leader can't be
of much help - he's having problems himself! Only the best leaders will be able to order a charge
while they themselves are under heavy fire. Of course, sufficiently heavy fire will render the
leader useless even if he's the best leader in the universe.
Assuming that we've fulfilled all of the conditions above, we move on to see whether we've found
the best leader in close proximity to Base_Character. We start by rading some important values,
including the Teammate's leadership and his distance from Base_Character.
Leadership_Modifier = (Teammate's_Effective_Leadership - 25) / 15
Effective Leadership is usually the same as the character's Leadership skill. If the character is
slightly drunk, he or she gets a 20% bonus to leadership.
Characters with less than 25 leadership will get a 0 here, because (25-25)/15 = 0. For every
15 points above 25, the character gives +1 leadership modifier. However, we don't apply this to the
Base_Character's tolerance value straight away, there's still a lot more to be done.
Distance_Modifier = Distance between Teammate and Base_Character, divided by 3.
This is the distance in tiles between the two characters, divided by 3.
If Distance_Modifier is less than or equal to (Leadership_Modifier+1), then
This condition compares the distance with the teammate's leadership. In essence, for every 3 tiles
of distance between Teammate and Base_Character, the teammate needs at least 15 points of
leadership above 25. Otherwise, he cannot bestow his leadership bonus at all because he's too far
away. This means that very good leaders can dish out leadership bonuses in a much larger radius.
Weaker leaders can only inspire troops who are very close by.
Leadership_Modifier is increased by the difference in EXPERIENCE level between the two characters
Again, we already know that Teammate has a higher experience level, otherwise he would've failed
one of the earlier conditions and we wouldn't even be here. So we add the difference to the
leadership score. The more experienced the teammate, the better he can convince the Base_Character
to shrug off suppression effects.
Leadership_Modifier is decreased by (Distance_Modifier-1)
Leadership is negatively affected by distance. So while a good leader can have a strong effect at a
greater distance, he will still get much better results if he is very close by to the
If the final Leadership_Modifier is the best we've seen out of all the teammates we've checked so far, then
Remember this Leadership_Modifier as the best one in the team.
Remember, we are looking for only ONE character to bestow a leadership bonus to tolerance. Somebody
has to take charge after all, and it better be the one that could be of the most help. So as we go
through each character on the team, we will remember only the best one we've encountered so far.
Total_Teammate_Bonus is increased by 1
This value, called "Total_Teammate_Bonus", is the final modifier that we will later apply to
Base_Character's tolerance. For now, it acts as a counter that tells us how many live, experienced,
inspiring mercs we've encountered so far. While only one of them can give a leadership bonus (which
can be pretty high if he's a good leader!), each of them will help the Base_Character's tolerance
simply by being nearby, adding one point of tolerance each. Having a strong team of friends can
really help us get through the fear of suppression!
But having friends nearby can backfire on you, if the situation appears dire for the entire group.
Let's see how this happens. Remember, we are still checking the same teammate.
If Teammate is dead, or
If Teammate is unconscious, or
If Teammate's current Shock value is higher than Base_Character's Shock value, then
A nearby dead or unconscious friend is going to really screw up our tolerance. Also, you see that
bit with the shock values above - basically it checks whether the Teammate is MORE SUPPRESSED than
the Base_Character. Seeing a friend who's even more suppressed than you are is certainly going to
wipe the smile off your face.
If Teammate is no more than 5 tiles away, then
Negative effect from dead/unconscious/suppressed friends only happens if they are no more than 5
Penalty = Teammate's_Experience_Level - Base_Character's_Experience_Level
Again, we check the difference in experience.
Penalty is divided by Distance/2, or 1, whichever is greater.
It helps if you're further away from the afflicted teammate.
Total_Teammate_Bonus is reduced by Penalty, or 1, whichever is greater.
In simpler terms, our Base_Character looks around and sees his friend lying there in a pool of
blood, or crying to mommy, or somesuch. If that teammate is of a higher experience level than
Base_Character, this is very bad news. I.E. "Look what they've done to him! And he's even more
experienced than ME!". This generally leads to a feeling of "I'm probably next".
So the higher the difference between the two characters, the more it will scare the Base_Character
to see his teammate in trouble (or, gone to a better place).
Any afflicted teammate within range will give at least a 1 point penalty to tolerance. If he is
sufficiently closeby and has sufficiently higher Experience level, he could give much more than
just 1 point!
After we've checked each and every teammate, we take a look to see whether any of them had any
leadership bonus to bestow:
If we've encountered at least one leader within range of Base_Character, then
Total_Teammate_Bonus is increased by (BestLeadership-1), or 1, whichever is greater.
We add at least one point to our teammate bonus for having found a good leader nearby. Note that
the -1 here is for compensation, because this leader already gave 1 point (as all leaders we found
did), so that point is now taken away to avoid giving the same bonus twice. It's all crazy maths,
don't pay attention to my shenanigans.
Make sure that Total_Teammate_Bonus is no less than -5 and no more than +5
This limits the effect of nearby friendlies, for good or for bad.
Finally, Base_Character's Tolerance value is increased by Total_Teammate_Bonus
Or decreased, of course, if the bonus turned out to be a penalty.
This leaves only one last modifier to the character's tolerance - a bonus for rapid movement. In
essence, the more tiles you move during your turn, the more tolerance you get. This allows
characters to advance under fire without getting pinned down. Naturally, it is meaninless on its
own, but experienced characters with high tolerance can make very good use of this. PLEASE NOTE:
This feature only exists in HAM 3.
Tiles_Moved = number of tiles that this character has moved since the start of his turn
For each X tiles_moved, add one point of tolerance.
In the above code, X is an externalized value that can be changed in the INI file (it's called
"TILES_MOVED_PER_BONUS_TOLERANCE_POINT"). Normally, a running character with full APs can cross
about 20 tiles. By default, the INI setting is 5, so for each 5 tiles moved you get one extra
tolerance point, for a total of 4 points for an entire turn's run.
We're almost done calculating our tolerance value, but first:
Make sure Tolerance is no more than "SUPPRESSION_TOLERANCE_MAX"
Make sure Tolerance is no less than "SUPPRESSION_TOLERANCE_MIN"
In the original (broken) suppression system, tolerance was limited to a number between 0 and 24.
HAM allows adjusting these minimum and maximum values through INI settings. This is useful because
it allows us to control how vulnerable (or invulnerable) a character can be to suppression fire.
Raising the minimum is useful to avoid having masses of low-level characters getting neutralized by
a couple of bullets. Lowering the maximum ensures that high level character do not become
impossible to suppress. The recommended HAM settings are roughly 2-18, although you can use the INI
to set it just right for your playing style.
And we're done! We now have the character's suppression tolerance, based on his experience level,
his own morale and personality, the condition of nearby friendlies, and his speed.
Continued in next post...
Re: "How does it work?" Part 10: HAM Suppression[message #222813]
||Tue, 23 June 2009 15:27 |
||Step 3: Calculating AP loss
We now have the character's total accumulated Suppression Points (from bullets and explosions so
far), and the character's tolerance level. We can then proceed to calculate all of the effects of
suppression on this character, if any.
The first and most basic step will be to calculate how many APs this character loses due to
suppression fire. All other effects of suppression will be based on AP loss. Therefore, if the
character suffers no AP loss, he does not suffer any other effects.
The formula for calculating AP loss is rather complicated. Actually, it's less complicated than the
one I was trying to make to replace it, but it's still a lot of crazy maths. I won't bother
explaining it in great detail, but I'll explain the jist of it in a moment.
AP_Loss = ( ( (Suppression_Points * "AP_SUPPRESSION_MOD") / (Tolerance + 6) ) * 2 + 1 ) / 2;
Phew! That's a nasty one!
We already know two of the factors here - the number of Suppression Points accumulated, and the
Tolerance of this character. The third factor is "AP_SUPPRESSION_MOD", which is a setting in
APBPConstants.INI that you can change at will. This value is used to make the system compatible
with both 100AP and 25AP play modes. By default, it is 24 (for the 100AP mode) or 6 (for the 25AP
Explaining the formula in detail would be silly (I can't do it, anyway).
What actually happens is that, based on the number of suppression points you accumulate, there's a
linear increase in the number of APs lost. In other words, if you receive X suppression points, you
lose Y APs, and if you receive 2*X suppression points, you lose 2*Y APs.
Tolerance helps moderate the ratio between X and Y. A Tolerance 0 character (a crappy soldier) will
therefore lose more APs for each suppression point, while the a Tolerance 24 character (an elite
with good morale or other bonuses) will only lose a few APs if any. In other words, for the same
amount of suppression fired at them, characters with lower tolerance will always lose more APs than
characters with higher tolerance.
It's hard to say how many APs are lost per bullet on average, because of the random nature of
assigning suppression points (see "Step 1A"), and because tolerance plays an important part in the
formula. However, in general, an experienced character should suffer no more than 5-6 APs per
bullet (in the 100AP mode!), assuming the bullet passed very close to that character. High
tolerance can actually negate AP loss completely, although this is more common in the 25AP mode
where values like 0.99 or somesuch are immediately rounded down to 0. In such cases, only large
amounts of bullets can cause any significant AP loss. Then again, really high tolerance values are
rare, even for elite characters.
The bottom line is that the more bullets are fired at the target, the more suppression points are
accumulated, resulting in higher AP loss. And as you'll see shortly, the more APs you lose, the
more suppression effects you will suffer as a result. However, AP loss is perhaps the most
important effect in itself, especially because HAM allows APs to drop below 0, in which case
they are DEDUCTED from the character's next turn. More on this later.
AP_Loss = (AP_Loss * "SUPPRESSION_EFFECTIVENESS") / 100
The INI setting called "SUPPRESSION_EFFECTIVENESS" works like a percentage that modifies AP loss.
Subsequently, because AP loss is the basis for all other suppression effects, lowering or raising
the AP loss value will cause all other effects to shift accordingly. This allows us to control
rather directly how powerful suppression fire really is. If the SUPPRESSION_EFFECTIVENESS value is
set to 0, it will completely disable all suppression effects, disregarding everything else.
Make sure that AP_Loss is no greater than the amount of AP loss allowed per attack
This check limits the number of APs a character can lose in a single suppressive attack (be it a
single shot, a burst, an autofire volley, or a nearby explosion). This limit is set using an
APBPConstants.INI value called "AP_MAX_SUPPRESSED", which is normally set to 64 (in the 100AP mode)
or 16 (in the 25AP mode). You can turn off this limit completely using a JA2_Options.INI setting
called "LIMITED_SUPPRESSION_AP_LOSS_PER_ATTACK", which can be set to TRUE or FALSE.
Make sure that the total APs this character has lost to suppression during this entire turn is not above the limit
Another limit check. This time, we're making sure that we do not lose more APs PER TURN than
we're allowed. No matter how many attacks are made against the character, there's only so much APs
he or she can lose. This is set using the APBPConstant.INI value called "AP_MAX_TURN_SUPPRESSED",
which is normally set to 200 (in the 100AP mode) or 50 (in the 25AP mode).
Yes, indeed, it's MORE than the number of APs we get per turn! The idea behind this is that
sufficient suppression fire can actually cause a character to lose their ENTIRE next turn,
effectively neutralizing them, or "Pinning them Down". This happens when the character reaches -80%
of his normal APs-per-turn.
Again, you can turn the limit off completely, using a JA2_Options.INI setting called
"LIMITED_SUPPRESSION_AP_LOSS_PER_TURN". It is recommended that you leave this limit in place,
otherwise extreme negative AP values can "wrap around" and give the character more APs than he ever
should have. In other words, the limit is good, don't mess with it.
Please note that APs are NOT YET DEDUCTED. They will only be deducted much later in the process.
Step 4: Suppression Shock
Now that we know how many APs we're going to lose (and thus, how badly our character was affected
by suppression), we can begin calculation additional negative effects. The first and most
complicated effect is Suppression Shock, a concept which did not exist in the original Suppression
System at all.
If AP Loss is meant to simulate the time it takes to duck into cover and regain one's wits,
Suppression Shock represents the ramifications of fear, panic, and an overwhelming instinct for
Suppression Shock manifests as physical nervousness. It doesn't prevent the character from
performing actions (that's what AP loss does), it makes actions much harder to perform. Shooting
becomes harder, as does performing delicate actions like lockpicking. In addition, a shocked
character is scared of exposing himself to the whizzing bullets, and so becomes much harder to hit.
And finally, if enough shock has been accumulated, the character is considered to be "Cowering",
I.E. in a state of panic which can exposes him to further fear and thus even more shock.
We'll see the effects of Suppression Shock later in this article. For now, let's see how shock
points are calculated and distributed.
Please remember - Suppression Shock can be turned off completely, but for the purpose of this
article we'll assume that it is ACTIVATED. If not, you can simply skip to the next step.
NOTE: The original HAM shock system was built before the 100AP system was introduced. When
HAM was added to the main code, it did not work well with the new system, and unfortunately didn't
produce the best results with the 25AP system either.
Therefore, the suppression shock calculations here belong to the new HAM 3.5 Suppression
System. They are much more streamlined and easier to understand, and work well with both AP
If Suppression Shock is allowed, then
First we check to see whether Suppression Shock is activated or not. There is an INI setting for
this called "SUPPRESSION_SHOCK" which can be set to TRUE or FALSE. In HAM 3.5, this setting has
been removed - you can turn suppression shock off by setting "SUPPRESSION_SHOCK_EFFECTIVENESS" to 0
(see more on that below).
Suppression Shock is applied based on how many APs are being lost during the current suppressive
attack. Therefore, if no APs are lost, no shock is gained either.
Shock_Limit = Read the value of "MAXIMUM_SUPPRESSION_SHOCK" from JA2_Options.INI
This value, read from INI, is the maximum possible shock allowed. Normally, it is set to 30. As
you'll see shortly, it is possible to "breach" that limit due to considerable suppression effects,
especially explosions, which cause a lot of AP loss during one attack.
Shock_Gained = AP_Loss / AP_SUPPRESSION_SHOCK_DIVISOR
The original HAM Suppression system made a complex calculation here, taking into account a lot of
things that in retrospect don't make much sense. Instead, with the HAM 3.5 system, we now gain a
number of suppression points based directly on the number of APs we've lost.
The divisor "AP_SUPPRESSION_SHOCK_DIVISOR" is a new APBPConstant.INI value. It should be set to 4
when using the 100AP system, and 1 when using the 25AP system. So basically, in 100APs, you will
receive 1 shock points per every 4 APs lost.
Since AP Loss is directly affected by the character's tolerance (see above), this also affects the
amount of shock that the character gains. In theory, any character who is "pinned down" (reached
-80 APs and has lost the next turn completely) will be fully shocked. This is much harder to
achieve against high tolerance, so this simple calculation is much better than the old one.
Also note that Shock_Gained and Shock_Limit cannot be lower than 0. It's just a failsafe.
Shock_Gained = (Shock_Gained * SUPPRESSION_SHOCK_EFFECTIVENESS) / 100
The INI setting called "SUPPRESSION_SHOCK_EFFECTIVENESS" is a useful method to control how powerful
the shock effect really is. It is a percentage value, so if set to 100 then the shock system
behaves as per HAM default. Increase the value above 100 to get more shock delivered. You can also
reduce it below 100 to reduce the amount of shock in the game. In HAM 3.5, setting this to 0 is the
only way to turn off Suppression Shock entirely.
If (Current_Shock + Shock_Gained) is less than or equal to the Shock_Limit, then
Current_Shock is increased by Shock_Gained
Here the program checks the amount of shock we're going to end up with. If the new value is lower
than the limit, then there's no problem, and the soldier's shock level is increased normally.
Else, if Current_Shock is still below Shock_Limit, then
Current_Shock is increased by Shock_Gained
This is what's called a "breach". The new value is going to be HIGHER than the Shock_Limit. It's
only possible if the original shock value was lower than the limit. If the current shock is already
higher than the limit, it cannot be increased further.
The effect of this is that a lot of suppression coming from a single attack or explosion can send a
character way above the limit. Further suppression will not increase the shock value anymore once
the limit has been breaches. Of course, since Shock is halved at the start of each turn, you can
breach the limit once per turn.
The effects of Suppression Shock are many, and will be covered later in this article.
Step 5: Cowering
As we've already established, suppression causes an instinctive reaction that causes you to dive
for cover and reduces your will to risk yourself any further. If you haven't received sufficient
combat training and actual experience, it's likely that you will also make a CONSCIOUS decision to
stop fighting and pray to god. With sufficient incoming fire, this can even happen to the best
soldiers as a rational decision ("Bloody hell, they're out to get me! Better stay as low as I
can until they find something else to shoot at!").
When a soldier reaches the state where he's abandoned any thoughts of advancing or presenting any
part of his body as a target, he is considered to be "cowering". In physical terms, this is the act
of making yourself as small a target as possible. It naturally comes at the expense of being able
to do anything else.
In effect, "cowering" is simply a state of having too much suppression shock. Once the soldier has
reached a certain threshold of shock, he is considered to be cowering. If you can see the soldier
(or he's one of your own men), then you will also get a message notifying you that the character is
It is important to pay attention to this message because cowering has a very important effect: It
makes the soldier even more vulnerable to suppression fire. In other words, once a character is
cowering, they're going to be even EASIER to suppress, requiring less bullets/explosions to pin
that soldier down (I.E. lose his next turn). Also, cowering characters are far more likely to drop
stance, as you'll see shortly.
If Suppression Shock is enabled, and Current_Shock is greater than Tolerance, then
This is the condition for cowering. To become cowering, the character must've accumulated more
suppression shock than his Tolerance level. For this reason, characters of very low Experience
Level will cower whenever they are shot at, making them very vulnerable to suppression fire. High
level characters require a massive amount of shock to reach this state. Given the calculations
above, a character with 24 Tolerance (the highest tolerance possible) would require 24 shock points
to reach the cowering state. This requires them to lose no less than 100 AP to suppression fire in
a single turn (or even higher AP loss over several turns). This is extremely unlikely because
tolerance also reduces the number of APs lost!
Character_Is_Cowering = TRUE
If the character is visible, then Show on-screen message: "Soldier cowers in fear!"
AP_Loss = (AP_Loss * COWER_EFFECT_ON_SUPPRESSION) / 150
The last line is the most important of course: AP_Loss is increased by a certain percentage
dictated by the "COWER_EFFECT_ON_SUPPRESSION" INI setting. Normally, this would be 150%, so the
cowering character will actually lose 50% more APs than he was supposed to! In fact, every
subsequent attack at this character will cause 150% AP loss. If the character survives, shock is
reduced at the start of every turn, so eventually the cowering effect will disappear.
Step 6: Morale Reduction
Suppression Fire reduces your will to fight, and naturally this means reducing your morale. For
every X APs you've lost, you will lose one point of morale.
If we've lost more than 0 APs, then
For every X APs lost, reduce morale by one point
X here is defined by the APBPConstant called AP_LOST_PER_MORALE_DROP.
Please note that personality traits (like "Optimist") take effect here, so you may lose more or
less than 1 morale point per AP lost.
Step 7: Stance Change
As has been repeated several times so far, Suppression is supposed to get your enemies to seek
cover. The closest cover available, of course, is the ground itself, so getting closer to the
ground is a character's first choice.
If Current_Stance is PRONE, then
No stance change
If you're already down on the ground, there's no where lower to go!
If Current_Stance is CROUCHED, then
If it is possible to go PRONE at this location, then
If AP_Loss is greater or equal to the amount required for a drop to PRONE stance, then
If there are no enemies less than 8 tiles away, or if the character is Cowering, then
Drop to PRONE stance
Lots of conditions there. I'll explain.
Firstly, it should be possible to drop to prone stance here. As you probably know, it's impossible
to lie prone on some tiles, especially if there's something directly behind you.
The character must also be losing enough APs to go prone. In the 100AP system's default settings,
going from crouch to prone costs 8 APs, so unless you've lost at least that many APs you will not
change to prone stance.
Additionally, characters will not normally go prone if there are enemies in the vicinity (less than
8 tiles away). That would just be silly, and would get you killed much faster than if you were
staying crouched and mobile. HOWEVER, if the character is also COWERING (I.E. has received a
considerable amount of shock), he/she is not thinking rationally and will drop to the ground anyway
as it is the closest possible cover.
If Current_Stance is STANDING, then
If in water, then
Can't change stance anyway
It is impossible to change stance when in water.
If it is possible to drop to PRONE stange at this location, then
If AP_Loss is greater or equal to the amount required to drop all the way to PRONE stance, then
If there are no enemies less than 8 tiles away, or if the character is Cowering, then
Drop to PRONE stance
Else, if there are nearby enemies, then
Drop to CROUCHED stance
Again, it must be possible to drop to PRONE stance here. Also, as before, enemies should be
sufficiently far away, or the character is cowering and seeking immediate cover (I.E. the ground).
If enemies are too close, the character will instead drop to CROUCHED stance. This reduces his
chances of being hit, while not costing too many APs or damaging mobility too badly. It's more
sensible in close quarters than dropping to prone stance.
If it is not possible to drop to PRONE stance at this location, then
If AP_Loss is greater or equal to the amount required to drop to CROUCHED stance, then
Drop to CROUCHED stance
In case prone is unavailable, the character will crouch if he can. Again this makes sense even in
close quarters, as it reduces your profile without making you too immobile.
Stance change due to suppression fire DOES NOT COST EXTRA APs. You're already losing APs, and can
only drop stance if you have lost enough of them. The loss of APs represents your desire to find
cover and stay behind it, so stance drops are already included in the effect.
Step 8: Pinned Down
The idea behind JA2 suppression is to suck out the target's APs, so that he/she cannot fire back or
move quickly during the next round, giving you time to surround and eliminate the enemy, or at
least hold them in place until reinforcements arrive.
The best result possible, of course, is to cause so much AP loss to the target that he/she will not
be able to do ANYTHING during their entire next turn. They are effectively "neutralized" by
suppression fire. They're not just innaccurate and slow, but rather actually can't do anything, and
so are a non-threat for at least one turn's length.
When a character reaches this state, a message on screen will show you that this is the case. You
can stop suppressing this target, as further suppression will have little or no effect. Your
assaulters can now move in and finish the target without fear of it firing back during its turn.
If Character's_Current_APs minus AP_Loss is less than -80, then
If Character is visible, then
Show on-screen message: "Soldier pinned down!"
Flash a radio locator over this character
Please note that "-80" here isn't the actual number. It's set by an APBPConstants.INI setting
called "AP_MIN_LIMIT". This is the value at which a character has lost his entire next turn. He
will start his next turn with 0 APs. If you're using the 25AP system, set this value to -20.
You can keep neutralizing the same character over and over again if you want to. For example:
Character ends his turn with 50 AP. During the enemy turn, incoming suppression fire causes him to
lose 130 AP, causing him to reach the minimum limit of -80. He's now considered to be "pinned
down". At the start of his next turn, he will have 0 AP. During the next enemy turn, further
suppression fire costs him another 80 points, dropping him to -80 again. He's still "Pinned down"
and will start his next turn with 0 AP. And so on and so on.
Step 9: AP Reduction
The character's APs are finally reduced.
If Current_APs - AP_Loss < Minimum_Limit, then
Current_APs = Minimum_Limit
Current_APs is reduced by AP_Loss.
Very simple. Just making sure that we haven't dropped below the minimum possible limit. Normally
this limit should be at -80. It is dictated by an APBPConstants.INI setting called "AP_MIN_LIMIT".
Step 10: Clear Suppression Points
Finally, we clear all the suppression points accumulated by the character thus far.
Character's Suppression Points = 0.
Previously, HAM had a setting called "CLEAR_SUPPRESSION_COUNTER" which could be toggled to
different settings, controlling exactly when this happens. With HAM 3.5, this is no longer
necessary. The amount of suppression points accumulated so far are cleared away, because they've
already taken effect on this character (causing AP loss and everything else). The next suppressive
attack will start from 0 suppression points again.
Continued in next post...
Re: "How does it work?" Part 10: HAM Suppression[message #222814]
||Tue, 23 June 2009 15:31 |
||Suppression Shock - additional effects
During the suppression formula, the main effect was obviously a loss of APs. However, the character
has also gained Shock Points accordingly. These shock points will go on to create a whole range of
effects in other places in the game.
- Harder to Hit (Ranged)
- Shock makes a character think more about making himself a smaller target. This makes him
harder to hit with ranged weapons.
- Reduced Accuracy (HTH, Ranged, thrown)
- Shocked characters can't shoot very well because they're too afraid to stay out of hiding
long enough to aim properly. They become very inaccurate until the shock dissipates.
- Reduced Sight and Tunnel Vision
- Shocked characters don't want to put their head out where it can get shot, so their
tactical awareness suffers.
- Reduced Leadership
- This refers to people's effect on nearby friendlies' tolerance. A shocked character not
only cannot lead his men, but may actually discourage his mates!
- Trap Detection
- Shocked characters fleeing through doorways are much more prone to miss an obvious
- Less Interrupts
- It is harder to get the initiative in combat when you're more concerned with avoiding
- Reduced ability to defend (HTH)
- Shocked characters may be harder to hit with ranged weapons, but they're easier to hit
- AI more likely to flee
- The AI takes shock very seriously, and enough shock may cause an AI character to retreat.
At the beginning of each of his turns, the character's shock value is HALVED, so all of the above
effects are halved with it. Eventually, if left alone, a character's shock will reach 0, at which
point all of the accompanying effects disappear.
Harder to Hit (Ranged)
During any CtH calculation where the shocked character is the target, a penalty is applied. The
exact stance of the target, as well as the bodypart targetted, have a strong impact on the size of
If Target's Stance is PRONE, then
Penalty = Target's_Shock * AIM_PENALTY_PER_TARGET_SHOCK
The basic penalty is based on the target's current Shock value, multiplied by the value of the INI
setting "AIM_PENALTY_PER_TARGET_SHOCK". Normally, the INI setting is set to 5. So for each point of
shock the target has, it is 5% harder to hit. This can easily make a target extremely hard to hit
at long distance (unless the shooter has a good scope).
Penalty is divided by CTH_PENALTY_FOR_COWERING_PRONE_TARGET_DIVISOR
The INI has four different divisors based on stance and bodypart. Since it's impossible to aim at
specific part of a PRONE character, the stance has only one INI setting. Normally it is 1, so when
shooting at a PRONE shocked character, you receive the full brunt of the penalty.
Penalty is multiplied by (MIN_RANGE_FOR_FULL_COWERING_TARGET_PENALTY, or the distance to the target, whichever is LOWER)
Penalty is divided by MIN_RANGE_FOR_FULL_COWERING_TARGET_PENALTY
Looks complex, but it really isn't. This bit determines how far away you are from the shocked
target, and changes the penalty accordingly. If using the default HAM settings, the penalty will
remain unchanged if the target is 10 or more tiles away from the shooter. However, if the shooter
is less than 10 tiles away, you will only receive part of the penalty proportionally. With this
setting (MIN_RANGE_FOR_FULL_COWERING_TARGET_PENALTY = 10), it will be very hard to kill a fully-
shocked target at anything over 10 tiles away. To do it, you'll have to send an assaulter close to
the target. The closer you get, the less CtH penalty you receive, and thus can hit the target
easier. The alternative, again, is to use scopes to snipe the target down despite the penalty, but
this can be very difficult if the target is very heavily suppressed.
If both the Shooter and the Target are on the roof, then
Penalty is 0!
There is no place to hide on a roof, so even if the target is fully shocked, it doesn't actually
hide. Getting suppressed on a roof is like a death sentence.
If Shooter is on the ground, but Target is on the roof, then
Penalty is DOUBLED!
If the target is cowering up on a roof, a shooter on the ground will find it much harder to hit the
target. It's usually harder to hit a character on a roof anyway, but in this case the target
benefits from the height difference.
If Shooter is on the roof, but Target is on the ground, then
Penalty is HALVED!
Cowering behind objects on the ground really isn't going to help you if the person shooting at you
has a height advantage.
Make sure that the penalty is not over MAX_TARGET_COWERING_PENALTY, and not under 1.
Reduce Chance-to-Hit by Penalty.
This checks whether we're over the INI set limit. Then, the penalty is applied to your CtH.
Now let's look at the penalty when shooting at a CROUCHED target:
If Target's Stance is CROUCHED, then
Penalty = Target's_Shock * AIM_PENALTY_PER_TARGET_SHOCK
So far the same as shooting at a prone target. However:
If aiming at the target's head, then
Penalty is divided by CTH_PENALTY_FOR_COWERING_CROUCHED_TARGET_HEAD_DIVISOR
If aiming at the target's torso, then
Penalty is divided by CTH_PENALTY_FOR_COWERING_CROUCHED_TARGET_TORSO_DIVISOR
If aiming at the target's legs, then
Penalty is divided by CTH_PENALTY_FOR_COWERING_CROUCHED_TARGET_LEGS_DIVISOR
There are three separate INI settings controlling the size of the penalty when the target is
CROUCHED, each pertaining to a different bodypart. The reasoning behind this is that when a
cowering character hides from incoming bullets, his instinct is to protect the head (the most
vulnerable bodypart), but tends to neglect his legs which sometimes stick out behind cover and are
easier to hit. In the default settings, the HEAD divisor is 3, the TORSO divisor is 4, and the LEGS
divisor is 5. This means that shooting at a crouched shocked character's legs gets 1/5 the penalty
of shooting at a prone shocked character.
The rest of the crouched formula is the same as the prone formula, above.
Reduced Accuracy (HTH, Ranged, thrown)
Characters suffering from shock will find it harder to attack accurately. Fear causes
incoordination, as it is very difficult to kill someone else while you're afraid for your own life.
Add to this your reluctance to stay exposed for the prolonged period of time required to aim an
attack correctly, and the best you can do is "spray and pray", provided that suppression fire has
even left you enough APs to do so at all!
During the Chance-to-Hit formula, you will encounter a penalty based on your own shock level. The
effect is pretty simple, and PREDATES the HAM suppression system. Originally, shock was generated
whenever you got hit. With HAM suppression however, you're pretty much guaranteed higher levels of
shock during any kind of combat situation.
Penalty = Current_Shock * AIM_PENALTY_PER_SHOCK
Penalty is limited to between 1 and MAX_SHOOTER_COWERING_PENALTY
Chance-to-Hit is reduced by Penalty
It's as simple as that. The AIM_PENALTY_PER_SHOCK is an INI setting - for every shock point you
have, this is how much CtH you lose. The penalty is limited by a second INI value called
The same effect happens with Ranged attacked, Thrown attacks, and HTH attacks. The difference is
that currently, there's no limit to how much CtH you can lose during HTH/Thrown attacks. One might
be introduced in the future.
Reduced Sight and Tunnel Vision
HAM 3 introduced a new and important effect of shock - it reduces situational awareness. Reluctance
to show your head out of cover results in not knowing what's going on around you. In the game, this
can be manifested through either reduced sightrange, increased tunnel vision, or both!
This effect occurs only if the character is COWERING. That is, only if he or she has suffered an
amount of shock equal or greater than their Suppression Tolerance level. Up to that point, even if
the character does have shock points, they are not subject to sightrange reduction at all.
An INI setting called "COWERING_REDUCES_SIGHTRANGE" controls which of the two sight penalties is
given. At a setting of "2", only sightrange reduction occurs. At a setting of "3", only tunnel
vision occurs. At a setting of "1", they both occur, and "0" turns both features off.
The first effect (sight-range reduction) takes place during the bit of code that calculates how far
you can see (duh). The maths are pretty complex but I'll explain them in a moment.
If COWERING_REDUCES_SIGHTRANGE is set to 1 or 2, then
If the character's Shock is greater or equal to his Tolerance, then
Actual_Sight_Distance = ((Sight_Range * (Shock_Limit-Current_Shock)) / Shock_Limit), but no less than 1.
In this formula, Shock_Limit equals the value of the INI setting "MAX_SUPPRESSION_SHOCK", which
controls how much shock a character can receive. Current_Shock acts as a sort of percentage value
here. The higher your shock, the lower that percentage will be, giving you less actual sight
distance than normal. A character can lose all of his sightrange once the Shock Value reaches the
limit. You'll always have a sightrange of at least 1 tile, but that's really not going to help you
in most combat situations!
Now let's look at how shock can affect tunnel vision. This is actually done whenever the game
calculates all Tunnel Vision penalties from worn equipment (like Scopes). Please remember that
tunnel vision is a percentage value itself, and that you can turn off tunnel vision completely
using an INI setting from JA2 1.13.
If COWERING_REDUCES_SIGHTRANGE is set to 1 or 3, then
If the character's Shock is greater or equal to his Tolerance, then
Tunnel_Vision_From_Shock = (100 * Current_Shock) / Shock_Limit
Final_Tunnel_Vision = Tunnel_Vision_from_Equipment + (((100 - Tunnel_Vision_from_Equipment) * Tunnel_Vision_from_Shock) / 100)
Final_Tunnel_Vision is limited to 100.
The maths here are a bit harder to understand. First let's establish that this comes after all
tunnel vision penalties from worn equipment and the gun's scope (if any) have been calculated. This
is a penalty, so the higher it is, the worse you're off. At 100% tunnel vision, you can only see a
line of tiles directly ahead of you, giving you no situational awareness.
Shock adds an amount of tunnel vision based on shock, but also based on how much you've got left
between your current tunnel vision (from equipment) to 100% (full tunnel vision). If your current
tunnel vision is 70%, you've only got 30% to go until you reach full tunnel. If your Current_Shock
has reached the Shock_Limit (INI defined, see above), then you will receive the entire 30% left, so
your TOTAL tunnel vision is 100%. If your Current_Shock is only 1/3 of the Shock_Limit, then you
will only go 1/3 of the way between the current tunnel vision (70%) and full tunnel vision (100%),
which is 10%.
Yeah yeah, it's crazy maths. So sue me.
Reduced Leadership for Tolerance calculations
As we saw much earlier in this article, characters with high Experience Level and high Leadership
skill can improve the Suppression Tolerance of friends who are in close proximity. However, a
high-experience character who is suffering large amounts of shock will serve a very bad example to
lower-level mercs nearby. After all, no one wants to see their commander screaming to mommy!
Basically, characters who are cowering (I.E. suffer from massive suppression shock) will not be
able to confer leadership bonuses to nearby friendlies' tolerance, and will instead cause a
tolerance PENALTY to any of those characters who have a lower experience level.
The formula can be seen in detail in one of the first sections in this article, so I won't repeat
it here. However, here's a short summary of how this specific effect works:
A character is being examined to see if he has enough leadership to confer Tolerance bonuses to nearby allies.
If this character's Shock Value is greater than his Leadership/5, then
This character cannot confer any leadership bonuses.
This is the first part. Divide your leadership by 5. If you have more shock than this, you cannot
confer leadership bonuses to anyone's tolerance value.
If you calculate this in your head you'll quickly see that if Shock is ever greater than 100/5
(=20), the character cannot confer leadership bonuses AT ALL, no matter what his leadership is!
Very skilled leaders however (Leadership > 80) can still confer their leadership bonuses at
anything between 0 to 16 shock points, which is pretty good.
Here's the flipside:
A character is being examined to see if he's in bad enough shape to inflict Tolerance PENALTIES on nearby allies.
If this character's Shock Value is greater than the shock value of a nearby friendly (less than 6 tiles away, then
Nearby_Character's_Tolerance is decreased by (Difference in Experience Levels / distance between the characters/2 ), or 1, whichever is higher.
Another nasty formula. Basically, characters can only inflict this penalty if their shock level is
higher than that of the friendly, and only if they are no more than 5 tiles away. The larger the
difference between their Experience Levels, the larger the penalty. If a high-level merc becomes
shocked, rookies in the vicinity may suffer a massive tolerance penalty. The actual penalty is also
based on distance, so anyone exceptionally close (1 or 2 tiles away) will feel this penalty very
keenly. Also note that the same thing happens if the character is unconscious.
Also, it does NOT work in reverse. A high-level character's tolerance will receive very minor
influence when a nearby rookie becomes suppressed, but some effect is still felt (-1 tolerance for
each such proximity).
A simple little effect from the days of JA2 1.13 changes your trap-finding ability when you are
shocked. It's a bit archaic, because shock used to be a minor feature that happens when a character
is hit. I may end up revamping this as well.
If the character's Current_Shock is more than 0, then
Detection_Level is decreased by anywhere between 0 and 2 points, randomly.
-2 is a considerable effect, similar to losing 2 experience levels for the purpose of this check
(which relies HEAVILY on experience level). However, it's probably not considerable enough, given
the newfound importance of Suppression Shock.
Also note that having more than 20 bleeding injury points will have the same effect, but it's not
cumulative with the effect from shock (I.E. you'll get -0 to -2 at most, even if you're both
shocked AND injured).
Losing your situational awareness means that you're far less prepared for the sudden appearance of
enemies. Shock has a PROFOUND effect on interrupts, and so it's imperative not to trust a
suppressed character to spot incoming enemies before they get the chance to shoot.
During the Interrupt duel:
Interrupt Points are reduced by Current_Shock
Very simple and brutal, because Shock can reach levels of 30 and beyond, easily making it
impossible to interrupt anything. For comparison, the Night Ops skill raises interrupt points by +1
(or +2 for expert)!!
Due to the importance of shock in HAM suppression, this penalty may be reduced in the future.
Reduced ability to defend (HTH)
Melee combat is actually a contest of skills between the attacker and defender. They both calculate
scores and compare them against each other, determining whether a hit was scored or not. A
character defending against an HTH attack will have a much harder time if he has recently been
suppressed into the dirt.
During Melee Combat Chance-to-Hit calculations:
Defender's score is reduced by (Current_Shock * AIM_PENALTY_PER_SHOCK)
A similar effect was described earlier, because the Attacker suffers from his own shock in the same
exact way. See above for more details on that. AIM_PENALTY_PER_SHOCK is an INI setting, usually set
AI more likely to flee
This is a small change to the way AIs behave. Whenever an AI considers fleeing, we check to see
whether he is shocked or not.
AI Character is not in direct combat (can't see enemies at the moment, but knows that combat is going on).
He/she has not found any reasonably desirable actions to do.
If Current_Shock is greater than Tolerance*1.5, then
Because the AI is rather cowardly, the check here requires a rather high level of shock before the
character even considers running away. In face, high-level characters with good morale may require
no less than 30 shock points (the maximum) before they can make the decision to flee.
Re: "How does it work?" Part 10: HAM Suppression[message #225663]
||Sun, 05 July 2009 16:19 |
||Spectacular. I always brought along a squad machine gunner because:
a.) It was cool to have a machine gunner
b.) Occasionally you'd run into perfect clumpings of enemies where a long burst would hit several targets (fun fun fun!)
c.) Watching burst damages approach quadruple digits was fun
ALL acceptable reasons, but unfortunately none of them spectacularly tactical in nature.
I just played through 3 games in a row of 1.13, and now that I know of this new system, I'm going to have to download the new version and play yet another.
Thanks for your work, looks like a spectacular addition.
Re: "How does it work?" Part 10: HAM Suppression[message #233146]
||Sun, 13 September 2009 22:20 |
|----Due to the fact that the vanilla JA2 Suppression System doesn't actually work....-----
There was some kind of suppression in vanilla: if you burst-fire at the enemy, they would duck, then lie prone
Current Time: Thu Jun 29 17:13:38 EEST 2017
Total time taken to generate the page: 0.01798 seconds