Announcement

Collapse
No announcement yet.

Let's fix the weak leaders

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

  • Let's fix the weak leaders

    Over the last few days I've been digging around in the Civ4LeaderHeadInfos.xml file and compiling lists showing the differences in the AI between the various Civ4 leaders. It's been pretty interesting, and most of my findings are listed towards the bottom of this thread..

    I started noticing that some of the leaders who seem to rarely do well when the AI is playing them have some values that are pretty far from the average for other civilizations.

    For instance, Napoleon has the highest chance to build a unit of all the leaders (40%). There is another value that determines how large another civ's military has to be relative to your own to discourage you from attacking. Napoleon has one of the highest for nearby civilizations (120%) and THE highest (well, tied with Isabella) value for distant civilizations (100%, and this is usually in the 40-60% range). I have a strong feeling this is why Napoleon usually ends up last on the leaderboards - he spends a disproportionate amount of time building military and then starts wars with distant nations that are as strong as himself.

    Tokugawa is another leader that seems to founder when played by the AI, and this is odd because he has a very strong combination of traits and is the only Aggressive leader who has a really strong offensive UU. I was very interested in seeing what his hidden traits were. Aside from his well-known reluctance to trade technology, I found that his UnitAIWeightModifier (a variable that I think influences what kind of units the AI builds) is set to UNITAI_CITY_DEFENSE. He is the only leader with this value. If I am interpreting this correctly, this means that Tokugawa is made so that he tends to build units useful for city defense. None of the other Aggressive leaders are weighted towards building defensive units - these are the UnitAIWeightModifiers that they use...

    UNITAI_COUNTER,
    UNITAI_ATTACK
    UNITAI_ATTACK_CITY
    UNITAI_CITY_COUNTER
    UNITAI_PILLAGE

    It stands to reason that Tokugawa could be made far more formidable and make better use of his traits if he had one of these other UnitAIWeightModifiers.

    I've made backups for my .xml and I'm ready to start doing some ghetto-modding, but I was wanting some input before I started digging in. Here are my questions for anyone who'd care to answer them.

    1. Which leaders, in your experience, tend to perform poorly when played by the AI, and what do you think the reasons are (i.e. being too aggressive, failing to develop cities, etc.)?

    2. Which leaders, in your experience, tend to perform best when played by the AI, and in what way do these leaders excel (i.e. Mansa Musa always wins the space race, Catherine kicks a lot of ass)?

    3. What leader traits do you think are strongest? What would be the best combination of traits?

    The last question is for a side-project. When I'm done making the weaker leaders perform better, I'd like to see how good of a leader I could make using what I've learned, even if they are overpowered. I might even use one of the trait combos that's not in the game, like Industrious/Creative, if I think I can tailor the leader to make the best use of those traits.

  • #2
    Ind/Cre is in the game (Louis XIV). You're thinking of Ind/Phi and Org/Cre.
    Participating in my threads is mandatory. Those who do not do so will be forced, in their next game, to play a power directly between Catherine and Montezuma.

    Comment


    • #3
      He should have a bigger military then everyone else though because he builds so many units, so few civilizations would have as big a military (assuming they started in equally good spots) so he would go for a weaker military before he went for a stronger one. Meaning he could easially dominate other civilizations.

      Comment


      • #4
        Originally posted by Qwertqwert
        He should have a bigger military then everyone else though because he builds so many units, so few civilizations would have as big a military (assuming they started in equally good spots) so he would go for a weaker military before he went for a stronger one. Meaning he could easially dominate other civilizations.
        I think lowering the size of enemies that Napoleon will take on would help him. He does build a lot of units, but he also will attack enemies that have even more than him (up to 120% for civs near him, 100% for civs far from him). I think this leads him to attack too soon, and fight too many unsuccessful battles - not too realistic for Napoleon, who was a strong believer in bringing more than enough troops to the battle.

        I'm going to reduce Napoleon's threshold for opponent force to 100% for near (pretty average), 80% for far (which is still high, but takes into account Napoleon's propensity for getting involved in foreign wars). I'll play my next few games with Napoleon as one of the opponents and see if he does better before, if it's not a signficant enough improvement I will lower his chance to build units so he develops more.

        As to Tokugawa, I think making him a little more likely to trade techs would help him a lot - I know he was isolationist, but he IS the only leader for Japan, and Japan has a history of adopting foreign technologies, which is hard to do in Civ if you don't trade techs. I think his preferred civic of Mercantilism is enough to distinguish him from less isolationistic leaders. I'm also going to change his UnitAIWeightModifier, but I need to figure out which class Samurai fall into - I think they are either UNITAI_COUNTER, UNITAI_ATTACK, or UNITAI_CITY_COUNTER. I'm at work right now so I can't check, but is this value listed in the unit info?

        Comment


        • #5
          Being the Swordsman UU replacement I'd think it's UNITAI_CITY_COUNTER, but don't depend on me... I'm at work too.

          Tom P.

          Comment


          • #6
            Originally posted by padillah
            Being the Swordsman UU replacement I'd think it's UNITAI_CITY_COUNTER, but don't depend on me... I'm at work too.

            Tom P.
            Actually, the Samurai is the replacement for the Maceman, which may make it UNITAI_COUNTER, since Macemen are a good counter for melee units and not specific to cities. I forgot to check when I was home last night so I still don't know.

            Comment


            • #7
              Over the weekend I made my first version of the modified Civ4LeaderheadInfos.xml file, but I'm going to update it further before posting it here. My Tokugawa changes seem useful, Napoleon probably could use more work.

              I made Tokugawa slightly more likely to trade technologies, and gave him a preference for UNITAI_COUNTER units, which I verified as the class for Samurai. In 2.5 test games, Tokugawa stayed in the top half of an 8 civ game, and seemed to do well at expanding his territory.

              With Napoleon I decreased the maximum size of a neighbor he would attack from 120 to 100 (so he'll build up his army more before attacking), and gave him a preference for UNITAI_ATTACK units, which is what Musketeers fall under. He did not seem to do any better in my test games than he did before, never staying in the top 4 for long at all. He needs more work.

              Comment


              • #8
                I think I may not have had a big enough sample to appreciate the benefits to Napoleon. I played a few more games over the weekend, and Napoleon dominated in two of them. I think my AI changes are working out pretty well with those two. Unfortunately, my internet access from home is down so I won't be able to post the modified Civ4LeaderHeadInfos.xml file for a couple of more days. I think in the meantime I'm going to work on some other 'weak' civs, if anybody can suggest any.

                I think Montezuma needs some work. He's an annoyance, but he rarely is a contender later in the game. Part of it may be because he never builds wonders, I may increase his chances to do so a little bit (from 0 to 10 percent). I don't really want to mess with his crazy propensity to declare war because that adds a lot to his character, but I need some ideas to make him stronger despite this. Any suggestions?

                Comment


                • #9
                  I did some poking around in the units file (forgot the name of it, but it's the big .XML in the Assets/XML/Units), and saw that most units have multiple unit_ai values, I'm not sure why I missed that before. I am not sure now how the UnitAIWeightModifier value in the Civ4LeaderHeadInfos.xml file works any more. I thought at first that each unit would have a single UNIT_AI value and that the reference to these in the Civ4LeaderHeadInfos.xml file would make the AI build more units with that UNIT_AI value, but now that I'm seeing that most units have multiple UNIT_AIs, I think maybe it just determines how the AI uses the units it builds. Either way, the changes I made have had a big effect on the effectiveness of Tokugawa and Napoleon, but I'm not sure why or how.

                  Is there anybody who can explain what exactly that value does? Anybody able to get hold of the developers and ask them for me? This would really help my AI modding efforts. Thanks.

                  Comment


                  • #10
                    I did some experimentation with Montezuma, and I think it paid off very well...possibly too well.

                    The change I made that I wasn't sure about was adding a third flavor to his leaderhead file. He was Military 5, Gold 2, which means his building and research emphasis was on military related buildings and technologies, with economy related improvements and technologies as a secondary focus. I figured that Montezuma should try and build more religious buildings, since he IS a Spiritual leader, so I added the flavor of Religion 2. This makes him the first AI leader to have three flavors, and I was afraid it might cause some glitches, but it didn't.

                    The other changes I made were increasing his BuildWonderRand from 0 to 10. He was the only leader with it at 0 and I thought the fact that he seems to never build wonders might be holding him back in the mid and late game. This worked well, Montezuma beat me to the Pyramids and the Parthenon in my test game, which I think helped him a lot. I also changed his favorite civic to Theocracy. I think this goes well with his Spiritual trait and fits the historical figure better than Police State, which is a rather late civic and not very useful. The last change I made was reducing the power ratio of neighbors he'd go to war with from 130 to 110. He'll still go after neighbors bigger than him, but he'll build up his army a bit more before committing.

                    All these changes worked as planned in my first test game. I made a Tiny pangaea map with two Montezumas. I played at Warlord because I was a bit afraid of taking on two Montys at Noble, especially with several changes that could make him more powerful, and I wanted to observe him through all eras.

                    Both Montezumas were effective builders, though one did a lot better than the other, probably because of having more free space to expand into. One of them researched Buddhism on turn 6, and though I was able to snag Polytheism I was actually beaten to Judaism even though I deviated from it's beeline by only one early tech (Animal Husbandry). I found this impressive on Warlord vs. Catherine, who is usually one of the better non-spiritual leaders for early religion grabs.

                    There were no wars until medieval times. I didn't expect them to attack me because I was out-teching them pretty severely (this WAS Warlord), but I was surprised that there were no wars between them until I started one. The big Monty declared on me and attacked with some very highly promoted units - he had been using Theocracy+Barracks+Aggressive very effectively. Even though I had a tech advantage and was playing on an easy difficulty, I had to sweat it a bit to hold him off, and he slowed me down a lot when I tried to take the battle to him, only being able to hold one city before war exhaustion made me bow out. When I got Free Religion the one I didn't fight was no longer Annoyed with me for being a heathen, and I was able to make friends with him and get him to fight the other Monty.

                    I was really impressed with the more religious character of Montezuma and how it worked out. They founded all but three religions (I got Polytheism, Confucianism, and Taoism), and used missionaries to spread them. I'm going to try him again on harder difficulties, and I think he's going to be a real challenge.

                    I think my internet at home might be up tonight, so I may be able to upload the updated AI file so others can try this out. I'd be especially interested in getting the input of players who play at higher difficulty levels - I rarely play anything above Noble and have trouble competing with the AI on Prince, I'd like to see how tough these updated leaders are against people used to the higher difficulties.

                    Comment


                    • #11
                      I think that the organized trait needs to go. I only pick that trait for my enemies if I want an easy game.
                      ModCastNewest Episode!
                      Beyond the Sword: Road to War Art Development

                      Second Revolution 3.0 Creator

                      Comment


                      • #12
                        I'm having a hard time pinning consistent winners/losers down. And I think it may alot to do with Diplomacy rather than traits.

                        For example: Catherine often "seems" to turn on her long-time allies just as they are declining probably because she places high values on other players' behavior towards her friends/enemies, and by late game religion and, for her, civic diplomacy bonuses have been eliminated. (Her fave civic is Hereditary Rule.)

                        Also, Gandhi does well on space races possibly because he never holds a "grudge." You can slight him diplomatically however often you want, and he forgets quickly (especially if you stop trading with him). This probably keeps him from initiating ill-fated late game wars due to "diplomatic residue."
                        "The human race would have perished long ago if its preservation had depended only on the reasoning of its members." - Rousseau
                        "Vorwärts immer, rückwärts nimmer!" - Erich Honecker
                        "If one has good arms, one will always have good friends." - Machiavelli

                        Comment


                        • #13
                          I'm having a hard time pinning consistent winners/losers down. And I think it may have alot to do with diplomacy rather than traits.

                          For example: Catherine often "seems" to turn on her long-time allies just as they are declining probably because she places high values on other players' behavior towards her friends/enemies, and by late game religion and, for her, civic diplomacy bonuses have been eliminated. (Her fave civic is Hereditary Rule.)

                          Also, Gandhi does well on space races possibly because he never holds a "grudge." You can slight him diplomatically however often you want, and he forgets quickly (especially if you stop trading with him). This probably keeps him from initiating ill-fated late game wars due to "diplomatic residue."
                          "The human race would have perished long ago if its preservation had depended only on the reasoning of its members." - Rousseau
                          "Vorwärts immer, rückwärts nimmer!" - Erich Honecker
                          "If one has good arms, one will always have good friends." - Machiavelli

                          Comment


                          • #14
                            I've been playing with my modified file for some time now, and Montezuma is almost always a contender the entire game and frequently founds a religion. I'm quite happy with Montezuma's new flavor.

                            Tokugawa seems to do better than before, though he still seems to never trade techs. He still languishes in the bottom of the scoreboard sometimes, but sometimes he does really well, though he never seems to make it to the top of the heap.

                            Napoleon is still not doing very well, but I've fought a few tough wars with him where he invaded with Musketeers, which is an improvement.

                            I'm turning my eye towards Genghis now. He expands very fast but tends to have a lot of weak cities and never does very well.

                            Comment


                            • #15
                              I like the idea of balancing out some of the really weak players kile Boney, but I wouldn't go too far modifying leaders like Monty, Genghis, and Ceasar. They tend to start the game in a blaze of glory, and this is has important effect on the other civs around them. If you reduce their propensity for crazy wars, everyone else rest a little easier while they build up their infrastructure.

                              Some of the hardest games I've played are where all the warmongers end up on one continent with me, and the peaceniks all go on building on the other continent. By the time I've cleaned up my continent, the other civs may be an entire Era ahead of me in tech, and have an infrastructure that dwarfs mine. It makes the late game an interesting catch-up contest.

                              Imagine how differently you'd play if you knew all the players around you were rational-builder types. Your initial warrior might be all the military you need

                              So while Monty may not win a lot of games, he's important. Oh, and if he does win a few wars and takes over a continent of his own, watch out...

                              Comment

                              Working...
                              X