[MOD] More Naval AI

I do have some changes to AI religion selection coming with the next update that will hopefully improve overall AI religion choice.

I was going to ask about that. Good to hear that you are going to take a look at improvements.

One quick question, how does a civ have Royal Guards, Knights and Shadowriders all at the same time? Shouldn't civics, alignment and religion choices prevent that from happening?
 
One quick question, how does a civ have Royal Guards, Knights and Shadowriders all at the same time? Shouldn't civics, alignment and religion choices prevent that from happening?

Royal Guards require Aristocracy, Knights have no civic or religious requirements, and Shadowriders require Council of Esus.
 
I discovered that the AI didn't have any code for using or even moving HN units, so I set them up to cancel HN and use their units normally until I get a chance to try and create some code for that.

That's strange, since the AI seemed to use Privateers effectively in vanilla FFH (pillaging along the coastlines, attacking lone boats, and even a blockade here and there), though most of my memories of this date from before the Wild Mana AI merge, so it may be that they are no longer able to do so. Anyway, looking forward the issue being solved, since I find Privateers to be an important part of naval warfare in FFH.

you're probably right that the high cost of the Hunting tech is resulting in FoL getting pushed back to a second tier religion behind RoK and OO.

Actually, I found it very strange that OO never was founded in that game, and I played it for quite some time (badly planned Altar victory around turn 500). It may have to be because most of the civs didn't have any access to the sea (again, Barbarian World / No Settlers options), but the Luchuirp, who actually did research naval techs at some point to work their water tiles (fishes and whales), ended up founding... FOL and Empyrean. Maybe they have strong weights against OO.
 
That's strange, since the AI seemed to use Privateers effectively in vanilla FFH (pillaging along the coastlines, attacking lone boats, and even a blockade here and there), though most of my memories of this date from before the Wild Mana AI merge, so it may be that they are no longer able to do so. Anyway, looking forward the issue being solved, since I find Privateers to be an important part of naval warfare in FFH.

Movement for Naval units and Land units are handled in different functions. If there was some working Naval HN code, then it got cut early on when I tore out the old Naval logic to replace it with the code from Better AI. I'll go back and look at that old code and see if I can salvage anything.
 
TXT_KEY_MISC_SHIFT_ALT_PREPARE_WAR is the TXT_KEY that is visible when I scroll over the score display. Only the civs that I am not at war with have it.
 
I don't want to sound annoying, but this is either this mod, or another? Why not doing it as a modmod for one of the main mods?
I'm a purist ;)

On complete seriousness I suppose it could be a good thing that there are multiple AI floating around, and I think additional content of the modmod just makes AI setting for one simply unsuitable for another.
 
Oh, something I wanted to report earlier but forgot: it seems snow and tundra don't turn to Hell Terrain, even though their ressources are converted to the Infernal version (i.e. I've seen Sheut Stone take place of Marble in a snowy area). I don't remember if that was also the case in base FFH though, since apparently the AI did not like to summon the Infernal.

Also, Barbarian land does seem to stop Hell Terrain too, are Barbarians supposed to be Neutral?
 
Version 1.5 released (compatible with previous saves)

Changes with this update:
  • Revamp of the way the AI chooses religions (this should stop religion flipping once and for all, though this function is still a work in progress)
  • Adjustments as to when AI will use various worldspells (Religious Fervor, River of Blood, Raging Seas, Warcry, Rally, Gifts of Nantasoula)
  • Created basic AI for using Arena Battle and Blaze
  • Created basic AI for using Wane and settling Shades
  • Created basic AI for the Add to Flesh Golem spell
  • AI will now occasionally summon Floating Eyes
  • Changes to the AI calculations for producing Mages and Priests units
  • AI now gives extra value to producing units that match the leader's favorite unitcombat type
  • Added a catch for terraforming units that are upgraded to non-terraforming units so they'll be given a more useful AI type (mainly affects Priest of Leaves upgraded to Paladins)
  • AI now values the Fear promotion when choosing upgrades
  • Various tweaks in how units are assigned Groupflags
  • Lunatics require Octopus Overlords to be present in the city they're being built in (fixes Barbarians from making Lunatics)
  • Bug Fix: Removed invalid text key that would sometimes show up when mousing over the scoreboard
  • Bug Fix: Summoned units now get default AI for their unit type
  • Bug Fix: Disabled code that would cause Volcanoes to spawn in Hell terrain
  • Bug fix: Infernals will no longer try to terraform Hell terrain
  • Bug Fix: Updated text for Tower of Necromancy and Bane Divine (translations via Babelfish)
  • Debug: Groupflags now displayed for units when in Debug mode
 
