Is Barrage broken?

Whats missing is a good example of barrage outperforming combat. Preferably with more than 50% siege units in your stack.
 
RE: Barrage isn't broken ...

NOTE: 'strength combinations' refer to all the unique strength values of military land units except the Warrior which are legal collateral damage recipients (17 in all: 3, 4, 5, 6, 8, 9, 10, 12, 14, 15, 18, 20, 22, 24, 28, 32 & 40).

  • In 37.25% of strength combinations, promoting a Catapult to the next level of Barrage delivers no more collateral damage than not promoting.
    Spoiler :
    • In 52.94% of strength combinations, Barrage I delivers no more collateral damage than Barrage 0.
    • In 52.94% of strength combinations, Barrage II delivers no more collateral damage than Barrage I.
    • In 5.88% of strength combinations, Barrage III delivers no more collateral damage than Barrage II.
  • In 43.14% of strength combinations, promoting a Trebuchet to the next level of Barrage delivers no more collateral damage than not promoting.
    Spoiler :
    • In 100% of strength combinations, Barrage I delivers no more collateral damage than Barrage 0.
    • In 17.65% of strength combinations, Barrage II delivers no more collateral damage than Barrage I.
    • In 11.76% of strength combinations, Barrage III delivers no more collateral damage than Barrage II.
  • In 7.84% of strength combinations, promoting a Cannon to the next level of Barrage delivers no more collateral damage than not promoting.
    Spoiler :
    • In 17.65% of strength combinations, Barrage I delivers no more collateral damage than Barrage 0.
    • In 5.88% of strength combinations, Barrage II delivers no more collateral damage than Barrage I.
  • In 5.88% of strength combinations, promoting an Artillery to the next level of Barrage delivers no more collateral damage than not promoting.
    Spoiler :
    • In 17.65% of strength combinations, Barrage I delivers no more collateral damage than Barrage 0.
  • In 1.96% of strength combinations, promoting a Mobile Artillery to the next level of Barrage delivers no more collateral damage than not promoting.
    Spoiler :
    • In 5.88% of strength combinations, Barrage I delivers no more collateral damage than Barrage 0.
  • In no situation does Barrage I on any Siege unit ever equate to a +20% increase in collateral damage.

  • In no situation does Barrage II on any Siege unit ever equate to a +30% increase in collateral damage.

  • In no situation does Barrage III on any Siege unit ever equate to a +50% increase in collateral damage.


So Barrage never does what it says it does and often does nothing at all ... hmm ... that sounds like the textbook definition of "not broken" to me. :crazyeye:


RE: Barrage isn't meant for attacking cities

Says who?

Given that collateral damage needs to be done to stacks in both cities and the field (though predominantly the former), it's unlikely the developers intended for Barrage to be useless against cities.

And if they did intend for it to be useless against cities, why'd they make it barely useful in the field?

Not to mention if the developers didn't intend for Barrage to be used against cities, why does Barrage I open up a promotion strictly intended for city siege -- Accuracy?

----

I'm not saying Barrage on Siege is definitely meant for attacking cities, but given it's less-than-stellar track record (see list above), I'm not certain we can adequately make that call until it's fixed and/or fully working as intended.
 
ok, I am going to make this very very very simple. Why? Because I do not read computer code. What I do know is what I can see before my very eyes.

You can do this yourself in world builder. Just in case you're too busy with your calculator confusing the hell out of me, I did the test for you.

I put 4 catapults in a line. They have B1 B2 B3 and a cat with no promotions.
Across from them are 4 stacks of unpromoted longbows.
The results are as follows:
Unpromoted cat: .5 Collateral damage
Barrage 1 Cat : .6 damage. 20% of .5 is .1 .1+.5=.6 B1 worked as advertised
Barrage 2 Cat : .6 damage 30% of .5 is .15 .15+.5=.65 Civ then rounds that down to .6 B2 worked as advertised, the flaw is in the combat mechanic that rounds down.
Barrage 3 Cat .7 damage 50% of .5 is .25 .25+.5=.75 Civ rounds that down .7 B3 worked as advertised, the flaw is in the combat mechanic that rounds down.

I took the test further using Cannons vs Riflemen

Unpromoted cannon: 1.3 damage
Barrage 1 cannon : 1.4 damage definately not a 20% increase
Barrage 2 cannon : 1.5 damage definately not a 30% increase
Barrage 3 cannon : 1.8 damage 50% of 1.3 is .65 1.3+.65=1.95 close but not the advertised 50%

Now it gets strange. I thought the large defense of the riflemen maybe that skewed the results.So I tried muskets

unpromoted 1.0 damage
B1 1.1damage
b2 1.2 damage
B3 1.3 damage.....clearly not what is advertised

