[MOD] More Naval AI

ErebusContinent (with default settings) does not seem to be a favorable map for naval warfare: what is the point going around a continent when there is always a path by land? ErebusContinent with default settings, does not have the pockets and bottlenecks like on Erebus (and is much more difficult), and there is no real incentive for the AI creating/maintaining/using a naval force, except for recon and meeting new civs...

Unfortunately, the mod author made some changes to the mapscript a while back to make it so the landmasses were more interconnected because the Naval AI was non-existent in FFH. If you want some islands, set water level to high and cohesion to low.


Just out of curiosity: i wonder how you do for having the AI autoplaying...
Do you mean there is no human player and you can see, like in a "God" mod, everything happening on the map?
I would love to do this sometimes for testing some "what if..." scenarii, and autoreplay some maps I played for learning from the AI...

Yep. First step is to go into your civ4.ini file and set cheat code to "chipotle"

Then, once you're in-game you can hit CTRL-z to expose the whole map and show what the AI is researching. You can also hold down various combinations of CTRL/ALT/SHIFT while mousing over tiles, units or players in the score table to get more info.

To have the AI play itself, once you're ingame, press SHIFT-~
This should bring up a command window that says something about Python (if there is no text in the window, hit SHIFT-~ to close it and try again). Then type the following:

CyGame().setAIAutoPlay(xx)

where xx should be replaced by the number of turns you want the AI to autoplay. You can scroll around the map (slowly) and see what's happening while the AI is playing, but you can't interact with any cities, players or units.
 
Priceless !!

And it works...

