JoshW
Chieftain
I actually haven't been using an INI file. I've just been putting a copy of the CvGameUtils in the CustomAssets folder, along with XML defining the resolutions. I'm not sure how to write INI.
JoshW said:I actually haven't been using an INI file. I've just been putting a copy of the CvGameUtils in the CustomAssets folder, along with XML defining the resolutions. I'm not sure how to write INI.
JoshW said:Thus far with this file I have received no errors and the interface is there, however the mod just doesn't work. Passing the resolution has no effect. I have attached the python file.
def cannotTrain(self,argsList,iVote,szBannedUnit):
Python:
for iVote in range(gc.getNumVoteInfos()):
C++
for (int i = 0; i < GC.getNumVoteInfos(); ++iVote)
for szBannedUnit in self.m_dResolutionUnitBans(iVote):
for szBannedUnit in self.m_dResolutionUnitBans[b][[/b]iVote[b]][/b]:
def cannotTrain(self,argsList):
pCity = argsList[0]
eUnit = argsList[1]
bContinue = argsList[2]
bTestVisible = argsList[3]
if not bTestVisible:
for iVote in range(gc.getNumVoteInfos()):
if gc.getGame().isVotePassed(iVote):
if self.m_dResolutionUnitBans.has_key(iVote):
for szBannedUnit in self.m_dResolutionUnitBans[iVote]:
if gc.getInfoTypeForString(szBannedUnit) == eUnit:
return True
def __init__(self):
self.m_dResolutionUnitBans = {
gc.getInfoTypeForString("VOTE_NO_NUKES") : ("UNIT_BOMBER",)
}
def __init__(self):
self.m_dResolutionUnitBans = {
gc.getInfoTypeForString("VOTE_NO_NUKES") : ("UNIT_BOMBER","UNIT_STEALTH_BOMBER")
}
JoshW said:-Does anyone think that the AI knows what these nonproliferation resolutions mean, in the sense that they might vote "no" for them?
-Are there mechanisms in the python code for disbanding units.....