Announcement

Collapse
No announcement yet.

Happy Buildings for AIs

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

  • Happy Buildings for AIs

    In CTP2 the AI doesn't build happiness building very well, therefore it will get some serious problems, in empire efficiency, growth and power.

    Unfortunatly the CTP2 AI doesn't use entertainers to cure unhappiness, either. Instead of using entertainers it will max out the global sliders according happiness on the cost of an efficient empire. In the default game the AI tries to keep the happiness level at 73 and in ApolytonPack at 75. To achieve this goal via the sliders is very inefficient. Another problem is if a city is rioting the AI doesn't clear the build queue and add a happiness building on this list. The default behaviour is to finish the current building and maybe later to add this happiness building to the build queue. This script file adds clears the build queue and adds the happiness building on top of the build queue and tries to rush buy it. In this strategies.txt the priority for happiness is also increased but not the top priority, so AI cities will now build the happiness buildings when they are needed.

    To install this script just unzip the *zip file into your default CTP2 folder and open the file script.slc in your ..\ctp2_data\default\gamedata\ folder and add to the end of this file the line #include "MG_HappyBuilding.slc". If you want to use this file with ApolytonPack search for the according file APOL_script.slc. If you like to use this script with GoodMod you have to look for a file called GM1_script.slc if you are playing for CityMod2 or for a file called GM1_APOL_script.slc if you are playing GoodMod for ApolytonPack. Unfortunatly the settings in the original strategies.txt or APOL_strategies.txt don't allow the AI to let drop the happiness level under 73 (or 75 in Apolyton Pack) therefore you have to replace the default strategies.txt's. If you are playing GoodMod you don't need to do that, because the GM1_strategies.txt is allready a part of GoodMod. To do that just move the GM1_strategies.txt to the ..\ctp2_data\default\aidata\ directory. If you unzip this *.zip file into the above directory you should find the GM1_strategies.txt there. Now you have to make CTP2 use the GM1_strategies.txt. To do that open the gamefile.txt (If you are playing an unmodded CTP2, if use one of the mods here are the prefixes: CM2_ for CityMod2, APOL_ for ApolytonPack and APOLUL_ for the Ultra Gigantic Map version of ApolytonPack.) Look in that file for a line strategies.txt and replace it by GM1_strategies.txt. If the entry allready has a prefix replace it by GM1_.

    Unfortunatly this script file is not compartible with Craddle or MedPack2.

    -Martin
    Attached Files
    Civ2 military advisor: "No complaints, Sir!"

  • #2
    I simply renamed GM1_strategies to strategies.txt ..does this work ?

    Comment


    • #3
      I know you read the thread about the new slic file. There I allready posted the installation notes about the GM1_strategies.txt it is the same file, therefore if you allready installed it you don't need to install the strategies.txt again.

      Originally posted by Foro
      I simply renamed GM1_strategies to strategies.txt ..does this work ?
      Of course this will work as well if you play the the default game or CityMod2. But it doesn't work if you play Apolyton Pack, because it has its own file called APOL_strategies.txt.

      -Martin
      Civ2 military advisor: "No complaints, Sir!"

      Comment


      • #4
        I think that yours startegy.txt isn't that good
        I was thinking about HAPPY seq. Priority 7500 & 0.5 Unhappiest

        You should look at Commerce for Ai thread.
        There I gave an interetigns way to mak AI build more "happy" improvments.

        Basicily you shuould make it a VERY high priority like 11500 or 12000,
        exept in starting strategies in which it should be like 1000.
        Then A percent should be a 0.1 Unhappiest.
        Then in Buildlistseqences.txt you should top GarrisonUnitBuildList
        in front of BuildingBuildList BUILDING_BUILD_LIST_HAPPINESS
        so computer will use a Martial Law & won't make cities undefended.

        In yours settings big commercal & scientific cities & several others would
        not build "happy" building at all (since their priorities are bigger than for
        happines).

        Comment


        • #5
          I agree with player1, 0.5 is too big. I edited medmod's strategies. txt and saw lots of priorities had 0.4 or higher and I lowered it.

          In yours settings big commercal & scientific cities & several others would not build "happy" building at all (since their priorities are bigger than for happines).

          actually you're wrong they will build them, but nearly at the end, Since each buildlist has to build all kinds off buildings.

          I've had some success by adding entertainers in strategies.txt. I've made it so a city has one Entertainer for very 10 citizens.

          Comment


          • #6
            You are right Cube.
            But the point is that ALL serously UNHAPPY cities should Build HAPPINES
            BUILDINGS FIRTS(after defense), and gold, science & production later.
            That's what it's done in my settings.
            0.1% unhappiest & 115000 priority (1000 at strat strategies).

            Comment


            • #7
              Remember only combination of LOW percent & HIGHEST priority will
              make it GOOD setting.

              Comment


              • #8
                Originally posted by player1
                But the point is that ALL serously UNHAPPY cities should Build HAPPINES
                BUILDINGS FIRTS(after defense), and gold, science & production later.
                That's what it's done in my settings.
                That's right and therefore I wrote the MG_HappyBuilding.slc. If the happiness level of a city drops under 73 it will clear the build queue and put there a happiness building and tries to rush buy. I would do the same thing in combination with entertainers and let young cities undefended. In a testgame I played a turn with another civ by accident and as I awithed back I saw that the AI started to move units from my old cities to my young undefended cities. Therefore my conclusion no need to think about defense.

                By the way the slic file is anouther sollution for the same problem.

                -Martin
                Civ2 military advisor: "No complaints, Sir!"

                Comment


                • #9
                  Yes, it is other solutuon.
                  Still I'll use them both in my MOD I am making.

                  Comment


                  • #10
                    Originally posted by player1
                    Still I'll use them both in my MOD I am making.
                    I guess I should do it, too. By the way what kind of mod are you making?

                    -Martin
                    Civ2 military advisor: "No complaints, Sir!"

                    Comment


                    • #11
                      Something similar to CD-mod for CTP1
                      or Apolyton Pack for CTP2.

                      Comment


                      • #12
                        I am using the new strategies file and most of the other slics you both (Martin and player 1 ) made available.
                        How can i still improve the Happieness of the AI ?
                        You said something of using both things but i cant really figure out what the second one is or how to do it ( programming isnt really something i like ;p)
                        Another thing i saw is that the AI is building a LOT of cities now and it seems to me that they have more cities then their goverment system would allow.
                        So there empire must have an increase in unhappieness.
                        I also saw on the map a lot of babarien cities ( i guess created from unhappieness) maybe this has something to do with it ?

                        Comment


                        • #13
                          Originally posted by Foro
                          Another thing i saw is that the AI is building a LOT of cities now
                          heavy settling AI

                          Originally posted by Foro
                          and it seems to me that they have more cities then their goverment system would allow.
                          That's not so but expansion is the key in this game. To prove your idea Foro you could use the cheat editor and take a look on AI happiness. Save before opening the cheat editor and afterwards you saw enough reload your previous saved game and you can keep your score. I like to know which mod are you exactly using I think it is hard to reach the city limit in the ultra gigantic map version of Apolyton Pack. You could attach your save game as a *.zip file so that I can take a look into it, if the *.zip file is greater than 200 KB you could use this file splitter here. It is freeware therefore no problems with copyright and other legal stuff if I attach it here.

                          Originally posted by Foro
                          You said something of using both things but i cant really figure out what the second one is or how to do it ( programming isnt really something i like ;p)
                          The combination would be to add player1 priorities about happiness to my GM1_strategies.txt which increases AI settler activity and AI transport capacity.

                          -Martin
                          Civ2 military advisor: "No complaints, Sir!"

                          Comment


                          • #14
                            Originally posted by Foro
                            How can i still improve the Happieness of the AI ?
                            You said something of using both things but i cant really figure out what the second one is or how to do it ( programming isnt really something i like ;p)
                            Foro, you shoudl look Martin's Commerce for AI thread>
                            There I explained in deltails how to do it.

                            Comment


                            • #15
                              Sorry I forgot the file splitter.

                              -Martin
                              Attached Files
                              Civ2 military advisor: "No complaints, Sir!"

                              Comment

                              Working...
                              X