Hi,
And I have figured out how to keep the Civilizations at war on first contact with player, although I am unable to get the GUI of first contact out of the way.
I would be happy to share that code in some time.
I tried getInfoTypeFromString("ATTITUDE_FURIOUS") as well and it gave an error of some CyGlobalContext and ATTIDUE_FURIOUS not found or something.
But I will try what you asked and post soon.
Thanks
Hi,
I searched the PyHelpers.py file and also the site http://civilization4.net/files/modding/PythonAPI/. The only attitude options are with get functions and the AI_changeAttitudeExtra(PlayerType eIndex, INT iChange) function. Nothing at all with set. Thats why I was wondering if there is a...
Hi,
I am trying to change the AI's attitude towards the player in python but it seems like whatever I try it jsut doesn't work. I have the following code but it never gets into the if loop
def changeAIAttitude(self, iPlayer):
# change the AI attitude towards the active player...
Hi,
In XML file Civ4HandicapInfo.xml what is <iStartingLocPercent>60</iStartingLocPercent> used for.
Also I was trying to spawn more barbarian cities by doing the following in settler mode
<iBarbarianCityCreationProb>90</iBarbarianCityCreationProb>
as someone tried in a different post...
http://civilization4.net/files/modding/PythonAPI/AllClasses.html#CySelectionGroup
Thats all I have been using and its been working for other things like Fortify and stuff so I would assume it would work for this as well.
Hi,
You are right, on looking through the code this is a fatal mistake. I modified this to the following
def buildRoads(self, iPlayer):
print "Build Roads called"
player = gc.getPlayer(iPlayer)
iWorker = gc.getInfoTypeForString("UNIT_FARM_WORKER")
pWorker =...
Hi,
I am trying to build a road from one city to another if there is more than 1 city for a civilization. However it seems like I am doing something wrong. Firstly I would like to ask if this even possible. Secondly I am doing it this way :-
def buildRoads(self, iPlayer):
print...
Hey,
Thanks, now I have got AI setting war on me as soon as he meets me. With a few modifications I can probably make AI war with other AI. Once I get that working I can have world war mod I guess :)
Hi,
I am trying to do many different things with python, so I guess I am asking a lot of questions. I tried to mdofiy the culture of the capital city. Although it seems to give no error it doesn't seem to work.
I tried CultureLevelTypes.CULTURELEVEL_DEVELOPING. But it gave me an error :-...
To TheLopez :
I tried that but it still isn't working. I have the following code based on what you mentioned :-
bResult = unit.canFortify()
if(bResult == True):
group = unit.getGroup()
plot = group.plot()
print plot
group.pushMission(MissionTypes.MISSION_FORTIFY...
Hi,
I am trying to give a new unit on every second turn of the player turn. I have the following code
def checkPlayerTurnEvents(self, iGameTurn, iPlayer):
'Check for events on every turn and give a unit on on the 10 turns'
print "Called checkPlayerTurnEvents"
if(iGameTurn %...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.