Doviello not attacking but expanding

Bad Player

Deity
Joined
Oct 31, 2005
Messages
3,534
Location
(Bris)Vegas!
In my scenario I started the Doviello with 2 cities and 4 beastmen + Lucian. Instead of attacking and building beastmen they are building a worker and settler.

Should I write some code saying that they are meant to be in WARPLAN_TOTAL or is this how they should be behaving? :confused:


EDIT: TITLE OF THREAD IS MISLEADING!!! Pls ignore the title!
 

Attachments

  • Doviello build priority.jpg
    Doviello build priority.jpg
    484.8 KB · Views: 165
After checking what they are doing, the Doviello are doing nothing much except building and storing units (see attached) but all except 1 beastman are in the capital.

I noticed that noone has built any new cities even though they have settlers on Turn 85.

The thing I am concerned about is that I coded the evil civs to start at war with the good civs (using warplan total), so I just wonder if that affected the behaviour of the civs?
 

Attachments

  • Doviello city.jpg
    Doviello city.jpg
    342.1 KB · Views: 154
I cant really say what is going on without seeing the situation. Are there good places to settle? Do the AI players have visibility on those places? Do they have units with ATTACK and CITY_DEFENSE AI that can group with the Settler?

If you attach your scenario file I'll take a look at it if I get a chance.
 
I created a new map and changed the initial war declaration to WARPLAN_DOGPILE to see if that made a difference but they did the same thing - created settlers but didn't expand. I checked what the warriors etc had as their flag - mostly conquest with the occasional permadefence flag. I did see some patrol flags and I saw one attack flag for a warrior when I checked all the civs.

e.g. on Turn 134, Capria has a settler, lots of conquest warriors, an attack city archer, and 2 permdefence warriors all in her capital.
 
As a test I made a new map (still using warplan_dogpile) which was just the regular pangea large map with the 10 civs (and added some grassland, used eraser on some land) but this time I didn't create any cities for the civs - I just left them with their starting units (which includes a scout for nearly everyone). They all built one capital city and there was a LOT more units running around the map looking for fights! So maybe starting scouts are necessary for the AI to want to do stuff?

However, at Turn 130, I have the flags of all the units in the capitals (N.B. A settler in each):
Alexis: Missionary (thane), permdefence, patrol
Cardith: Patrol, permdefence, city defence units
Capria: (1x attack), patrol, permdefence, conquest
Alendra: dead
Sheelba: Permdefence, patrol, conquest units
Garrim: Conquest, patrol, permdefence (NO SETTLER)
Charadon: Conquest, patrol, permdefence
Tebryn: Permdefence, conquest



