Announcement

Collapse
No announcement yet.

AI defensive units

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

  • AI defensive units

    Rats! Some of you may have read my thread where I said that I turned all units into 'offensive' units so that attacks by the AI are more overwhelming like blitzkriegs (because they attack with ALL of their units). This also creates the feeling of a 'front' since most of their forces will be thrown against the borders of the enemy civ.

    Well, I found out that in doing this, it prevents the AI from building any more units. I think it has to do with the advisor. It usually advises to build defensive units first, then offensive, correct? So now it doesn't know what to build because there are no defensive units. Do any of you know a way to tweak what the AI prefers to build? I really like playing the game this way because when it's allowed to build defensive units cities are almost never taken.

  • #2
    Take a read at this, it will explain what I reckon is happening.



    The CIV2 engine always make the AI build the most effective unit
    with the highest attack factor, and nulls the rest. For example:

    If you have Panzer III = (10a,4d, 4h,3f)

    And

    If you have Panzer IV = (12a,4d, 4h,3f)

    The AI will always build Panzer IV.

    One way around this is to make all land attack units into 'role 3' units...This over-rides the AI.

    http://sleague.apolyton.net/index.php?title=Home
    http://totalfear.blogspot.com/

    Comment


    • #3
      Furthermore 1 move defensive units are infact what the AI considers to be infantry units.
      A one move defencive unit with good attack stats will be used for offensives as well by the AI as this is how most infantry units in the original game are configured. It's not really that good at handling offensive role infantry units actually, unless it's given a lot of move events a la red front.
      No Fighting here, this is the war room!

      Comment


      • #4
        I'm not sure that's quite what he meant, although that link is extremely useful for something I'm putting together at the minute. And Kobyashi also did another excellent article on units which covered the few things that were left out

        I think I had a similar problem to Sirrvs very recently when I was tinkering with Soviet Steel (I was running MGE).
        If an AI player is not able to build a unit with the "Defend" role, and there are no units with the "Defend" role already stationed in the city, the Military Advisor will not build anything, so the AI player will effectively not build any units in said city... It is quite irritating.

        But you can kind of get around it by having a unit with the "defend role" merely present in the city. Even if Mr Military "I know best, and if I can't have a defense unit I'm just going to sit here and sulk" Adviser, can't build it, if one is present in the city, he resumes his normal building activity...

        Comment


        • #5
          Ah I see. That's good to know. So does that mean if I make my infantry units have equal attack/defense stats to say, marines, the AI will use them as offensive infantry even though they are role 1 units? Remember, my problem is not that the AI is building the wrong units...it's not building units AT ALL unless I have at least one role 1 unit in the list.

          Edit: Yeah, exactly what Tigey said. I wouldn't mind so much but the AI insists on building like 8 defensive units per city making it nearly impossible for another civ to take it from them.
          Last edited by Sirrvs; April 17, 2005, 20:13.

          Comment


          • #6
            Well, I have made a workaround, somewhat. I created a batch file that swaps two rules.txt files. One of them has riflemen, paratroopers, infantry, etc. set to the normal defensive role, and the other to the offensive role. So I let the enemy build up their armies for a number of turns, save the game, run the batch file, load the savegame and watch as the mass armies are thrown against each other.

            The only problem I'm noticing now is for some reason one of the AI civs is hoarding defensive infantry units (over 100 of them) and not building any offensive armor, planes, etc. (I didn't change any of THOSE values).

            Comment


            • #7
              Maybe there's more hardcoding to the unit slots than we know of?
              Visit First Cultural Industries
              There are reasons why I believe mankind should live in cities and let nature reclaim all the villages with the exception of a few we keep on display as horrific reminders of rural life.-Starchild
              Meat eating and the dominance and force projected over animals that is acompanies it is a gateway or parallel to other prejudiced beliefs such as classism, misogyny, and even racism. -General Ludd

              Comment


              • #8
                Originally posted by Sirrvs
                The only problem I'm noticing now is for some reason one of the AI civs is hoarding defensive infantry units (over 100 of them) and not building any offensive armor, planes, etc. (I didn't change any of THOSE values).
                Any correlation with @LEADER settings?
                El Aurens v2 Beta!

                Comment


                • #9
                  I had a similar problem recently, with my WW2 scen.

                  The USA was performing a massive defence unit build up and not going on the attack.

                  This has to do with the outlay of the scenario map.
                  Always load the map in the editor and make sure the analysis tool gives you the OK.

                  The AI is affected greatly by map layout!

                  http://sleague.apolyton.net/index.php?title=Home
                  http://totalfear.blogspot.com/

                  Comment


                  • #10
                    Originally posted by curtsibling
                    I had a similar problem recently, with my WW2 scen.

                    The USA was performing a massive defence unit build up and not going on the attack.

                    This has to do with the outlay of the scenario map.
                    Always load the map in the editor and make sure the analysis tool gives you the OK.

                    The AI is affected greatly by map layout!

                    Are you sure it's due to the landmass problem? I think there might also be AI problems related to the size of an AI empire (whether this is in a relative or absolute sense, I'm not sure). In Soviet Steel 2, throughout the game, the US and USSR simply hoarded defensive units, in an almost identical manner as Sirrrvs describes, AND did not launch ANY form of land attack (considering the massive forces the Soviets had in position, this is very odd), only hitting out sporadically with air units. The smaller civs, however, like, India, China, Eastern Allies, etc, fought like lions, building large offensive forces, and attacking with everything they had. Also, when Russia had been carved up to a certain size, their behaviour changed very suddenly, going on the attack with everything they had (and hadn't used for most of the game). Admittedly the game did have over 63 landmasses, but only the largest empires seemed affected...

                    I know the AI's behaviour is probably the last thing anyone would want to spend time studying, but has anyone looked at it in any depth?

                    Comment

                    Working...
                    X