for information, instructions are designed for US keyboard.
By instance, in my Portuguese layout keyboard, Shift + ~ is actually Shift + Ç
But, at the opposite, the text [CyGame().setAIAutoPlay(xx)] must by typed exactly as said, not according to the keyboard (in Port keyboard, it would do: CyGame*(.setAIAutoplay*100( for 100 turns. You must play around on your keyboard for typing the exact instruction CyGame().setAIAutoPlay(xx)

I am going to watch now a Civ 4/FFH movie for a while ...

to [to xp]Gekko : I will definitely try this setting!
 
I tried your mod in my latest games and, while it seems the AI effectively got improved (I even got invaded by sea courtesy of Falamar), I ran into some strange bugs.

First, I see in the "known bugs" list that the barbarians sometimes spawn Freaks and Lightbringers, and I've effectively seen them in the endgame. But I've also seen Monks and Grigori Medics (and a Shadow, but it could have been an HN unit from Tasunke, I didn't check in WB)... do you have an idea where these might come from?

Second, I saw Valledia building stacks of Soldiers and Kilmorph who could easily have captured the poorly defended barbarian town near her borders, but she just kept camping near that city with Bambur and some Kilmorph guys... even though she could have overrun them in seconds. When she DOWd me later in the game (which took me completely by surprise since she was at Pleased, but she probably saw my poorly defended cities as a way to extend her kingdom), I thought I was done for, but I managed to turn the tables with just a stack of a few crusaders, the three Stooges and Valin... since she just made her stacks of mages and paramander roam her lands instead of rushing them through my borders. What's the point in building so many units if you don't even use them correctly?

Third, I spread Order in Galveholm, which was already affected by the Kilmorph plague (but Os-Gabella didn't switch to Kilmorph, which is a huge improvemend over base FFH). I tried to convert her, but the option simply wasn't there. Not even redded out. The same deal happened with Falamar later.

Fourth, I was able to build Abashi in captured Galveholm (playing as Ethne), and Guybrush in a Lanun town. I thought Tolerant didn't let you build other civ's heroes?

Fifth (this is a question, not a bug report), Jonas adopted FoL early in the game (which I founded), then founded AV, but did not convert. Were his religious weights changed somehow?

Anyway, despite the bugs, these were probably the best FFH games I had in a while, so thank you for your mod :)
 
Also throwing a bit here. I'm not confident about it, but I don't think the werewolf hero guy's mechanic works (even when I killed more than ~20 units using the werewolf hero, no ravid werewolf unit was generated).
 
Also throwing a bit here. I'm not confident about it, but I don't think the werewolf hero guy's mechanic works (even when I killed more than ~20 units using the werewolf hero, no ravid werewolf unit was generated).

Worked fine in my game. Are you sure you were attacking living units? Fighting constructs (golems, etc), machines (catapaults, etc), undead, demons, or angels will not spawn ravenous werewolves. Also, if the stack you were attacking had a lot of stronger units defending, your ravenous werewolves may have attacked and died immediately after being created, without your noticing.
 
First, I see in the "known bugs" list that the barbarians sometimes spawn Freaks and Lightbringers, and I've effectively seen them in the endgame. But I've also seen Monks and Grigori Medics (and a Shadow, but it could have been an HN unit from Tasunke, I didn't check in WB)... do you have an idea where these might come from?

Unfortunately, this one has stymied me when I tried to fix it in the past. It is relatively minor issue, but I find it an annoyance (especially since it's a bug I introduced!), so I'll move it to the top of my bug fix list and give it another shot (though not in the next release)


Second, I saw Valledia building stacks of Soldiers and Kilmorph who could easily have captured the poorly defended barbarian town near her borders, but she just kept camping near that city with Bambur and some Kilmorph guys...

... since she just made her stacks of mages and paramander roam her lands instead of rushing them through my borders. What's the point in building so many units if you don't even use them correctly?

This seems to happen occasionally with stacks flagged with the Barbsmasher AI. Do you happen to have a save game where I can take a look at the aimless troops?


Third, I spread Order in Galveholm, which was already affected by the Kilmorph plague (but Os-Gabella didn't switch to Kilmorph, which is a huge improvemend over base FFH). I tried to convert her, but the option simply wasn't there. Not even redded out. The same deal happened with Falamar later.

Interesting. I didn't intentionally touch anything regarding diplomacy options, but maybe it's a by-product of some other changes. I'll make a note to take a look at that.

Fourth, I was able to build Abashi in captured Galveholm (playing as Ethne), and Guybrush in a Lanun town. I thought Tolerant didn't let you build other civ's heroes?

Does base FFH behave the same way or is this another bug of mine?

Fifth (this is a question, not a bug report), Jonas adopted FoL early in the game (which I founded), then founded AV, but did not convert. Were his religious weights changed somehow?

AI religious choice was altered to be more dynamic. So even though a leader might have a preference towards a certain religion, they won't automatically adopt it every time.

Anyway, despite the bugs, these were probably the best FFH games I had in a while, so thank you for your mod :)

Glad to hear that you enjoy the mod! I very much appreciate the feedback, so don't be afraid to keep it coming!
 
Also throwing a bit here. I'm not confident about it, but I don't think the werewolf hero guy's mechanic works (even when I killed more than ~20 units using the werewolf hero, no ravid werewolf unit was generated).

Worked fine in my game. Are you sure you were attacking living units? Fighting constructs (golems, etc), machines (catapaults, etc), undead, demons, or angels will not spawn ravenous werewolves. Also, if the stack you were attacking had a lot of stronger units defending, your ravenous werewolves may have attacked and died immediately after being created, without your noticing.

I just ran a test and it seems to be working properly. If none of the situations Clearbeard outlines fit what you're seeing, please provide a save game and I'll look into it. Thanks!
 
Does base FFH behave the same way or is this another bug of mine?

Description for the Tolerant trait mentions that "you will not be able to build other civs' heroes", so I assumed it would be the case (though ironically, I won that game thanks to Abashi...). But it has been a while since I last played the Elohim and I usually don't go military with them, so I wouldn't know if the bug could come from base FFH...

Sadly I don't have an available save for the Amurite war, but if the bug ever comes again I'll be sure to keep one.
 
Version 1.3 released (compatible with previous saves)

  • Fix for Adventurers not gaining experience
  • Adventurers can upgrade to Grigori Medics
  • Fix for a Python error when Orthus is created
  • Improvements to AI civic choices (based on Better AI and Denev's mod)
  • Fix for some ships having too much defense
  • Fix for AI building too many ships
  • Minor fix to AI_Missionary move to keep the AI from using their first Disciple unit to create a Great Work rather than establishing a religion
  • Update to the AI's computation of it's religious victory status (checks that religious victory is turned on and also checks the XML for what percentage the victory is set to)
  • Minor tweaks to AI city production
  • Heroes less likely to attack at low odds
 
Fix for AI building too many ships

As it is "More Naval AI" mod, was not it normal to have AI building more ships?
Actually, I did not notice in my games with this mod that the AI built too many ships, but rather did not used/promoted them accordingly to the map (emphasis on transport, or raiders, or trade blockers... or sea domination, or exploration)
Do you mean: "too many ships "... of a certain kind, i.e., not directly useful to sea invasion (ex.: building caravels rather than Galleons when at war and in need of transports ?

p.s.: link on 1st page still talks about v 1.2: Download link (v1.2)
 
As it is "More Naval AI" mod, was not it normal to have AI building more ships?

There was a spot in the code where the AI would get stuck in a sort of loop. For example, the AI would count how many ships it has with the ESCORT_SEA AI. If it didn't have enough, then it would queue up a ship build. However, sometimes it would decide to switch the AI of the new ship to RESERVE after it was built, resulting in the next count showing that it still needed ESCORT_SEA ships, rinse, repeat.

Now I have the AI including the number of ships set to AI_RESERVE when counting its fleet.


p.s.: link on 1st page still talks about v 1.2: Download link (v1.2)

Thanks! I'll fix that now.
 
[*]Improvements to AI civic choices (based on Better AI and Denev's mod)

Does that mean Cassiel will stop switching to Religion as soon as he can and that we can see something else than Conquest in the AI economy? If that's the case, you have my eternal thanks.
 
Does that mean Cassiel will stop switching to Religion as soon as he can and that we can see something else than Conquest in the AI economy? If that's the case, you have my eternal thanks.

There will definitely be some variety. I discovered that the AIweights in the XML were set to overly high values, resulting in nearly every civ adopting the same civics. I set most of the AIweights to 0 and incorporated some new code to help the AI decide what civics it should adopt. It's one of those areas that will always be a work in progress (now the AI doesn't like Infernal Pact for some reason), but hopefully it's already an improvement.
 
I am playing my first game of the mod with the Erebus Continent mapscript. It's the most fun I've had with FfH in a long time.
 
any chance that this may be, in any way, compatible with Tweakmod? or made compatible without running massive amounts of file diffs? i've tried out all the major modmods (Orbis, RiFE, Wildmana) and really don't like any of them, but i do like some of the changes. now, if i could just have AI using actual navy + tweakmod changes, then i think i'd be a happy camper :)
 
I am playing my first game of the mod with the Erebus Continent mapscript. It's the most fun I've had with FfH in a long time.

Excellent! I'd love to hear about your game when you're done.

any chance that this may be, in any way, compatible with Tweakmod? or made compatible without running massive amounts of file diffs? i've tried out all the major modmods (Orbis, RiFE, Wildmana) and really don't like any of them, but i do like some of the changes. now, if i could just have AI using actual navy + tweakmod changes, then i think i'd be a happy camper :)

Since Tweakmod is all Python and XML it could probably be done. It would take some work though. And yes, you would need to diff all the Python and XML files.
 
Top Bottom