View unanswered posts | View active topics It is currently 29 Oct 2020, o 14:40



Reply to topic  [ 2 posts ] 
 Enhancement: AI City razing only if city size < 8 
Author Message
Trainee

Joined: 11 Apr 2020, o 11:06
Posts: 10
Post Enhancement: AI City razing only if city size < 8
When we play at monarch, the AI almost always raze conquered cities, maybe 80% of the cases. If the city has size 20 and it took lots of time to get to size 20, it would be better if we would have a chance to take it back. As an enhancement as an option in the settings or automatically, the AI should not raze cities that are already too big, e.g. size < 8.

Very good work of you with the mod! It is a pleasure to play it once a week.


5 Sep 2020, o 16:28
Profile
Trainee

Joined: 11 Apr 2020, o 11:06
Posts: 10
Post Re: Enhancement: AI City razing only if city size < 8
In PythonCallbackDefines.xml I changed
<Define>
<DefineName>USE_CAN_RAZE_CITY_CALLBACK</DefineName>
<iDefineIntVal>1</iDefineIntVal>
</Define>


In CvGameUtils.py I changed

def canRazeCity(self,argsList):
iRazingPlayer, pCity = argsList
#Can raze city if size < 6
canRaze = False
if pCity.getPopulation() < 6:
canRaze = True

return canRaze

It seems to work. It has to be tested first. However, it would be nicer that the AI destroys cities, which are closer to its border with a lower probability than cities far away. The purpose is to let the AI consume smaller empires without having to rebuild everything. As humen player rather kepp good cities, especially at the border, the game gets too easy if the AI does not expand in the same tempo.


21 Oct 2020, o 06:41
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.