Is Barrage broken?

So because Arathorn used the incorrect, unfloored value of 7.5, Arathorn's quoted value of "11" is wrong. The amount of damage done to a Longbow by a Barrage II Catapult is 10!

And this can be verified by in game experiments (though you may need to turn on the cheatcode to see the actual hp breakdowns - I'm not sure).
 
Well, I guess that means it was the latter of my guesses. ;)

... or unknown to Arathorn ...

... when Arathorn published his article the SDK was not yet out, so I suppose that his article was based in a enourmous and tiresome reverse engineering... Not surprising that his work has some errors ;)

Thanks for clearing that up ... I had been wondering how such a great article with such immense detail could've missed that.

Knowing this tidbit has greatly increased my respect for the man and his article! :bowdown:

----

And this can be verified by in game experiments (though you may need to turn on the cheatcode to see the actual hp breakdowns - I'm not sure).

Nah, it's pretty simple ... attack 2 Longbows with a Barrage II Catapult.

As long as that LB takes 11+ HP direct damage, the collaterally damaged LB will defend next -- in which case the basic Combat Log will tell the tale of the starting HP. ;)
 
As long as that LB takes 11+ HP direct damage, the collaterally damaged LB will defend next -- in which case the basic Combat Log will tell the tale of the starting HP. ;)

Another illustration of the difference in our approach: I usually have an MI on top of the longbows, just to avoid any possible error.
 
I usually have an MI on top ...

I guess I'm giving away my level of ignorance/experience with this kind of testing in Civ4 by asking, but what is "MI"?

I thought I'd played with all the cheat options, but I'm not sure what you're referring to, so I guess I haven't after all. :confused:
 
I guess I'm giving away my level of ignorance/experience with this kind of testing in Civ4 by asking, but what is "MI"?

I thought I'd played with all the cheat options, but I'm not sure what you're referring to, so I guess I haven't after all. :confused:

Mech Infantry - but I meant Modern Armor. When I was slamming multiple cats to try to reproduce your pike numbers, what seemed to be "simplest" was putting a 40 Str, C6, D4, anti-siege unit on top of the stack, and ignore any concerns that some other unit would defend.
 
Already did a test. Combat does less collateral damage and they die. Barrage does more collateral and they die.

I suspect the reason for your results favouring barrage over combat were due to the catapults being a lot weaker than the units you were attacking. If I understand what your tests were they are based on attacking this enemy SoD with catapults.

2 Knights combat 2
5Macemen CR2
2longbows CG2
2 crossbows drill2
2Pikemen. combat2
8Trebs CR2
a reasonable stack that is well balanced for defensive purposes and designed to take and hold a normal size city.

All those units except the trebs are significantly stronger than the catapults and that skews the results. Unavoidable in this age, due to the types of siege available, but it means that the results cannot be reliably extended to cannons and artillery used against a contemporary SoD later in the game. So a cannon might face muskets, grenadiers, cuirassiers and riflemen and an artillery would face riflemen, cavalry, machineguns and infantry. I strongly suspect that combat cannons will do a lot better than barrage versus stacks nearer their own strength.

My hypothesis is that if the siege is close in strength to the top unit then its chance of survival is greatly increased by the combat promotion, rather than barrage, and furthermore, even if it loses the damage it does to the top defender is more on average. Against an enemy SoD what interests me is the total damage done to the SoD by my forlorn hope attacker as well as its chance of survival. Total damage is the direct damage done to the top defender plus the collateral damage done to rest of the stack.

It is likely that for some ratios of strength of siege attacker to strength of top defender, that the extra direct damage done to the top defender by the combat promoted siege will outweigh the relatively small extra collateral damage done by the barrage one. But that in itself is not enough; as in the complex situation of a large SoD attacked by multiple siege the top defender will eventually be one that has taken one or two amounts of collateral damage, and in that case the barrage promotion might begin to do better against a more damaged defender than a combat one will against its less damaged one. This set of interactions becomes so complex that I doubt there is a simple result that can be obtained.

