JareshInyo
Chieftain
- Joined
- Oct 20, 2008
- Messages
- 29
I do not know a lot about python (at all) and I just wanted to program one event. The coding is below.
#Federation Headquarters
iFedHead = CvUtil.findInfoTypeNum(gc.getBuildingInfo, gc.getNumBuildingInfos(), "BUILDING_FACTORY")
pEarth = gc.getTeam(gc.getPlayer(0).getTeam())
pVulcan = gc.getPlayer(1).getTeam()
pAndoria = gc.getPlayer(2).getTeam()
pTellar = gc.getPlayer(3).getTeam()
if(iBuildingType == iFedHead):
pEarth.addTeam(pVulcan)
pEarth.addTeam(pAndoria)
pEarth.addTeam(pTellar)
for iPlayer in range(gc.getMAX_PLAYERS()):
pPlayer = gc.getPlayer(iPlayer)
if(pPlayer.isAlive() and pPlayer.isHuman()):
popupInfo = CyPopupInfo()
popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_TEXT)
szBody = localText.getText("TXT_KEY_FOUND_FEDERATION", ())
popupInfo.setText(szBody)
popupInfo.addPopup(iPlayer)
I copied the code from another mod, which forms a 4 civilization team with the first four players in the game (players 0,1,2, and 3) when a specific building is constructed. Can I change the code somehow to make a 4 civilization team of 4 specific civilizations (for example, making the US, England, France, and Germany one team) in any game where those 4 specific civs could have any player number?
#Federation Headquarters
iFedHead = CvUtil.findInfoTypeNum(gc.getBuildingInfo, gc.getNumBuildingInfos(), "BUILDING_FACTORY")
pEarth = gc.getTeam(gc.getPlayer(0).getTeam())
pVulcan = gc.getPlayer(1).getTeam()
pAndoria = gc.getPlayer(2).getTeam()
pTellar = gc.getPlayer(3).getTeam()
if(iBuildingType == iFedHead):
pEarth.addTeam(pVulcan)
pEarth.addTeam(pAndoria)
pEarth.addTeam(pTellar)
for iPlayer in range(gc.getMAX_PLAYERS()):
pPlayer = gc.getPlayer(iPlayer)
if(pPlayer.isAlive() and pPlayer.isHuman()):
popupInfo = CyPopupInfo()
popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_TEXT)
szBody = localText.getText("TXT_KEY_FOUND_FEDERATION", ())
popupInfo.setText(szBody)
popupInfo.addPopup(iPlayer)
I copied the code from another mod, which forms a 4 civilization team with the first four players in the game (players 0,1,2, and 3) when a specific building is constructed. Can I change the code somehow to make a 4 civilization team of 4 specific civilizations (for example, making the US, England, France, and Germany one team) in any game where those 4 specific civs could have any player number?