[BtS] Star Trek Mod

Sadly there are no combat scripts in civ... it's all random numbers. You didn't actually have a 100% chance of victory (such a thing does not exist in civ4); it was actually 99.9999% and you just got lucky.

If I had my way, probes wouldn't have any combat strength, but the auto-explore feature is tied to combat strength for some reason.
 
That looks pretty ridiculous.

The regular ST mod has a number of free wins vs. barbarians at low difficulty levels (3 at settler, 2 at chieftain, and 1 at warlord). That might explain it.

The screen shot shows the difficulty as Lt. Commander, which I think works out to Noble difficulty which would rule out a free win for the base ST mod. I don't know if you were playing that or a scenario (which could have different settings, like a free win at noble or having the "Lt. Commander" difficulty work out to something lower).

There was just over a 7.5% chance for you to win each round, but winning 13 rounds in a row like that therefore works out to about 1 in 377,535,569,899,859. That's pretty unlikely. If it wasn't a free win then you'll probably never see something that unlikely happen again in your entire life - evidently you should have bought a lottery ticket instead of playing the game.
 
Winning 13 times in a row is still 7.5% the first time, and the result should repeat indefinitely if random seed is disabled... right?
 
I thought you were saying you tried it 13 times by loading a saved game over and over. In any case it would be highly unlikely.
 
Incidentally, did the 'free wins vs barb' feature come with Civ? And is it the first (3,2,1) combats of your game or just a random chance of a free win being awarded?
 
Can I adjust the Spiral Galaxy Many Civ to make the map bigger or is it at the hard coded limit?
Just want some elbow room.

Not sure I will figure out how to fix the Federation problem but guess the custom is easiest. If I am a random 0 player will it include me in the Federation even if i am Borg?
 
Map size is somewhere in the map script. It's very easy to find if you use a file comparison program to compare it with SpiralGalaxy (the only differences between the two is map size and solar system distance).

Player 0 is always included; no civ comparison is done. The Borg can still team up (and this allows them to acquire techs via research as the effect is done on a player basis (note: not tested)).

I forgot to mention: the team research modifier in GlobalDefinesAlt was modified in The Galaxy to balance the Federation tech rate. You might want to copy it over (should be near the top of the file).
 
Here is my first not working) attempt to fix the Federation code. I am trying to search by civilization type but got syntex wrong as don't have programming skills:

