Not about modding the spell itself, but about using it in another mod. (It's been copied from wildmana, so I'm asking the question here.)
I'm attempting to use this spell in another mod, but am running into a problems where both pythons don't actually work.
Python (strikethrough shows parts of the austrin spell that are deleted for my version..):
I've also tried playing around with the XML changes, (The full spell is supposed to change the unit into a worker, though deleting this part doesn't have any effect either way.). It seems both parts of the python for the spell aren't working, as i cannot cast the spell when the requirement is included, while no city is founded when the the requirement is deleted or commented out.
(Awaits extremely simple, obvious answer that will make me feel really dumb when it is suggested.)
I'm attempting to use this spell in another mod, but am running into a problems where both pythons don't actually work.
Python (strikethrough shows parts of the austrin spell that are deleted for my version..):
Code:
def reqAustrinRemoteFound(caster):
pPlot = caster.plot()
pPlayer = gc.getPlayer(caster.getOwner())
[s]if not pPlayer.isFeatAccomplished(FeatTypes.FEAT_EXPEDITION_READY):
return false[/s]
if pPlot.isOwned() and pPlot.getOwner() != caster.getOwner():
return false
if pPlot.isCityRadius():
return false
if pPlot.isWater():
return false
if not pPlayer.isHuman():
if pPlot.getFoundValue() < (pPlot.area().getBestFoundValue() * 2) / 3:
return false
return true
def spellAustrinRemoteFound(caster):
pPlot = caster.plot()
pPlayer = gc.getPlayer(caster.getOwner())
pCity = pPlayer.initCity(pPlot.getX(),pPlot.getY())
[s]CvEventManager.CvEventManager().onCityBuilt([pCity])
pPlayer.setFeatAccomplished(FeatTypes.FEAT_EXPEDITION_READY, false)[/s]
I've also tried playing around with the XML changes, (The full spell is supposed to change the unit into a worker, though deleting this part doesn't have any effect either way.). It seems both parts of the python for the spell aren't working, as i cannot cast the spell when the requirement is included, while no city is founded when the the requirement is deleted or commented out.
(Awaits extremely simple, obvious answer that will make me feel really dumb when it is suggested.)