Announcement

Collapse
No announcement yet.

AI Improvement Selection

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

  • AI Improvement Selection

    Is it possible to change the order, or priority, of the AI's city improvement selections when a city is set on auto-build? (In detail, I mean, not just by switching between millitary & domestic.)

    Thanks!

  • #2
    I don't know. Does the AI also follow the citypref.txt?
    Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)

    Comment


    • #3
      I think it does, but only if the working directory matches the location of the file. i.e. this is normally the civ2 root directory so the citypref.txt would have to be in there (and so would only work for games using those files, usually unmodified; scenarios would be unaffected).

      For scenarios you can set up a new shortcut file (*.lnk) that targets the civ2.exe file but the working directory is set to a different location, e.g. a scenario directory.

      See the example below.

      This also allows civ2 to use alternative city.gif and menuloop.wav files in scenario folders. Little tip.
      Attached Files
      "I didn't invent these rules, I'm just going to use them against you."

      Comment


      • #4


        So a citypref in the scenario folder doesn't work?

        And if you change the working directory, there are some files you must place in that working directory, even if they're just copies of the originals. It's the game.txt and labels.txt at least, I think, and possibly some others too.
        Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)

        Comment


        • #5
          menu.txt is essential as well. Have you tried this?
          "I didn't invent these rules, I'm just going to use them against you."

          Comment


          • #6
            I think I'm missing some basic concept here or something; I can't find a citypref.txt file anywhere in my civ2 directory... Is this because I am not using MGE?

            Or, can I just copy the file in? (I actually have MGE, just have allways prefered not to use it..)

            Comment


            • #7
              Citypref.txt is not a pre-existing file. It's an optional feature they added allowing you to define the build order when you put your cities on auto-build.

              Let me see, this is what it said in the readme of the 2.42 patch (I imagine it hasn't changed since, for later civ2 versions):

              Customizing autobuild
              ---------------------
              You may customize the domestic advisor's city improvement
              picks for the autobuild if you wish. Create a file in your
              Civilization II directory called CITYPREF.TXT. The first line
              should be:

              @AUTOBUILD

              Each succeeding line contains the name of a city improvement in
              the order you want to build them. You don't have to list every
              city improvement, but each improvement must be spelled -exactly-
              as it is in RULES.TXT. (For foreign language versions, use the
              exact spelling from RULES.FRE or RULES.GER as appropriate.)
              Your domestic advisor will then choose improvements from this
              list provided that technology is available and the city is
              otherwise eligible to build them. If nothing on list is available,
              the advisor resorts to his normal algorithm.

              The military advisor will make his picks as usual. However, you
              can order him never to build "defensive" type units by inserting
              the line @NODEFEND at the beginning or end of the CITYPREF.TXT
              file (don't put it between the @AUTOBUILD line and the list of
              improvements).

              An example file is below:

              @NODEFEND
              @AUTOBUILD
              Temple
              Marketplace
              Library

              The file is reread every time you click the "AUTO" button on the
              "What shall we build?" menu. If you wish, you can alter your
              priorities over the course of a game without reloading.
              Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)

              Comment


              • #8
                Oh cool! This is actually really interesting. I didn't know this existed.

                Comment


                • #9
                  Woah, Awesome! All hail King Mercator!


                  There's something else about the auto-build function:

                  There are a few improvements that don't seem to be able to be auto-built; the temple, colluseum, barracks, airport & solar power plant. (I might be missing one there...) Why is this? It seems somewhat to have to do with oblolete technology, at least in the barracks' case. A solar plant sure isn't obsolete, though.

                  In any case, I'm eager to learn if the citypref file will override this little glitch.

                  Thanks, and thanks again!

                  Comment


                  • #10
                    I don't suppose Auto Build has any effect on the AI build queue?

                    Comment


                    • #11
                      Originally posted by harmonic
                      Woah, Awesome! All hail King Mercator!
                      Well, thanks, but I hardly deserve any credit here... I just read the manual in contrast with everybody else.

                      And I've never used the file myself, so I can't really help any further.

                      But, um, could you be more specific about the building problem? Are you testing it with the standard game, or have you changed the tech tree or so already? Are you sure you spelled the names right, you got the prerequisite techs, no wonders that already function as such an improvement etc?
                      Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)

                      Comment


                      • #12
                        My autobuild problem... It's been around for a while, I noticed it not long after I first started playing the game. (Which has been a long time.) Up until now I hadn't been interested in scenario design at all - but I had been messing with the terrain values, specifically, raising the trade values to boost the rate at which advances are gained.

                        Obviously I changed other terrain values from time to time, but mostly trade values.

                        Never messed with advances or improvements, like I said, 'till now. Anyway, for clarification, no this is not being tested under any advancement or improvement mods. I haven't had a lot of time to playtest any of these new changes, really. I spent most of the time downloading FAQs, guides and such. Seems like every time I set out to make a change and test it, I find some new choice, so off I go researching again.

                        It's ok though... my goals are pretty lofty, I want to put out the best work possible. Thanks a million for all the help!

                        Comment

                        Working...
                        X