I could give you a save game to look at but my scenario is written in CvEventManager.py so it means overwriting (adding more lines, no deletions) that file (some .xml values are changed too but that doesn't count).
 
Bad_Player: I repost the questions from Tholal:
do the units you gifted the AI have UNITAI_EXPLORE? , or ATTACK and CITY_DEFENSE ? or the adequat UNITAI for the settler ? (manually added settler often stay in cities for me... I suppose it is due to a lack of adequat UNITAI)
 
In that game I posted directly above you Calavente, I posted what the units had in each city (and I didn't create any cities in that game - I just let the AI start as normal). So there were no EXPLORE units in the cities (but presumably their starting scouts had EXPLORE), Capria had 1x ATTACK unit, Cardith Lorda had at least one (I didn't write down how many) CITY_DEFENCE units, and I didn't check what the settlers had.



A different issue resolved - I found that revealing the city tiles of Capria for the Doviello makes them rush in for an early attack which is what I want. So that is why scouts are important for the AI.
 
I commented out the section of code which makes the good civs at war with the evil civs and now the AI creates new cities:

Code:
	def onGameStart(self, argsList):
		'Called at the start of the game'
...
		
		#Find and set the Team (i.e. player) ID numbers for each civ in the game (could be done manually since it is a scenario with fixed civs)
		#ID's need to be remembered for the onBeginGameTurn section (so if code is moved away from CvEventManager.py to other files then use pickle + Bugdata to remember it perhaps?)
		for iGoodAndEvilPlayer in range(gc.getMAX_PLAYERS()):
			pGoodAndEvilPlayer = gc.getPlayer(iGoodAndEvilPlayer)
			if pGoodAndEvilPlayer.isAlive():
				if pGoodAndEvilPlayer.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_BANNOR'):
					iBannorTeamID = gc.getPlayer(iGoodAndEvilPlayer).getTeam()
				if pGoodAndEvilPlayer.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_CALABIM'):
					iCalabimTeamID = gc.getPlayer(iGoodAndEvilPlayer).getTeam()
				if pGoodAndEvilPlayer.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_CLAN_OF_EMBERS'):
					iClanOfEmbersTeamID = gc.getPlayer(iGoodAndEvilPlayer).getTeam()
				if pGoodAndEvilPlayer.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_DOVIELLO'):
					iDovielloTeamID = gc.getPlayer(iGoodAndEvilPlayer).getTeam()
				if pGoodAndEvilPlayer.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_ELOHIM'):
					iElohimTeamID = gc.getPlayer(iGoodAndEvilPlayer).getTeam()
				if pGoodAndEvilPlayer.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_KURIOTATES'):
					iKuriotatesTeamID = gc.getPlayer(iGoodAndEvilPlayer).getTeam()
				if pGoodAndEvilPlayer.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_LJOSALFAR'):
					iLjosalfarTeamID = gc.getPlayer(iGoodAndEvilPlayer).getTeam()
				if pGoodAndEvilPlayer.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_LUCHUIRP'):
					iLuchuirpTeamID = gc.getPlayer(iGoodAndEvilPlayer).getTeam()
				if pGoodAndEvilPlayer.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_SHEAIM'):
					iSheaimTeamID = gc.getPlayer(iGoodAndEvilPlayer).getTeam()
				if pGoodAndEvilPlayer.getCivilizationType() == gc.getInfoTypeForString('CIVILIZATION_SVARTALFAR'):
					iSvartalfarTeamID = gc.getPlayer(iGoodAndEvilPlayer).getTeam()

				
					
		#Make the good civs at permanent peace with eachother, the evil civs at non-permanent peace with eachother, and the good and evil civs at war		
		#If the setPermanentWarPeace boolean is True then the civs cannot change their peace or war status.  Use declareWar first to keep them at war with the True boolean.
		#If the declareWar boolean is True then you get a pop-up message that the civ declares war on you, if it is False then there is no pop-up message
		#If the meet boolean is True then you get a pop-up message that you met them for the first time, if it is False then there is no pop-up message
		
		for iWarAndPeaceTeam in range(gc.getMAX_CIV_TEAMS()):
			pWarAndPeaceTeam = gc.getTeam(iWarAndPeaceTeam)
			if pWarAndPeaceTeam.isAlive():
				#Make good civs meet other good civs
				if iWarAndPeaceTeam == iBannorTeamID:
					pWarAndPeaceTeam.meet(iElohimTeamID, False)
					pWarAndPeaceTeam.meet(iKuriotatesTeamID, False)
					pWarAndPeaceTeam.meet(iLjosalfarTeamID, False)
					pWarAndPeaceTeam.meet(iLuchuirpTeamID, False)
				if iWarAndPeaceTeam == iElohimTeamID:
					pWarAndPeaceTeam.meet(iKuriotatesTeamID, False)
					pWarAndPeaceTeam.meet(iLjosalfarTeamID, False)
					pWarAndPeaceTeam.meet(iLuchuirpTeamID, False)
				if iWarAndPeaceTeam == iKuriotatesTeamID:
					pWarAndPeaceTeam.meet(iLjosalfarTeamID, False)
					pWarAndPeaceTeam.meet(iLuchuirpTeamID, False)
				if iWarAndPeaceTeam == iLjosalfarTeamID:
					pWarAndPeaceTeam.meet(iLuchuirpTeamID, False)
				#Make evil civs meet other evil civs
				if iWarAndPeaceTeam == iCalabimTeamID:
					pWarAndPeaceTeam.meet(iClanOfEmbersTeamID, False)
					pWarAndPeaceTeam.meet(iDovielloTeamID, False)
					pWarAndPeaceTeam.meet(iSheaimTeamID, False)
					pWarAndPeaceTeam.meet(iSvartalfarTeamID, False)
				if iWarAndPeaceTeam == iClanOfEmbersTeamID:
					pWarAndPeaceTeam.meet(iDovielloTeamID, False)
					pWarAndPeaceTeam.meet(iSheaimTeamID, False)
					pWarAndPeaceTeam.meet(iSvartalfarTeamID, False)
				if iWarAndPeaceTeam == iDovielloTeamID:
					pWarAndPeaceTeam.meet(iSheaimTeamID, False)
					pWarAndPeaceTeam.meet(iSvartalfarTeamID, False)
				if iWarAndPeaceTeam == iSheaimTeamID:
					pWarAndPeaceTeam.meet(iSvartalfarTeamID, False)			
				#This section makes the evils civs at war with the good civs 
#				if iWarAndPeaceTeam == iCalabimTeamID:
#					pWarAndPeaceTeam.declareWar(iBannorTeamID, False, WarPlanTypes.WARPLAN_DOGPILE)
#					pWarAndPeaceTeam.setPermanentWarPeace(iBannorTeamID, True)
#					pWarAndPeaceTeam.declareWar(iElohimTeamID, False, WarPlanTypes.WARPLAN_DOGPILE)
#					pWarAndPeaceTeam.setPermanentWarPeace(iElohimTeamID, True)
#					pWarAndPeaceTeam.declareWar(iKuriotatesTeamID, False, WarPlanTypes.WARPLAN_DOGPILE)
#					pWarAndPeaceTeam.setPermanentWarPeace(iKuriotatesTeamID, True)
#					pWarAndPeaceTeam.declareWar(iLjosalfarTeamID, False, WarPlanTypes.WARPLAN_DOGPILE)
#					pWarAndPeaceTeam.setPermanentWarPeace(iLjosalfarTeamID, True)
#					pWarAndPeaceTeam.declareWar(iLuchuirpTeamID, False, WarPlanTypes.WARPLAN_DOGPILE)
#					pWarAndPeaceTeam.setPermanentWarPeace(iLuchuirpTeamID, True)
#				if iWarAndPeaceTeam == iClanOfEmbersTeamID:
#					pWarAndPeaceTeam.declareWar(iBannorTeamID, False, WarPlanTypes.WARPLAN_DOGPILE)
#					pWarAndPeaceTeam.setPermanentWarPeace(iBannorTeamID, True)
#					pWarAndPeaceTeam.declareWar(iElohimTeamID, False, WarPlanTypes.WARPLAN_DOGPILE)
#					pWarAndPeaceTeam.setPermanentWarPeace(iElohimTeamID, True)
#					pWarAndPeaceTeam.declareWar(iKuriotatesTeamID, False, WarPlanTypes.WARPLAN_DOGPILE)
#					pWarAndPeaceTeam.setPermanentWarPeace(iKuriotatesTeamID, True)
#					pWarAndPeaceTeam.declareWar(iLjosalfarTeamID, False, WarPlanTypes.WARPLAN_DOGPILE)
#					pWarAndPeaceTeam.setPermanentWarPeace(iLjosalfarTeamID, True)
#					pWarAndPeaceTeam.declareWar(iLuchuirpTeamID, False, WarPlanTypes.WARPLAN_DOGPILE)
#					pWarAndPeaceTeam.setPermanentWarPeace(iLuchuirpTeamID, True)
#				if iWarAndPeaceTeam == iDovielloTeamID:
#					pWarAndPeaceTeam.declareWar(iBannorTeamID, False, WarPlanTypes.WARPLAN_DOGPILE)
#					pWarAndPeaceTeam.setPermanentWarPeace(iBannorTeamID, True)
#					pWarAndPeaceTeam.declareWar(iElohimTeamID, False, WarPlanTypes.WARPLAN_DOGPILE)
#					pWarAndPeaceTeam.setPermanentWarPeace(iElohimTeamID, True)
#					pWarAndPeaceTeam.declareWar(iKuriotatesTeamID, False, WarPlanTypes.WARPLAN_DOGPILE)
#					pWarAndPeaceTeam.setPermanentWarPeace(iKuriotatesTeamID, True)
#					pWarAndPeaceTeam.declareWar(iLjosalfarTeamID, False, WarPlanTypes.WARPLAN_DOGPILE)
#					pWarAndPeaceTeam.setPermanentWarPeace(iLjosalfarTeamID, True)
#					pWarAndPeaceTeam.declareWar(iLuchuirpTeamID, False, WarPlanTypes.WARPLAN_DOGPILE)
#					pWarAndPeaceTeam.setPermanentWarPeace(iLuchuirpTeamID, True)
#				if iWarAndPeaceTeam == iSheaimTeamID:
#					pWarAndPeaceTeam.declareWar(iBannorTeamID, False, WarPlanTypes.WARPLAN_DOGPILE)
#					pWarAndPeaceTeam.setPermanentWarPeace(iBannorTeamID, True)
#					pWarAndPeaceTeam.declareWar(iElohimTeamID, False, WarPlanTypes.WARPLAN_DOGPILE)
#					pWarAndPeaceTeam.setPermanentWarPeace(iElohimTeamID, True)
#					pWarAndPeaceTeam.declareWar(iKuriotatesTeamID, False, WarPlanTypes.WARPLAN_DOGPILE)
#					pWarAndPeaceTeam.setPermanentWarPeace(iKuriotatesTeamID, True)
#					pWarAndPeaceTeam.declareWar(iLjosalfarTeamID, False, WarPlanTypes.WARPLAN_DOGPILE)
#					pWarAndPeaceTeam.setPermanentWarPeace(iLjosalfarTeamID, True)
#					pWarAndPeaceTeam.declareWar(iLuchuirpTeamID, False, WarPlanTypes.WARPLAN_DOGPILE)
#					pWarAndPeaceTeam.setPermanentWarPeace(iLuchuirpTeamID, True)
#				if iWarAndPeaceTeam == iSvartalfarTeamID:
#					pWarAndPeaceTeam.declareWar(iBannorTeamID, False, WarPlanTypes.WARPLAN_DOGPILE)
#					pWarAndPeaceTeam.setPermanentWarPeace(iBannorTeamID, True)
#					pWarAndPeaceTeam.declareWar(iElohimTeamID, False, WarPlanTypes.WARPLAN_DOGPILE)
#					pWarAndPeaceTeam.setPermanentWarPeace(iElohimTeamID, True)
#					pWarAndPeaceTeam.declareWar(iKuriotatesTeamID, False, WarPlanTypes.WARPLAN_DOGPILE)
#					pWarAndPeaceTeam.setPermanentWarPeace(iKuriotatesTeamID, True)
#					pWarAndPeaceTeam.declareWar(iLjosalfarTeamID, False, WarPlanTypes.WARPLAN_DOGPILE)
#					pWarAndPeaceTeam.setPermanentWarPeace(iLjosalfarTeamID, True)
#					pWarAndPeaceTeam.declareWar(iLuchuirpTeamID, False, WarPlanTypes.WARPLAN_DOGPILE)
#					pWarAndPeaceTeam.setPermanentWarPeace(iLuchuirpTeamID, True)
				#This makes good civs be at peace with good civs
				if iWarAndPeaceTeam == iBannorTeamID:
					pWarAndPeaceTeam.setPermanentWarPeace(iElohimTeamID, True)
					pWarAndPeaceTeam.setPermanentWarPeace(iKuriotatesTeamID, True)
					pWarAndPeaceTeam.setPermanentWarPeace(iLjosalfarTeamID, True)
					pWarAndPeaceTeam.setPermanentWarPeace(iLuchuirpTeamID, True)
				if iWarAndPeaceTeam == iElohimTeamID:
					pWarAndPeaceTeam.setPermanentWarPeace(iKuriotatesTeamID, True)
					pWarAndPeaceTeam.setPermanentWarPeace(iLjosalfarTeamID, True)
					pWarAndPeaceTeam.setPermanentWarPeace(iLuchuirpTeamID, True)
				if iWarAndPeaceTeam == iKuriotatesTeamID:
					pWarAndPeaceTeam.setPermanentWarPeace(iLjosalfarTeamID, True)
					pWarAndPeaceTeam.setPermanentWarPeace(iLuchuirpTeamID, True)
				if iWarAndPeaceTeam == iLjosalfarTeamID:
					pWarAndPeaceTeam.setPermanentWarPeace(iLuchuirpTeamID, True)

I do want the evil civs to start (and permanently be) at war with the good civs.


EDIT: Making the civs start at war using WARPLAN_LIMITED still causes the settlers to remain inside their capital cities.
EDIT: Try setting the wars in worldbuilder (diplomacy button) and see if the AI will build new cities then - would still need to be permanent war though!
 
Top Bottom