Another factor is the ratio of the number of siege to the number of defenders. If you only have a few siege to soften up a stack for a lot of regular units to kill then that might require a different promotion strategy to one where the siege outnumbers the defenders in the stack and each defender could eventually be directly attacked by a siege. For instance, if a force a) consisting of 5 cannons and 20 rifles was counter-attacking an invading SoD of 10 rifles it might require different promotions from an alternative force b) consisting of 12 cannons and 12 rifles attacking the same SoD. In the second case even allowing for a few cannon casualties the 10 rifles in the SoD might be reduced to their minimum strength if all 12 cannons were used before their own rifles cleared up. I strongly suspect that defending force b) will perform better than force a) despite having less hammers invested.

To summarise:
The combat versus barrage decision is affected by:
- total damage rather than just collateral damage
- the ratio of strength of the siege to the strength of the top defender
- the ratio of the number of siege available to the total number of defenders
 
To summarise:
The combat versus barrage decision is affected by:
- total damage rather than just collateral damage
- the ratio of strength of the siege to the strength of the top defender
- the ratio of the number of siege available to the total number of defenders

Which makes it like pretty much everything else in Civ4...situational. My only remaining question is. At what point in this thread do we being comaparing siege used bya civ running an SE vs siege used by a civ running a CE
 
LOL, about 3 pages ago we all sort of agreed that for attacking cities CR wins hands down. Now we were trying to figure out which is better in the open field. I am a firm believer in Barrage in the open field

Garrh. I got to the spreadsheet on p 2 before surrendering to the clock and dropping into my bed, about 6 feet from my monitor.

Open field say you? I don't know, I would believe that Combat was best unless the top unit is ridiculously strong ( <15% chance of survival) compared to the siege.

Again, try two methods:
1) Very few siege
2) mediocre amount of siege

by very few I mean like 1 for every 4-5 defender,
by mediocre, closer to 2 per defender
 
Garrh. I got to the spreadsheet on p 2 before surrendering to the clock and dropping into my bed, about 6 feet from my monitor.

Open field say you? I don't know, I would believe that Combat was best unless the top unit is ridiculously strong ( <15% chance of survival) compared to the siege.

Well, working from the back of the envelope: suppose we consider that the catapults fullfill their destiny by delivering collateral damage. The barrage promotions improve collateral damage at around 10% or so (about +1 hp per target).

Surviving allows you to deliver the same amount of collateral damage again (remember, that damage is calculated from baseCombatStr, not currentCombatStr), roughly doubling the damage you can do (first order approximation here guys, we can do the real math later if we need to).

So the expected value of the combat promotion is going to be equal to the survival rate it provides. In other words, if the combat line improves your survival rate by better than 10%, then that's a win.

The comparison isn't quite fair - extra damage later isn't at all the same as extra damage now, especially when conditions are urgent. On the other hand, we're also ignoring (for this calculation) the extra damage that the combat promoted units do now.