hmmm, seems to get worse if the unit is stronger so I tried vs infantry
Unpromoted 1.4 damage
B1 1,6 damage 20% of 1.4 is .28 1.4+.28=16.8 rounded down to 1.6 as advertised
B2 1.8 damage 30% of 1.4 is .42 1.4+.42=1.82 rounded down to 1.8 as advertised
B3 2.0 damage 50% of 1.4 is .7 1.4+.7 = 2.1 close but not quite.

So then I tried units of practically identical strength a cannon vs Coursiers.
unpromoted 1.2 damage
b1 1.2 damage no bonus at all
B2 1.4 damage 20% rounded down
b3 1.7 damage nearly 50% but not quite

I then tried a couple bonus tests for people that missed the part where it was explained that any promotions other than barrage for the attacker or Drill for the defender do not have any effect on Collateral damage.

I put longbows in a city with CG3 Combat1,2,3,4,5,6 anti the anti siege promotion(charge) Then I gave the city legendary culture, walls, a castle and Chicken Itza. Collateral damage was identical for all three levels of barrage and unpromoted as it was on the open field.
So for the purposes of collateral damage discussions there is no more need to discuss combat, anti siege or any other promotion but Barrage and Drill.
Nothing else matters. the other promotions only affect damage to the top defender and siege survival. Which brings us to Bonus test #2

I put a stack of 5 longbows next to an unpromoted catapult. 2 longbows were promoted to drill4 one to drill3 one to drill2 and one was unpromoted to give a base.

Drill4 reduced the collateral damage by 60% . it sustained .2 damage rather than.5 sustained by the unpromoted longbow
Drill3 reduced damage by 20% rather than the 40% it should have it sustained .4 vs.5
Drill2 did not reduce damage at all. though a 20% reduction should have been .4 damage
The drill 1 and unpromoted longbow both sustained .5 damage which is correct


What did i learn from all this time in WB? Well, first and foremost I was reminded just how poorly documented this game is if you don't want to or don't know how to read the code. And honestly I don't buy computer games to stare at the code.
Secondly I learned that barrage for siege units does not stack. I was not aware of that. I think it is the only promo line that does not. Thus for lower strength units the rounding down can eliminate a lot of the bonus.
Thirdly, while at first it apears barrage is broken, I think it is more a function of the rounding down. I believe it is refered to as flooring. And secondly with the drill2 and drill3 not reducing the collateral damage as advertised. I have come to the conclusion that the entire collateral damage system is flawed therefore passing that on to any promotions affecting collateral damage.

All that being said. I still feel that if collateral damage is more important than survival of the siege unit then barrage is better. Sometimes an extra point can mean the difference in losing either a defender in a city or an counterattacking unit.

One final comment. Barrage on tanks DOES stack. MA w barrage1 does 1.6 collateral to Mechs while Barrage3 does 3.5. And it appears that the +10% vs gunpowder units applied as well. It does not for siege. i went back and tested it.
OK, i just spent over 2 hours in WB...someone buy me a beer
 
:beer:
Ok, for me 2h in code > 2h in WB ;).
You should have looked at the changes in hitpoints of the damaged units instead of their decrease in strength, because that way you introduced another inaccuracy due to rounding...

Looking at the code I conclude that "stacking" and protection via Drill promotions work fine. The main problem is the flooring when the Collateral Strength is determined as has been stated 3 pages above.

So the (flawed) mechanics are pretty clear, the question is - what are the situations when it is nonetheless useful?
 
:beer:
Ok, for me 2h in code > 2h in WB ;).
You should have looked at the changes in hitpoints of the damaged units instead of their decrease in strength, because that way you introduced another inaccuracy due to rounding...

?

I was looking at end results. After the attack is over any damage rounded down is lost. I tested this by then attacking again. It again just added the rounded damage even when adding both unrounded damages would have resulted in more damage.

As for when barrage is a good option. I think if survival odds are low, then if the bugger has to die then let him do more damage not matter how small the difference. Or if survival odds are high enough that you are willing to risk the unit for extra damage.
 
Here is an Excel spreadsheet to calculate the numbers according to CvUnit::collateralCombat. No guarantee, I'm currently not able to test and verify the results. :(

Just put in the numbers for defender and attacker (blue cells), results in green cells.

Current Example is Cannon vs Infantry.

Any errors? - I'm always happy to be corrected.
 

Attachments

  • CollDmg_Calc.rar
    2.8 KB · Views: 90
It did more collateral damage as advertised. It's not broken.
It does a lot less collateral damage than advertised. You are wrong there and it's time to acknowledge that instead of harping on about how awesome Barrage is in the open field (VoU showed it not being the case unless you put some absurd effort into finding jump points).
 
