[MOD] More Naval AI

Hey Wraith367, why are your civilizations are password protected? A friend and i wanted to try your game, but we could not play your civ.

I have to say that more naval ai is very stable and we didnt get oos until i brought Hyborem into the world and chose to play him and invaded a city. Since then we got an oos every 3 or 4 turns.
Is it because i play Hyborem or can it be that the Balseraph (now played by the comp) are the cause. I remember to have read the Balseraph are causing trouble in Multiplayer games.

After all more naval ai is a really good mod! Thank you very very much! I love the aggressive behaviour of the ai since the beginning of the game and that its possible to play multiplayer. Thank you! :)
 
To remove OOS play without Kuriotates.

You'll still get OOS when Hyborem captures cities, but those can be solved by saving and rehosting. Just annoying that you have to do it every time he captures a city.
 
This should do nothing in your modmod, if you followed my advice here .

There is a mistake in the code is that major leaders are checked that way, but minor leaders are not. I'll try to fix that now.

updated RevCivUtils. I think the problems are solved.

Magister: I think you have to change CvRevInterface as described in the post I linked. After ALL leaders are chosen, the puppet states C++ code (probably) chooses a duplicate leader, but in a mod with about 70 leaders and 50 allowed players I think this problem can be neglected for now.

I did so yesterday, and merged my RevCivUtils.py with the new one you posted. (I included everything you had changed from the More Naval AI version on which mine was based, but kept my changes like blocking checking for religious weightings of -100 instead of just the agnostic trait, blocking most new civs from having religious rebellions for the new religions, etc.)

Today it doesn't seem like rebellions as working as well. In my current game as Auric Ulvin of he Illians, the first city to rebel did so under Tethira of the Bannor instead of an Illian minor leader. (I had been trying to get Riuros/Dumannios/Anagantios to form in order to test some changes to the code that causes the named priest units to switch sides and become their avatar.) It didn't even have any Bannor culture, not any religion but The Hand. (I was unhappy enough with that to go back and load the most recent autosave and prevent the rebellion.) The next rebellion events didn't really seem to go anywhere. I got some warnings but no followups for a long time. Eventually I got a python exception. I forgot to write down what all it said before going back loading an autosave, but I recall that it said there was something out of the bounds of a list around line 110 of RevCivUtils.py. When I loaded the autosave I was able to play at least 3 turns past that without incident. After the Bannor/Mercurian alliance and their Kuriotates vassal declared war on me, one of my cities (a captured barbarian one bordering the Kuriotates but far from the Bannor) tried to rebel and form Tethira of the Bannor again.

I'm thinking this indicates an issue either with your code or with your suggestion to change iSplitType = RevCivUtils.SPLIT_PUPPET to iSplitType = RevCivUtils.SPLIT_FORCED, as the Illian minor leaders were being chosen just fine before those changes.

Edit: I don't think if it is relevant, but just in case I thought I'd remind you that in my modmod I added all the minor leaders as possible leaders of the dummy CIVILIZATION_RANDOM. When the Unrestricted Leaders option is used, that allows players to choose to start as a minor leader. Otherwise, the game seems to treat them the same as RANDOM_GOOD, RANDOM_NEUTRAL, and RANDOM_EVIL, ignoring everything but the leader's alignment and replacing them with a leaders of the same alignment.


Edit2: This is completely unrelated, but I don't suppose I could convince Tholal (or anyone working with him on the DLL) to add a new tag to promotions to allow units to move through impassible terrain, could I?

I'd really like to let Dwarven and/or Runes units (including civilians like workers and great persons) purchase a promotion they lets them move through peaks, but I really do not want them to have flat movement costs or the ability to cross water like the bFlying tag grants.
 
The civilizations are not password protected (or the password is blank, just hit enter when it asks for one). The game posted has neither Kuriotates or Hyborem in it, and reloading or rejoining after an oos happens just makes one happen the next turn.
 
To remove OOS play without Kuriotates.

You'll still get OOS when Hyborem captures cities, but those can be solved by saving and rehosting. Just annoying that you have to do it every time he captures a city.

Thank you very much! No OOS since 40 turns. I just destroy the enemy cities and found new ones if i need more of them. :)
 