You can run a quick check on these via world builder (my choice, because I didn't want to deal with "retreat odds" rather than full combat. For first experiment, let's assume the top defender has 100hp, because that's easy to test....

If the top defender has no first strikes, it looks like the break even point is around 9.75 strength - combat gives +10.2% survival at 9.6 (combat I sword in a forest), and +9.8% at 9.9 (combat I musket on plains).

If the top defender has one first strike (longbows), things get wonky because of the breakpoints; vs 9.0 (longbow on hill, longbow in forest) and the combat line improves your survival by 13%; give that same longbow a combat I promotion and that improvement falls to 6.7%

You also need to not be an idiot: a Mace on a hill is 10 Str, so the expectation of Barrage is higher than Combat... except that Combat I opens up Shock, and your survival rate climbs to 28.4 (assuming another defender doesn't shuffle forward).

Anyway, my rough conclusion is that survival rate needs to be below 5% before barrage becomes a good idea - possibly lower than that, depending on the value of the ancillary considerations that were dismissed in this first pass.
 
Anyway, my rough conclusion is that survival rate needs to be below 5% before barrage becomes a good idea - possibly lower than that, depending on the value of the ancillary considerations that were dismissed in this first pass.

Even with survival rates higher, you want to consider what is more important, the survivaly of the dirt cheap catapult or the survival of the units in the follow up attack. If it is the latter then barrage is better
 
Even with survival rates higher, you want to consider what is more important, the survivaly of the dirt cheap catapult or the survival of the units in the follow up attack. If it is the latter then barrage is better

The thing to consider about starting Combat Odds for unpromoted Siege is that promoting down the Combat or CR line increases the amount of plausible direct damage inflicted upon the top defender.

Barrage I, II & III typically mean +1, +2 & +3 HP collateral damage per unit -- or +6, +12 & +18 collectively for a Catapult.

So if promoting a Catapult down the Combat or CR line means doing more than +6, +12 & +18 HP direct damage than the respective Barrage counterpart, then the increased survival chances came at net gain -- a win-win situation in my book.

----

I just did a quick test of a 1 Catapult (5) vs 7 Musketman (9). I ran each test 10 times.

Barrage 1 Catapult vs 7 Musketman : 11.6% Combat Odds

The average direct damage done was 23.78 HP.

Collateral damage of 8 HP * 6 units = 48 HP.

Total damage done = 71.78 HP

Combat 1 Catapult vs 7 Musketman : 14.4% Combat Odds

The average direct damage done was 37.33 HP.

Collateral damage of 7 HP * 6 units = 42 HP.

Total damage done = 79.33 HP

----

So by promoting to Combat 1 instead of Barrage, I increased my overall survival odds by 2.8% and inflicted 7.55 HP more damage ...

... that sounds like a true win-win choice to me.
 
So by promoting to Combat 1 instead of Barrage, I increased my overall survival odds by 2.8% and inflicted 7.55 HP more damage ...

... that sounds like a true win-win choice to me.

That's not as true as it looks, if direct damage and indirect damage have different leverage. Remember, part of the magic of collateral damage is that it wounds the units that are going to be selected as specific defenders for your expensive attacking units.

The experiment I need to look at is this one - a pike splashed 5 times by Barrage I catapults is redlined at 50hp; 5 Combat pults leave the pikes at 55hp. What's the delta on survival for various strength knights?

(Note, for Pikes, at Str 6, that second Barrage promo does not a thing - see earlier post. In game situations, not all of the splashable units will be str 6, so under appropriate conditions the Barrage II promo may still be right.)
 
That's not as true as it looks, if direct damage and indirect damage have different leverage. Remember, part of the magic of collateral damage is that it wounds the units that are going to be selected as specific defenders for your expensive attacking units.

The experiment I need to look at is this one - a pike splashed 5 times by Barrage I catapults is redlined at 50hp; 5 Combat pults leave the pikes at 55hp. What's the delta on survival for various strength knights?

(Note, for Pikes, at Str 6, that second Barrage promo does not a thing - see earlier post. In game situations, not all of the splashable units will be str 6, so under appropriate conditions the Barrage II promo may still be right.)

That is exactly the point I was trying to make when I ran my test. When facing a stack with a tough top defender ow in my case two. Then survivability for the catapults is not an issue because they pretty much all died regardless of promotions.Barrage did however inflict considerably more damage on the pikes. I did not do a comparison with barrageI cats or cats with both c1 and barrage. Barrage2 is needed for barrage3. If you are producing 9exp cats (barracks/MI both civics) or 7hp for charasmatic then the occasional survivor (in my test it was one out of the five cats survived in1/2 the attempts, 90% mortality) will get barrage3 which is as much as the barrage1&2 combined.
Also note that barrage2 grants 10vs melle which is the equivilent to C1 if the top defender is a melee unit. This increases direct damage and survival rate. Barrage3 grants+10% vs gunpowder. Not too handy for cats but it helps with cannons.
 
Right now we seem to be looking at the heart of the problem with Barrage, namely that its value is very hard to gauge in advance.

Promoting with Barrage might do the decisive amount of damage needed to put (some of) your primary attacker at significantly less risk (jump points blah blah). It might give my level 4 knights 90% success rate instead of 75%, just because one critical defender received that additional splash damage from Barrage.

The problem that I see is that, unlike with direct combat odds, there's no way to actually make the comparison Barrage vs. Combat when it matters most. Going by "feel" doesn't seem to be the answer considering the fine lines that one seems to be crossing here often enough.

We seemed to have reached a consensus (and even CivCorpse would probably agree here) that Barrage is not a very valuable promotion as is, and not being able to use the promotion at all would be a minor annoyance at most.

I would like to hear some propositions how to improve the promotion line to make it useful, easy to understand and not overpowered (just like the City Raider or Combat promotion lines). Would changing the damage formula be enough or would the entire mechanics of collateral damage have to be changed?
 
OK, I have some very interesting data to report.

Preliminaries



So in the first test I ran, I was looking at running collateral assults against an MA protecting pikemen. But before I get to that result, I want to report a pair of intermediate results.

1) I verified that Barrage II inflicted no more splash on pikes than barrage I did. This was done by splashing 4 pults of each kind (5 would redline, so that wouldn't help, but 4 should show any favorable rounding error - there isn't one).

2) Second, I splashed six unpromoted pults against an MA, and discovered they only did five pults worth of splash (55hp). That seemed odd, so I ran a couple more tests, and discovered that the barrage I promo moves the damage cap. ?!?!?!

