• If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Stop wasting time looking for files and revisions. Connect your Gmail, DriveDropbox, and Slack accounts and in less than 2 minutes, Dokkio will automatically organize all your file attachments. Learn more and claim your free account.


"How does it work" Part x: Suppression

Page history last edited by Little Alien 11 years, 8 months ago

This article attempts to unveil some of the secrets behind suppression fire. The formula you are about to read is, in general, not very complicated. However, it is written in such a way as to make it look VERY complicated. The reason for this is a system that tries to make sure that characters can only lose a limited amount of APs from any suppressive attack. So, I beg of you - don't let that confuse you!

Suppression is dealt out during the flight of the bullet. The bullet doesn't have to hit anything to cause suppression - just whizzing past would be enough. Suppression is applied both to any characters WITHIN the bullet's path, as well as anyone standing close enough to the bullet's path. I'm not sure what "close enough" really means, but it appears to be no more than one tile away from the bullet's path. Do note that while the program deals with characters in the path and characters adjacent to the path in two different parts of the function, the result is the same in both cases.

The idea of suppression is mainly to cause AP loss to the target(s), I.E. anyone unfortunate enough to be in the way. It will also cause a (rather slight) effect on morale. Experienced targets will be more resistant to suppression, suffering a smaller AP loss than others. They are also more likely to fall prone when suppressed, reducing the attacker's CTH.

Suppression is caused by ANY bullet, although it behaves very differently when there are several bullets fired (such as during burst, autofire, or buckshot blasts). In essense, autofire is more useful because it fills the air with bullets, each of which has a chance of causing suppression to enemies. Therefore, the key here is quantity, not quality. Also note that buckshot blasts are also pretty damn effective, as they too fill the air with bullets.

Before we begin I'll beg again - don't let the weird limit system confuse you. Yes, it's damn confusing, but the idea is simple and will be explained with many small words. ;\)

So, enjoy!


We start by determining the number of suppression points assigned to the target, or anyone standing adjacent to the path of the bullet. Naturally, the more suppression points, the more effect the attack will have in suppressing the target(s).

If character is a monster, tank, or civilian, then
   No suppression.

Making sure we can't suppress non-combatants or unusual combatants.


Random_Number = either 0 or 1, randomly.
If Bullet is a buckshot pellet, then
   If Random_Number = 0, then
      Continue with suppression.
      Pellet fails to suppress.

Each pellet only has a 50/50 chance to cause a suppression point. Of course, since there are 9 buckshot pellets in each shot, that's one

of the main reasons why shotguns cause so much suppression...


If character is Prone, then
   Random_Number = anywhere between 0 and 3
   If Random_Number = 0, then
      Avoid suppression point!
      Gain suppression point.
If Character is Crouched, then
   Random_Number = anywhere between 0 and 3
   If Random_Number = 0, then
      Avoid suppression point!
      Gain suppression point.
If Character is Standing, then
   Gain Suppression point.

Actually, that's not exactly the way it's in the code. It looks like the original coders intended it to work so that a prone character has roughly 1/2 chance to avoid a suppression point. It actually works that way too - somehow a prone character also gets the chance to roll again as though they were crouched. No idea why that happens, I guess I need to learn some C++ ;\)


So now each character on or next to the path of the bullet has a certain number of suppression points. A single bullet can probably cause up to 3 suppression points per character - once while approaching the character, once passing through the character's tile (or hitting them), and one moving away from the character. NAturally, if the bullet stopped (hitting something, or someone), it also stops giving suppression points. This is odd (at least, unrealistic) as bullet-strikes are far more "fearsome" than whizzing past your head, but I guess that doesn't really matter right now.

Next up, we see how well characters handle suppression. We calculate their tolerance to suppression, based on their level.


Tolerance = Character's_Experience_Level * 2

Our experience level serves as a basis for everything else.


