FfH2 AI Mod (Highly Experimental!)

Maybe combine this with the better economic mod?

I know that covers the aristocracy economy.
 
Here you go.

It's a worldbuilder save, as the actual save games aren't binary-compatible (a couple of extra XML fields). Just select Varn at the menu screen and it should be exactly the same setup as the ones I posted.

I ran it with only my (updated) version of the mod and a merge of both(cut out my religion founding stuff, but pasted in the rest).

The results are interesting and scores are quite similar to your game:

My mod only (I disabled Acheron as he can totally kill AI dynamics without your fix):

Scores:
Spoiler :
Civ4ScreenShot0272.jpg


Demographics:
Spoiler :
Civ4ScreenShot0275.jpg


Combined mod:
Spoiler :
Civ4ScreenShot0276.jpg


Spoiler :
Civ4ScreenShot0274.jpg


Curiously the Kuriotates AI performs best without your improvements to it.
And even more curiously Sheelba manages to become one of the best researchers in the combined game.

I must say that I prefer my religious code to yours. In the combined game with your religious code Varn founded Runes of Kilmorph early, spent a lot of effort spreading it and researchign Arete only to switch immediately to Empyrean once he founded it.
This lead to lots of wasted hammers and happiness problems until Empyrean gained a wider spread.

Another issue that came to mind is that the Lanun AI never uses fishing boats to build pirate coves. Any idea how to fix that?
There was also a problem with settling on an island. It appeared that the AI wanted to settle on the top left island on the mana resource spot, but couldn't once it landed its troops. The troops and settler stood on the island without settling for 30+ turns. Maybe something in the city founding code is wonky?
 
I did some tests with some testing with my own tweaks... I noticed how bad the Bronze Working beeline is :lol: But I also wonder why on earth would the Bannor lower their research slider to 20-30% even though they can run at 100% without deficit... any idea?
 
Curiously the Kuriotates AI performs best without your improvements to it.
And even more curiously Sheelba manages to become one of the best researchers in the combined game.
Well, a lot of the game is random, so I'd take the performance of the individual civs with a bit of a pinch of salt. I've noticed the Clan often tend to be one of the stronger civs with my mod, though, and Sheelba's organised trait helps make up for the research penalty somewhat. The Kuriotates did badly in my game because Charadon invaded relatively early on and took two of their cities (including the capital). If they can get up and running (all five cities + worldspell), they can be pretty powerful.

I must say that I prefer my religious code to yours. In the combined game with your religious code Varn founded Runes of Kilmorph early, spent a lot of effort spreading it and researchign Arete only to switch immediately to Empyrean once he founded it.
This lead to lots of wasted hammers and happiness problems until Empyrean gained a wider spread.
Agreed on 'early Runes' (and sometimes FoL) issue. This seems to be quite common with Varn and also the Bannor and Elohim leaders. Possibly they should hold off on researching another religion while their favoured religion is still available. They sometimes manage to nick it from under Kandros' nose, too, which is slightly unflavourful.

Another issue that came to mind is that the Lanun AI never uses fishing boats to build pirate coves. Any idea how to fix that?
Will put it on my list. Without looking at the code, I think the most likely reason is that the AI only builds fishing boats if it has sea resources that need improving, so there would need to be a special case for the Lanun.


There was also a problem with settling on an island. It appeared that the AI wanted to settle on the top left island on the mana resource spot, but couldn't once it landed its troops. The troops and settler stood on the island without settling for 30+ turns. Maybe something in the city founding code is wonky?
The AI should know that it can't found on mana and not consider it as a city site. Maybe this needs double-checking...

