[MOD] More Naval AI

[to_xp]Gekko;12025722 said:
the only other thing needed for this project to reach perfection is the "avoid growth" buttons in the city screen MoM has. Tholal or Red Key please please please take a look at Master of Mana source code and add them to More Naval AI as well! :D

Since this is Tholal's mod he makes the decisions about new features. I'm just a minion :borg: that checks his Tracker page to pick something to work on when I get time. I haven't had much time lately, but I have a few weeks with no college or work soon.

P.S. Tholal could you close things on the Tracker that have been completed? plz k thx bai
 
Pretty sure the More Naval AI mod has the avoid growth button. In fact I am looking at it right now.
 
it's not the one I'm talking about :)

Master of Mana has two buttons ( for health and happiness ) on the top part of the city screen that automatically enable and disable avoid growth when the city is about the go over the cap.

makes managing a large empire a lot more convenient since you no longer have to constantly check your cities.
 
by the way. what happened to autocasting? it was added in FFH from Wild Mana back in patch 0.41 H, but it seems to no longer be present. did it get removed at some point? all that having to recast haste each and every turn REALLY detracts from the experience.
 
I had written


Any ideas? Essentially, I have Steam installed to a non-standard location (D:\yadda\yadda\) and I have CIV using the /ALTROOT to point to a specific directory, also on D:\, for it's file location.

Really want to try this mod, am fairly certain it's just an issue of put this folder here, put that folder there.

I just don't know where here and there may be ...

Where does your Steam install of Beyond the Sword put all of the default mods that shipped with it? If those work properly you should just be able to unpack this (or any other mod) into that mods directory and everything should work.
 
Anyone else had problems with games ending because a civ popped a lair or Bradeline's Well, spawning a strength 15 barbarian that then went on a world rampage? Me and my friends had to end 3 out our 7 games so far because of this. Can't really do anything early game and when it happens mid to late game, most of the AI civs are dead and it gets kind of stale.

*edit* I'm not sure if lairs give worse results now or if the AI is more happy popping them.
 
Anyone else had problems with games ending because a civ popped a lair or Bradeline's Well, spawning a strength 15 barbarian that then went on a world rampage? Me and my friends had to end 3 out our 7 games so far because of this. Can't really do anything early game and when it happens mid to late game, most of the AI civs are dead and it gets kind of stale.

*edit* I'm not sure if lairs give worse results now or if the AI is more happy popping them.


I play on harder difficulty so Ai starts with 2 settlers and more units, plus lately I've been using Full of Resources map script and giving everyone extra starting units and techs to avoid AI disability.
 
Anyone else had problems with games ending because a civ popped a lair or Bradeline's Well, spawning a strength 15 barbarian that then went on a world rampage? Me and my friends had to end 3 out our 7 games so far because of this. Can't really do anything early game and when it happens mid to late game, most of the AI civs are dead and it gets kind of stale.

*edit* I'm not sure if lairs give worse results now or if the AI is more happy popping them.

I remember it happen once actually. Orthus got really strong, and along with a wraith from a lair wiped 4 civs (including mine) in 50 turns until only the Clan was left.
It was kinda fun actually.
 
You may want to try an advanced start. This allows two or three cities at the start for everyone, and has ten turns of peace before resuming normal play. This will give the AI players better odds of staying in the game.
 
I'm not sure what event that is. If you can give me a screenshot of it or quote a bit of text I can try and track it down.

I didn't get a screenshot at the time, and haven't seen it happen again since.

I think the text I remember is from TXT_KEY_REV_CULT_VIOLENT, the code starting around line 2842 of Revolution.py, but I'm not sure.



Do you need to keep all of those Text files separate? Kael kept all of his TXT_KEYs in a single file (CIV4GameText_FFH2.xml) and I am keeping all of my changes in another (Magister_CIV4GameText_FFH2.xml). Your TXT_KEYs are spread out over 79 different files, many of which include only one or two TXT_KEYs. This makes it much more difficult to search for a specific bit of text. It also wastes time when I have to scroll through them all to find Magister_CIV4GameText_FFH2.xml in order to change something. Would you mind consolidating those files?



In my modmod there are problems that could arise from having doppelgangers of Auric, Basium, and other leaders that have avatar units. I've never really cared for things like having 3 Arendel Phaedras in the world at the same time either. It is fine if you want to leave the imposters in your modmod, but what would I have to do in order to make sure that revolution events never duplicate a leader?