int iMaxDamage = std::min(collateralDamageLimit(), (collateralDamageLimit() * (iCollateralStrength + iStrengthFactor)) / (iTheirStrength + iStrengthFactor));

Yeah, that second bad boy says that how hard you can redline the units depends on relative strengths, with the usual crazy integer rounding.

This can be seen by using mixed stacks of 5 catapults, and looking at the difference in HP between sending in the barrage pults first (bad), and sending in the barrage pults last (good!). So if you are trying to tune your catapults to a particular amount of splash damage, the Barrage promoted catapults go LAST.

Further note that Barrage II doesn't move the cap for this test, (nor Barrage III) because improving your collateral strength improves the damage cap only if your collateral strength is lower than their strength and you get lucky on the rounding....

Jump Points



Understanding that surprise, I ran two sets of tests. First, I compared knights with various promotions to pikes with various promotions at two hp levels: 55hp (the cap of unpromoted cats) and 50hp (the cap for Barrage I cats).

In the cases without jump points, the largest spread was a +2.5% survival rate for the knights, which comes to 0.5% per promoted catapult used in the softening up.

The two cases with jump points affected unpromoted knights only. Against a Combat II + Formation pike with 55hp, survival is 74.7 percent; with 50hp, the knight's survival improves to 88%. Against a Combat II pike, 55hp gives the knight an 88% chance of survival, where at 50hp survival was at 95.2%.

So there's a big win in there - but there are an awful lot of hit points between 55 and 50, and since the promotion is adding exactly 1hp of splash, we should be able to find the jump...

If I'm reading my notes correctly... the jump point against the C II + Formation pike is between 55 and 54 hp. In other words, you get almost all of the benefit from a single barrage promotion, if you remember to attack with that catapult last.

For the Combat II pike, the jump point was between 52hp and 51 hp, so you need to promote four catapults, including the last one, to Barrage I.

Now, that pretty much takes care of the biggest range. Anybody else is invited to check the other ranges
91 vs 90
82 vs 80
73 vs 70
64 vs 60

Conclusion



Assuming that my results hold (I always leave open the door that somebody finds a flaw in my experiment), I think we can pretty will cook the Barrage promotion for catapults in casual play. In most cases the marginal return appears to be pretty small; if you happen to have a jump point available in your neighborhood you can do better, and if you invest way to much time in this you can game the mechanics for the savings of one or two promotions. All of these caveats rest on top of our previous set (that collateral damage is worth more than direct damage, that we can ignore the ancillary benefits of survival, blah blah blah).