EDIT 2: I've found the issue. There is code in the DLL to prevent a settler unit from founding a city on a mana square, but the AI still considers them valid when it's calculating its best city sites (there's no special condition, nothing in the XML, etc.). I'm surprised this doesn't cause more problems.

I'll run the game with the latest version of my mod later to see how things go.

EDIT:

They probably run a goldrush enabling civic.

Read as 'goldfish-enabling civic'. Gave me a laugh, anyway.
 
Latest version causes error in tech trading screen after someone enables gold trading. I tested save whit older .dll and there wasn´t any problems, did you edit code that affects AI_maxGoldTrade function because error mesage pointed to line 856 in CvExoticForeignAdvisor?
attachment.php
 

Attachments

  • Civ4ScreenShot0000.JPG
    Civ4ScreenShot0000.JPG
    67.3 KB · Views: 420
Damnit. That's what I get for messing with compiler options, I suppose, though I could have sworn I re-enabled RTTI.

I'll post a fixed DLL as soon as I get the chance. In the meantime, if you have a CodeBlocks or Visual C++ set up, recompiling it should solve the problem.

EDIT: New DLL uploaded. It seems to work, fingers crossed.
 
I know this is probably easier said than done, but any chance of teaching the AI to persue victory conditions? I just beat an immortal game where Garrim got corn, gold and Yggdrasil in his capital and finished the tech tree in 340 turns, but he never bothered doing anything with that tech rate. No towers, no great prophets, no rampage across his continent, and lol culture victories in FFH.
 
It could probably be taught to pursue the Altar in a similar way to how it currently pursues culture victories, with it gradually increasing its great prophet output the closer it is to winning. The Tower probably won't be possible until it has some idea how to use mages (which is on the list, but will probably take a while to implement).

The AI will already attempt to pursue a domination victoriy if it gets a big enough share of land/population, but it's rare for it to get into a position where it would trigger this, especially as the a civ like the Luchuirp.
 
i just tested the recent version (0.0.2b) and had the impression that the AI did use first strike a lot. a lot as in "no other promotions".
 
I haven't touched promotions yet, and Turinturambar's shot of the combined mod shows units with all sorts of promotions on the units in Varn's city. His changes don't touch anything to do with promotions, either. :confused:
 
Does this work with FF 0.50, with the unoficcial patch?
 
No, sorry. It's base FfH only (FF has a different DLL). You can try Sephi's mod, but that makes gameplay changes, too.

On an unrelated note, any Khazad experts here? I've got the AI to stop throwing all its money away but need some advice on how the AI should actually play them. In particular:

- At what point do you expand?

- At what point do you start aiming for the higher vaults and the production bonuses?

v0.3 out soon, since I'm reasonably happy with economy stuff now. v0.4 will be all about fighting, promotions and mages. :D
 
A barebones outline to playing the Khazad might be:

Don't expand unless running either city states or aristocracy.
Expand as normal when running either civic.
If expansion reduces vaults below Stocked, run 0% science until they're stocked.
Change goal from stocked to abundant once both taxation and sanitation come in.
 
How did you do the money saving bit?
First, I have a Python call to determine the amount of money they want to aim to have in the vault. Then the excess amount of gold (on top of the amount they need for the vault) is calculated and used to determine whether they can hurry units/buildings, how much they can spend on upgrades and how much they're willing to trade to other players. (Note: Most of this is in the DLL.)

Monkeyfinger said:
A barebones outline to playing the Khazad might be:

Don't expand unless running either city states or aristocracy.
Expand as normal when running either civic.
If expansion reduces vaults below Stocked, run 0% science until they're stocked.
Change goal from stocked to abundant once both taxation and sanitation come in.
:goodjob:

Question on the first bit, at what point would you research Cartography (or CoL)? After getting basic worker techs, they're currently beelining Way of the Earthmother and getting Arete not that long after. I'm thinking a forced beeline for Cartography at some point is necessary if they're ever going to expand under these rules.

I'll put something together and see if they improve.
 
No, sorry. It's base FfH only (FF has a different DLL). You can try Sephi's mod, but that makes gameplay changes, too.

On an unrelated note, any Khazad experts here? I've got the AI to stop throwing all its money away but need some advice on how the AI should actually play them. In particular:

- At what point do you expand?

- At what point do you start aiming for the higher vaults and the production bonuses?

v0.3 out soon, since I'm reasonably happy with economy stuff now. v0.4 will be all about fighting, promotions and mages. :D

I'm very happy with the way the Khazad perform in the early game in my mod. They will beeline festivals early giving them access to the market building. This usually leads to an early great merchant, which the AI uses for a trade mission, letting them tech nicely at a gold surplus of 1k+.
 
Question on the first bit, at what point would you research Cartography (or CoL)? After getting basic worker techs, they're currently beelining Way of the Earthmother and getting Arete not that long after. I'm thinking a forced beeline for Cartography at some point is necessary if they're ever going to expand under these rules.

Earthmother might be an acceptable alternative to cartography/aristocracy. I forgot about that because I never go RoK when I play them. A Trade mission probably would be too. Just make sure it goes for either cartography or CoL soon after founding RoK or bombing its merchant. (Actually it would need cartography very shortly after festivals, because no cartography = no open borders = no juicy rival capitals to send the merchant to.)
 
I'm very happy with the way the Khazad perform in the early game in my mod. They will beeline festivals early giving them access to the market building. This usually leads to an early great merchant, which the AI uses for a trade mission, letting them tech nicely at a gold surplus of 1k+.
Have you changed how they expand, or is it just the same as with the other civs? I've been experimenting with different setups and the main problem I find is getting the balance right there. If they expand too quickly, they end up with empty vaults. If they expand too slowly, they get boxed in by rivals, and the AI isn't good enough at picking starting locations to stay competitive with just one city for long.
 
It's the same as with other civs. Before festivals they are limited to 1 settler at a time. After festivals the restriction on settlers is lifted, since each city can easily generate 6 gold from market+merchant slot. Until they get access to goldrushing they generally run on stocked/abundant vaults with this expand scheme.
 
Back
Top Bottom