Announcement

Collapse
No announcement yet.

How do i change the AI building priority?

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

  • How do i change the AI building priority?

    At my game i am annoyed by the fact that the AI is building to much ranged units (reaching 80% of the total of units). I already looked at strategies.txt and decrease the RangedUnitsPercent and increase in others categories. Did not helped.

    I looked into the Unitbuildlist.txt and changed the columns of ranged units leavin only one with actually ranged units: the UNIT_BUIL_LIST_RANGED.
    Still the AI kepts producing way too much ranged units.

    My guess is that in somewhere among the AI files there is a priority to the columns in the Unitbuildlist.txt. And the i want to know where so that i could change thoses.
    Can anyone give me this tip?
    "Kill a man and you are a murder.
    Kill thousands and you are a conquer.
    Kill all and you are a God!"
    -Jean Rostand

  • #2
    My guess is that in somewhere among the AI files there is a priority to the columns in the Unitbuildlist.txt. And the i want to know where so that i could change thoses.
    If only there were . Unlike the building and wonder buildlists, "The [unit] build list names are special and are directly referenced by the AI code. " This is done through the AllUnitBuildList and GarrisonUnitBuildList
    elements in the BuildListSequences but other than the various unit percentages in strategies.txt (which you've already tried changing) we have no direct control over unit production. I suspect that the way the AI does it, doesn't work very well which is why you're getting an excess of ranged units. Is it building ranged units all the time or just at certain times? Maybe it needs to discover an advance so that it will build some other type of units.

    Comment


    • #3
      It is buiding almost all the time . At the beginning with Archers, then with Bowmans, and so with catapults...
      It get advances to build assault unit but for some reason it never build those, except in rarely times. Sometimes it builds Defense units bu like i said i have seen 80% of the total units being Ranged .
      I have gotten now the MM2 new strategies.txt and i will check out now. Although i am not that optimistic.

      I have a thought. If you take a good look you will notice that ranged units are the firsts in the alphabetic order (AArcher, Bowman....) I think the AI when it has nothing to buid it gets the first unit in the build qeue. I will start a game where the i will dislocate these units to a final place in the unit.txt that way they will be the lasts in the buid qeue.
      I will see how often the AI will keep producing them.
      I really hope i am wrong about that
      "Kill a man and you are a murder.
      Kill thousands and you are a conquer.
      Kill all and you are a God!"
      -Jean Rostand

      Comment


      • #4
        well here are some ideas of how I think the AI builds units. I have seen something that says allunitbuildlist or something like that. I think that it goes through all the unit build lists and builds one unit from each except if it alredy has the maximum like 2 settlers or 3 transports. So, if this is true than the fact that the ranged units are the first in alphabetical order is very bad. It would take it a long time to finish all the unit build list, and by the time it has to build other units it might figure it already has too many units. Try and use mayors in some of your cities and see how they build units. From what I know using mayors is basically like letting the AI run your cities. Check when he builds units from what buildlist he is building, rush the unit and check the buildlist agian.

        In my current medmod 2 game I have seen that the AI has lots of culverin and artillery, but nothing like 80 %. I think building culverin and artillery in the modern age is good in real lfe, but it wasn't in the early ages. They also don't build musketeers that much, they just build grenadiers.

        I remember once in of my first games unmodded, The AI was good at building units. One of the civs had about 200 or more units. So I went to war with them, taking advantage of the fact they don't attack, and found out they build a lot of tanks and marines, and a good amount of ranged units. If this would have been a medmod 2 or apolyton pack game, they would have whopped me badly. I used cheat mode and saw that one of their small cities had a machine gunner first then a cannon or artillery. Well what I think happen is that while mods changed AI behavior, they also change unit names and strenghts so now the AI builds too many ranged units, but at least it attacks with them. You might wan't to look at the original units.txt files and unitbuildlist.txt, and see if you find some thing there.

        Comment


        • #5
          Cube thanks for remind me about the Mayors. I had forgot i could check the AI through them.

          Although my experiences werent very produtive. I changed the archer place in the unit.txt and its name. It did not changed. What made me happy since this meant that the alphabetical order thought was wrong .
          I went to the build list sequence wich i made Defense list only with Allunitbuildlist and offense with only Garrisonbuillist. I wanted to know the pattern of them. Guess what? I still dont have a clue about it. these two lines a very like each other. Almost all the time they produced the same things.
          And I do know that the percentage in the strategies.txt did not influenced in nothing
          At one point it start producing only Spearmans, so i disbanded all ranged units hoping that the Mayor was going to balance it building more ranged units. And it did not. It kept producing Speamans for about five turn (i rushed buy every turn)
          sometimes even looked like there were a hidden list since they produced always the same things for the same amount of turns.
          I will just give up checking this. I almost got almost crazy today .

          Originally posted by Cube
          I remember once in of my first games unmodded, The AI was good at building units. One of the civs had about 200 or more units. So I went to war with them, taking advantage of the fact they don't attack, and found out they build a lot of tanks and marines, and a good amount of ranged units. If this would have been a medmod 2 or apolyton pack game, they would have whopped me badly. I used cheat mode and saw that one of their small cities had a machine gunner first then a cannon or artillery. Well what I think happen is that while mods changed AI behavior, they also change unit names and strenghts so now the AI builds too many ranged units, but at least it attacks with them. You might wan't to look at the original units.txt files and unitbuildlist.txt, and see if you find some thing there.
          This really is true and since archer can make 3 rows of attack they can be really deadly.

          PS: Since Activision forgot all about CTP2 it could at least helped us a little by telling some misterious things about it: Like the Unit build list, how do the tiles are explored in the city radius and how much money and PW we get from special attacks.
          "Kill a man and you are a murder.
          Kill thousands and you are a conquer.
          Kill all and you are a God!"
          -Jean Rostand

          Comment

          Working...
          X