help on modding, please!!!

americo

Warlord
Joined
Oct 30, 2008
Messages
121
Location
Salerno
hello can someone ask some question of mine?
1) how can i have improvement castle with different civ artstyle?
2) how can i add other civilization spawning on building built or tech discovered
3) how can i reput the vanilla spy mission

thanks
 
should also rename the tag infernalteam for example or leave it unmodified and simply duplicate the code chaning only the tech and civilization?
 
should also rename the tag infernalteam for example or leave it unmodified and simply duplicate the code chaning only the tech and civilization?

I dont have the code in front of me so Im not sure exactly what you're referring to, but if it's a variable that's only internal to the function, then it's ok to leave the name (though you might want to change it just for consistency). If it's referenced to or from the outside of the function, then you definitely need to change it.

In regards to castle artwork, you might want to check the RiFE code. I believe they have civ-specific forts.
 
that's the code for mercurian
Spoiler :
if iBuildingType == gc.getInfoTypeForString('BUILDING_MERCURIAN_GATE'):
iMercurianPlayer = cf.getOpenPlayer()
iTeam = pPlayer.getTeam()
pPlot2 = cf.findClearPlot(-1, pCity.plot())
if (iMercurianPlayer != -1 and pPlot2 != -1):
for i in range(pPlot.getNumUnits(), -1, -1):
pUnit = pPlot.getUnit(i)
pUnit.setXY(pPlot2.getX(), pPlot2.getY(), true, true, true)
CyGame().addPlayerAdvanced(iMercurianPlayer, iTeam, gc.getInfoTypeForString('LEADER_HYBOREM'), gc.getInfoTypeForString('CIVILIZATION_INFERNAL'))
gc.getPlayer(iMercurianPlayer).initUnit(gc.getInfoTypeForString('UNIT_HYBOREM'), pPlot.getX(), pPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
gc.getPlayer(iMercurianPlayer).initUnit(gc.getInfoTypeForString('UNIT_PITLORD'), pPlot.getX(), pPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
gc.getPlayer(iMercurianPlayer).initUnit(gc.getInfoTypeForString('UNIT_MANES'), pPlot.getX(), pPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
gc.getPlayer(iMercurianPlayer).initUnit(gc.getInfoTypeForString('UNIT_MANES'), pPlot.getX(), pPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
gc.getPlayer(iMercurianPlayer).initUnit(gc.getInfoTypeForString('UNIT_MANES'), pPlot.getX(), pPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
gc.getPlayer(iMercurianPlayer).initUnit(gc.getInfoTypeForString('UNIT_MANES'), pPlot.getX(), pPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
gc.getPlayer(iMercurianPlayer).initUnit(gc.getInfoTypeForString('UNIT_MANES'), pPlot.getX(), pPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
gc.getPlayer(iMercurianPlayer).initUnit(gc.getInfoTypeForString('UNIT_MANES'), pPlot.getX(), pPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
if pPlayer.isHuman():
popupInfo = CyPopupInfo()
popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_PYTHON)
popupInfo.setText(CyTranslator().getText("TXT_KEY_POPUP_CONTROL_MERCURIANS",()))
popupInfo.setData1(player)
popupInfo.setData2(iMercurianPlayer)
popupInfo.addPythonButton(CyTranslator().getText("TXT_KEY_POPUP_YES", ()), "")
popupInfo.addPythonButton(CyTranslator().getText("TXT_KEY_POPUP_NO", ()), "")
popupInfo.setOnClickedPythonCallback("reassignPlayer")
popupInfo.addPopup(player)


and it is for infernal
Spoiler :
if not gc.getGame().isOption(GameOptionTypes.GAMEOPTION_NO_HYBOREM_OR_BASIUM):
if (iTechType == gc.getInfoTypeForString('TECH_INFERNAL_PACT') and iPlayer != -1):
iCount = 0
for iTeam in range(gc.getMAX_TEAMS()):
eTeam = gc.getTeam(iTeam)
if eTeam.isHasTech(gc.getInfoTypeForString('TECH_INFERNAL_PACT')):
iCount = iCount + 1
if iCount == 1:
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, gc.getInfoTypeForString('LEADER_TASUNKE'), gc.getInfoTypeForString('CIVILIZATION_HIPPUS'))
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)
newUnit1 = pInfernalPlayer.initUnit(gc.getInfoTypeForString('UNIT_CORLINDALE'), pBestPlot.getX(), pBestPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
newUnit1.setHasPromotion(gc.getInfoTypeForString('PROMOTION_IMMORTAL'), true)
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_KURENAI'), pBestPlot.getX(), pBestPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
newUnit7.setHasPromotion(gc.getInfoTypeForString('PROMOTION_MOBILITY1'), true)
newUnit8 = pInfernalPlayer.initUnit(gc.getInfoTypeForString('UNIT_NAARU'), pBestPlot.getX(), pBestPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
newUnit9 = pInfernalPlayer.initUnit(gc.getInfoTypeForString('UNIT_NAARU'), pBestPlot.getX(), pBestPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_NORTH)
newUnit10 = pInfernalPlayer.initUnit(gc.getInfoTypeForString('UNIT_KURENAI'), 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)


what should i change? thanks
 
Yeah. It looks like you could get away with just switching out the tech, building and/or civilization. I'm not sure if the player switching part will work or not though (if you do keep it in, you'll need to create new text keys), but you can give it a shot and see what happens.
 
Back
Top Bottom