PieceOfMind's Advanced Combat Odds

An idea just came to me, and I haven't thought it out at all yet. I want to capture it before I forget it.

Show which attacker bonuses are subtracted from the defender's strength. For example, CR1, Cover when attacking Archery units, etc.

I was thinking that some defender bonuses apply to the attacker's strength, but upon reflection I don't think that is true. If it is, show those as well.

This should be a simple matter of appending a string to the line items at the bottom of the hover. For a C1 CR1 Cover Swordsman against a C1 Archer:

  • +10% Strength
  • +25% vs. Archery Units [defender]
  • +30% from City (Unit Ability) [defender]
  • +10% Strength
  • ...
A different option would be to simply show them as minuses for the defender. This would require looping over the bonuses twice if you wanted them to remain grouped by att/def. Or you could leave them in-place:

  • +10% Strength
  • -25% vs. Archery Units
  • -30% from City (Unit Ability)
  • +10% Strength
  • ...
Another minor enhancement would be to show the total % applied to each strength:

6.60 [+10%] vs. 7.35 [+145%]

Some nice ideas. I'll give them some thought.

One comment regarding the stating whether the bonus applies to attacker or defender. It's literally always the defender except attacker strength bonuses. In other words, it would be easier (in terms of work to do) to simply label the +10% strength (for example) as +10% strength [Attacker] and all others are assumed to be on the defender.

*****

phungus,
Thanks for doing that! Just downloading it now.EDIT.. done
 
Does the Combat line of promos on the defender work just like the other bonuses for the defender? What I mean is does C1 work the same as Shock for a total +35% strength modifier? And then if the attacker has Cover it drops back to +10%? Both assuming Axeman attacking Archer.

Given the answers I expect (yes and yes), then ya it makes sense to just tag the items that apply to the attacker's strength. I would still like to see the final bonus total for each when it's non-zero. I don't know how you should show a negative defensive bonus--as -20% or /120%. I suppose you could just say /1.2 and x1.2 for +20%, but those don't look as nice to me, nor is it as clear what they are.

I originally wanted to work the graphing bars into this somehow, but I don't see how they really would apply or be useful.
 
And here is ACO + the UP. Not sure what the official UP is, the thread is kind of a mess, so I used Dresdens update, and incorporated Alexman's amphibious landing fix, as I guess that's the most current build :dunno:

Anyway, same thing as last time, let me know when you've got it in the DB so I can delete the atachment.
 
EF,

The combat promos are unique because they (and Drill as well) are the only ones that always apply directly to the unit owning them. Every other situational modifier (all defense bonuses and modifiers due to promotions or unit-types) are added or subtracted from the defender bonuses. So the only time you'd be sticking the "attacker" tag on something would be for his first strikes and for his combat promos.

Regarding how to display the total defense modifier, that's a good question. Displaying it as /120% is accurate but might be confusing at first.
 
And here is ACO + the UP. Not sure what the official UP is, the thread is kind of a mess, so I used Dresdens update, and incorporated Alexman's amphibious landing fix, as I guess that's the most current build :dunno:

Anyway, same thing as last time, let me know when you've got it in the DB so I can delete the atachment.

Thanks.

Got it now. Will upload it to the db soon.
 
This would require explanation until you learned what it meant, but you could instead show the attacker's non-Combat effects in yellow to denote that they subtract from the defender's bonus.

  • +10% Strength
  • +25% vs. Archery Units
  • +30% from City (Unit Ability)
  • +10% Strength
  • ...

The reason I'm looking for a different method is that adding [Attacker] to an attacker's line item seems like it would be misleading. Another option is to add [-X%] after the ones that subtract from the defender.

  • +10% Strength
  • +25% vs. Archery Units [-25%]
  • +30% from City (Unit Ability) [-30%]
  • +10% Strength
  • ...
I don't like that it shows the % twice, one negative of the other. It looks a bit overkill. I suppose if you just memorize the fairly easy rule, there's no point.

Hmm, I'm starting to like the yellow. :)
 
Don't like the idea of using Yellow as it's used for retreating information in the rest of the ACO display...

I think the idea is sound to show visually where the bonuses are applied (in fact this would clear up alot of confusion I think). But I'm not sure the best way to go about it.
 
Awesome job with this! Also for merging it with Solver and Dresden's unofficial patch.
 
