Resource icon

Civ III Combat Calculator (.EXE) 1.36

Hello all,

Sorry for any delays. I haven't been monitoring this page, so I didn't know about the problems until I was PMed. That said I am officially releasing the calculator into the public domain. Included are all the files I used with Visual Studio 6.0 to create the calculator (If I inadventently missed one, just PM me). It was written with VB 6.0. I tried to comment the code as much as possible, mainly for my benefit at the time, but hopefully it will help everyone now. If anyone finds errors or has improvements feel free to post them here. Although I am no longer making code changes or supporting the program, I'd still be interested in hearing about it. Happy Civ-ing!!! :D

Calculator Source
http://forums.civfanatics.com/uploads/33932/CivIIICombatCalculatorSource.zip

Calculator EXE
http://forums.civfanatics.com/uploads/33932/CivIIICombatCalculator_v1.36_.zip
 
Thanks a lot BomberEscort and merry christmas :D
 
"Custom Terrain Bonuses from -99% to +999% in 1% increments."
...........................................^
if a unit has a net strength penalty, the % combat strength is added and then inverted
(1/1.99), or about 1/2 normal strength for -99% defense

or it could be a typo : P
 
Could you please add bonuses for fights against barbarians according to difficulty levels?
 
Just wondering, but i've seen that the max HP for the calculator is 20, while I know that having more than that is strange, the naval battles in my WIP Scenario have been spiced up.

You see, the Battleships (I was just testing how some of the battles would play out, statistically) have an 18 pt. bonus (max of 20) so therefore they have 21 HP, more than 20.

I wanted to see if the Battleships could defend against a Submarine -- as the Defense value of the BB is [45] and the attack of the SS is [55], but the BB HP is [21] and the SS HP is only [6], so I was wondering how this would play out.

Just wondering if it could be fixed, not that its a big problem.
 
After reading about and downloading a couple combat calculators for Civ 3, I realized they are not what I am looking for, If I understand what it is I am looking at...What I really need a CIV 3 Mod/ Utility that tells me what will happen if a particualr unit attacks another unit- A combat predictor or "Combat Crystal Ball", if you will, is what I want.

If I select a unit and pass the cursor over or single click on on an enemy unit- I want to know which unit will live and which will die. I am constantly saving and loading and it is a major waste of time. If I know my unit will die I just won't attack and that way I don't have to save and reload. Sometimes I will sacrifice a unit but I still want to know in advance what will happen.

I believe you when you say you can calculate the combate odds. But it seems to me those odds are pre-determined each turn? You can save and reload a 100 times and the exact same thing will happen in the same turn. Please correct me if I am wrong or better yet, someone please create my "Combat Crystal Ball". Thanks!
 
I think you are getting confused about how combat in Civ3 happens. Civ3 will save the random number seed in the saved game, which means that if you load the saved game, then the same random numbers will be generated each time, and thus combat will have the same result every time as long as you do the combat in the same order. What this does not mean is that combat odds are predetermined.

To change this, you can turn off saving the random seed (it is an option somewhere, which may have only been added with a later patch), or do the combat in a different order. Either of these things will give you a different result when you reload the game.

As for what you want, that is a lot more work than what has been done here. This is a calculator; having something which actually got the seed, and used the game interface to select units and display results takes a lot more work.
 
The idea of combat in the civilization series is that it is unpredictable but that the stronger unit will win far more often than the weaker one. The odds that the stronger unit wins are higher than the odds that the weaker unit wins.

You are correct that reloading won't change the result and that thus in a sense the result is predetermined. However, the game tries to simulate a pure random value which will determine the outcome of the battle (by so called pseudo random number generators which are based on mathematical formulas that generate series of results which behave very similar to a series of random numbers). In version 1 and 2 of the civilization series, the game would simulate a new random number on reload but it resulted in players which couldn't restrain themselves from reloading as often as was needed until the lucky number caused their spearman to win against the enemy rifleman. Some players said this was cheating which I agree with as you're systematically changing (pseudo) random behaviour so that you have more luck than you should have. It's very very similar to demanding a redraw of the lottery each time that you lose until you're going to win. Other players didn't like that things happened differently on a reload for different reasons. So in civilization 3, this was changed. When you reloaded, the same random number (the same seed of the pseudo random number generator) would be used, so the result would be the same and reloading one hundred times wouldn't make your spearman win against the rifleman. (However, it does allow you to do something different.)
In civilization 4, it was again changed so that players may choose (at the start of the game) whether random numbers remain the same on reload or not. The game designers decided that players should choose themselves whether they are willing to reload the odds when they lose.

What you're looking for is something that shows you the next random number and what result that will have (on the combat that you're planning). This is of course fundamentally opposed to the idea of civilization combat which is supposed to be unpredictable. It would be very similar to you deciding whether you're going to enter the lottery with your numbers after the winning lottery numbers have been drawn.

In theory, such a function could be designed as reloading gives you the same information, but no one has done so as far as I know. In civilization 3, the amount of access to the games functionality by modders is fairly limited (and still great mods have been and still are being created) so I don't know if this would even be possible without a huge amount of work. I do know that such a utility would be automatically disallowed in any competition related to the civilization series.
 
