Announcement

Collapse
No announcement yet.

Combat questions

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

  • #46
    Originally posted by Maquiladora
    Ah that old trick you truely are a mathmagician
    I can do some cool things with a rabbit too

    Although i would say that varying HP's rather than armour seems a little more intuitive to the player. Maybe they were forced to change it after losing the Civ license. Armour is more realistic in its thinking but its not as intuitive as HP's by judging units power, although as we know now, they equal the same thing in the end. Anyway I digress, ill try and make the sim with those workings in mind and see what comes out.
    Not sure about that: the HP value isn't visible anywhere in the game, the only way you can sort of deduct it is from the health bars of units. As it is, a 50% health bar on a Warrior means 5 HP, on a Tank it means the same thing. If you start varying HP then 50% health on a Tank might mean 20 HP while it still means 5 HP for a Warrior - that would be extremely confusing IMHO...

    Pedrunn,
    Maq and I pretty much layed it out in formula form already, but if you must have the whole thing in a single formula, I attached a screenshot of (the relevant part of) a Maple worksheet for you. If anyone actually has Maple and would like to see the entire worksheet (it's not all that special, just the formulas of this thread in Maple form), let me know.
    Attached Files
    Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

    Comment


    • #47
      What the heck, here's the actual Maple code (might help explain how I accomplished the above results, even if you don't know Maple):
      Code:
      restart;
      C := "chance to hit"; T := "turns to defeat"; V := "chance of victory";
      
      C[a] := A[a]/(A[a]+D[d]);
      C[d] := A[d]/(A[d]+D[a]);
      
      T[a] := (AR[a]*HP[a])/(C[d]*FP[d]);
      T[d] := (AR[d]*HP[d])/(C[a]*FP[a]);
      
      V[a] := T[a]/(T[a]+T[d]);
      V[a] := simplify(%);
      V[d] := simplify(1-V[a]);
      Last edited by Locutus; December 30, 2002, 08:55.
      Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

      Comment


      • #48
        Ah ok i thought it unlikely that i hadnt made a mistake. But at least we know the most important values now.

        On veterans, it seems unlikely that the programmers would let it out this way. Also considering theres an entry in the manual about it and its used in some of Activison's own scenario scripts, would they put work into that knowing it didnt work? Maybe they knew it didnt have an effect aside from the little medal as you said though.

        It also says in the manual that veteran units only enjoy a bonus to their attack rating, but we know what the manual is like.

        Is there a quick way to generate alot of veterans to test with? Otherwise it could take a long time to get enough from combat experience.

        Not sure about that: the HP value isn't visible anywhere in the game, the only way you can sort of deduct it is from the health bars of units. As it is, a 50% health bar on a Warrior means 5 HP, on a Tank it means the same thing. If you start varying HP then 50% health on a Tank might mean 20 HP while it still means 5 HP for a Warrior - that would be extremely confusing IMHO...
        Thats true, for CtP2. I had intended to use HP rather than varying armour but i realised you couldnt see the HP in the build manager and stuff, and now its clear armour has exactly the same effect so...

        Probably the last version of the combat sim, although i said that last time. If it turns out veteran has no effect theres no need to use it.
        Attached Files
        Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
        CtP2 AE Wiki & Modding Reference
        One way to compile the CtP2 Source Code.

        Comment


        • #49
          Originally posted by Maquiladora
          On veterans, it seems unlikely that the programmers would let it out this way.
          Ain't that the very definition of a 'bug'? I doubt Activision noticed it themselves. After all, even if there is a bonus, it's only a small one and if veterans indeed don't have a bonus, none of us noticed it in over 2 years of playing either. It's pretty darn stupid that the bug is there, but you can't really blame Activision for not noticing it...
          Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

          Comment


          • #50
            Yeah we can, we can blame them for everything I just think its weird they would write a feature of the scenarios around the veteran effect if they didnt know it worked for definate.

            On the other hand, say a 50% attack bonus to 1 unit in an army of 12 attacking 12 units defending with all of them having defensive bonuses, hard to spot to say the least.
            Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
            CtP2 AE Wiki & Modding Reference
            One way to compile the CtP2 Source Code.

            Comment


            • #51
              Originally posted by Maquiladora
              Is there a quick way to generate alot of veterans to test with? Otherwise it could take a long time to get enough from combat experience.
              It's not too bad, you should get several veterans from every 12v12 battle. But to make things even easier, you can use this SLIC code as well:
              Code:
              HandleEvent(BeginTurn) 'VeteranAll' post {
              unit_t	tmpUnit;
              int_t	i;
              
              	for (i = 0; i < player[0].units; i = i + 1) {
              		GetUnitByIndex(player[0], i, tmpUnit);
              		ToggleVeteran(tmpUnit, 1);
              	}
              }
              This turns all units veteran at the end of every turn. So create a bunch of units with the cheat menu, end the turn, all units become vets, create a bunch of non-veteran units with the cheat menu, attack.

              The vets and non-vets both have an equal chance to win the battle, and usually the winner comes out of the battle severely damaged (only 1 or 2 hp left). When I tested terrain and fortifying, the units with a 50% bonus won 6-7 out of 10 battles and usually still had 5-2 hp remaining. (Note that there's a pretty big randomness factor so it's entirely possible for a non-fortified unit to defeat a fortiefied unit and only loose 2 hp, it just doesn't happen very often).
              Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

              Comment


              • #52
                Originally posted by Maquiladora
                Yeah we can, we can blame them for everything I just think its weird they would write a feature of the scenarios around the veteran effect if they didnt know it worked for definate.
                That's why I'm pretty sure they weren't aware of the fact that it didn't work. Heck, Harlan shared many of the emails/design docs/etc that he and Activisioners exchanged for the Alexander scenario with me and although I don't have them anymore, I'm pretty sure everyone was assuming veterans had an added combat bonus...

                On the other hand, say a 50% attack bonus to 1 unit in an army of 12 attacking 12 units defending with all of them having defensive bonuses, hard to spot to say the least.
                Precisely...
                Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                Comment


                • #53
                  Well its hard to say whether theres any bonus, but its probably easier to say it doesnt give a bonus from the tests i did anyway.

                  Attached shows, twelve 1 Warrior vs 1 Warrior, 1 Interceptor vs 1 Interceptor, 1 Archer vs 1 Archer, 1 Bomber vs 1 Bomber. All units have attack values equal to their defence values so every 1v1 battle is 50/50 chance for either unit. Blue always had veteran bonus and was the attacker. Probably do some more tests with veteran unit as defender.
                  Attached Files
                  Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
                  CtP2 AE Wiki & Modding Reference
                  One way to compile the CtP2 Source Code.

                  Comment


                  • #54
                    The above formulas already proof that it makes very, very little difference whether you attack or defend (except when you only have 1 or 2 hp left, in which case whoever strikes first (I think the attacker) has the advantage of being able to kill the opponent before he can retaliate), so no real need to test that (although it wouldn't hurt of course).

                    What would be more interesting to test would be to have battles with identical units but give one side a terrain or other bonus - see how different the results are when you're certain that there *is* a bonus (I already tested this myself with defensive bonuses but am yet to test with offensive bonuses).
                    Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                    Comment


                    • #55
                      edit: just rambling

                      You could of course change the veteran effect to something freakish like VETERAN_COEF 250 then see what happens...
                      Last edited by Maquiladora; December 30, 2002, 10:37.
                      Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
                      CtP2 AE Wiki & Modding Reference
                      One way to compile the CtP2 Source Code.

                      Comment


                      • #56
                        Edit: okay, I'll spare you the humiliation of quoting and replying to what was there before the edit - this time...

                        Edit2: changing the const.txt value would be useful but even if that's broken, there could still be a hard-coded bonus or something (unlikely, but still...), so although I certainly plan on trying it to prove that that setting is broken, it's not 100% closing evidence for the fact that veterans themselves are broken.
                        Last edited by Locutus; December 30, 2002, 11:06.
                        Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                        Comment


                        • #57
                          Sorry about that.

                          What about VETERAN_COEF? I did a couple more tests, one with VETERAN_COEF 99 and one with VETERAN_COEF 250, and neither showed any positive results, just what youd expect without any effects. Either thats obsolete in const.txt and its hardcoded at +50% and hard to see or it just doesnt work at all.
                          Call to Power 2: Apolyton Edition - download the latest version (12th June 2011)
                          CtP2 AE Wiki & Modding Reference
                          One way to compile the CtP2 Source Code.

                          Comment

                          Working...
                          X