deanej
Deity
Looks like I forgot to include a file. Just go into Mods\ST Millennium\Assets\XML\Units\Civ4UnitClassInfos.xml and copy the entry for the grigari ship and add a 2 to the end of all the stuff that ends with "something_GRIGARI".
# Cheat a little bit, need to get more Construction Ships
iConstructionShip = CvUtil.findInfoTypeNum(gc.getUnitInfo,gc.getNumUnitInfos(),'UNIT_CONSTRUCT_SHIP')
# Size requirement
if (pPlayer.getNumCities() > 1):
if (pCity.getPopulation() >= 4):
iNumUnits = 0
pyPlayer = PyPlayer(iPlayer)
apUnitList = pyPlayer.getUnitList()
for pUnitLoop in apUnitList:
if (pUnitLoop.getUnitType() == iConstructionShip):
iNumUnits += 1
# Either 0 ships or less than certain # of cities...
iNumCitiesThreshold = (pPlayer.getNumCities() / 2) + 1
if ((iNumUnits < iNumCitiesThreshold) or (iNumUnits == 0)):
iRand = CyGame().getSorenRandNum(100, "Rolling to see if AI should be forced to build a Construction Ship")
# 15% Chance of forcing AI to build one of these things
if (iRand < 15):
printd(" Forcing city to make a Construction Ship :)")
pCity.pushOrder(OrderTypes.ORDER_TRAIN, iConstructionShip, -1, False, False, False, True)
bOverride = true
return bOverride
Probably not, but I haven't verified it. I'm not sure how to teach the AI where a good location to put one is. You'll also notice that the code that makes them place starbases only takes into account resources.
I think I might be able to (try and) do this. I added some code to it that gives it a massive bonus if the plot is near a wormhole (that way, the base can bombard things that come out of a wormhole- a strategy I used in Millennium to fend off the Grigori) for my modmod. I was considering trying to make them build starbases near solar systems for defense as well, or near other chokepoints, but this would be harder. And, making an entirely new function for sensor stations would be even harder, I think...
What is an ideal place for a sensor station? Near cultural borders? On the edge of a city's visibility?