Sir Falstaff
Chieftain
- Joined
- Feb 7, 2010
- Messages
- 10
My apologies if this is in the wrong place, but the issue is python-related so I figured I'd be most likely to get help here.
I'm modding FfH2, trying to add a few civilizations to the mix geared toward the playing styles of myself and some friends. One of the Civs is basically a civilization of revolutionaries out to break down the old order. I thought it would be appropriate to give them a worldspell that causes all the other Civs' cities to break out into revolt.
Problem is, I don't really know what I'm doing.
I figured at first I could take the River of Blood spell, which reduces all non-vampire cities' population by 2, and just switch out the commands. Problem is, when I did that, it doesn't actually do anything.
Here's the code. Can someone here show me where I went wrong? And hopefully how to fix it?
...like I said, I don't really know what I'm doing here.
I'm modding FfH2, trying to add a few civilizations to the mix geared toward the playing styles of myself and some friends. One of the Civs is basically a civilization of revolutionaries out to break down the old order. I thought it would be appropriate to give them a worldspell that causes all the other Civs' cities to break out into revolt.
Problem is, I don't really know what I'm doing.
I figured at first I could take the River of Blood spell, which reduces all non-vampire cities' population by 2, and just switch out the commands. Problem is, when I did that, it doesn't actually do anything.
Here's the code. Can someone here show me where I went wrong? And hopefully how to fix it?
Code:
def spellFortheRevolution(caster):
iOwner = caster.getOwner()
for iPlayer in range(gc.getMAX_PLAYERS()):
pPlayer = gc.getPlayer(iPlayer)
if pPlayer.isAlive():
if iPlayer != iOwner:
for pyCity in PyPlayer(iPlayer).getCityList() :
pCity = pyCity.GetCy()
pCity.setOccupationTimer(4)
CyInterface().addMessage(pCity.getOwner(),True,25,CyTranslator().getText("TXT_KEY_MESSAGE_FOR_THE_REVOLUTION", ()),'',1,'Art/Interface/Buttons/Spells/For the Revolution.dds',ColorTypes(7),pCity.getX(),pCity.getY(),True,True)
...like I said, I don't really know what I'm doing here.