Thanks for the informormation about seeds! Because you could consider saves and reloads (other than those to begin and end a session) CHEATING, I guess a hardcore Civ addict might play a game with no saves and reloads. I would probably try it no higher than 'Warlord' level.

Currently I am playing the Austrians in Ryne's huge realistic world map and actually kicking some butt for the first time in 'Regent' level in this mod. I cannot, especailly in the early game, afford to lose a single unit as I am hanging on for dear life, so I do a lot of saves and reloads which is very time consming on my older PC, thus my request.

I will look for that option to turn off saved seeds in Civ 3 if it exists.
 
I've read several comments from players who used to reload everything when something went wrong. They claimed that it improved their enjoyment of the game once they gave up reloading.

No one really likes losing units, but once you realise that reloading essentially lets you dictate the outcome of every battle, you'll realise there's no challenge in any conflict in this game. In that case, there's kind of a button next to each battle which you'll have to press in order to win that battle and that will quickly become stale. Or at least, it does for most players.

I'm not trying to tell you how you should play this game as that is up to you. I'm just warning you what systematic reloading will do to your game experience once you realise that there is no challenge left in such a game. However, everyone is different and it's of course all up to you how you wish to experience this game.


I'll present a game experience of mine in my latest game. I was fighting and conquering a weaker enemy when another civilisation amphibiously attacked me at a small island (4 cities) off the opposite coast. This second enemy was at least as strong as I was and came with quite some troops so I lost a city. There was no way for me to get my troops there quickly enough to stop him and it was a challenge to stop his advance at only that single city. I managed to sink his second invasion fleet and after several dozens of turns I could get a significant force there (by ship from the main continent) to recapture my lost city. I got a peace treaty and continued my conquest of the weaker enemy. Of course, this second front significantly slowed my original plans of conquest and hurt the area around the conquered city which took some time to recover. But in the end, I did win that game.

Of course, I could have reloaded to a point before the amphibious attack of this second enemy and strengthen my defences so that I didn't lose the city. I also could have reloaded as often as necessary so that my weak defenders somehow through sheer luck would win their defensive battle. However, after the game would have been won, I would know that I won the game by reloading that sequence and not through my own skill. It would have cheapened the victory.


Maybe, you don't have this problem and you like your play style better. I'm just giving you some experience from others. It might help you enjoy the game more.

Have fun!
 
Humm...I appreciate your perspective. I find that there is a certain point, usually in the early medevial era when my Civ's very survival, or at least the probabability that I can eventuallly catch up to more powerful Civs, can hinge on a few specific battles and events. So by reloading I, in effect, time travel back and tweek the course of history. I guess I consider it payback for the A/I cheating. Depending on the level you play, the AI will give computer Civs advantages like cheaper units and improvements. The AI is much more aggressive toward me than it is between other computer Civs.

Personally, after I beat Ryne's world map a couple times on 'Warlord' I no longer found it challenging, while failing several times to "get over the hump" at Regent level. So now I am "using every trick in the book" to suceed at Regent level. One of those tricks is save before taking a hut and reloading and waiting a turn if I don't get a new tech or unit or a settlement. Unless I aggressively get new techs from huts I fall so far behind the leaders they will soon be sending Tanks against my Pikemen. Another trick is to agressively pursue diplomacy, which is a nusance-like paying off enemies to make peace and bribing others to make military alliances. It seems to be working because I am leading in Victory points at about 1500 AD. Thanx!
 
While saving/reloading to change combat results kills my enjoyment too, I can understand you wanting to do it. It turns out that option I was talking about was not added until patch 1.21f.

Regarding AI cheating, AFAIK it doesn't cheat with cheaper/extra units until Monarch or higher levels (though it still does know where all your units are IIRC). And the AI can never be as adaptable as a human player.
 
I got a question; What if there is more than four anti-air units in a stack?.. Does the rest of the units of that stack up more than four times their chance to destroy the aircraft or is it just four times and nothing stacks past that?
 
From BomberEscort's post here;

Conclusions...
Hit Points and Experience do not affect interception by AA.
Stealth Ability does not affect interception by AA.
Terrain has no effect.
Radar Towers have no effect.
SAM Missile Battery is cumulative with Mobile AA.
If more than 4 AA in a square, only the best four will defend...
A Defense of zero will result in always being shot down, this is why Stealth Aircraft now have a Defense...

So only the best four AA units will defend.

Tom
 
1) The formulas for these are the actual formulas the game uses?

2) Is there any shortcomings this program has? I like programming, so I may be interested in fixing anything wrong. If someone else hasn't already.

3) Related to game loading - I reload my games only on very few occasions, and I hate doing so because I know it changes how the game goes. a) I reload on stupid culture flips that wipes out a stack of units/enough units to make me POed, especially when the citizens were happier under my rule than their old ruler. b) When something really impossible happens, like a 3 defense (with minimal fortify bonuses) unit defeats five 8 offense units in a row, when the defender had 1 hp for 3-4 of those fights. Only two I can really think of now.
 
Top Bottom