Secondly I learned that barrage for siege units does not stack. I was not aware of that. I think it is the only promo line that does not. Thus for lower strength units the rounding down can eliminate a lot of the bonus.
It is supposed to stack, however. If you have BI+BII+BIII the tooltip says "+100%" which suggests that stacking is intended since +20+30+50=+100. Apart from that, a new promotion never obsoletes an existing promotion, so by definition they ALL stack regardless which promo and on which unit.

That Barrage doesn't seem to stack properly is due to the brokenness of the combat formulas -- a fact which you can not evaluate consistently without examining them (due to the rounding and limited in-game information).

Unfortunately, World Builder experiments can't answer a lot of the questions here.
 
What I do know is what I can see before my very eyes.

The cake is a lie!

if you are using displayed strength as your measurement of the result of a test, you are introducing an extra error into your results. hp are a sounder foundation for future conclusions

Secondly I learned that barrage for siege units does not stack.

I believe that a careful look will show that it does - try Trebuchets:
4 * (1 + .2) = 4
4 * (1 + .3) = 5
4 * (1 + .2 + .3) = 6

In other words, the improvement you get from Barrage I + Barrage II is more than the improvement you get from Barrage I added to the improvement you get from Barrage II.

That's what I would understand "stack" to mean.

All that being said. I still feel that if collateral damage is more important than survival of the siege unit then barrage is better.

If you amend this slightly to "if the marginal value of the collateral damage...", then I will agree with you completely. But that's the big wall across the freeway: we've pretty well demonstrated that the collateral damage doesn't have that much value in a number of circumstances.

If someone manages to show that the demonstration has a flaw, then we can start challenging those conclusions.

Unfortunately, "reports facts that disagree with the position I've been defending" does not, of itself, count as a flaw.
 
RE: staring at code:

I don't particularly care for staring at code either, and I actually do very little of it. Most of my findings are via WB. I only peek under the hood when necessary.

For collateral damage calculations, I use VoiceOfUnreason's Collateral Damage Calculator -- an Excel spreadsheet which has been thoroughly tested and proven 100% accurate. (There is also DanF5771's, which I haven't tested but assume works just fine.)

RE: Strength levels

I appreciate your analysis of the strength levels, because it's very possible the developers wanted a +20%, +50% & +100% reduction in the modified strength from collateral damage.

However, not even that comes close to meeting expectations.

In your example of a Catapult causing collateral damage on a Longbow:

  • Barrage I should reduce the strength by 0.6. And it does! (0.5 * 1.2 = 0.6)
  • Barrage II should reduce the strength by 0.7. It doesn't. In fact, it does the same thing as the previous promotion. (0.5 * 1.5 = 0.75)
  • Barrage III should reduce the strength by 1.0. It doesn't. It only does -0.7. (0.5 * 2 = 1)

Spoiler a couple more examples :
Yes, it does get much worse with stronger units ...

Artillery causing collateral damage to a Tank:

  • Barrage 0 = -2.2 modified strength.
  • Barrage I = -2.2 modified strength. no additional effect (should be -2.6)
  • Barrage II = -2.5 modified strength. (should be -3.3 ... or -2.8 w/o stacking)
  • Barrage III = -3.1 modified strength. (should be -4.4 ... or -3.3 w/o stacking)

Mobile Artillery causing collateral damage to a Modern Armour:

  • Barrage 0 = -3.2 modified strength.
  • Barrage I = -3.2 modified strength. no additional effect (should be -3.8)
  • Barrage II = -3.6 modified strength. (should be -4.8 ... or -4.1 w/o stacking)
  • Barrage III = -4.4 modified strength. (should be -6.4 ... or -4.8 w/o stacking)

---- This is NOT a rounding error. This is evidence of Barrage being broken.


In NO COMBINATION of Siege unit & collateral damage recipient does either the HP or the modified strength reduction match up to the stated +20%, +50%, +100% by Barrage I, II, III!

So even when looking at modified strength, Barrage I is the only promotion that can do what it states (+20%) but only in certain, specific matchups.

I'll change my original statement for that:

Barrage very seldom does what it says it does and often does nothing at all ... still the textbook definition of "not broken". :crazyeye:

----
 
For collateral damage calculations, I use VoiceOfUnreason's Collateral Damage Calculator -- an Excel spreadsheet which has been thoroughly tested and proven 100% accurate. (There is also DanF5771's, which I haven't tested but assume works just fine.)

aaahhh ... so the other continent was already quite advanced, VoU discovered the "CD Calculator" and traded it to OTAKUjbski ...
self researching sucks
 
aaahhh ... so the other continent was already quite advanced, VoU discovered the "CD Calculator" and traded it to OTAKUjbski ...
self researching sucks