Oh, something I wanted to report earlier but forgot: it seems snow and tundra don't turn to Hell Terrain, even though their ressources are converted to the Infernal version (i.e. I've seen Sheut Stone take place of Marble in a snowy area). I don't remember if that was also the case in base FFH though, since apparently the AI did not like to summon the Infernal.

Also, Barbarian land does seem to stop Hell Terrain too, are Barbarians supposed to be Neutral?

In base FfH, Hell does spread to snow and tundra, but the terrain doesn't change because there's no hell version of those types of terrain. As you've noticed, though, regular resources will change to their hellish versions, which is how you know that hell is spreading. Also, any forests you might still have on snow or tundra will get destroyed when hell spreads there -- I've had that happen to me when I've played as as the Illians, so I had to replace my now destroyed lumbermills with a new improvement.
 
Great mod man. It really improves FFH2 to be more challenging, but I think I found a pretty nasty bug.

This turn the Council of Esus was found in a distant land and then when I go to end turn, crash. Around this same time maybe a turn or two before, my adaptive trait kicked in (may also be a cause). To recreate the crash have the workers do something, build a market when prompted, and then end turn.

I've attached the save. Given my start, I should have been the Launn instead of Grigori.
 

Attachments

  • Grigori 7 Crash.CivBeyondSwordSave
    196.4 KB · Views: 107
Great mod man. It really improves FFH2 to be more challenging, but I think I found a pretty nasty bug.

This turn the Council of Esus was found in a distant land and then when I go to end turn, crash

Thanks for your kind words and the savegame! I believe that I've found what was causing the crash. Try replacing the DLL with the one I'm attaching to this message and let me know how it goes.
 
Thanks for the quick reply. I used the DLL to replace the one in the Fall from Heaven 2 Assets folders and it worked. What was the bug? Was it related to religion or the adaptive trait?

I just remembered one other bug, it's alot smaller though, in 1.4 I was able to get Orthus' Axe in one game and I was unable to attack multiple times with it. I thought it was a typo on the axe so I got a unit with blitz as well. Still couldn't. Unfortunately I don't have a save with this one.
 
Thanks for the quick reply. I used the DLL to replace the one in the Fall from Heaven 2 Assets folders and it worked. What was the bug? Was it related to religion or the adaptive trait?

It was related to the Council of Esus. Part of the new code I put in for valuing religions includes checking on whether or not their heroes have already been built. Since Council of Esus only has one hero, one of the checks was failing. I'm not sure why this didn't result in a crash in every game, especially since Empyrean also only has one hero. But I'm glad that I was able to track it down.

I just remembered one other bug, it's alot smaller though, in 1.4 I was able to get Orthus' Axe in one game and I was unable to attack multiple times with it. I thought it was a typo on the axe so I got a unit with blitz as well. Still couldn't. Unfortunately I don't have a save with this one.

It takes a movement point to attack. So if your unit only has 1 move, he still only gets one attack. I just tested the Axe with a Knight and I was able to attack multiple times.
 
It takes a movement point to attack. So if your unit only has 1 move, he still only gets one attack. I just tested the Axe with a Knight and I was able to attack multiple times.

I was able to find the save (it was in a different folder for some reason) and test it out. You're right. I thought I had taken mobility I on the axe holder, but apparently not.
 
Version 1.51 released (compatible with previous saves) - download link

Changes with this update:
  • Bug Fix: Fix for a crash bug introduced with the last update
  • Bug Fix: Religion percentages now display correctly on the Victory screen
  • AI: Terraformers will now cast Spring on Oases
  • AI: AI won't explore lairs before turn 10
 
Top Bottom