Iceciro
Special Ability: Decimate
EDIT: nevermind, was being overwritten by another module >_>
<ProjectInfo>
<Type>PROJECT_LIBERATION</Type>
<Description>TXT_KEY_PROJECT_LIBERATION</Description>
<Civilopedia>TXT_KEY_PROJECT_LIBERATION_PEDIA</Civilopedia>
<Strategy>TXT_KEY_PROJECT_LIBERATION_STRATEGY</Strategy>
<TechPrereq>TECH_ELEMENTALISM</TechPrereq>
<iMaxGlobalInstances>1</iMaxGlobalInstances>
<iCost>600</iCost>
<Button>Modules\NormalModules\Frozen\Frozen\Winter Tech 1.dds</Button>
<BonusProductionModifiers>
<BonusProductionModifier>
<BonusType>BONUS_MANA_ICE</BonusType>
<iProductonModifier>100</iProductonModifier>
</BonusProductionModifier>
</BonusProductionModifiers>
<iAIWeight>100</iAIWeight>
</ProjectInfo>
<TechInfo>
<Type>TECH_WINTER_TECH</Type>
<Description>TXT_KEY_TECH_WINTER_TECH</Description>
<Civilopedia>TXT_KEY_TECH_WINTER_TECH_PEDIA</Civilopedia>
<Advisor>ADVISOR_RELIGION</Advisor>
<iCost>-1</iCost>
<iAdvancedStartCost>-1</iAdvancedStartCost>
<Era>ERA_ANCIENT</Era>
<iAsset>40</iAsset>
<iGridX>1</iGridX>
<iGridY>21</iGridY>
<Flavors>
<Flavor>
<FlavorType>FLAVOR_GROWTH</FlavorType>
<iFlavor>10</iFlavor>
</Flavor>
<Flavor>
<FlavorType>FLAVOR_PRODUCTION</FlavorType>
<iFlavor>20</iFlavor>
</Flavor>
<Flavor>
<FlavorType>FLAVOR_RELIGION</FlavorType>
<iFlavor>70</iFlavor>
</Flavor>
</Flavors>
<Quote>TXT_KEY_TECH_WINTER_TECH_PEDIA</Quote>
<Sound>AS2D_TECH_DING</Sound>
<SoundMP>AS2D_TECH_DING</SoundMP>
<Button>Modules\NormalModules\Frozen\Frozen\Winter Tech 3.dds</Button>
</TechInfo>
Dear FF Team,
Would you mind publishing the CvTeam.setForceRevealedBonus function to be called from python ?
Even better would be a function which could force the bonus to be revealed for one plot only, but simply publishing this function would be good and easy I think (good for me and easy for you)
Thanks in advance !
if iProjectType == gc.getInfoTypeForString('PROJECT_LIBERATION'):
iFrozenPlayer = 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 Taranis")
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 (iFrozenPlayer != -1 and pBestPlot != -1):
CyGame().addPlayerAdvanced(iFrozenPlayer, -1, gc.getInfoTypeForString('LEADER_TARANIS'), gc.getInfoTypeForString('CIVILIZATION_FROZEN'))
iFounderTeam = gc.getPlayer(iPlayer).getTeam()
eFounderTeam = gc.getTeam(gc.getPlayer(iPlayer).getTeam())
iFrozenTeam = gc.getPlayer(iFrozenPlayer).getTeam()
eFrozenTeam = gc.getTeam(iFrozenTeam)
for iTech in range(gc.getNumTechInfos()):
if eFounderTeam.isHasTech(iTech):
eFrozenTeam.setHasTech(iTech, true, iFrozenPlayer, true, false)
eFounderTeam.signOpenBorders(iFounderTeam)
eFrozenTeam.signOpenBorders(iFrozenTeam)
pFrozenPlayer = gc.getPlayer(iFrozenPlayer)
pFrozenPlayer.AI_changeAttitudeExtra(iPlayer,4)
eFrozenTeam.setHasTech(gc.getInfoTypeForString('TECH_WINTER_TECH'), true, iFrozenPlayer, true, false)
newUnit1 = pFrozenPlayer.initUnit(gc.getInfoTypeForString('UNIT_ICE_GOLEM'), pBestPlot.getX(), pBestPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
newUnit1.setHasPromotion(gc.getInfoTypeForString('PROMOTION_MOBILITY1'), true)
newUnit2 = pFrozenPlayer.initUnit(gc.getInfoTypeForString('UNIT_ICE_GOLEM'), pBestPlot.getX(), pBestPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
newUnit2.setHasPromotion(gc.getInfoTypeForString('PROMOTION_MOBILITY1'), true)
newUnit3 = pFrozenPlayer.initUnit(gc.getInfoTypeForString('UNIT_CHAMPION'), pBestPlot.getX(), pBestPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
newUnit3.setHasPromotion(gc.getInfoTypeForString('PROMOTION_IRON_WEAPONS'), true)
newUnit3.setHasPromotion(gc.getInfoTypeForString('PROMOTION_MOBILITY1'), true)
newUnit4 = pFrozenPlayer.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 = pFrozenPlayer.initUnit(gc.getInfoTypeForString('UNIT_WORKER'), pBestPlot.getX(), pBestPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
newUnit5.setHasPromotion(gc.getInfoTypeForString('PROMOTION_DEMON'), true)
newUnit6 = pFrozenPlayer.initUnit(gc.getInfoTypeForString('UNIT_ADEPT'), pBestPlot.getX(), pBestPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
newUnit6.setHasPromotion(gc.getInfoTypeForString('PROMOTION_MOBILITY1'), true)
newUnit7 = pFrozenPlayer.initUnit(gc.getInfoTypeForString('UNIT_FROZEN_SOUL'), pBestPlot.getX(), pBestPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
newUnit8 = pFrozenPlayer.initUnit(gc.getInfoTypeForString('UNIT_FROZEN_SOUL'), pBestPlot.getX(), pBestPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
newUnit9 = pFrozenPlayer.initUnit(gc.getInfoTypeForString('UNIT_FROZEN_SOUL'), pBestPlot.getX(), pBestPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
newUnit10 = pFrozenPlayer.initUnit(gc.getInfoTypeForString('UNIT_SETTLER'), pBestPlot.getX(), pBestPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
newUnit10.setHasPromotion(gc.getInfoTypeForString('PROMOTION_STARTING_SETTLER'), true)
newUnit10.setHasPromotion(gc.getInfoTypeForString('PROMOTION_DEMON'), true)
newUnit11 = pFrozenPlayer.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)
if gc.getPlayer(iPlayer).isHuman():
popupInfo = CyPopupInfo()
popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_PYTHON)
popupInfo.setText(CyTranslator().getText("TXT_KEY_POPUP_CONTROL_FROZEN",()))
popupInfo.setData1(iPlayer)
popupInfo.setData2(iFrozenPlayer)
popupInfo.addPythonButton(CyTranslator().getText("TXT_KEY_POPUP_YES", ()), "")
popupInfo.addPythonButton(CyTranslator().getText("TXT_KEY_POPUP_NO", ()), "")
popupInfo.setOnClickedPythonCallback("reassignPlayer")
popupInfo.addPopup(iPlayer)[/SPOILER]
And now I'm having another problem. This is the code I added to CvEventManager.py's onProjectBuilt, a copied version of the Fall from Heaven 2 Infernal code.
Spoiler :Code:if iProjectType == gc.getInfoTypeForString('PROJECT_LIBERATION'): iFrozenPlayer = 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 Taranis") 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 (iFrozenPlayer != -1 and pBestPlot != -1): CyGame().addPlayerAdvanced(iFrozenPlayer, -1, gc.getInfoTypeForString('LEADER_TARANIS'), gc.getInfoTypeForString('CIVILIZATION_FROZEN')) iFounderTeam = gc.getPlayer(iPlayer).getTeam() eFounderTeam = gc.getTeam(gc.getPlayer(iPlayer).getTeam()) iFrozenTeam = gc.getPlayer(iFrozenPlayer).getTeam() eFrozenTeam = gc.getTeam(iFrozenTeam) for iTech in range(gc.getNumTechInfos()): if eFounderTeam.isHasTech(iTech): eFrozenTeam.setHasTech(iTech, true, iFrozenPlayer, true, false) eFounderTeam.signOpenBorders(iFounderTeam) eFrozenTeam.signOpenBorders(iFrozenTeam) pFrozenPlayer = gc.getPlayer(iFrozenPlayer) pFrozenPlayer.AI_changeAttitudeExtra(iPlayer,4) eFrozenTeam.setHasTech(gc.getInfoTypeForString('TECH_WINTER_TECH'), true, iFrozenPlayer, true, false) newUnit1 = pFrozenPlayer.initUnit(gc.getInfoTypeForString('UNIT_ICE_GOLEM'), pBestPlot.getX(), pBestPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH) newUnit1.setHasPromotion(gc.getInfoTypeForString('PROMOTION_MOBILITY1'), true) newUnit2 = pFrozenPlayer.initUnit(gc.getInfoTypeForString('UNIT_ICE_GOLEM'), pBestPlot.getX(), pBestPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH) newUnit2.setHasPromotion(gc.getInfoTypeForString('PROMOTION_MOBILITY1'), true) newUnit3 = pFrozenPlayer.initUnit(gc.getInfoTypeForString('UNIT_CHAMPION'), pBestPlot.getX(), pBestPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH) newUnit3.setHasPromotion(gc.getInfoTypeForString('PROMOTION_IRON_WEAPONS'), true) newUnit3.setHasPromotion(gc.getInfoTypeForString('PROMOTION_MOBILITY1'), true) newUnit4 = pFrozenPlayer.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 = pFrozenPlayer.initUnit(gc.getInfoTypeForString('UNIT_WORKER'), pBestPlot.getX(), pBestPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH) newUnit5.setHasPromotion(gc.getInfoTypeForString('PROMOTION_DEMON'), true) newUnit6 = pFrozenPlayer.initUnit(gc.getInfoTypeForString('UNIT_ADEPT'), pBestPlot.getX(), pBestPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH) newUnit6.setHasPromotion(gc.getInfoTypeForString('PROMOTION_MOBILITY1'), true) newUnit7 = pFrozenPlayer.initUnit(gc.getInfoTypeForString('UNIT_FROZEN_SOUL'), pBestPlot.getX(), pBestPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH) newUnit8 = pFrozenPlayer.initUnit(gc.getInfoTypeForString('UNIT_FROZEN_SOUL'), pBestPlot.getX(), pBestPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH) newUnit9 = pFrozenPlayer.initUnit(gc.getInfoTypeForString('UNIT_FROZEN_SOUL'), pBestPlot.getX(), pBestPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH) newUnit10 = pFrozenPlayer.initUnit(gc.getInfoTypeForString('UNIT_SETTLER'), pBestPlot.getX(), pBestPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH) newUnit10.setHasPromotion(gc.getInfoTypeForString('PROMOTION_STARTING_SETTLER'), true) newUnit10.setHasPromotion(gc.getInfoTypeForString('PROMOTION_DEMON'), true) newUnit11 = pFrozenPlayer.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) if gc.getPlayer(iPlayer).isHuman(): popupInfo = CyPopupInfo() popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_PYTHON) popupInfo.setText(CyTranslator().getText("TXT_KEY_POPUP_CONTROL_FROZEN",())) popupInfo.setData1(iPlayer) popupInfo.setData2(iFrozenPlayer) popupInfo.addPythonButton(CyTranslator().getText("TXT_KEY_POPUP_YES", ()), "") popupInfo.addPythonButton(CyTranslator().getText("TXT_KEY_POPUP_NO", ()), "") popupInfo.setOnClickedPythonCallback("reassignPlayer") popupInfo.addPopup(iPlayer)[/SPOILER]
When I complete Liberation in-game using a test (by setting the cost of the ritual to 1 hammer and giving myself the prereq technology) and switch to the Frozen, I can't see any of the plots I'm on. As I explore with some of my starting units, I find that I can't see many other plots as well. (some seem to be randomly revealed, others aren't). Yet, I still have line of sight on my old civilization's plots, although I cannot see my old capital or any units. (There's no fog of war). Have I done something wrong?
EDIT: A test as the Infernals revealed similar issues. I could not see any terrain that the civ who summoned the Infernals had not revealed already, and as I explored several plots were not revealed...
I made a note to do so for you, but my notes tend to fill fast and get lost, so was waiting to reply till I did it
And does it change anything if you save and then reload the game?