It's the "thoroughly tested and proven 100% accurate" that raises my eyebrows. I originally sold it as a floor wax and dessert topping.
 
It's the "thoroughly tested and proven 100% accurate" that raises my eyebrows. I originally sold it as a floor wax and dessert topping.

Well ... thoroughly tested by me (for what that's worth).

Since Post #1 of this thread, I've been comparing the VoU calculator vs the WB results & CvUnit code, and so far they've been spot on.

@ DanF5771:

There's one thing your calculator has his doesn't though -- iMaxDamage

I can't tell you how much time that's saved me in this test I'm trying to complete right now! :goodjob:
 
Well, all this work just went down the drain.

Patch 3.17 :

  • Combat line of promotions not available to Siege
  • Fixed Barrage promotion bug

Edit: at least now we have the official Firaxian position on whether barrage is broken.
 
OK, I'm not up to experiments tonight, but here are the code changes that I see....

3.13
Code:
iCollateralDamage -= (iCollateralDamage * pBestUnit->getCollateralDamageProtection()) / 100;

3.17
Code:
int iModifier = 100;
iModifier += getExtraCollateralDamage();
iModifier -= pBestUnit->getCollateralDamageProtection();
if (pCity != NULL)
{
	iModifier += pCity->getAirModifier();
}
iCollateralDamage *= iModifier;
iCollateralDamage /= 100;

So for siege units, we should now see that the number of HP of collateral damage inflicted will depend strongly on the promotion, subject to the usual rounding errors.

HOWEVER....

3.13
Code:
int CvUnit::collateralDamage() const
{
	return std::max(0, (m_pUnitInfo->getCollateralDamage() + getExtraCollateralDamage()));
}

3.17
Code:
int CvUnit::collateralDamage() const
{
	return std::max(0, (m_pUnitInfo->getCollateralDamage()));
}

So the promotions no longer change the collateral strength used in the damage calculation, but only the damage itself. So our damage numbers for unpromoted units should be unchanged - unpromoted catapult splashing longbows should still be 9, and from there we see whatever effects the rounding has.

OK, small lie. I did run an experiment here. 9/10/13/18 are the damage totals now for collateral damage inflicted by a catapult against a longbow; these numbers are consistent with 0%/20%/50%/100% damage bonuses, and integer rounding.

I believe they have also broken the barrage promotion for tanks, in so far as tanks are eligible for the barrage promotions, but no longer inflict splash damage even when promoted (because units with 0 base collateral strength exit from the collateral damage calculator immediately).

I gave this a quick test as well - my results matched my expectations.

A generous and gently motivated person might try reproducing my results, just to double check that I haven't made errors through fatigue, and/or overlooked another delta in the source code that changes things dramatically.

Somebody with more motivation might check the efffects of promotions on maximum damage - it looks to me as though the maximum damage calculation is no longer dependent on promotions, so that weird behavior that called for using the most barraged promoted attackers last should have gone away?
 
OKI believe they have also broken the barrage promotion for tanks, in so far as tanks are eligible for the barrage promotions, but no longer inflict splash damage even when promoted (because units with 0 base collateral strength exit from the collateral damage calculator immediately).

I gave this a quick test as well - my results matched my expectations.

A generous and gently motivated person might try reproducing my results, just to double check that I haven't made errors through fatigue, and/or overlooked another delta in the source code that changes things dramatically.

Somebody with more motivation might check the efffects of promotions on maximum damage - it looks to me as though the maximum damage calculation is no longer dependent on promotions, so that weird behavior that called for using the most barraged promoted attackers last should have gone away?

I did a quick test with tanks. They still do splash damage with the barrage promotion. And I'll let the unknowing in on a lil secret. Tanks do splash damage to siege weapons >:) including machine guns.
 
Hmm - I repeated my experiment, without seeing evidence of collateral damage. Have I already forgotten how to test these things?

My test included four stacks of defenders - a Modern Armor, an Artillery, a Long Bow, and a Catapult. I attacked each with a single tank with 0/1/2/3 barrage promotions. I then peeled away the defenders, and with a cavalry unit selected examined the hit points shown for the remaining units.

In each case, I discovered that the remaining units were undamaged.

So, where did I screw up? Because this sure looks to me like the results I would expect if the collateralDamage method exits as soon as it discovers that the Tank has 0 collateral strength.
 
LOL, well it could have something to do with me realisizing I had stopped the 3.17 patch download until I knew just how badly Firaxis had screwed up this time. Thus my experiment was a waste of time and is totally meaningless.
 
VoU, I've testet it too with 3.17. No collateral at all, you don't even have to check the defnders strength, you'll notice that there is no "tank has done collateral damage to x defenders" popup.
 
Top Bottom