[MOD] More Naval AI

Not that I know of. What happens when you try to load a scenario? Is it any scenario of just certain ones that are giving you trouble.
Whenever I try to load any of them, it says "failure to read...", with {...} being the path to the sav.
If they're working for you I'll assume that I must have screwed something up when I installed the patch...see if reinstalling fixes it.
 
Most modmods break scenarios, especially the major ones. I would be much more surprised if unmodded scenarios worked with this mod than the other way around.
 
Huh, I tried loading them "as administrator" and they worked. I did get some python exceptions but nothing that seems to impact gameplay.
 
How long can we expect to wait for the next update?

I just solved my issue with that UnitUtils error (there were typos in the default unit of two unitclasses), and am wondering whether I should be getting my mod ready for release or continuing to play-test and maybe add a couple new things while I wait for the next More Naval AI in order to include its improvements.
 
Ok. Thanks for all the work you've done so far. I'll probably release the next version of my mod before you do.


Right now the main thing I'm trying to figure out is the Revolution system. I would certainly like to make it so that the Tower of Complacency and Unyielding Order will stop and prevent any revolts, at least in the cities where they are built/cast.

I'm also thinking that I should probably use the revolt system (when that game option is turned on) instead of just randomly setting an occupation timer in cities were specific religions are causing problems. These would be The Empyrean for the Calabim civilization, The Children of the One (Luonnotar) for any civilization with a state religion, The White Hand for any civilization at war with Auric Ulvin after the completion of The Draw ritual, and The Cult of the Dragon for any civilization that does not have a dragon (either controlling one of the dragon units or being led by Cardith Lorda).

How would I go about making such changes?


Also, did we ever figure out how to make the tech screen not move the tech's names when selected.


Should I be getting the diplomatic malus for kicking out another player's ambassadors when the embassy was only cancelled because she declared war on me?


Can python be used to force right of passage agreements and embassies between players? I'd like those to be granted automatically between the Infernals and their summoner, and as well as to have council resolutions that force them between members.
 
Good questions! Let's see what I can answer.

Right now the main thing I'm trying to figure out is the Revolution system. I would certainly like to make it so that the Tower of Complacency and Unyielding Order will stop and prevent any revolts, at least in the cities where they are built/cast.

Dont know about stopping revolts entirely. You'd probably have to dig into the Revolutions code for that. But you can add an effect for the building using the XML tag iRevIdxLocal. Set it to a negative number to have it help quell revolutions.


I'm also thinking that I should probably use the revolt system (when that game option is turned on) instead of just randomly setting an occupation timer in cities were specific religions are causing problems. These would be The Empyrean for the Calabim civilization, The Children of the One (Luonnotar) for any civilization with a state religion, The White Hand for any civilization at war with Auric Ulvin after the completion of The Draw ritual, and The Cult of the Dragon for any civilization that does not have a dragon (either controlling one of the dragon units or being led by Cardith Lorda).

How would I go about making such changes?

Seems like that should be doable but I dont really know how. I looked in the DLL to see if there were functions for changing the Rev index for cities but couldnt find it. Maybe it's done in python?

Also, did we ever figure out how to make the tech screen not move the tech's names when selected.

Yep. Just a one-line python change. You can see the fix here

Should I be getting the diplomatic malus for kicking out another player's ambassadors when the embassy was only cancelled because she declared war on me?

Probably not. I'll add it to my bugfix list.

Can python be used to force right of passage agreements and embassies between players? I'd like those to be granted automatically between the Infernals and their summoner, and as well as to have council resolutions that force them between members.

I would think so, though I'm not entirely sure how. Here's the line of code from the DLL that sets up the Rights of Passage. Looks like it's not exposed to python though. I'll expose the function with the next release.

Code:
GET_TEAM(GET_PLAYER(eFromPlayer).getTeam()).setLimitedBorders(((TeamTypes)(GET_PLAYER(eToPlayer).getTeam())), true);

Embassies should be already doable from python.

Code:
 void CvTeam::setHasEmbassy(TeamTypes eIndex, bool bNewValue)
 
Hopefully this isn't just a "mod" discussion area... was the most relevant section I could find for the query I have... I'm not a programmer, so don't understand all the COBOL and FORTRAN talk above... (just kidding if anybody really remembers that stuff).

Anyway, my question is based on naval blockading. For most of the game I'm in, I've been down to two AI civs left (France and Russia). Been working to defeat the French, and noticed the Russians were isolated to one area of a continent... so I proceeded to box them in for easier defeating later by placing ships and subs in a straight line from top of map to a section they couldn't travel through (my territories with no open border treaty in place). Anyway, I was noticing they started creating more troops, many being embarking land units. No biggie, they stayed behind my 'iron curtain' until suddenly... not all items, but seems to be just the embarked anti-aircraft guns can travel through the blockade. First I thought they were just travelling over top of my subs, so started boxing the wayward units with ships. So far, I've been boxing them with DOUBLE LINES of ships, and they still pass straight through... is this a glitch that others have noticed later in the game as it's progressed? I just find it odd that these anti-air gunners can go willfully wherever they wish, yet their submarines are still nestled tightly within my continental blockade.

Realize there is a lot to this, I have a tendency to ramble.. :) .. enjoy the story at any rate.. :)
 
