FfH2 AI Issues Thread

Notque, are the changes you've implemented all in xml/python?

I'd like to have a go at a very similar thing as you've done for a personal/with friends mod I have for FF.
 
Yes. If you download the minor leaders mod, it's all CvGameUtils.py

Just ignore the Minor leaders which should be very obvious. I started doing per leader tech trees with rands. It should be all obvious stuff.

The scout part is in what units you can build above the tech section.

I've changed my mind about not building any scouts for the AI. Probably will change it to only build a scout if they have none to limit it.

You can customize it however you see fit.
 
Appreciate the assistance, Notque. Only reason I don't play Minor Leaders is because it isn't out for FFurther yet. :D
 
I don't know how exactly the AI works with events, but I've noticed the AI has been pretty dumb with the harpy event where you can get a free Great Artist for 15 turns of resistance in your capital. There have been a few times I've seen a civ shut down it's capital when it's their only city or their strongest city with God King and it cripples them quite a bit.
 
Yes I also had it. For a human player it's quite clear what to do with it, but the ai settles him instead of using him for a great work which ends the unrest immediately. It's quite strange because the AI otherwise almost never settles great persons.
 
I have a situation with the AI. The issue boils down to how it handles land that is inaccessible to other land. There are mountains that totally wall off part of a peninsula, the AI Balseraph have conquered two cities there. These cities are near mine (we're at war) in terms of tiles, but are totally inaccessible by land. The AI has over 100 troops in the closest city, and seems to just be building them over and over there, with no intent of, you know, loading them into a bunch of ships and rolling through me like a hot knife through butter.

The save is pretty big, but I can upload if that would help.
 
Common water problem. I'm trying to implement a fix in my mod, although it's a dll change, and I was trying to avoid those.
 
Common water problem. I'm trying to implement a fix in my mod, although it's a dll change, and I was trying to avoid those.
I'd prefer you make keep as much of the AI in the dll as possible, much faster. And if you post your changes (maybe just the snippet that improves it) in for example the modders guide, it can make it into the main mod.
 
Part of what is odd, btw, is that there are nowhere near enough hammers near that city to build all of the troops. So, the AI is loading troops into ships, bringing them into the city, and then leaving them there.

Must be a helluva city, tho: mimcs, diseased corpses, the whole lot.
 
I have a situation with the AI. The issue boils down to how it handles land that is inaccessible to other land. There are mountains that totally wall off part of a peninsula, the AI Balseraph have conquered two cities there. These cities are near mine (we're at war) in terms of tiles, but are totally inaccessible by land. The AI has over 100 troops in the closest city, and seems to just be building them over and over there, with no intent of, you know, loading them into a bunch of ships and rolling through me like a hot knife through butter.

That's a vanilla problem. The AI doesn't understand that it needs to load the troops into ships to reach the city behind the mountains, since the cities are on the same continent as the AI's the invasion force. The BetterAI team fixed that.
 
That's a vanilla problem. The AI doesn't understand that it needs to load the troops into ships to reach the city behind the mountains, since the cities are on the same continent as the AI's the invasion force. The BetterAI team fixed that.

I'm currently merging the betterai code into my fall from heaven modmod.
 
AI quick fixes: I think these changes would help AI a little and are probably not too difficult to implement (though, I'm not a programmer).

1. Build more catapults, keep at least 1 in every city, don't attack until enemy's stack is adjacent. Catapults are the great equilizers.
2. Emphasize wonders (and wonder techs). possibly in cities with good hammers. In prince difficulty i routinely build every single wonder. On monarch, more or less the same even though a few AIs don't fall behind too much in tech until very late.
3. Better tech choice. Emphasize government civic granting civics.
4. AI can only build road+nodes on mana containing plots. Can't build anything else there after it has built a node. Builds one of the "stackable" mana types most of the time.
 
AI quick fixes..

Firstly, this made me wonder.. Are some of the AI tricks tied to difficulty levels? I would think all the bonuses would be enough to differentiate between levels. Because making the AI deliberately dumb can give new players a false impression about the quality of the mod!

Points 1 to 3. The AI already does all that, more or less. The catapults do a pre-emptive strike which is better since many armies have two movement. AI actually already spends too much resources on wonders (I myself don't get many built on Immortal), all those hammers would be better spent on military units. All but one (guilds) of the good civics are early and AI gets them very efficiently. The quick fix for you is to up the difficulty level, trust me, it gives a much better gaming experience.

So stop underestimating yourself. Being a Prince is of course nice, you get all the girls and wine you want, but it quickly gets boring since your every whim is easily satisfied.

However, if you would be the Emperor, you would get all that and the added responsibility of running the nations internal and external affairs. Which translates into the exhilariting feeling of power over everything! And besides, every non-psychopath knows beating up a bully makes you feel much better than beating up a weakling.

Point 4. Cannot figure out if that was a suggestion or a complaint. AI is very good at connecting and upgrading mana nodes.
 
Firstly, this made me wonder.. Are some of the AI tricks tied to difficulty levels?

No .
 
I don't know if this has been reported before. I've noticed that well into the late game there will still be unexplored dungeons and unique features in AI territory. It seems to me it would make more sense for the AI to explore these for whatever potential benefits it might obtain. It's kind of weird sending expeditions into AI lands to explore dungeons or unique features that are 1 or 2 tiles away from AI cities.
 
The AI weights for Education, Code of Laws and maybe Cartography should be greatly increased due to their great value. For Education, my weights are currently set to:

<Flavor>
<FlavorType>FLAVOR_GOLD</FlavorType>
<iFlavor>60</iFlavor>
</Flavor>
<Flavor>
<FlavorType>FLAVOR_PRODUCTION</FlavorType>
<iFlavor>10</iFlavor>
</Flavor>
<Flavor>
<FlavorType>FLAVOR_MILITARY</FlavorType>
<iFlavor>60</iFlavor>
</Flavor>
<Flavor>
<FlavorType>FLAVOR_CULTURE</FlavorType>
<iFlavor>20</iFlavor>
</Flavor>
<Flavor>
<FlavorType>FLAVOR_GROWTH</FlavorType>
<iFlavor>50</iFlavor>
</Flavor>
<Flavor>
<FlavorType>FLAVOR_SCIENCE</FlavorType>
<iFlavor>40</iFlavor>
</Flavor>
 
I don't know if this has been reported before. I've noticed that well into the late game there will still be unexplored dungeons and unique features in AI territory. It seems to me it would make more sense for the AI to explore these for whatever potential benefits it might obtain. It's kind of weird sending expeditions into AI lands to explore dungeons or unique features that are 1 or 2 tiles away from AI cities.
Agreed. AI explorers need to be programmed to seek out certain features and explore them, with maybe some specific code for certain things to make sure they're sensible (e.g. don't explore epic dungeons near your territory if you don't have adequate defenses!).
 
FF AI does have that feature. It doesn't work perfect yet, but it works pretty well already.
 
Oh, and increase the weights for Agriculture, too.
 
Top Bottom