in CvGameUtils.py, under def cannotCreate(self,argsList):
if eProject == gc.getInfoTypeForString('PROJECT_DEMONIC_PACT'):
if pPlayer.getStateReligion() != gc.getInfoTypeForString('RELIGION_THE_ASHEN_VEIL'):
return True
-------------------
in CvEventManager.py, under def onProjectBuilt(self, argsList):
if not gc.getGame().isOption(GameOptionTypes.GAMEOPTION_NO_HYBOREM_OR_BASIUM):
if (iProjectType == gc.getInfoTypeForString('PROJECT_DEMONIC_PACT') and iPlayer != -1):
demonList = []
if not CyGame().isLeaderEverActive(gc.getInfoTypeForString('LEADER_HYBOREM')):
demonList.append(gc.getInfoTypeForString('LEADER_HYBOREM'))
if not CyGame().isLeaderEverActive(gc.getInfoTypeForString('LEADER_JUDECCA')):
demonList.append(gc.getInfoTypeForString('LEADER_JUDECCA'))
if not CyGame().isLeaderEverActive(gc.getInfoTypeForString('LEADER_SALLOS')):
demonList.append(gc.getInfoTypeForString('LEADER_SALLOS'))
if not CyGame().isLeaderEverActive(gc.getInfoTypeForString('LEADER_OUZZA')):
demonList.append(gc.getInfoTypeForString('LEADER_OUZZA'))
if not CyGame().isLeaderEverActive(gc.getInfoTypeForString('LEADER_MERESIN')):
demonList.append(gc.getInfoTypeForString('LEADER_MERESIN'))
if not CyGame().isLeaderEverActive(gc.getInfoTypeForString('LEADER_STATIUS')):
demonList.append(gc.getInfoTypeForString('LEADER_STATIUS'))
if not CyGame().isLeaderEverActive(gc.getInfoTypeForString('LEADER_LETHE')):
demonList.append(gc.getInfoTypeForString('LEADER_LETHE'))
iDemonLord = demonList[CyGame().getSorenRandNum(len(demonList), "Infernal Pact")]
iInfernalPlayer = cf.getOpenPlayer()
pBestPlot = -1
iBestPlot = -1
for i in range (CyMap().numPlots()):
pPlot = CyMap().plotByIndex(i)
iPlot = -1
if pPlot.isWater() == False:
if pPlot.getNumUnits() == 0:
if pPlot.isCity() == False:
if pPlot.isImpassable() == False:
iPlot = CyGame().getSorenRandNum(500, "Place Hyborem")
iPlot = iPlot + (pPlot.area().getNumTiles() * 2)
iPlot = iPlot + (pPlot.area().getNumUnownedTiles() * 10)
if pPlot.isOwned() == False:
iPlot = iPlot + 500
if pPlot.getOwner() == iPlayer:
iPlot = iPlot + 200
if iPlot > iBestPlot:
iBestPlot = iPlot
pBestPlot = pPlot
if (iInfernalPlayer != -1 and pBestPlot != -1):
CyGame().addPlayerAdvanced(iInfernalPlayer, -1, iDemonLord, gc.getInfoTypeForString('CIVILIZATION_INFERNAL'))
iFounderTeam = gc.getPlayer(iPlayer).getTeam()
eFounderTeam = gc.getTeam(gc.getPlayer(iPlayer).getTeam())
iInfernalTeam = gc.getPlayer(iInfernalPlayer).getTeam()
eInfernalTeam = gc.getTeam(iInfernalTeam)
for iTech in range(gc.getNumTechInfos()):
if eFounderTeam.isHasTech(iTech):
eInfernalTeam.setHasTech(iTech, true, iInfernalPlayer, true, false)
eFounderTeam.signOpenBorders(iFounderTeam)
eInfernalTeam.signOpenBorders(iInfernalTeam)
iBarbTeam = gc.getPlayer(gc.getBARBARIAN_PLAYER()).getTeam()
eInfernalTeam.makePeace(iBarbTeam)
for iTeam in range(gc.getMAX_TEAMS()):
if iTeam != iBarbTeam:
eTeam = gc.getTeam(iTeam)
if eTeam.isAlive():
if eFounderTeam.isAtWar(iTeam):
eInfernalTeam.declareWar(iTeam, false, WarPlanTypes.WARPLAN_LIMITED)
pInfernalPlayer = gc.getPlayer(iInfernalPlayer)
pInfernalPlayer.AI_changeAttitudeExtra(iPlayer,4)
if iDemonLord ==gc.getInfoTypeForString('LEADER_HYBOREM'):
newUnit1 = pInfernalPlayer.initUnit(gc.getInfoTypeForString('UNIT_HYBOREM'), pBestPlot.getX(), pBestPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
newUnit1.setHasPromotion(gc.getInfoTypeForString('PROMOTION_IMMORTAL'), true)
newUnit1.setHasCasted(true)
if iDemonLord ==gc.getInfoTypeForString('LEADER_JUDECCA'):
newUnit1 = pInfernalPlayer.initUnit(gc.getInfoTypeForString('UNIT_JUDECCA'), pBestPlot.getX(), pBestPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
newUnit1.setHasCasted(true)
if iDemonLord ==gc.getInfoTypeForString('LEADER_SALLOS'):
newUnit1 = pInfernalPlayer.initUnit(gc.getInfoTypeForString('UNIT_SALLOS'), pBestPlot.getX(), pBestPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
newUnit1.setHasCasted(true)
if iDemonLord ==gc.getInfoTypeForString('LEADER_OUZZA'):
newUnit1 = pInfernalPlayer.initUnit(gc.getInfoTypeForString('UNIT_OUZZA'), pBestPlot.getX(), pBestPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
newUnit1.setHasCasted(true)
if iDemonLord ==gc.getInfoTypeForString('LEADER_MERESIN'):
newUnit1 = pInfernalPlayer.initUnit(gc.getInfoTypeForString('UNIT_MERESIN'), pBestPlot.getX(), pBestPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
newUnit1.setHasCasted(true)
if iDemonLord ==gc.getInfoTypeForString('LEADER_STATIUS'):
newUnit1 = pInfernalPlayer.initUnit(gc.getInfoTypeForString('UNIT_STATIUS'), pBestPlot.getX(), pBestPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
newUnit1.setHasCasted(true)
if iDemonLord ==gc.getInfoTypeForString('LEADER_LETHE'):
newUnit1 = pInfernalPlayer.initUnit(gc.getInfoTypeForString('UNIT_LETHE'), pBestPlot.getX(), pBestPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
newUnit1.setHasCasted(true)
newUnit2 = pInfernalPlayer.initUnit(gc.getInfoTypeForString('UNIT_LONGBOWMAN'), pBestPlot.getX(), pBestPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
newUnit2.setHasPromotion(gc.getInfoTypeForString('PROMOTION_MOBILITY1'), true)
newUnit3 = pInfernalPlayer.initUnit(gc.getInfoTypeForString('UNIT_LONGBOWMAN'), pBestPlot.getX(), pBestPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
newUnit3.setHasPromotion(gc.getInfoTypeForString('PROMOTION_MOBILITY1'), true)
newUnit4 = pInfernalPlayer.initUnit(gc.getInfoTypeForString('UNIT_CHAMPION'), pBestPlot.getX(), pBestPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
newUnit4.setHasPromotion(gc.getInfoTypeForString('PROMOTION_IRON_WEAPONS'), true)
newUnit4.setHasPromotion(gc.getInfoTypeForString('PROMOTION_MOBILITY1'), true)
newUnit5 = pInfernalPlayer.initUnit(gc.getInfoTypeForString('UNIT_CHAMPION'), pBestPlot.getX(), pBestPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
newUnit5.setHasPromotion(gc.getInfoTypeForString('PROMOTION_IRON_WEAPONS'), true)
newUnit5.setHasPromotion(gc.getInfoTypeForString('PROMOTION_MOBILITY1'), true)
newUnit6 = pInfernalPlayer.initUnit(gc.getInfoTypeForString('UNIT_WORKER'), pBestPlot.getX(), pBestPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
newUnit6.setHasPromotion(gc.getInfoTypeForString('PROMOTION_DEMON'), true)
newUnit7 = pInfernalPlayer.initUnit(gc.getInfoTypeForString('UNIT_IMP'), pBestPlot.getX(), pBestPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
newUnit7.setHasPromotion(gc.getInfoTypeForString('PROMOTION_MOBILITY1'), true)
newUnit8 = pInfernalPlayer.initUnit(gc.getInfoTypeForString('UNIT_MANES'), pBestPlot.getX(), pBestPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
newUnit9 = pInfernalPlayer.initUnit(gc.getInfoTypeForString('UNIT_MANES'), pBestPlot.getX(), pBestPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
newUnit10 = pInfernalPlayer.initUnit(gc.getInfoTypeForString('UNIT_MANES'), pBestPlot.getX(), pBestPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
newUnit11 = pInfernalPlayer.initUnit(gc.getInfoTypeForString('UNIT_SETTLER'), pBestPlot.getX(), pBestPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
newUnit11.setHasPromotion(gc.getInfoTypeForString('PROMOTION_STARTING_SETTLER'), true)
newUnit11.setHasPromotion(gc.getInfoTypeForString('PROMOTION_DEMON'), true)
newUnit12 = pInfernalPlayer.initUnit(gc.getInfoTypeForString('UNIT_SETTLER'), pBestPlot.getX(), pBestPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
newUnit12.setHasPromotion(gc.getInfoTypeForString('PROMOTION_STARTING_SETTLER'), true)
newUnit12.setHasPromotion(gc.getInfoTypeForString('PROMOTION_DEMON'), true)
if gc.getPlayer(iPlayer).isHuman():
popupInfo = CyPopupInfo()
popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_PYTHON)
popupInfo.setText(CyTranslator().getText("TXT_KEY_POPUP_CONTROL_INFERNAL",()))
popupInfo.setData1(iPlayer)
popupInfo.setData2(iInfernalPlayer)
popupInfo.addPythonButton(CyTranslator().getText("TXT_KEY_POPUP_YES", ()), "")
popupInfo.addPythonButton(CyTranslator().getText("TXT_KEY_POPUP_NO", ()), "")
popupInfo.setOnClickedPythonCallback("reassignPlayer")
popupInfo.addPopup(iPlayer)
---------------
in CvEventManager.py, delete all the current Infernal-placing code from def onTechAcquired(self, argsList):
---------------
in CIV4ProjectInfos.xml:
<ProjectInfo>
<Type>PROJECT_DEMONIC_PACT</Type>
<Description>TXT_KEY_PROJECT_BANE_DIVINE</Description>
<ProjectInfo>
<Type>PROJECT_DEMONIC_PACT</Type>
<Description>TXT_KEY_PROJECT_DEMONIC_PACT</Description>
<Civilopedia>TXT_KEY_PROJECT_BANE_DIVINE_STRATEGY</Civilopedia>
<Strategy>TXT_KEY_PROJECT_BANE_DIVINE_STRATEGY</Strategy>
<VictoryPrereq>NONE</VictoryPrereq>
<TechPrereq>TECH_INFERNAL_PACT</TechPrereq>
<AnyonePrereqProject>NONE</AnyonePrereqProject>
<iMaxGlobalInstances>7</iMaxGlobalInstances>
<iMaxTeamInstances>1</iMaxTeamInstances>
<iCost>216</iCost>
<iNukeInterception>0</iNukeInterception>
<iTechShare>0</iTechShare>
<EveryoneSpecialUnit>NONE</EveryoneSpecialUnit>
<EveryoneSpecialBuilding>NONE</EveryoneSpecialBuilding>
<bSpaceship>0</bSpaceship>
<bAllowsNukes>0</bAllowsNukes>
<Button>Art/Interface/Buttons/Projects/Bane Divine.dds</Button>
<PrereqProjects/>
<VictoryThresholds/>
<VictoryMinThresholds/>
<iVictoryDelayPercent>0</iVictoryDelayPercent>
<iSuccessRate>0</iSuccessRate>
<BonusProductionModifiers>
<BonusProductionModifier>
<BonusType>BONUS_MANA_ENTROPY</BonusType>
<iProductonModifier>100</iProductonModifier>
</BonusProductionModifier>
</BonusProductionModifiers>
<CreateSound/>
<MovieDefineTag/>
<iAIWeight>300</iAIWeight>
<iPrereqGlobalCounter>0</iPrereqGlobalCounter>
</ProjectInfo>
-----------------
in CIV4UnitInfos.xml I added 6 heroes (all of the same unitclass as Hyborem), which so far are basically a half strength Hyborem without the Gela. I'll probably make them more unique eventually.