Tholal, could I make a balance suggestion? Have Mask, the Esus/recon spell for hidden nationality, only be castable in your own or neutral territory. Or perhaps make the Empyrean priest spell add a temporary promotion which blocks the use of mask after it removes hidden nationality from a unit. At the moment, even if you managed to unmask a shadow, there's nothing stopping them from casting mask again on their next turn and attacking you, or from just waltzing through your territory unmasked, then attacking you once they reach their target.

I disagree. Shadows are powerful, expensive late game units, but the counters are in place and fairly strong. The AI isn't that good at countering them, but you shouldn't have too much trouble, especially if you're Empyrean (and have its holy city). They can be irritating, but generally not lethal. And if they're waltzing through your territory and killing your units, but you know who sent them, well, that's an act of war and you should respond accordingly!
 
The civilizations are not password protected (or the password is blank, just hit enter when it asks for one). The game posted has neither Kuriotates or Hyborem in it, and reloading or rejoining after an oos happens just makes one happen the next turn.

Have you all cleared your cache lately? Also, make sure none of you have made any small but unnoticed mods to the game that might not come into conflict until late in the game. In my experience, pretty much all of the consistent (i.e. every stinking turn) OOS problems can be traced to one of these two things.
 
Okay after a few defeats I finally got a couple games going but both crashed late game, turn 414 (normal speed, huge map) and my next game at turn 370 (normal speed, large map).

I could not get them to go past either turn reloading from autosave. Games prior without More Naval AI didn't have a problem. I really like this mod and would rather play with than without so any suggestions?
 
IIRC, the thing that causes OOS when Infernals conquer a city is because AV gets spread to the city AFTER the popup asking to keep/raze.

it used to be BEFORE, but this meant that Infernals razing a city would ALWAYS lower the AC which was pretty lame.

I guess Tholal could include an optional file in the download to revert this change for the MP crowd.

Kurios OOS is most likely caused by their third ring of workable tiles.
 
Today it doesn't seem like rebellions as working as well. In my current game as Auric Ulvin of he Illians, the first city to rebel did so under Tethira of the Bannor instead of an Illian minor leader. (I had been trying to get Riuros/Dumannios/Anagantios to form in order to test some changes to the code that causes the named priest units to switch sides and become their avatar.) It didn't even have any Bannor culture, not any religion but The Hand. (I was unhappy enough with that to go back and load the most recent autosave and prevent the rebellion.)
Some revolt types do not necessarily cause splinter civs to form. In Revolution.py you can find some occurences of "SPLIT_ALLOWED". That means splinter civs get a bonus, but also other civs, that fit to the terrain/religion may be chosen. But I the bannor have no such bonus, except an positive alignment to the order.
You may change the occurences of SPLIT_ALLOWED to SPLIT_FORCED in Revolution.py.
The next rebellion events didn't really seem to go anywhere. I got some warnings but no followups for a long time. Eventually I got a python exception. I forgot to write down what all it said before going back loading an autosave, but I recall that it said there was something out of the bounds of a list around line 110 of RevCivUtils.py.
I have fixed the bug causing the exception.
When I loaded the autosave I was able to play at least 3 turns past that without incident. After the Bannor/Mercurian alliance and their Kuriotates vassal declared war on me, one of my cities (a captured barbarian one bordering the Kuriotates but far from the Bannor) tried to rebel and form Tethira of the Bannor again.
I tested all split types with the new code and they work fine for me. Could you please send me a savegame and python log next time you encounter anything strange? I'm afraid I currently have no time for extensive tests.
 

Attachments

I disagree. Shadows are powerful, expensive late game units, but the counters are in place and fairly strong. The AI isn't that good at countering them, but you shouldn't have too much trouble, especially if you're Empyrean (and have its holy city). They can be irritating, but generally not lethal. And if they're waltzing through your territory and killing your units, but you know who sent them, well, that's an act of war and you should respond accordingly!

You disagree with what? And what are their counters, and what makes them strong? And when did I mention the AI? And what about when times when you can't declare war on someone because of forced peace?
 
