Alternate Scion Awakening

odalrick

Emperor
Joined
Nov 12, 2003
Messages
1,114
I'm not entirely happy with the current mechanics for awakening. A bit to random for my taste, and the absolute ceiling of 30 population fills me with dread. So I suggest this alternate system.


Each turn there is a chance that an awakened spawns. That chance starts at 10%. +5% under Aristocracy or God King. A further +5% for Glory.
Korinna gets +5% under Aristocracy, the Emperor for God King.

Edit: I forgot to mention that spawning rate is balanced to game speed.


No awakened will spawn if the total scion population is to big. To big depends on map size, number of techs researched, number of luxuries, body mana (with the Flesh Studio), Patrian Artifacts and the spawn buildings.

Imperial Cenotaph
Shrine to Kyorlin
Temple of the Gift
Hall of the Covenant

Obviously the numbers will need balancing.

If you want to test it either replace the method CustomFunctions.doTurnScions in CustomFunctions.py or replace the entire file with the attached file.

Spoiler :
Code:
	def doTurnScions(self, iPlayer):
		pPlayer = gc.getPlayer(iPlayer)
		py = PyPlayer(iPlayer)

		iSpawnChance = 10
		iGovernment = pPlayer.getCivics(gc.getInfoTypeForString('CIVICOPTION_GOVERNMENT'))
		if  iGovernment== gc.getInfoTypeForString('CIVIC_ARISTOCRACY'):
			iSpawnChance += 5
			if pPlayer.getLeaderType() == gc.getInfoTypeForString('LEADER_ALEXI'):
				iSpawnChance += 5
		elif iGovernment == gc.getInfoTypeForString('CIVIC_GOD_KING'):
			iSpawnChance += 5
			if pPlayer.getLeaderType() == gc.getInfoTypeForString('LEADER_RISEN_EMPEROR'):
				iSpawnChance += 5

		if pPlayer.getCivics(gc.getInfoTypeForString('CIVICOPTION_CULTURAL_VALUES')) == gc.getInfoTypeForString('CIVIC_GLORY'):
			iSpawnChance += 5

		# Modify spawn chance bases on game speed
		estiEnd = CyGame().getEstimateEndTurn()
		if estiEnd >= 1500:
			iSpawnChance /= 2.0
		elif estiEnd >= 750:
			iSpawnChance /= 1.5
		elif estiEnd >= 500:
			iSpawnChance /= 1.0
		else:
			iSpawnChance /= 0.67
		if pPlayer.getNumCities() and CyGame().getSorenRandNum(100, "Spawn Roll") < iSpawnChance:
			pTomb = pPlayer.getCapitalCity()
			iTombPop = pTomb.getPopulation()
			iTotalPop = pPlayer.getTotalPopulation()

			iTotalPopLmt, pop_per_tech = {gc.getInfoTypeForString('WORLDSIZE_DUEL'):(3, 1./4),
							gc.getInfoTypeForString('WORLDSIZE_TINY'):(4, 1./3),
							gc.getInfoTypeForString('WORLDSIZE_SMALL'):(5, 1./2),
							gc.getInfoTypeForString('WORLDSIZE_STANDARD'):(6, 2./3),
							gc.getInfoTypeForString('WORLDSIZE_LARGE'):(6, 3./4),
							gc.getInfoTypeForString('WORLDSIZE_HUGE'):(6, 1./1)}[CyMap().getWorldSize()]

			iTotalPopLmt += len(py.getResearchedTechList()) * pop_per_tech

			building_pop = [ ('BUILDING_TEMPLE_OF_THE_GIFT', 1),('BUILDING_HALL_OF_THE_COVENANT', 2),('BUILDING_IMPERIAL_CENOTAPH', 1),('BUILDING_SHRINE_TO_KYLORIN', .5) ]
			for building, modifier in building_pop:
				iTotalPopLmt += pPlayer.countNumBuildings( gc.getInfoTypeForString( building ) )

			iTotalPopLmt += iTombPop * 0.25 # Capital population

			luxuries = ['BONUS_SILK', 'BONUS_GOLD', 'BONUS_GEMS', 'BONUS_IVORY', 'BONUS_DYE']
			for luxury in luxuries:
				if pPlayer.getNumAvailableBonuses( gc.getInfoTypeForString( luxury ) ):
					iTotalPopLmt += 1

# The Body-mana bonus given by the Flesh Studio.
			iCorpusB = gc.getInfoTypeForString('BUILDING_FLESH_STUDIO')
			iNumCorpusB = pPlayer.countNumBuildings(iCorpusB)
			if pPlayer.countNumBuildings( gc.getInfoTypeForString('BUILDING_FLESH_STUDIO') ):
				iTotalPopLmt += 3 * pPlayer.getNumAvailableBonuses(gc.getInfoTypeForString('BONUS_MANA_BODY'))

# Per/resource Patrian Artifact modifier
			iPA = pPlayer.getNumAvailableBonuses(gc.getInfoTypeForString('BONUS_PATRIAN_ARTIFACTS'))
			iTotalPopLmt += iPA * 0.75

			if iTotalPop < iTotalPopLmt:
				iAwakened = gc.getInfoTypeForString('UNIT_AWAKENED')
				spawnUnit = pPlayer.initUnit(iAwakened, pTomb.getX(), pTomb.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)
			elif pPlayer.isHuman():
				message = "The Bottomless Tomb remains silent."
				CyInterface().addImmediateMessage(message,"")
			message = "(%i/%i)" % (iTotalPop, iTotalPopLmt//1)
			CyInterface().addImmediateMessage(message,"")
 

Attachments

Wow. Not scaled to game speed? Well if it isn't time to play a marathon game...

That's a massive head start. 5 pop capital before anybody else has 2? With luck, even a few more cities. Hey I gotta try it.

EDIT: Well of course it is game speed balanced. You could say so in your post too, not just the code.

EDIT2: After playing a Scions game (though it was quick rather than marathon), I say this is nice. I ran out of awakened spawns shortly after building my second cathedral. Not much else to say about that game, a couple of wars but hardly any fighting was involved. Just turtling and cultural domination.
 
I'm assuming that after the second cathedral you built Reborn faster than the Awakened cap rose.

Did you go through shorter periods of low population increase before that? For instance while you were waiting for Hall of the Covenant?
 
I agree that something needs to be done to improve the Awakening mechanism, and I like your suggestions.

My first game with FF, I randomly got the Scions of Patria. Although most civs were wiped out by barbs leaving me with the task of defending only two cities the best I can, when I have had a chance to expand, I didn't have the expansion unit and it took forever to build one when I really need to keep building defenders.

My cities have room to grow, but no Awakenings to accomplish this. I am at Turn 650 in an epic speed game and have not seen one for many turns.

I am really enjoying all the neat new things (to me) of this civ, but really bewildered on expansion.
 
My first game with FF, I randomly got the Scions of Patria. Although most civs were wiped out by barbs leaving me with the task of defending only two cities the best I can, when I have had a chance to expand, I didn't have the expansion unit and it took forever to build one when I really need to keep building defenders.

Hopefully this will be a little better now - Xienwolf has reworked the way the AI decides how many units it needs to defend with, so it may be less susceptible to barbarians killing them off. It's especially important as for each AI civ that dies, there is more unowned space, which means more barbarian units, reducing the chance that the remaining civs can survive.
 
Back
Top Bottom