Announcement

Collapse
No announcement yet.

Combat System Explained

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Combat System Explained

    I posted this on Civ Fanatics Forum as well...trying to get as many eyes on this as possible because alot of the "UNKNOWNS" I really want to know, heh. Anyone can take this info for posting in other forums or websites, but please do not paste this info in this or Civ Fanatics forum which will create redundant threads.

    What I want to do is to be able to make this thread the be all information on how combat works in Civ3. Most of this info I have comes from the instruction manual snipits, civilopedia, various websites and forum feedback. Really wished the manual was more specific on hard numbers used in calculations. If you have anything to add to this thread (like erroneous data or missing data) please do so and I will edit my origional post to import the new data.

    HP:
    The only different in conscripts, standard, vetran and elite units is the number of hit points they have. During battle each time the unit loses on a battle roll they loose 1 hp.
    Conscript 2hp
    Standard 3hp
    Vetran 4hp
    Elite 5hp

    Terrain Bonuses:
    When combat occurs over a river, the defender receives a 25% bonus.

    The defensive terrain bonuses are as follows
    10 Floodplains, Grasslands, Plains, Desert, Tundra, Coast, Sea, Ocean
    25 Forest, Jungle
    50 Hills
    100 Mountains

    How these numbers are used in the battle calculation are UNKNOWN.

    By the looks of it terrain does not give any offensive bonuses what so ever.

    Manmade Bonuses:
    Cities & Walls
    Walls give a ground defensive bombardment of 8. The way this value of 8 is used is UNKNOWN.
    Units in cities of population of 6 or below do not receive a defensive bonus.
    Units in cities of population of 6 or below that have city walls give a defensive bonus of 50%
    Units in cities of population of 7-12 receive a 50% defensive bonus, reguardless of city walls.
    Units in cities of population over 12 receive a 100% defensive bonus, reguardless of city walls.

    Great wall
    Supposed to double the effect of city walls to a 100% bonus to the defense of units, but once your city exceeds a population of 6, the option to build citys walls no longer appears in your production list. So right now its UNKNOWN what effect the great walls have on tows over population of 6.

    By the looks of it walls and large cities do not give any offensive bonuses.

    Fortresses
    Build outside of cities. When a unit is stationed in a fortress it receives a 50% bonus to their defense.

    Units stationed in a fortress receive an offensive bonus of being able to get "free shots" on the enemy. The specific definition of "free shots" is UNKNOWN. I have not seen it myself, but based on feedback I think this is what happens. Every unit inside of the fortress will automatically attack any approaching enemy unit (no limit) and not lose their turn. The free shot only involves 1 turn battle where if the unit in the fortress wins the roll, 1hp will be removed from the enemy unit outside of the fortress. If the unit in the fortress loses, no damage will occur on wither unit. Each turn while the enemy unit is next to the fortress, each unit inside of the fortress with get a free shot on each enemy unit next to the fortress. Once again I THINK this is what happens.

    Airport
    Provides NO attack/defensive bonuses.

    Coastal Fortress
    Provides a naval defensive bombardment value of 8. The way this value of 8 is used is UNKNOWN.
    This provides a 50% defensive bonus to all units stationed in the city against naval attacks. Plus a costal fortress will take pot shots at passing enemy sea vessels. The specific definition of "pot shots" is unknown, but I THINK its alot like fortresses. Each turn the fortress fires on nearby enemy ships using an attack factor of 8. If successful the offending sea vessels suffer 1hp of damage. The fortress will be able to fire on all enemy ships within range, which I believe is 1.

    SAM Missle Battery
    Civilopedia simply states that it attempts to attack air units that are attacking the city its in. Hard data on how this works specifically is UNKNOWN.

    Strategic Missle Defense
    Has a 75% chance to destroy incoming ICBMs.

    Unit Abilities:
    Retreat
    Units that have a higher movement modifier than the opponent and have no used all of their movement points can retreat when their hp drops to 1.

    Fortify
    A fortified unit receives a defensive bonus of 50%, but no offensive bonuses.

    Bombarbment/bombing
    (Have only tried bombardment a little so its hazy here)
    The attack value of the boming unit affects its successful rate, but how exactly is UNKNOWN. Also what factors determine the probability that determines if its a city improvement, unit, city wall, population hit is UNKNOWN. Also I assume all successful bombarbments on a military units only results in 1hp lost. I recently found that bombardment units have a value called rate of fire. From feedback, rate of fire is the number of "projectiles" the unit can fire per attack turn. For example a unit with a RoF of 2 does 1 attack on a city, the city is affected by 2 hits (if both did hit).

    Army
    Units in an army can only move as fast as the slowest unit in the army. When an army attacks or defends the first unit continues to fight/defend until the unit is down to 1hp. After which the unit gets replace with the next unit. This continues until the army gets to its last unit where that one is destroyed when its hp reaches zero, but the other 1hp units remain undestroyed (albeit heavily damaged).

    Nuclear Attacks
    Has a 50% chance to destroy each unit caught in its blast area (reguardless if its a friend or foe unit) and reduces a city's population by 50%. Size of the blast area is UNKNOWN.

    Other:
    The affect of difficulty level has NO effect on attack/defense calculations reguardless if the unit is computer or player controlled.

    The penalty (if it exists) for naval units caught in port is UNKNOWN.

    The penalty (if it exists) for air units caught on the ground is UNKNOWN.

    Final Calculations:
    Bonus percentages add, so 2 50% bonuses result in a 100% total bonus. How the game deals with rounding is UNKNOWN.

    The final caculation to determine the % chance for an attacking unit to win per turn is quite easy. However, what muddles this is that the vaules of the attackers offense and defenders defense vaules are UNKNOWN because the lack of information of how EXACTLY does ALL of the bonuses are totalled up is UNKNOWN. So we can only (at this time) calculate a crude approximation of turn win percentage. For example where the hell exactly is the 50 point defense bonus of hills used....is it +50 points somewhere in the grand equation or is it +50% bonus. Plus how does the game handle rounding is also UNKNOWN.

    Crude Turn Win % = (attackers offensive rating)/ ((attackers offensive rating)+(defenders defensive rating))

    If the unit wins the turn, it causes 1hp of damage to the opponent. If it loses the turn, its loses 1hp of damage.

    Dusted off my only high school probability and statistics book and I think I found the correct formula to predict the crude final battle win %. After a quick scan I found the binomial equation, abeit if memory serves me right there is a better one when your looking for a specific number turns won and the number of "coin tosses" is a ranged variable.

    * I am pretty sure there is better equation out there...help me find it guys *

    X = (HP of both units added together - 1)
    Y = HP of defender
    Z = X - Y
    A = Crude turn win % (in a .xx format so 50% would be .50)
    B = 1 - A
    C = (X-Y)!

    Crude final battle win % = (X!/(Y! * C!)) * (A^Y) * (B^Z)

    So for example an attacker of hp of 5 (elite) is attacking a defender of hp of 3 (regular). The attacker has a crude turn win % of 66% or .66

    So the crude final battle win % would be (7!/(3! * 4!)) * (.66^3) * (.33^4) which equals 11.9% of the outcome being killing the defender in 7 turn battle. The 11.9% seems small but you need you need to add the percentage chance of winning in a 6, 5, 4 and 3 turn battle to get the real overall chance of winning the battle. So for each battle the number of times you have to run through the above equation as many times as the HP of the attacker. So for a 5hp on 5hp unit battle you will have to go through a 5,6,7,8 and 9 turn battles and add up their probability. Hence you would have the do this equation multiple times to add up the total chance to win overall....and also hence I state that there must be a better equation to get the total chance of winning the battle with only using 1 equation.

    Well its late and I am tired so going to end it here without proofing.....please add what you can.
    Last edited by Valant; November 3, 2001, 12:19.

  • #2
    dont forget the free shots associated with the former zone of control system. instead of not allowiung enemy units to pass by your unit's 'zone of control', civ3 allows the unit to pass but the unit passing gets to be shot at by the unit who is being passed, even though its not his/her turn.

    Example: My cavalry is stationed in a tile accross from an enemy rifleman in an adjacent tile. On the enemy's turn, he moves his rifleman to the next adjacent tile to my cavalry- my cavalry gets a free shot.

    Comment


    • #3
      That 8 value for City Walls is its defense against Catapults & Cannons.
      If it is bigger there is less chance to destroy them, if is is lower then chance to destroy them is bigger.

      Catapults bombards City Walls: 4/(4+8)=0.33% to hit walls

      Comment


      • #4
        Ok got some questions before I update....

        To TheDarkSide
        Could you describe free shot a little more? From what I take it is that any units the move next to the fortress are automatically attacked by the unit(s) in the fortress. But here is my questions
        1) Is the any limit to the number of free shots per turn. For example I move 3 units next to a unit in a fortress will this unit free shot against each of the 3 units yet still retain their turn?
        2) Does the unit have to be fortified in the fortress for free shot to happen or could the just be inside the fortress for free shot to work?
        3) Is free shot automatic?
        4) Does the unit doing the free shot ever get damaged?
        5) How does the offending unit get damage by free shot? Is it like a 1hp drop like bombardment or is it a full on battle to the death/retreat?

        To Player1
        1) I just recently discovered that bombardment units have a rate of fire value, do you know what this value does?
        2) Do you know what happens for towns over a pop of 6 where city walls seem to disappear?
        3) Can bombardment affect more than 1 thing? I.E. hitting wall yet doing 1 hp of damage on a unit within the city?
        4) If the wall is hit, does it get destroyed?
        5) Does that value of 8 only pertain to bombardment calculations?
        6) Is the +50% def bonus or does that value of 8 get applied to a defending unit being attacked by bombardment within a city?


        Thanks for the responce.

        Comment


        • #5
          Re: Combat System Explained

          Originally posted by Valant
          Terrain Bonuses:
          When combat occurs over a river, the defender receives a bonus. How much this bonus is, is UNKNOWN.
          In the Civilopedia it is stated that if both units stand on the opposite sides of the river the defender gets a 25% bonus.
          "Beware of he who would deny you access to information, for in his heart he dreams himself your master" - Commissioner Pravin Lal.

          Comment


          • #6
            Originally posted by Valant
            Ok got some questions before I update....

            To Player1
            1) I just recently discovered that bombardment units have a rate of fire value, do you know what this value does?
            2) Do you know what happens for towns over a pop of 6 where city walls seem to disappear?
            3) Can bombardment affect more than 1 thing? I.E. hitting wall yet doing 1 hp of damage on a unit within the city?
            4) If the wall is hit, does it get destroyed?
            5) Does that value of 8 only pertain to bombardment calculations?
            6) Is the +50% def bonus or does that value of 8 get applied to a defending unit being attacked by bombardment within a city?
            1) I think it is how much damage can bombardment do in a single turn,
            for instance Artillery has rate of fire 2. When you say bombard it fires to shots, if both are succesfull then enemy unit loses 2 hit points, if only one is succesful enemy loses 1HP, etc... In fact it is the MOST IMPORTATNT ability of bombardment unit (more important then bombard ratink if you ask me)
            2) They will have bouns for being a CITIES (7-12 pop) of 50+, I don't know do Great Wall give anything to them.
            3) Maybe, I don't know (if unit has fire rate of 1, it will affect only one thing, if not then I don't know)
            4) I don't know I haven't played game much, if walls have some sort of HP rating then, they get hit, if hot then they are probably destroyed
            5) I thnik so, otherwise they would be to powerfull
            6) they don't get +8 defese (you play too much CTP ), I think thay get only +50%, 8 is "probably" defense of walls itself

            Comment


            • #7
              Difficulty level does not affect combat, Soren Johnson said. Which is surprising but welcome in a way.

              Comment


              • #8
                Originally posted by Valant
                Ok got some questions before I update....

                To TheDarkSide
                Could you describe free shot a little more? From what I take it is that any units the move next to the fortress are automatically attacked by the unit(s) in the fortress. But here is my questions
                1) Is the any limit to the number of free shots per turn. For example I move 3 units next to a unit in a fortress will this unit free shot against each of the 3 units yet still retain their turn?
                2) Does the unit have to be fortified in the fortress for free shot to happen or could the just be inside the fortress for free shot to work?
                3) Is free shot automatic?
                4) Does the unit doing the free shot ever get damaged?
                5) How does the offending unit get damage by free shot? Is it like a 1hp drop like bombardment or is it a full on battle to the death/retreat?
                Thanks for the responce.
                1) From what I've seen, yes, only one free shot then they can mvoe as many units passed as they want without getting shot at.

                2) Preliminarily speaking- Yes, from my play experience the unit has to be fortified to be able to take free shots.

                3) Yes, if you blink you might not even notice! Theres no prompt or confirmation. (on a side note: i tried looking in script.txt for an entry of "FREESHOT" or whatever so maybe I can try making a dialogue to notify the player that a unit is taking a free shot, but there is no such entry )

                4) No.

                5) It gets hit once, and damage depends upon unit doing free shot. I've seen artillery take free shots- so they took quite a bit of health as you expect.

                Comment


                • #9
                  Anyone know a way to make this into one equation. I could get my maths book, but its a bit far away. Where's Victor Galais? He seems to be able to answer all my questions.

                  Or else I could use a loop in Visual Basic.

                  Comment


                  • #10
                    First time poster...

                    Regarding the probability of an elite unit defeating a regular unit, the originator of this thread was definitely on the right track. I only have two corrections to make. One is that the "morale" of the units (to use SMAC terminology) or the Hit Points, does not determine what was called the "crude turn win %." Instead, that percentage is determined just as the author stated, that is

                    Crude Turn Win % = (attackers offensive rating)/ [(attackers offensive rating)+(defenders defensive rating)]

                    The second point I'd like to make is that to determine the probability of winning over an opponent with more than one hit point, the last "roll" must be won. Let me explain.

                    Let's say there are no defensive adjustments and it is an 5 HP attacker with an offensive rating of 4 versus a 3 HP defender with a defensive rating of 2. The attacker's Crude Turn Win % = 4 / (4 + 2) = 2/3. Okay, to get the probability of the attacker winning the battle, we do have to calculate how likely it is the attacker will win in 3 rolls, 4 rolls, etc. up to 7 rolls. (It cannot go 8 rolls because then both attacker and defender would be dead.) But in each calculation for figuring the attacker's winning [Pr(A win)], the attacker must win the final roll. That's it. Very simple.

                    So we have
                    Pr(A win in 3) + Pr(A win in 4) + Pr(A win in 5) + Pr(A win in 6) + Pr(A win in 7) = [(2/3)^3] + [3 x (2/3)^3 x (1/3)^1] + [6 x (2/3)^3 x (1/3)^2] + [10 x (2/3)^3 x (1/3)^3] + [15 x (2/3)^3 x (1/3)^4] = 95.5%.

                    As a check, we can figure the chance of the defender winning (it'll take at least 5 rolls):
                    Pr(D win in 5) + Pr(D win in 6) + Pr(D win in 7) = [(1/3)^5] + [5 x (1/3)^5 x (2/3)^1] + [15 x (1/3)^5 x (2/3)^2] = 4.5%

                    After all that, my question is: in Civ3 how can we get a message to popup advising us of the odds and prompting us to decide to continue with the attack or not? SMAC has that and I use it all the time.

                    Comment


                    • #11
                      I would love it if you could make that a bit more generic.

                      Say
                      Attacker 1 Hitpoints : X
                      Defender 1 Hitpoints: Y
                      Attacker 1 Offense : A
                      Defender 1 Defenders Rating: B

                      I'll try myself

                      Crude Turn Win % = (attackers offensive rating)/ [(attackers offensive rating)+(defenders defensive rating)]
                      Giving

                      Crude Turn Win %(C) = A/(A+B)

                      Victory Probability
                      Pr(Win in Min) + Pr(Win in Min +1) ...Pr(Win in Max)
                      [What are the values of Min and Max here?]

                      = C^Win in Min + ?

                      Could you help?

                      I want to get this into a program. If you could tell me the formula's it would be much appreciated.

                      BTW: Are you using the binomail theorem or the hypergeometric random distrubition varibale or something else here?

                      Comment


                      • #12
                        Yeah, I couldn't remember that name, "hypergeometric." I can generalize it for the 4 basic variables of

                        Attacker 1 Hitpoints : X
                        Defender 1 Hitpoints: Y
                        Attacker 1 Offense : A
                        Defender 1 Defenders Rating: B.

                        But Civ3 has already done this! I want them to give me the odds, not have to calculate them myself. I'm here to have fun. (Well, arithmetic, especially combinations and permutations is fun, but anyway...) Valant's point, and it was a good one, was that so many of the adjustments to the basic variables are UNKNOWN.

                        Let's try this. Please check me to see if I'm wrong. We agree on the attacker's "Crude Turn Win % = A / (A+B). What Civ3 does is apply that percentage until someone loses, okay? In my understanding, their program does not, for example, determine in advance that the attacker has a 95.5% probability of winning. I think their program simply "rolls the dice" with a 66.67% chance (from the previous example) of the attacker taking away a defender hit point.

                        To get you started: for the attacker the MIN and MAX are MIN = Y and MAX = X - 1 + Y. And for the defender it is MIN = X and MAX = Y - 1 + X. The reasons for these are, at a minimum, the winner has to beat the loser the number of times in a row equal to the loser's hit points, and, at the most, all the hit points except one will be gone at the end of the battle.

                        But to write a general formula and explain the combinatorial math is, as they say, beyond the scope of this message. If you can tell me, based on an assumption of the Yankees having a 2/3 probability of winning any given World Series game, and the Diamondbacks having a 1/3 probability, what's the overall probability of the NY team winning the World Series, then you should be able to do a similar calculation for Civ3 Combat.

                        Comment


                        • #13
                          Okay. I'll still try and make a program.

                          Yankee question: I hate baseball
                          Last edited by heardie; November 4, 2001, 07:32.

                          Comment


                          • #14
                            Originally posted by heardie

                            Pr(Win in Min) + Pr(Win in Min +1) ...Pr(Win in Max)
                            [What are the values of Min and Max here?]

                            = C^Win in Min + ?
                            principle of choice (combinations)
                            Pr(
                            (2/3)^3 - base chance of a winning 3
                            (
                            3c1 (3)- to go 4 rounds, d must win 1
                            4c2 (6)- " 5 " 2
                            )
                            (1/3)^n++ - pr d will win 1 more round each time

                            Bleh..i'm terrible at explaining math. However,
                            Attached Files
                            Last edited by jones; November 4, 2001, 16:11.

                            Comment


                            • #15
                              Re: Combat System Explained

                              Originally posted by Valant
                              The penalty (if it exists) for naval units caught in port is UNKNOWN
                              I think that the penalty is that the unit gets sunk - one of my first games I lost a caravel when it was the only unit left in my city and the city got captured...

                              Comment

                              Working...
                              X