Recent content by gautam

  1. G

    Harry Potter Modpack ideas

    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.
  2. G

    Changing AI attitude

    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
  3. G

    Changing AI attitude

    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...
  4. G

    Changing AI attitude

    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...
  5. G

    Civ4HandicapInfo.xml file questions

    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...
  6. G

    Building a road from one city to another in python

    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.
  7. G

    Building a road from one city to another in python

    Hi, I managed to get it going into the loop but it still doesn't seem to build any roads. Should I be doing anything else in order to do this. Thanks
  8. G

    Building a road from one city to another in python

    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 =...
  9. G

    Building a road from one city to another in python

    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...
  10. G

    setting culture in python

    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 :)
  11. G

    few more python questions

    Yeah, you are right. I did have it on, but rather than let it show up on screen I prefer to see it in the python error log.
  12. G

    setting culture in python

    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 :-...
  13. G

    few more python questions

    Hi, Thanks, I got it working. Actually it was failing on bResult = unit.canFortify() which should have been bResult = unit.canFortify(unti.plot()).
  14. G

    few more python questions

    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...
  15. G

    few more python questions

    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 %...
Back
Top Bottom