[to_xp]Gekko;12043813 said:
IIRC, the thing that causes OOS when Infernals conquer a city is because AV gets spread to the city AFTER the popup asking to keep/raze.

it used to be BEFORE, but this meant that Infernals razing a city would ALWAYS lower the AC which was pretty lame.

I guess Tholal could include an optional file in the download to revert this change for the MP crowd.

Kurios OOS is most likely caused by their third ring of workable tiles.

Would it not work to allow the spread of AV to the city before the popup but just increase the amount that the AC is increased by when the Infernals raze an AV city?
 
Would it not be possible just to move the code that spreads AV from def onCityAcquired(self, argsList): to def onCityAcquiredAndKept(self, argsList):?


-----
Unrelated edit to avoid double posting:


I merged the changes from lfgr's latest version of RevCivUtils.py into my modmod, but have not yet had enough revolts to see how well it is working.

I did however just get that issue I complained about before, where I get a revolution event where a city asks for me to return it to another player with whom I am still at war. This time got a screenshot.

It pretty clearly seems to be TXT_KEY_REV_CULT_PEACE_JOIN. Personally I do not think that it should be possible to have a peaceful revolution that turns over a city to a player with whom you are at war, unless the option to accept their request helps end the war.

Edit2:
Later in the same game, I captured an Elohim city from Ethne the White and decided to liberate it as a puppet state. The puppet leader was also called Ethne the White. It is true that Thessalonica was already in the game (since the previous turn), but Einion Logos had never been present. I thought that changing iSplitType = RevCivUtils.SPLIT_PUPPET to iSplitType = RevCivUtils.SPLIT_FORCED was supposed to prevent things like this?

I'm thinking that just commenting out those two lines would probably serve my purpose better.


Edit3: Ok, I was pretty sure that it was Ethne already in the game, but maybe I was wrong. After changing iSplitType and commenting out those lines I loaded the last autosave and played from there. This time Thessalonica didn't splinter off, so I got her as my puppet, and I soon make peace with the original Elohim leader. I was still pretty sure that was Ethne, but a few turns later when my cities started trying to return to the Elohim I saw it was then Einion in charge. I was thinking maybe the AI had an event that changed the leader, but then I glanced at the screen shot again and saw it was already Einion there. I just tried opening one of my earliest saves from that game, and found that Einion was in charge long before we even went to war. Oops. Maybe I should go back to using iSplitType = RevCivUtils.SPLIT_FORCED.
 
Wraith367. Do you have kuriotes in the game?

When they are in the game there is always OOS. While it works fine for me if they are not.
 
something weird happened in MP yesterday: I was Lanun, switched to Hyborem and didn't OOS ( ! ) , and as hybo I was still able to build Sea Havens :D
 
[to_xp]Gekko;12046673 said:
something weird happened in MP yesterday: I was Lanun, switched to Hyborem and didn't OOS ( ! ) , and as hybo I was still able to build Sea Havens :D

:lol:

...

...

wait, MP and I wasn't invited? (sadface)

;)
 
it was just me and my girl :D

I've just taught my dad how to play as well.. thanx to his previous experience with Warlords 2 and 3 he should handle it just fine :D

besides, you're most likely way above our league :p
 
I think something ought to be done about the way that the AI values Rituals. Currently, it appears that an AI player will not consider working on a ritual while he is at war with anyone. In a recent game with an AI Auric Ulvin I found that he would focus on building units while at war even though he had a reasonably large army, but switch to constructing rituals as soon as I cheated and granted him peace with everyone. Most of the Illian rituals (and other rituals too, like Glory Everlasting, Bane Divine, and Blood of the Phoenix) are probably even more important while the player is at war. Considering that The Draw forces the Illians into permanent war, this AI behavior essentially makes Ascension impossible.


Can you make it so that certain units are allowed to upgrade outside borders? I have added a bunch of spells (with a python prereq to hide them when the unit can upgrade normally) for upgrading angels, Doviello units, etc., and am considering adding more to allow those Adventurers spawned in revolts to be able to upgrade before the rebels have actually gained a city in which to upgrade them. It seems like it would be a whole lot more convenient though if the DLL would allow them to upgrade without requiring such workarounds.
 
Back
Top Bottom