Oh, after checking out the BUG mod I would LOVE to see a merge with that! :drool: (I've currently merged Better AI with BUG; ACO would make it perfect!)
 
Oh, after checking out the BUG mod I would LOVE to see a merge with that! :drool: (I've currently merged Better AI with BUG; ACO would make it perfect!)

Just use the merged DLL above with BUG as you currently use the Better AI DLL. It should work fine.
 
So all I need is the DLL?

It didn't work. Maybe I didn't understand. Anyway, I want to use both BUG and Better AI with the ACO tool (all combined in one).
 
BUG by itself doesn't have its own DLL. If you merged Better AI with BUG, that means you must be using Better AI's DLL. Replace it with the merged ACO + BAI DLL posted above.
 
Ok, obviously the DLL wasn't enough by itself for ACO to work.

So I copied the /Assets/Art/ and /Assets/XML/ files as well. Dunno about the Python files in the merged ACO + BAI posted above. I also added the ACO.ini file to /Assets/.

Here's how I got it to work:
First I followed this guide for merging BAI with BUG:
http://forums.civfanatics.com/showthread.php?t=296534

Then I added the ACO + BAI merged DLL and the files mentioned above from ACO.

I am really new at this kind of stuff so I barely knew what I was doing, but I got it to work. Someone more computer savvy than me should make a guide for this, or include all the correct files in a .zip file.
 
BULL, the BUG DLL, includes ACO. I'm hoping someone will merge BAI with BULL as soon as it's released in installer form.
 
BULL, the BUG DLL, includes ACO. I'm hoping someone will merge BAI with BULL as soon as it's released in installer form.
That sound great. Can't wait :goodjob:
 
I am not sure if this is the right thread to ask in, but I have a problem...

I am using Wolf Revolution 1.4, and I get these detailed odds, but it started to look funny when I was going to attack a city with my axemen. I had these two axemen, one of them had +10 strength, the other +20 city attack. They were both attacking the same defense troop, but the axemen with +10 strength had much better odds than the one with +20 city attack. Shouldn't it be the other way around? or am I missing something? Screenshots below. I will be happy for any help, thank you!

scrpr1.jpg
scrpr2.jpg
 
PoM is the best to answer this, but I'll take a stab.

The Combat line of promotions affect the strength of the attacker. In this case, it adds 0.5 (10% of 5 assuming full health) to the Axeman's base strength giving you 5.5.

The City Raider line of promotions and those versus specific unit types subtract from the defender's base strength. Assuming your are attacking an Archer, this 20% is subtracted from its 50% city defense and 25% fortification, or 75% -> 55%.

It's possible that this ends up being less valuable than C1 I think, but the math is left as an exercise for the reader. ;)
 
In this case the R value is the dead give-away.

EmperorFool is absolutely right. This is a situation where a single combat promo, because the way it works differently to other promotions, is better than city raider. You'll notice the combat axeman has R = 0.72, and the CR one has R=0.71.

When both attacker and defender have 100HP, R is the only value you need to know. Whichever promotion increases the R value the most (the higher the better for the attacker) will give the greater odds of survival, ignoring things like Flanking promotions etc.

Also in this case, having the R value go from 0.72 to 0.71 causes a jump point. The combat axeman does 17HP damage per hit, unlike the CR axeman who does 16 damage per hit. As a result, the combat axemen requires only 6 hits to kill the defender, compared with 7 hits for the CR axeman. This abrupt change is what causes the large difference in survival odds.

The details of when combat or CR is better for city attackers were looked at in another thread, but basically when you attacking a unit with low base strength and/or with high defense bonuses (like the archer in this example), combat promos compare very well with CR, particulary CR1.
 
To apply EmperorFools excellent description of the combat rules to this case:

It's 110% of 5 strength vs 254% of 3 strength in the first example and 100% of 5 strength vs 234% of 3 strength in the second example. Mathematically speaking, the reason the first example leads to better results is because the 10% is added to a base of 100% strength meaning a relative increase of 10% while in the second case the 20% is substracted from 254% meaning a relative decrease of 254%/234% - 100% = 8,5% for the defender. 10% > 8,5%.

Or to say it in words, the 20% attack bonus doesn't make a dent in the huge defence bonus of the archer.

edit: too slow, Pieceofmind already answered too. But maybe my look on things is interesting too.
 
Back
Top Bottom