If Character is a player-controlled Merc, then
   Morale_Modifier = (Character's_Morale - 50) / 10
   Tolerance increased (or decreased) by Morale_Modifier

Basically, our mercs get +1 tolerance for every 10 points above 50. They get -1 tolerance for every 10 points below 50.


If Character is computer-controlled, then
   Morale_Modifier = (Character's_Morale_Stage - 2) * 2
   Tolerance increased (or decreased) by Morale_Modifier

This is due to NPCs and enemies working on a different morale system than our mercs - they don't work on a scale of 0 to 100, but rather in five distinct "stages" of morale. I've explained this before, but here's the gist of it: They can be Hopeless, Worried, Normal, Confident, or Fearless (going from 0 to 4, respectively, higher is better). So if their morale is Worried(1), their tolerance would be (1 - 2) * 2 = -2. If their morale is Fearless(4), tolerance equals (4 - 2) * 2 = 4.


If Character is player-controlled, then
   If Character is AGGRESSIVE, then
      Tolerance is increased by 2
   If Character is a COWARD, then
      Tolerance is decreased by 2

Our character's personality can affect tolerance to suppression. Whee!


If Character is NOT player-controlled, then
   If Character is BRAVE, then
      Tolerance is increased by 2
   If Character is AGGRESSIVE, then
      Tolerance is increased by 1
   If Character is DEFENSIVE, then
      Tolerance is decreased by 1

I've never checked how NPCs get their personality, but I assume Enemy Elites and Militia Veterans are more likely to be brave? Dunno.


If Tolerance < 0, then
   Tolerance = 0

Just making sure it doesn't go negative.


Now we've got the tolerance level, let's see how it affects suppression.


Base_APs_Lost = ( ( ( (Accumulated_Suppression_Points * 6) / (Tolerance + 6) ) * 2 ) + 1 ) / 2

Yeah, a bit complicated. I really don't know how to comment that, since I suck at maths. In any case, here's the catch:


If Base_APs_Lost > 8, then
   Base_APs_Lost = 8

So no one can lose more than 8 APs due to a single burst, autofire volley, or buckshot blast. Further attacks WILL cause more AP loss though. We'll also see that the real limit on how many APs can be lost to one attack is based on both the Tolerance value and Suppression Points value.


It's about time for some EXAMPLES:

Let's start with an average enemy, EXP level 3, morale 2 (normal), standing.

Due to standing, the enemy gets +3 suppression points for every bullet (unless the bullet stopped near him, in which case he might get less than 3). Let's assume it's 3.

Base Tolerance is Experience Level * 2, so 3*2=6.

Morale Modifier is (Morale Stage - 2) * 2, so (2-2)*2=0.

Final Tolerance is Base Tolerance + Morale Modifier, so 6+0=6.

If we shot only one bullet, then Suppression Points are 3, and tolerance is six, so:

Base_APs_Lost = ((((3*6) / 6+6) * 2) + 1) / 2 = (((18/12=1.5) * 2) + 1) / 2 = (5+1) / 2 = (6)/2 = 3

Rounded down, the character will lose 5 AP for each bullet, up to 8 APs in all. Three bullets should do the trick.

Let's go for an enemy with better morale. We'll use the same enemy, but this time we'll make him FEARLESS (morale 4).

This enemy is also standing, so we apply 3 suppression points per bullet.

Base Tolerance is Experience Level * 2, so 3*2=6.

Morale Modifier is (Morale Stage - 2) * 2, so (4-2)*2=4.

Final Tolerance is Base Tolerance + Morale Modifier, so 6+4=10.

Suppression Points are 3, and tolerance is 10, so:

Base_APs_Lost = ((((3*6) / 10+6) * 2) + 1) / 2 = (((18/16=1.125) * 2) + 1) / 2 = (2+1) / 2 = (4)/2 = 2

This enemy is even more resistant to suppression. He'll only lose 2 AP per every bullet we shoot.

Let's try an even stronger character. This enemy has EXP level 7, morale 3 (confident), and is crouched.

Due to being crouched, the enemy can avoid about 1/4 of the suppression points he's supposed to accumulate. Since each bullet can cause

up to 3 suppression points, we'll use an "imaginary" fractional value of 0.75 points accumulated per bullet. This is just for example purposes, of course. In reality, this enemy can still get 3 points per bullet if he's unlucky.

Base Tolerance is Experience Level * 2, so 7*2=14.

Morale Modifier is (Morale Stage - 2) * 2, so (3-2)*2=2.

Final Tolerance is Base Tolerance + Morale Modifier, so 14+2=16.

Again, let's shoot just one bullet. Points per bullet are 0.75, tolernace is 16:

Base_APs_Lost = ((((0.75*6) / 16+6) * 2) + 1) / 2 = (((4/22=0) * 2) + 1) / 2 = (0+1) / 2 = 1/2 = 0.5

Rounded down, we get 0! This character can't be suppressed at all, no matter how many bullets we fire!

Now back to the formula.


We come up to a bit I just don't get. This may be the reason why Suppression isn't very effective, but it might be that I'm understanding it wrong.


If Character's_APs_Already_Lost >= Base_APs_Lost, then
   This character suffers no more suppression from the current bullet

This is the first part of a pretty sophisticated system designed to impose a limit on how many APs a character can lose to a single autofire volley, burst, or buckshot round. The limit is determined by the character's tolerance, basically, although their stance helps too (by reducing the number of suppression points they get from any bullet). In effect, it means that the first bullet whizzes past the character, and costs him some APs. The next bullet in the volley/burst has to be even SCARIER than the previous one, if it is to cause further suppression. The program records the number of APs the character has lost so far, and only a bullet that causes MORE AP loss than that will get to have any effect. The final effect of all this would be that a burst/volley/buckshot can only cause so much AP loss. The limit will be lower to a more tolerant character, and higher to a less tolerant (I.E. inexperienced) character. Also, if the character is crouched or prone, then the limit is even lower. While the execution is pure code magic, you don't really need to understand it. The bottom line is that each burst/volley can only cause so much AP loss - but a SECOND volley/burst will cause more AP loss as normal, and so on. So each burst is limited in its effect, but you can fire many bursts for an accumulating effect. Please note that the absolute MAXIMUM is still 8 APs per burst/volley.


Extra_APs_Lost = Base_APs_Lost

We're duplicating this value for reasons that will soon be very clear. Basically we're saving the "original" (base) number of lost APs so we can compare it to other stuff later. It represents the bullet's potential, or "scare value". So "Base_APs_Lost" will stay the same. The other value, "Extra_APs_Lost", is used for comparing the different bullets in a burst/volley/buckshot attack - it'll be used to track how much "scarier" this bullet is compared to previous bullets, and helps us keep the limit of how many APs we can lose in total.


If Base_APs_Lost/2 > APs_Already_Lost/2 , then
   Subtract -1 morale for every 2 APs lost.

This is fairly simple - every 2 AP the target has lost will drop its morale by a point. I'm not sure how this translates into computer-controlled characters' "morale stages", but I bet there's some overly complicated formula that handles this. The end result is probably similar to the effect it has on mercs. In any case, it's a pretty flimsy effect... although like all other morale modifiers, "COWARDS" will suffer more from this, while "PSYCHOS" won't suffer at all...


Extra_APs_Lost is reduced by APs_Already_Lost

See, we're already modifying the Extra_APs_Lost value. "Base_APs_Lost" remains untouched, as it remembers the bullet's potential.

Basically what we've just done is to see how many more APs we're losing now, due to a bullet that's even scarier than past ones. This works together with previous calculations to create that "limit" on how many APs a character can lose in total, from a single burst or autofire volley. As "scarier" bullets whizz by, the character's APs_Already_Lost will continue to rise (as we'll see later), until eventually it's so high that further bullets can cause no more suppression. Hence, a limit.


If APs_Already_Lost >= (130 / (6 + Tolerance)), then

Here we're going to check whether the character reacts to incoming fire. Basically, it tries to calculate whether the character is smart enough to change his stance. Some quick maths will tell us that the more tolerance we have, the more likely we are to change stance! That means that trained soldiers will drop down, while untrained soldiers (or ones who are already scared shitless) will stay standing! While this may sound weird, take into account the fact that once a soldier's dropped, he's harder to hit. In fact, if a soldier has a tolerance of 10 or less, he will NEVER drop down due to suppression. This may help dispel a lot of the mystery about suppression - it always sucks out APs and morale, but will only cause experienced enemies to drop to the ground...

In any case, let's see what happens to characters who do manage to drop stance. This is based on their current stance, obviously.

Starting with characters who are prone:


If Character is Prone, then
   No change of stance. DUUUUHHHH

Hehehehe, naturally, if you drop from prone mode, you'll be six feet under.

Let's move on to characters who are crouched:


If Character is Crouched, then
   If Base_APs_Lost >= 2, and Character can go prone at his current location, then
      If Closest Enemy is more than 8 tiles away (or can't see closest enemy!), then
         If Extra_APs_Lost < 2, then
            Increase soldier's action points by (2-Extra_APs_Lost)
            Extra_APs_Lost = 0
            Extra_APs_Lost is decreased by 2
         Schedule a change to Prone Stance.

This may look complicated, but it's just a lot of code mumbo-jumbo. Basically, if the bullet was scary enough to cost us 2 action points, our character will drop prone - but only if he can't see the enemy, or if the closest enemy is at least 9 tiles away. That's pretty smart, as it would be pointless to drop if the enemy is so close anyway. The rest of the code just makes sure that the character doesn't lose too many APs going prone. This again is part of that limit of how many APs the character can lose to one volley/burst (see above). Don't let it confuse you, ok? ;\)

Also note that the stance change is SCHEDULED, it's not yet carried out. It's not very important here, it'll be more important once we check out what happens to STANDING characters. So let's have a look at how standing characters react.


If Character is Standing, then
   If Character is in water, then
      No stance change (you can't!)
   If Base_APs_Lost >= 4, and Character can go prone at his current location, then
      If Closest Enemy is more than 8 tiles away (or can't see closest enemy!), then
         If already scheduled to drop to CROUCH stance, then
            Schedule a drop to PRONE stance.
            Schedule a drop to CROUCHED stance.
      If Closest (KNOWN) Enemy is 8 tiles or less away from us, then
         If not already scheduled to drop, then
            Schedule a drop to CROUCHED stance.
   If Base_APs_Lost is 3 or 2, then 
      If not already scheduled to drop stance, then
         Schedule a drop to CROUCHED stance.

Again, looks complicated, but really isn't. If the bullet is so scary that it has the potential to cost us 4 or more APs, the target will try to drop to crouched stance. However, if a previous bullet in the same volley/burst has already caused the character to want to drop to crouched stance, then the current bullet will make them want to drop further (to prone stance!).

This only happens if the enemy is at least 9 tiles away (or if we can't see the enemy). Otherwise, we only drop to crouched stance - present a smaller target but don't lose mobility, again that's a pretty smart thing to do.

If we the bullet can only (potentially) cause us to lose 2 or 3 APs, we'll only drop to crouched stance.

Note that I say "potentially" because we're not checking for the actual number of APs we lost (there's a limit on that, you know) but rather on how scary the bullet was, compared to our current stance and tolerance.

Let's finish this up.


Character's_Current_APs are reduced by Extra_APs_Lost

We use Extra_APs_Lost because there's a limit of how many APs a single burst/volley can take from us. Remember, Extra_APs_Lost gets smaller and smaller all the time with each bullet in the burst, because it only represents the difference between the "scare level" of this bullet and the "scare level" of the scariest bullet so far. Ah crap it's complicated. If you haven't gotten it so far, god help you ;\)


APs_Already_Lost = Base_APs_Lost

Again, part of that limit thing. Each time a scarier bullet goes whizzing by (scarier meaning it takes away more APs, potentially), the scale goes up, so later bullets will have to be even scarier to have any effect. If the target has low tolerance, then eventually the APs_Already_Lost will reach 8 (a bullet will scare them shitless), at which point it's impossible for further bullets to be even scarier, and thus they can't cause any more suppression. A character with higher tolerance would lower the limit below 8 AP, and thus would lose much fewer APs due to each burst/volley fired at them. Again - if ANOTHER burst is fired at them, they'll keep losing more and more APs.


That's pretty much it. I hope I haven't caused undue confusion, as this was extremely hard to crack (even when reading the original code! Not to mention my weird explanations). In any case, the end result should be obvious - an inexperienced character would lose a lot of APs (the absolute maximum is 8AP per attack, although the actual limit may be lower), and would probably remain standing. An experienced character would not be so affected, but if he/she was still scared by the bullets, they'd drop a stance or two, if possible. The experienced characters would also lose less APs in the process. However, additional attacks, even in the same turn, will continue to accumulate suppression.

Being crouched or prone obviously reduces the effect of suppression on a character. Morale also helps reduce it, or can increase its effect! Every 2 APs lost due to suppression will cause a one-point morale drop. Finally, to resist suppression, use mercs with high experience, and stay as close to the ground as you can.

Comments (0)

You don't have permission to comment on this page.