Problem with the Godslayer Event

Draconian

Templar of Doom
Joined
Dec 2, 2005
Messages
291
Location
Germany
I'm currently trying to get the Godslayer achievement, so I babysitted the Illian AI the whole game and gave them the techs needed to build the ascension ritual. A few turns later the ritual was finished and I got the event where an old man (Kylorin I assume) gives me a map with the location of the Godslayer.
But where exactly do I find the Godslayer now? I didn't get any notification on the map (like when Orthus spawns) and I checked all my units, no Godslayer :(
 
Kill every enemy unit until one of them drops the Godslayer. IIRC, some random unit in the world is given it.
 
The Godslayer spawns in a treasure chest in the capital of the civilization that has the highest score. This can, oddly enough, include the Illians although IIRC it's not supposed to.
 
Here's the phyton code for the godslayer event:
Code:
def doGodslayer(argsList):
	kTriggeredData = argsList[0]
	iPlayer = kTriggeredData.ePlayer
	pPlayer = gc.getPlayer(iPlayer)
	pBestPlot = -1
	iBestPlot = -1
	for i in range (CyMap().numPlots()):
		pPlot = CyMap().plotByIndex(i)
		iPlot = -1
		if not pPlot.isWater():
			[COLOR="Red"]if pPlot.getNumUnits() == 0:[/COLOR]
				if not pPlot.isCity():
					if not pPlot.isImpassable():
						iPlot = CyGame().getSorenRandNum(1000, "Add Unit")
						if pPlot.area().getNumTiles() < 8:
							iPlot += 1000
						if not pPlot.isOwned():
							iPlot += 1000
						if iPlot > iBestPlot:
							iBestPlot = iPlot
							pBestPlot = pPlot
	if iBestPlot != -1:
		containerUnit = -1
		for i in range(pBestPlot.getNumUnits()):
			[COLOR="Red"]if pBestPlot.getUnit(i).getUnitType() == gc.getInfoTypeForString('EQUIPMENT_CONTAINER'):[/COLOR]
				containerUnit = pBestPlot.getUnit(i)
		if containerUnit == -1:
			containerUnit = gc.getPlayer(gc.getORC_PLAYER()).initUnit(gc.getInfoTypeForString('EQUIPMENT_CONTAINER'), city.getX(), city.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)
		containerUnit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_GODSLAYER'), True)
		CyInterface().addMessage(iPlayer,True,25,CyTranslator().getText("TXT_KEY_MESSAGE_EXPLORE_LAIR_TREASURE",()),'',1,'Art/Interface/Buttons/Equipment/Treasure.dds',ColorTypes(8),containerUnit.getX(),containerUnit.getY(),True,True)
		if (iPlayer == CyGame().getActivePlayer()):
			CyCamera().JustLookAtPlot(pBestPlot)

The loop starting at line 7 is unnecessary: it selects a random, not impassable land tile. The loop starting at line 25 then checks if one of the units on the selected tile is a treasure chest (red line). This condition can never be true, because in the first loop it selects a tile without any units on it (red line).

I believe this code would do exactly the same thing:

Code:
def doGodslayer(argsList):
	kTriggeredData = argsList[0]
	iPlayer = kTriggeredData.ePlayer
	pPlayer = gc.getPlayer(iPlayer)
	
	containerUnit = gc.getPlayer(gc.getORC_PLAYER()).initUnit(gc.getInfoTypeForString('EQUIPMENT_CONTAINER'), city.getX(), city.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)
	containerUnit.setHasPromotion(gc.getInfoTypeForString('PROMOTION_GODSLAYER'), True)
	CyInterface().addMessage(iPlayer,True,25,CyTranslator().getText("TXT_KEY_MESSAGE_EXPLORE_LAIR_TREASURE",()),'',1,'Art/Interface/Buttons/Equipment/Treasure.dds',ColorTypes(8),containerUnit.getX(),containerUnit.getY(),True,True)
 
Top Bottom