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.
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,"")