Edit: wow - I'm feeling lucky that I didn't lose this prose (originally tried to post it when the forum wasn't responding
Edit #2: fixed a sleepo caught by DanF5771
 
Very nice results indeed! No way I'm going to hunt for jump points in my games, that's so NOT worth the effort (when you can't even see the exact amount of HP remaining on a unit).

Yeah, that second bad boy says that how hard you can redline the units depends on relative strengths, with the usual crazy integer rounding.
That's just ridiculous and a good reason to call the promotion broken in that area. I've noticed in my experiments that sometimes you couldn't properly red-line some units, but I attributed it to the fact that the game just "throws away" any collateral attacks that would have brought the unit below the red-line. Thanks for clearing that up.

I'm seriously wondering how this formula got into the code. It looks utterly arbitrary to me.
 
^^ I think the formula to cap iMaxDamage as a function of strength ratio is fine and necessary --> so it is guaranteed that an unpromoted Catapult can't bring a MA to lower than 78 HP (iMaxDamage=22). Here the rounding is not the problem, since it's only about +-1HP, whereas the rounding in the determination of iCollateralStrength is responsible for the larger part of the felt brokeness of the Barrage promotions (especially for early siege = Cats&Trebs).


Further note that Barrage II doesn't move the cap for this test, because it doesn't change the collateral strength of the catapult, and Barrage III doesn't move the cap because 50 is the catapult cap anyway.

Nice work VoiceOfUnreason - just a minor correction:
Barrage II changes iCollateralStrength for Cats from 6 (Barrage I) to 7. The cap for iMaxDamage for a Cat when splashing strength 6 units is only <50 (it's inherent cap) when it is unpromoted.
 
^^ I think the formula to cap iMaxDamage as a function of strength ratio is fine and necessary --> so it is guaranteed that an unpromoted Catapult can't bring a MA to lower than 78 HP (iMaxDamage=22)
I think it just uncessarily complicates things, making the whole issue of collateral damage even less transparent than it already is. What's wrong about a cat being able to deal 3-4 HP of collateral damage to a Modern Armor? In fact, even with the above restriction in place this is still possible, but after a point the siege weapon just stops dealing damage. That's completely arbitrary and counter-intuitive. There's nothing wrong about capping collateral damage to a certain point, but it should not change with strength ratio on top of all the other restrictions. Too complicated in my eyes.

If you don't want that to happen the entire mechanics of collateral damage should be changed, for example by taking a combat round against each target, and if it's won then you cause collateral damage to that target. Something along that line.

We're dealing with a host of built-in caps and rounding issues already, none of which are explained in-game at all, and the above formula adds one more on top of that. It's not even in the XML file, no, you have to inspect the game source code to find out!

I'm not in the mood anymore to write a combat simulator, because I would have to link it against CivGameCore.DLL in order to get accurate results. Reverse engineering this incredibly convoluted combat engine is more than I'm ready to face right now.
 
^^Lack of transparency? YES! But no cap in the game would lead to a lot of stories like: "5 Cats redlined my tank and then a spearman took it out..." :spear:
 
^^Lack of transparency? YES! But no cap in the game would lead to a lot of stories like: "5 Cats redlined my tank and then a spearman took it out..." :spear:
One could argue that catapults shouldn't be able to even SCRATCH the tank. In reality, however, they do, up to a certain point that depends on the strength ratio between the two units and the amount of damage done (hitpoints). Axeman can't scratch Mechanized Infantry because they're "too weak". Catapults can damage anything, but only so far, and then they're suddenly considered "too weak" as well EVEN THOUGH THE DEFENDING UNIT GOT WEAKER IN THE MEANTIME. There's not only a lack of transparency here, it's a point where the game breaks its own rules to "avoid stories".

I think it would be better if the likelihood for collateral damage occurring followed the difference in strength between the opposing units. The amount of damage dealt could then be fixed, with the Barrage promotions increasing that amount. The damage cap would remain in place, but also be fixed.

In other words: use "combat odds" for collateral damage as well (not necessarily the same odds, but related).

A catapult could damage a Rifleman collaterally, but the chance of success would be lower than against a Longbowman.

This would also make the system more transparent overall, since players are used to dealing with combat odds already.
 
Back
Top Bottom