As a French person I feel like it's my duty to explain strikes to you. - AdrienIer

Create an account  

 
The T170+ Attack on RB thread

Another useful bit of information:

collateral damage done by catapults to rifles:
0 barrage = 6
1 barrage = 7
2 barrage = 9

I'll therefore adjust the table accordingly. Each row down is basically one hit from collateral.

Rifle HPMaceC1 MaceMusketC1 MusketC1 Pinch MusketC1 KnightC1 Pinch Knight
1003.2%4.5%8.9%12%30%4.5%24%
944.0%17%18%22%46%17%27%
889.3%20%21%25%50%20%43%
8211%23%24%41%55%23%47%
7633%38%40%46%81%39%52%
7038%43%45%64%85%43%70%

All sorts of interesting things pop out from a table like this, and I think I'll do more of these in the future for our battles.

For example, if the top defender has taken exactly 2 collateral hits, the best unit to send in is a C1 pinch knight or an unpromoted mace, because those are the units who hit breakpoints on 2 collateral hits, and not 1 or 3. If the top defender only took 1 collateral hit, then a C1 mace is probably the correct choice. If 0 collateral hits, an unpromoted musket is probably best.
Reply

(July 25th, 2013, 16:32)kalin Wrote: I could try to write a python script if I am pointed to the formulae and given a bit of explanation.

Kalin

My code doesn't have any macros in it, so it's just the matter of reading the formulae. Let me know if I need to explain or re-explain something (it may be easier to PM me and we'll talk off-site, I don't think this works well by post).

It's here, there's an "Under the Hood" section which has most of the spaghetti code: Combat Calculator

- On the Calculator Page, pay attention to A11:C16. Those are the key values that are used for everything else. Everything in A1:C10 are input values. Everything else on the Calculator page are either outputs or notes. It shouldn't be too hard to reverse engineer the formulae there.

- "Under The Hood" is how I use that data to generate the % chance of winning and the HP outcome results.

I did this in a hacky manner, so it only allows 9 hits on a side before a win; it breaks under absurd strength ratios, or with >100HP on a unit. Assuming no first strikes, it starts at (0 Att Hits, 0 Def Hits), and works the odds in each direction until one unit or the other dies. If the attacker has 60% odds to win, then the cell (1 Att Hits, 0 Def Hits) has 60% odds, and (0,1) has 40% odds. Rinse and repeat until someone dies.

Getting to cell (2,2) = Oddsof(2,1)*ChanceDefenderWins + Oddsof(1,2)*ChanceAttackerWins, assuming that no one would have died at (2,1) or (1,2)

- First Strikes are a mess. How they work:

Assume the attacker has 2 First Strikes. A first strike is a "free roll" against the defender. Assuming 60% odds of the attacker winning a round, then we get:
25% of 2 FS Rounds. In that case, 36% of the time the attacker gets 2 hits in, 2*60*40 = 48% of the time 1 hit in, and 40*40 = 16% of the time 0 hits in. So we have a baseline of 16% at (0,0), 36% at (1,0), and 48% at (2,0).
NOTE: At (1,0), the odds of the attacker getting the first hit in are really 36% + 16%*AttackerWinsRound1OfContestedFighting (Also 60%) = 45.6% - that's what my system displays.

Then there are variable numbers of first strikes. If an attacker has "2-5 FS", then they've got a 25% chance of getting 2 FS opportunities (as above), 25% of 3 FS, 25% of 4, and 25% of 5.

- I am not 100% certain that my system is perfectly accurate in the event that both the attacker and the defender have First Strikes (e.g., Att has "1-2 FS" and the defender has "2 - 4 FS") - I am not sure if first strikes on both sides cancel, or if the game rolls an "attacker first strike roll" and then a separate "defender first strike roll" - this has minor implications on the variance of combat outcomes, or in corner cases where a unit has enough First Strikes to kill its opponent before actual combat. I assume that the first strikes cancel; this could be incorrect. I'm not sure how to test this reliably, and it is not impossible for the game to give false odds, as players in the early vanilla days can attest.

Note: I use calculated odds, instead of rolling lots of test battles and hoping it converges to the actual odds. Ruff had a version way back when that did lots of test battles.

EDIT: I never tried to implement collateral damage, mounted units' withdrawal, or the catapult's retreat system.
Reply

(July 25th, 2013, 19:27)Zargon Wrote: Another useful bit of information:

collateral damage done by catapults to rifles:
0 barrage = 6
1 barrage = 6
2 barrage = 7

This is interesting because it means you have to get 5 hits with catapults if they are barrage 1 or barrage 2, in order to reach the maximum barrage damage. Does barrage 2 affect the odds of hitting on a collateral hit? If not, then maybe Drill is better in certain situations?
Suffer Game Sicko
Dodo Tier Player
Reply

No, all collateral hits always hit, it's just that sometimes they get absorbed by things that aren't eligible to take collateral. Drill might possibly increase the damage to the unit actually being attacked, but combat 1 is probably better. But barrage is still better than both.

I'll probably end up doing a bigger table with 1 hp increments where it makes sense if I can find the time before I head off to a boardgaming con next week, but barrage 2 is totally worth it if you know where the breakpoints really are. For example: musket vs 81hp rifle = 24.6%. musket vs 80 hp rifle = 36.8%

At least, it's worth it if we don't plan to build enough cats to fully collateral most of their stack, as seems to be the case.
Reply

(July 25th, 2013, 19:39)Cyneheard Wrote: n the event that both the attacker and the defender have First Strikes (e.g., Att has "1-2 FS" and the defender has "2 - 4 FS") - I am not sure if first strikes on both sides cancel

They cancel. I checked the code (CvUnit::resolveCombat). The game runs the round of combat anyway, but either way the loser doesn't get damaged, then the function subtracts 1 from the remaining first strikes for each unit and iterates to another round.
Reply

Cyneheard, just wanted to say thanks for your post. I will read tomorrow and think, then I'll ping you if I need additional explanations.

Kalin
Reply

How's the potential front terrain look btw. Do we need to do some chopping in the jungle to make flatland to kill stacks on?
Blog | EitB | PF2 | PBEM 37 | PBEM 45G | RBDG1
Reply

(July 25th, 2013, 19:27)Zargon Wrote: Another useful bit of information:

collateral damage done by catapults to rifles:
0 barrage = 6
1 barrage = 6
2 barrage = 7

(July 25th, 2013, 20:06)Zargon Wrote: Drill might possibly increase the damage to the unit actually being attacked, but combat 1 is probably better. But barrage is still better than both.

This is great stuff Zargon - but I read your table as saying that barrage 1 does the same damage as not having barrage at all - is that right?
Reply

That is correct. The formula for collateral damage is

floor(10 * (3A+D)/(A+3D))

Where A is the attacker's base strength, and D is the defender's base strength. Neither of those values is modified by anything other than barrage. So whether A is 5 or 6, the damage comes out to 6. If A is 7.5, it comes out to 7.
Reply

So by that formula, barrage one doesn't do anything for catapults against knights- they still do 7 damage either way. It does let them do an extra point of damage against muskets, though.
Reply



Forum Jump: