Announcement

Collapse
No announcement yet.

Unit Production AI

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

  • Unit Production AI

    Hey all.

    I've been working on a scenario, which is essentially complete, but playtesting has revealed a fatal flaw -- The AI rarely builds military units. To answer the first things on most of your minds...

    -Yes, the AI has the prereq techs. In fact, two of the units it can build have nil as their prereq

    -No, there are no issues with the special unit slots. I avoided the Knight and the Musketeer altogether, and two of the three starting units are in the Warrior and Phalanx slots (The third is in the Settler spot).


    The problem also showed up on the player's end of the game, in that the military advisor in the production screen rarely reccomends building anything but settlers, and usually makes no reccomendation at all. An interesting quirk of this was that the AI could build the Temple equivalent, which had a prerequisite of NO.

    In any case, what can I do to remedy the problem? I spent weeks working on the scenario, and a week trying to alleviate this situation. If someone wants a copy of the scenario at hand, I'll email it to you.


    Thanks, all.

  • #2
    A few sugestions

    -Are the units roles set correctly?
    -Are the units affordable?
    -Have you tried setting the AI's personality to aggressive militaristic?

    BTW, what's the scenario about?
    'Arguing with anonymous strangers on the internet is a sucker's game because they almost always turn out to be - or to be indistinguishable from - self-righteous sixteen year olds possessing infinite amounts of free time.'
    - Neal Stephenson, Cryptonomicon

    Comment


    • #3
      the AI won't produce a unit if.....

      The unit is an attack unit and the attack and defense is lower than another attack unit or the unit is a defense unit and the defense and attack are lower than another defense unit.

      If a unit is just "cheap" the AI wont build it.

      Worse comes to worst use events to make new units appear every few turns.

      Comment


      • #4
        does these units' movement => 2 ?

        IA won't build "osbolete powers" land 2 pts movement units
        ex:
        Unit1 att 5 def 3
        unit2 att 5 def 2
        unit3 att 3 def 4
        only unit1 and 3 will be build
        ...
        but i also have some "corrects" units IA won't build.... but when i change the slots, IA finally build it.

        Comment


        • #5
          I suggest you read the Advanced Scenario Design document by Leon Marrick. It's a must for every serious scenario maker...
          (view online here)
          If you want to download the document, don't use the download links mentioned in that page (they're broken), but go to the guides section first and download from there.

          Sections 2a and 5e will be the most interesting for this issue (although most ideas are already mentioned in this thread).
          Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)

          Comment


          • #6
            I had already read the scenario creation tips, and the problem does not seem to lie in anything listed there.

            The only units that can be created at the start by most civs are:

            0/0/1, 1hp, 1fp, cost 30, Role: Settle (In Settler slot)
            2/2/1, 1hp, 1fp, cost 20, Role: Defend (In Warrior slot)
            3/1/1, 1hp, 1fp, cost 20, Role: Attack (In Archer slot, I might have said Phalanx earlier, but that was before I redid the rules.txt. The problem existed either way).

            The only improvement that can be initially constructed (For most civs) is the Temple equivalent, at a cost of 30, and a prereq of nil.

            Yes, all of the units can be constructed, and yes, they work properly. When played on the human end, nothing seems wrong except for the failure of the military advisor to have his own popup box (Most of the time).

            The prereq/expire techs for the last two units (The ones the computer rarely builds) are both nil/nil. The settler unit has a prereq of nil, and an expiration of 'C', which is a no-no tech given to one civilization at start (Who instead has the unit in the Engineer slot). One civilization has a sea unit with a prereq of a tech whose prereq is a no-no. These civilizations behave no differently than the others, in that they rarely build anything except for improvement or settling units.

            I am using Fantastic Worlds, pretty much as-shipped.
            Any ideas, anybody?


            P.S., to the person who asked about the subject of the scenario: It is based on the online game Sanctum, an online ccg. Take a look at http://sanctum.nioga.net .

            Comment


            • #7
              To clarify on the Musketeer/Knight issue... I have both units made inaccessible (Prereqs of NO), although I did make them backstory-relevent, as barbarian-only units.

              Comment


              • #8
                This rule applies only to computer players and only to ground units.
                If a better unit, in that same unit usage category (attack, defense, settle, etc.) is available then the computer player determines which units meeting all of these conditions to build, from among those you think it will, by looking only at attack and defense figures. Nothing else matters. A few examples (note that "5a/1d" means an attack of five and a defense of one) should make this clear:
                • 5a/1d and 4a/1d: Only the first is built. It does not matter how much you want the AI to build the second, or what extra capacities you grant either unit. You may only get the second to be built by setting either unit (or both) to air or sea, making the units' purposes different, or giving either unit (or both) a movement of one.
                • 2a/1d and 2a/2d: Only the second is built.
                • 5a/1d, 4a/2d, 3a/3d: works the same as 12a/1d, 3a/2d, and 1a/11d: all three are built, as those units with lower attacks (it does not matter how much lower) have better defenses (it does not matter how much better).
                • 6a/2d, 7a/2d, and 7a/1d: Only the middle unit is built, because it has the defense of the first without the poor attack, and the attack of the third without the poor defense.

                Comment


                • #9
                  do you still have the problem if u give 0 att, 0 def to the "musketeer" and "knight" units... just try

                  Comment


                  • #10
                    Originally posted by Eyn
                    do you still have the problem if u give 0 att, 0 def to the "musketeer" and "knight" units... just try
                    The "musketeer" and "knight" unit slot problem obsoletes the unit and makes it unbuildable. Since the unit can be build, it therefore must be the Att/Def issue.

                    Comment

                    Working...
                    X