When I was looking through the code the only place which I could tell was allowing duplicate leaders are the lines in bold, which I commented out. Is that enough to prevent duplicate leaders? Does eliminating them introduce any other problems?
Code:
# RevCivUtils.py
....

	def getLeaderList( self, iSplitType, iReligion ) :
		liResult = list()
		liResult.extend( self.liLeaders )

		liBadLeaders = list()

		for iLeader in self.liLeaders :
			# check if leader is used
			for iPlayer in xrange( gc.getMAX_CIV_PLAYERS() ) :
				if( iLeader == gc.getPlayer( iPlayer ).getLeaderType() ) :
					liResult.remove( iLeader )
					liBadLeaders.append( iLeader )
					break
			if not iLeader in liResult:
				continue
			if iReligion != -1:
				# check for agnostic leaders, and leaders unable to adopt the specific religion, in a religious revolution
				iAgnostic = CvUtil.findInfoTypeNum( gc.getTraitInfo, gc.getNumTraitInfos(), 'TRAIT_AGNOSTIC' )
				pLeader = gc.getLeaderHeadInfo(iLeader)
				if pLeader.hasTrait(iAgnostic) or pLeader.getReligionWeightModifier(iReligion) <= -100:
					liResult.remove( iLeader )
					liBadLeaders.append( iLeader )
					continue
[B]
##		if( iSplitType == SPLIT_PUPPET and len( liResult ) == 0 ) :
##			liResult = liBadLeaders[/B]

		return liResult

As usual, I'm wondering whether to try to release a new version of my modmod sooner or wait to include your next update in it. Any idea when it might be ready?
 
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.
 
Code:
[B]
##		if( iSplitType == SPLIT_PUPPET and len( liResult ) == 0 ) :
##			liResult = liBadLeaders[/B]

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.
 

Attachments

In the following game I'm unable to rebase the hawk to Bruti.

Is the AI more aggressive in this mod? Playing on immortal they declare war long before borders are shared and Einion Logos declaring war on Friendly/Pleased.
 

Attachments

Has anyone been able to get Rystic's tweakmod to work with Tholal's AI mod? I just tried it and I am getting a bunch of errors in the XML\Units\civ4spellinfos file.
 
In my current game (of my modmod) as Cassiel, I was able to convert to the Council of Esus when I got the popup saying that the religion had spread in my lands. (I don't recall getting it for The Empyrean or The Order when I founded those religions through disciples recused from lairs.)

I did remove his Agnostic Trait a while back (since I didn't want to inhibit the spread of the Children of The One religion), but I thought that the -100 weighting towards every religion was supposed to make converting to any of them impossible. Did you do anything that might have changed that?

Edit:
Ok, this seems to be an oddity that occurs only during that one particular game. It seems that I can adopt the other religions too, yet I cannot change the details of my name. There no errors showing up in PythonErr.log. I did notice in xml.log that I had mistyped a couple xml references in two python files (BUILDING_GRIGORI_TAVERN instead of BUILDING_TAVERN_GRIGORI in def onMoveHomestead(pCaster,pPlot): in CvSpellInterface.py, and DEMON_POSSESSION instead of PROMOTION_DEMON_POSESSED in def exploreLairBad(self, pCaster): of CustomFUnctions.py; I hadn't changed either very recently and I check the logs rather often, so I guess those bits of code don't get called much), but I don't see why those should be related to this.

I tried another quick game as Cassiel and another as Auric, and was not able to adopt the forbidden religions then. Of course, I only tested those with one small city, not the 6 cities I had in the other game.

Edit2: I just recalled that in the weird game I got the event to have me turn over control to Cassiel. (That event got triggered due to the happiness penalty from choosing the free great bard from another event). I accepted, as I wasn't doing anything really important at the time and I didn't have enough units to defend my cities if a violent revolution where to take place any time soon . I was expecting to see the computer auto-play for several turns as has happened with such events before (I don't recall reading if is what it said would happen, but I know that is what happened in games where I as Alexis turned things over to Flauros), but instead I just seemed to get one turn of anarchy. Could a revolution have switched me to play as another version of Cassiel who uses the personality of a different player, and thus does not have the ReligionWeightModifiers that usually make it impossible for the Grigori to adopt religions?
 
Edit2 last statement: quite possible
 
Great mod! But in mp for me and a friend we tend to get oos constantly, even with events disabled : can't ever finish a game. Attached is a save that generates oos within the next few turns. Haven't been able to discern a pattern for when oosing occurs.
 

Attachments

Back
Top Bottom