1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Unit and player AI difficulties

Discussion in 'Civ4 - Creation & Customization' started by Asjo, Nov 3, 2007.

  1. Asjo

    Asjo Warlord

    Jan 23, 2006
    I have made a scenario based on the concept that all civilizations should use their own special units. It's made on the largest size map (bigger than huge), with 18 civilizations. A few a quite advanced (Greeks have frigates (grenadiers disalbed), Romans have currency, a few have future tech), while some don't have siege, some no city defence, some no mining and other to sea transport. All technologies have been disabled.

    I have been experiencing a few problems with some things related to the AI:

    • Galleys do not unload cargo: I have put shallow water on most of the map to allow galleys to move around. First, I looked at the unit AI for longships in the Vikings mod for Warlords, which inspired me a lot in making the Vikings in my scenario. I added UNITAI_ATTACK_SEA to the galley as I thought this would make it more aggressive (used for attacking cities by unloading cargo), but I just found that the AI wouldn't use it for any transporting at all. I restored the old AI, but I found that galleys still were not used for transporting.

      In fact, one of the most exciting early-game situations is where the Romans make a surprise invasion attack at one of the two Viking islands (this one a scattered island group) with a fleet of galleys filled with praetorians, two catapults and a few longbowmen and one galleon escorting. The Romans can build galleons, but I imagined galleys, so they were the ones I used for this assault. The galley do approach the island as planned, even though the galleon, for some reason, goes somewhere else instead of escorting them. However, the galleys seem to complete ignore the fact that they have a lot of units for an invasion. In fact, they attack enemy ships even with the likelihood of losing the units they have as cargo. The go around pillaging fishing boats, but don't do anything else. In the end, they end up stuck by the shore for some reason.

      I'm worried, because the Spanish and a few smaller nations completely rely upon galleys, and they don't seem to use them for transporting either. I don't see the Vikings going off on any raids with galleys either - they just stay on their island.

    • Nations don't build their preferred units: First I thought some nations completely ignored their preferred units. It showed, though, that I had maybe just made too many of them, since when I put nations to war with each other, many nations started pumping their special units.

      However, some units were never built by their nations, even though I had done my best to remove alternatives without completely removing unit diversity. Persians had the choice between archers, swordsmen, spearmen, catapults and immortals. They could build elephants as well, but only if they got the elephant resource, and the only elephant resource on the map was in the hands of the Russians. Persians, however, never built a single immortal, even though I'm sure their have their use in some situations, if not only to have some quicker units. Why?

      Why the Zulus never built any impis was even less understandable - their only alternative was archers after I removed axemen.

      The Carthaginians don't build any numidian cavalry, but were instead massing pikemen and some archers like many other nations (well, most nations had spearmen instead of pikemen). They had the choice of swordsmen as well, I believe, no siege from what I recall.

      And why on earth would the Russians rather make pikemen and archers than war elephants? In fact, once they traded resources and got horses, they started making horse archers instead.

      How do I make the AI prefer building particular units without messing up the unit AI in battles and such?

    • Great people are not used in a desired manner: Too often, the AI saves up great people for a golden age, which is pretty useless with the way my scenario is constructed. I would love to see great generals used for giving experience to units either with the experience-adding building or by adjoining a unit. Would be great to see great artists being used for an aggressive culture takeover, like many artists in one city.

    • Sieges are not well-organized: It seems that the AI players without any siege units do not know how to properly plan a siege. They don't make very focused attacks and don't combine their units very well. The unit positioning isn't very clever either, often creating situations where they are outnumbered. The Japanese, for instance, attacked the Spanish with all their front samurais and captured a little scarcely defended Spanish city. However, even though they could see it coming a mile away, they left their capital, Tokyo, completely exposed.

    Some of the standard AI issues are present as well:

    • Wars do not last and big nations do not wage war on each other: The scenario starts out with some exciting wars to help shape things up. Despite playing with aggressive AI, wars end very quickly. Nations typically gang up on a few week nations instead of just going to war with each other. That makes for a very dull tactical scene in terms of warfare.

      Total war isn't really an option as it would end action fairly quickly with the long time it takes to build units (the scenario is in marathon speed, which is moderated to be even slower).

    • The AI players prefer technology even though they cannot tech: The one, luckily, ended up in my advantage. I finally made enough modifications to give all players plenty of gold, but if running at 100% technology, pretty much all players would have a deficit, however by adjusting it a little, they could make a profit again. That way gold never became an issue as the AI would never have too much or too little. I can be abused by a human player, though, who would be able to make as much as 3000 gold a turn with no technology.

      However, I was forced to use an entire day to moderate the map and adding gold everywhere because I was unable to stop the AI from trying to tech. It also means the game is handicapped in terms of culture. A few players can research culture, but don't do so because the prefer technology.

    I'm convinced that if I fix some of these things, in particular the problem with galleys, my scenario will be great fun to play. I already had fun having a go with the Vikings, with two surprise invasions, although the Romans actually never entered my land. The lack of unit diversity can make some situations annoying, but it was great fun being invaded by the Zulu impis as the Persians, where just a few archers to defend the cities would have made all the difference.
  2. Asjo

    Asjo Warlord

    Jan 23, 2006
    I found out what was wrong with the galleys. What a relief.

    The problem was that at the time I added all the galleys, the default AI for the galley was UNITAI_ATTACK_SEA, so all those units had that AI. I discovered that you can change this manually in the world editor, so it works fine now.

    Now I have another problem. The game crashes apparantly due to there being too much gold (with all the things I added to prevent AI players from running a huge deficit). When you use 'edit city' in the world editor, there is a field for 'gold'. It's the same number for any city you click. What does that field mean? When I reduced the number, the crash didn't happen.
  3. Mark_T

    Mark_T Chieftain

    Feb 6, 2008

    I'm toying with the AI, and how to get it to unload units. It won't do it, it seems. I searched and stumbled on this thread, and you said you got it working, may I ask how? What did you set the galley UNITAI to?

Share This Page