Hello I need help with a python code:
I've been studying python (a lot) and what I am trying to do is create a new way for people to receive gold per turn. The code is suppose to be read like this: The total population of a civilization times production rate divided by maintenance cost equals gold per turn.
You see I am making a mod that will make gold per turn your taxes. I need help please. Thanks. Ignore the foodrate thingy I was just testing the script at the time.
def doGoldPerTurn(self, argsList):
"controls the gold result of pillaging"
pPlot = argsList[0]
pUnit = argsList[1]
iGoldPerTurn = 0
iGoldPerTurn = self.player.getTotalPopulation * getNumCities()
iGoldPerTurn += self.player.getTotalPopulation * getNumCities()
iGoldPerTurn += ((pCity.getCulture() / 5) + (pCity.getFoodRate() + pCity.getProductionRate() \
+ pCity.calculateGoldRate())) * pCity.getPopulation()
return self.player.getGoldPerTurn()
I've been studying python (a lot) and what I am trying to do is create a new way for people to receive gold per turn. The code is suppose to be read like this: The total population of a civilization times production rate divided by maintenance cost equals gold per turn.
This is suppose to read Your total population multiplied by your total number of cities divided by inflation cost will be the total amount of gold you receive per turn.iGoldPerTurn += self.player.getTotalPopulation * getNumCities()
You see I am making a mod that will make gold per turn your taxes. I need help please. Thanks. Ignore the foodrate thingy I was just testing the script at the time.