Code:
#Federation Headquarters
		iFedHead = CvUtil.findInfoTypeNum(gc.getBuildingInfo, gc.getNumBuildingInfos(), "BUILDING_FEDHEAD")
		iEarth = CvUtil.findInfoTypeNum(gc.getCivilizationInfo, gc.getNumCivilizationInfos(), "CIVILIZATION_TERRAN")
		iVulcan = CvUtil.findInfoTypeNum(gc.getCivilizationInfo, gc.getNumCivilizationInfos(), "CIVILIZATION_VULCAN")
		iAndoria = CvUtil.findInfoTypeNum(gc.getCivilizationInfo, gc.getNumCivilizationInfos(), "CIVILIZATION_ANDORIA")
		iTellar = CvUtil.findInfoTypeNum(gc.getCivilizationInfo, gc.getNumCivilizationInfos(), "CIVILIZATION_TELLAR")
		if(iBuildingType == iFedHead) and (iCivilizationType == iEarth):	
			for iPlayer in range(gc.getMAX_PLAYERS()):
                                pPlayer = gc.getPlayer(iPlayer)

				if(pPlayer.isAlive() and (iCivilizationType == iVulcan):
					pVulcan = gc.getPlayer(iPlayer).getTeam()
	
				if(pPlayer.isAlive() and (iCivilizationType == iAndoria):
					pAndoria = gc.getPlayer(iPlayer).getTeam()

				if(pPlayer.isAlive() and (iCivilizationType == iTellar):
					pTellar = gc.getPlayer(iPlayer).getTeam()

				if(pPlayer.isAlive() and (iCivilizationType == iEarth):
					pEarth = gc.getPlayer(iPlayer).getTeam()

					pEarth.addTeam(pVulcan)
					pEarth.addTeam(pAndoria)
					pEarth.addTeam(pTellar)
				
				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)

		if(iBuildingType == iFedHead) and (iCivilizationType == iVulcan):	
			for iPlayer in range(gc.getMAX_PLAYERS()):
                                pPlayer = gc.getPlayer(iPlayer)

				if(pPlayer.isAlive() and (iCivilizationType == iVulcan):
					pVulcan = gc.getPlayer(iPlayer).getTeam()
	
				if(pPlayer.isAlive() and (iCivilizationType == iAndoria):
					pAndoria = gc.getPlayer(iPlayer).getTeam()

				if(pPlayer.isAlive() and (iCivilizationType == iTellar):
					pTellar = gc.getPlayer(iPlayer).getTeam()

				if(pPlayer.isAlive() and (iCivilizationType == iEarth):
					pEarth = gc.getPlayer(iPlayer).getTeam()

					pVulcan.addTeam(pEarth)
					pVulcan.addTeam(pAndoria)
					pVulcan.addTeam(pTellar)
				
				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)

		if(iBuildingType == iFedHead) and (iCivilizationType == iAndoria):	
			for iPlayer in range(gc.getMAX_PLAYERS()):
                                pPlayer = gc.getPlayer(iPlayer)

				if(pPlayer.isAlive() and (iCivilizationType == iVulcan):
					pVulcan = gc.getPlayer(iPlayer).getTeam()
	
				if(pPlayer.isAlive() and (iCivilizationType == iAndoria):
					pAndoria = gc.getPlayer(iPlayer).getTeam()

				if(pPlayer.isAlive() and (iCivilizationType == iTellar):
					pTellar = gc.getPlayer(iPlayer).getTeam()

				if(pPlayer.isAlive() and (iCivilizationType == iEarth):
					pEarth = gc.getPlayer(iPlayer).getTeam()

					pAndoria.addTeam(pVulcan)
					pAndoria.addTeam(pEarth)
					pAndoria.addTeam(pTellar)
				
				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)

		if(iBuildingType == iFedHead) and (iCivilizationType == iTellar):	
			for iPlayer in range(gc.getMAX_PLAYERS()):
                                pPlayer = gc.getPlayer(iPlayer)

				if(pPlayer.isAlive() and (iCivilizationType == iVulcan):
					pVulcan = gc.getPlayer(iPlayer).getTeam()
	
				if(pPlayer.isAlive() and (iCivilizationType == iAndoria):
					pAndoria = gc.getPlayer(iPlayer).getTeam()

				if(pPlayer.isAlive() and (iCivilizationType == iTellar):
					pTellar = gc.getPlayer(iPlayer).getTeam()

				if(pPlayer.isAlive() and (iCivilizationType == iEarth):
					pEarth = gc.getPlayer(iPlayer).getTeam()

					pTellar.addTeam(pVulcan)
					pTellar.addTeam(pAndoria)
					pTellar.addTeam(pEarth)
				
				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)
 
Here is the error:

Code:
if(pPlayer.isAlive() and (iCivilizationType == iVulcan):

I am not sure if it should be "iCivilizationType" but I am trying to get the program to figure out the race of the player to identify the Fed races. Any ideas for what variable or syntax?
 
Here is the error:

Code:
if(pPlayer.isAlive() and (iCivilizationType == iVulcan):

I am not sure if it should be "iCivilizationType" but I am trying to get the program to figure out the race of the player to identify the Fed races. Any ideas for what variable or syntax?

You are missing a close parenthesis. Or, alternatively, have an extra open parenthesis.

By the way, you also have a serious logic error (well, more than one but start with this one).
Consider what happens if the civilization type is not iEarth. It will never run the loop over the civilization types at all (so the various checks for other civs in that loop is currently pointless).
 
I am getting slowly closer. This time the game ran until the Fed Headquarters was built. Then it gave an error of " iCivilizationType is not defined" to the last line:

Code:
Federation Headquarters
		iFedHead = CvUtil.findInfoTypeNum(gc.getBuildingInfo, gc.getNumBuildingInfos(), "BUILDING_FEDHEAD")
		iEarth = CvUtil.findInfoTypeNum(gc.getCivilizationInfo, gc.getNumCivilizationInfos(), "CIVILIZATION_TERRAN")
		iVulcan = CvUtil.findInfoTypeNum(gc.getCivilizationInfo, gc.getNumCivilizationInfos(), "CIVILIZATION_VULCAN")
		iAndoria = CvUtil.findInfoTypeNum(gc.getCivilizationInfo, gc.getNumCivilizationInfos(), "CIVILIZATION_ANDORIA")
		iTellar = CvUtil.findInfoTypeNum(gc.getCivilizationInfo, gc.getNumCivilizationInfos(), "CIVILIZATION_TELLAR")
		if(iBuildingType == iFedHead) and (iCivilizationType == iEarth):

Lacking any programing knowledge how do you define a variable like that. How/where was iBuildingType defined so that I may do the same for iCivilizationType?
 
iBuildingType was passed in with the function call. You'd need to define iCivilizationType yourself using API functions (link on the modiki); you probably want something like pPlayer.getCivilizationType() (I think that's the syntax for it, but check the API if it doesn't work) instead of iCivilizationType.
 
Back
Top Bottom