Did you remove getReligionWeightModifier from CvLeaderHeadInfo? My PythonErr.log file kept having problems with the code Kael used to stop AIs from researching inappropriate religions. I just saw that your mod lacks that code, so I assume that you just moved such AI decisions from python to C++ and felt no need to leave that function exposed to python. Those errors went away when I commended out those lines. The log still inexplicably starts every game with "Can't find type enum for type tag CIVILIZATION_MINOR" though, not that you could tell there was anything wrong from within the game.


Revolutions does seem to be handled in python. RevBuildingUtils.py is what adds up the iRevIdxLocal values of buildings and puts their names in lists based on whether they make a revolution more or less likely. I don't completely understand all the other python files yet.


For now I set Unyielding Order and The Tower of Complacency to have a iRevIdxLocal of -100. I could easily mod it so that with either of those buildings makes RevBuildingUtils.py ignore any negative buildings, but I'm not so sure how to make them negate other contributors to revolutions. For now I'll just assume that -100 is sufficiently large to offset them.


I'm a bit concerned about RevCivicUtils, as it seems to be referencing the civics of vanilla civ. It does not have anything like gc.getInfoTypeForString('CIVIC_COMMUNISM') but does have def isCommunism( iPlayer ) : and if( kCivic.isCommunism() and pPlayer.isCivic(i) ) :. I wonder how well this works with FfH's civics.


Since having an occupation timer is a major contributing factor to revolts, I'll probably be fine leaving those religion with occupation timers at least until I understand Revolutions more fully. Plus, the presence of any non state religions contributes to revolts anyway.


I can see how to tell it what civs to use in the case of religious revolts in RebelTypes.py. Telling it to make White Hand rebels Illian or Doviello, Children of the One rebels Grigori, and Cult of the Dragon rebels Kuriotates or Sheaim seems easy enough. I'm not quite sure yet if BlockedReligiousRebels[iReligion] is to prevent the new rebel civ of being of certain civilization types or to prevent religious rebellions from happening against those civs. Actually, I'm not sure it does anything, as it seems all other references to it outside of this file are commented out.


Why is the Calabim civilization in RebelTypes.py defined along with the minor leaders instead of with all the other civilizations? I'm thinking that is a mistake.



Thanks for the Embassy python code. I don't think I really need the python for right of passage agreements. I did have it set up to grant open borders, and would rather keep it that way, but think that this was not working with the advanced diplomacy game option because embassies are prerequisites for open borders. I haven't tested it yet, but suspect that using python to establish an embassy first may solve this.
 
Did you remove getReligionWeightModifier from CvLeaderHeadInfo?

It's still there. Turns out I accidentally removed its python link when removing some other unused code. I'll add it the link back in.

but does have def isCommunism( iPlayer )

isCommunism is for an XML tag for Civics from Revolutions. It's not currently being used in FFH, but I decided to leave the code for it in place for potential modding use. Not sure what effect it will have, but if you want to test it out, just set the bCommunism tag to 1 for a civic.
 
Is it possible to change Hut (tech option) from a free tech to +X beakers?

(in the XML/Python only, that is)
 
The embassy python code does not seem to work. It gives causes an AttributeError: 'CyTeam' object has no attribute 'setHasEmbassy'

I notice that the code you supplied says CvTeam instead of CyTeam. Can you use CvTeam in python?
 
Is it possible to change Hut (tech option) from a free tech to +X beakers?

(in the XML/Python only, that is)

No idea.

The embassy python code does not seem to work. It gives causes an AttributeError: 'CyTeam' object has no attribute 'setHasEmbassy'

I notice that the code you supplied says CvTeam instead of CyTeam. Can you use CvTeam in python?

My bad. I'll expose that call with the next release.
 
A couple things I'm noticing off hand: Barbarians are building/spawning religious units, specifically Thanes of Kilmorph.

If my understanding that Barbarians are set not to adopt religions, they shouldn't be able to have Thanes at all, as a Temple of Kilmorph are required to build the Thanes.

Tech screen issue: Text on techs selected for research seems to misalign to the left, about two tech icons to the left of where it should be.
 
Barbarians are unaffected by Stasis. I had a Scout poking around a Barbarian city with two Archers (one 3/5, the other 2/4). The next turn a third Archer appeared.
 
When i go into the city screen, the building panel on the left is blank. The regular mouseover still works; so it's not that crippling, but it's mildly annoying.
 
I thought unit gifting was disabled, yet Arendel Phaedra proposed a tech trade involving my trireme.
 
Revolutions are kind of hurting the AI.

Many still go towards middle game techs without education making them too depend of the commerce resources available.

Spamming in wars low tier disciple units has to stop.

Too many buildings still. What's the point of smokehouse when enough health, low happy cap and no whipping?

When going builder and turtle mode they can neglect defense and stay with warriors for too long. One needs a certain minimal military power at each stage of the game even during peace with everybody pleased (everyone is a backstabber in this game).


Btw, why has the alchemy lab been moved to sorcery?

Are you going to balance out the spells or will they all stay like they are?


P.S.: Total random question now: Is it possible to code somehow and make Charadon gain the insane trait after losing peace with the barbarians? I would like to know about that, it would be fun and I think it would work.
 
Back
Top Bottom