Final Frontier Plus

Okay, I've released v1.42. It fixes all reported issues- including starbase and ranged strikes issues (I don't know, however, if it fixes the OOS on ranged strike since I don't play MP), Capitol issues, the New Earth UB bug, the Capital Shipyard bug, and the potential bug involving UBs replacing the Mining or Nutrition Facility.

It's much larger than the previous patch since it includes a

I believe it will break save games- but I'm not sure since I don't actually have any save games from v1.41 to compare it with.
 
I Have a question for you.

If you remove the standard civs from the FF game and replace them with your own custom civs, as we have done with the B5 mod, all civs get the Star fortress built around every system.

Mag levs are automatically built on all planets before you even have the tech to build them.

Civ's are automatically getting 4 prestige for all new units constructed, another hangover from the basic FF civs.

Is there any way to disable these things?
 
I Have a question for you.

If you remove the standard civs from the FF game and replace them with your own custom civs, as we have done with the B5 mod, all civs get the Star fortress built around every system.

Mag levs are automatically built on all planets before you even have the tech to build them.

Civ's are automatically getting 4 prestige for all new units constructed, another hangover from the basic FF civs.

Is there any way to disable these things?

I'm guessing these are hangovers from the Python code for the traits.

Have you removed the Final Frontier traits or left them the same?
 
Have you removed the Final Frontier traits or left them the same?
The FF traits have been totally removed from XML but not from Python. I tried it once and the mod failed to load after i had removed the python stuff for traits. So i'm looking to find out what specific bits of Python i need to remove to allow the mod to stll load.
 
The FF traits have been totally removed from XML but not from Python. I tried it once and the mod failed to load after i had removed the python stuff for traits. So i'm looking to find out what specific bits of Python i need to remove to allow the mod to stll load.

OK, here's the basics for traits - if you have any that should duplicate the effects you should just change the TRAIT_WHATEVER instead of removing the section(s) of code for that trait.

Keep in mind that I am not actually trying any of this, but it should remove the references to traits that don't exist for you and also remove the code for the effects the traits are supposed to have. (It looks like the reason you are getting all of the effect for everybody is that the check to get the integer value for the traits are returning -1 when it can't find it and then checking to see if a player has that "-1" trait seems to always return True which causes all of the trait specific code to be run.)

In CvFinalFrontierEvents.py, in the onGameStart function:
Code:
			if (pPlayer.isAlive()):
				
				# XXX - This only works because at the start of the game we know player's starting city exists
				pCity = pPlayer.getCity(0)
				pSystem = self.getSystemAt(pCity.getX(), pCity.getY())
				
				[COLOR="Red"]# New Earth gets extra population when city built
				iTrait = CvUtil.findInfoTypeNum(gc.getTraitInfo,gc.getNumTraitInfos(),'TRAIT_NEW_EARTH')
				if (pPlayer.hasTrait(iTrait)):
					if not ('.CivBeyondSwordWBSave' in CyMap().getMapScriptName()):		#Added to stop New Earth from getting 3 population when loading a scenario, pop is stored there anyway
						pCity.changePopulation(1)
				
				# Paradise gets free Mag-Lev on every planet
				iTrait = CvUtil.findInfoTypeNum(gc.getTraitInfo,gc.getNumTraitInfos(),'TRAIT_PARADISE')
				if (pPlayer.hasTrait(iTrait)):
					
					iBuildingMagLev = gc.getCivilizationInfo(pPlayer.getCivilizationType()).getCivilizationBuildings(CvUtil.findInfoTypeNum(gc.getBuildingClassInfo, gc.getNumBuildingClassInfos(), "BUILDINGCLASS_MAG_LEV_NETWORK")) # this civ's mag lev network
					for iPlanetLoop in range(pSystem.getNumPlanets()):
						pPlanet = pSystem.getPlanetByIndex(iPlanetLoop)
						pPlanet.setHasBuilding(iBuildingMagLev, true)
						
					pCity.setNumRealBuilding(iBuildingMagLev, pSystem.getNumPlanets())
				
				# Red Syndicate gets 1 free trade routes when city built
				iTrait = CvUtil.findInfoTypeNum(gc.getTraitInfo,gc.getNumTraitInfos(),'TRAIT_SYNDICATE')
				if (pPlayer.hasTrait(iTrait)):
					pCity.changeExtraTradeRoutes(1)

				# Halis's unique unit is of the unitclass that the free starting ship is, so swap out
				# the starting planetary defense ship for a system defense boat
				iTrait = CvUtil.findInfoTypeNum(gc.getTraitInfo,gc.getNumTraitInfos(),'TRAIT_HALIS')
				if (pPlayer.hasTrait(iTrait)):
					iPlanetDefShip = CvUtil.findInfoTypeNum(gc.getUnitInfo,gc.getNumUnitInfos(),'UNIT_PLANETARY_DEFENSE_I')
					iSysDefBoat = CvUtil.findInfoTypeNum(gc.getUnitInfo,gc.getNumUnitInfos(),'UNIT_SYSTEM_DEFENSE_BOAT_I')
					pyPlayer = PyPlayer(iPlayerLoop)
					apUnitList = pyPlayer.getUnitList()
					pUnitToKill = -1
					for pUnitLoop in apUnitList:
						if (pUnitLoop.getUnitType() == iPlanetDefShip):
							# flag the unit for removal (don't modify the list when we are looping through it)
							pUnitToKill = pUnitLoop
							printd("Found unit to kill, id = %d" %(pUnitToKill.getID()))
					# kill the unit that was flagged (if one was) and add the replacement unit
					if (pUnitToKill != -1):
						pUnitToKill.kill(false, -1)
						#add a system defense boat
						pPlayer.initUnit(iSysDefBoat, pCity.getX(), pCity.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.NO_DIRECTION)[/COLOR]
		
		# Set up Player stuff: Star Systems & Gold
		for iPlayerLoop in range(gc.getMAX_CIV_PLAYERS()):
If you have no civs with UUs that should replace the starting unit(s) supplied by the map script and will never add any you can just remove all the stuff that is in red.

Otherwise, remove all the stuff in red and put this in instead:
(OK, at this point I have to warn you that I have not actually tested this piece of code - it should be doing what the comments indicate. It is the same general idea as the existing code for TRAIT_HALIS at the end of the stuff-to-be-removed, but run as a check for everybody instead of being hardcoded for players with a specific trait.)
Code:
				# Check the player for unique units, swapping out the starting ship(s) for the player's UU if appropriate
				pCivilization = gc.getCivilizationInfo(pPlayer.getCivilizationType())
				pyPlayer = PyPlayer(iPlayerLoop)
				apUnitList = pyPlayer.getUnitList()
				for pUnitLoop in apUnitList :
					iUnitType = pUnitLoop.getUnitType() # this unit's unit type
					iUnitClass = pUnitLoop.getUnitClassType() # this unit's unit class
					iCivUnitType = pCivilization.getCivilizationUnits(iUnitClass) # this civ's unit type of this class
					if (iUnitType != iCivUnitType ):
						# existing unit's type does not match this civ's unit for the unit's class
						printd("Found unit to swap: id = %d, from type = %d to type = %d" %(pUnitLoop.getID(), iUnitType, iCivUnitType))
						# add new unit
						pNewUnit = pPlayer.initUnit(iCivUnitType, pCity.getX(), pCity.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.NO_DIRECTION)
						# remove old unit
						pUnitLoop.kill(false, -1)

Shortly after that in the same function you should also remove all of this:
Code:
				# Paradise starts with 10x normal amount of gold
				iTrait = CvUtil.findInfoTypeNum(gc.getTraitInfo,gc.getNumTraitInfos(),'TRAIT_PARADISE')
				if (pPlayer.hasTrait(iTrait)):
					pPlayer.setGold(pPlayer.getGold() * 10)

In the same file, in updatePlotYield remove all of this:
Code:
				# The Forge get's 1 fewer food in all cities
				iTrait = CvUtil.findInfoTypeNum(gc.getTraitInfo,gc.getNumTraitInfos(),'TRAIT_THE_FORGE')
				if (pPlayer.hasTrait(iTrait)):
					aiSystemYield[0] -= 1
#					if (pCity.isCapital()):
#						aiSystemYield[1] += 1
#					else:
#						aiSystemYield[1] += 1
						
				# Red Syndicate gets +1 food and production for each Trade Route
				iTrait = CvUtil.findInfoTypeNum(gc.getTraitInfo,gc.getNumTraitInfos(),'TRAIT_SYNDICATE')
				if (pPlayer.hasTrait(iTrait)):
					for iTradeCity in range (pCity.getTradeRoutes()):
						pTradeCity = pCity.getTradeCity(iTradeCity)
#						printd("Trade city object:")
#						printd(pTradeCity)
						if (pTradeCity):
							if (pTradeCity.getName() != ""):
#								printd("entering trade route additions")
								aiSystemYield[0] += 1
								aiSystemYield[1] += 1

Still in the same file, in onCityBuilt remove all of this:
Code:
		# New Earth gets extra population when city built
		iTrait = CvUtil.findInfoTypeNum(gc.getTraitInfo,gc.getNumTraitInfos(),'TRAIT_NEW_EARTH')
		if (pPlayer.hasTrait(iTrait)):
			pCity.changePopulation(1)
		
		# Paradise gets free Mag-Lev on every planet
		iTrait = CvUtil.findInfoTypeNum(gc.getTraitInfo,gc.getNumTraitInfos(),'TRAIT_PARADISE')
		if (pPlayer.hasTrait(iTrait)):
			
			iBuildingMagLev = gc.getCivilizationInfo(pPlayer.getCivilizationType()).getCivilizationBuildings(CvUtil.findInfoTypeNum(gc.getBuildingClassInfo, gc.getNumBuildingClassInfos(), "BUILDINGCLASS_MAG_LEV_NETWORK")) # this civ's mag lev network
			
			for iPlanetLoop in range(pSystem.getNumPlanets()):
				pPlanet = pSystem.getPlanetByIndex(iPlanetLoop)
				pPlanet.setHasBuilding(iBuildingMagLev, true)
				
			pCity.setNumRealBuilding(iBuildingMagLev, pSystem.getNumPlanets())
		
		# Red Syndicate gets 1 free trade route when city built
		iTrait = CvUtil.findInfoTypeNum(gc.getTraitInfo,gc.getNumTraitInfos(),'TRAIT_SYNDICATE')
		if (pPlayer.hasTrait(iTrait)):
			pCity.changeExtraTradeRoutes(1)

Also in the same file, in onUnitBuilt remove this:
Code:
		iTrait = CvUtil.findInfoTypeNum(gc.getTraitInfo,gc.getNumTraitInfos(),'TRAIT_BROTHERHOOD')
		
		if (pPlayer.hasTrait(iTrait)):
			pUnit.changeExperience(4, 100, false, false, false)

And one more thing in the same file, in the onCityAcquired function remove this:
Code:
		# Red Syndicate gets 1 free trade route in captured cities
		iTrait = CvUtil.findInfoTypeNum(gc.getTraitInfo,gc.getNumTraitInfos(),'TRAIT_SYNDICATE')
		if (pPlayer.hasTrait(iTrait)):
			if (pCity.getExtraTradeRoutes() < 1):
				pCity.changeExtraTradeRoutes(1)
		
		# Paradise gets free Mag-Lev on every planet
		iTrait = CvUtil.findInfoTypeNum(gc.getTraitInfo,gc.getNumTraitInfos(),'TRAIT_PARADISE')
		if (pPlayer.hasTrait(iTrait)):
			
			iBuildingMagLev = gc.getCivilizationInfo(pPlayer.getCivilizationType()).getCivilizationBuildings(CvUtil.findInfoTypeNum(gc.getBuildingClassInfo, gc.getNumBuildingClassInfos(), "BUILDINGCLASS_MAG_LEV_NETWORK")) # this civ's mag lev network
			
			for iPlanetLoop in range(pSystem.getNumPlanets()):
				pPlanet = pSystem.getPlanetByIndex(iPlanetLoop)
				pPlanet.setHasBuilding(iBuildingMagLev, true)
				
			pCity.setNumRealBuilding(iBuildingMagLev, pSystem.getNumPlanets())

That should be everything in that file.

There is also one trait-specific thing in CvSolarSystem.py in the getExtraYield function remove the lines in red:
Code:
	def getExtraYield(self, iOwner, iYieldID):
		
		pPlayer = gc.getPlayer(iOwner)
		
		iExtraYield = 0
		
		[COLOR="Red"]iTrait = gc.getInfoTypeForString('TRAIT_THE_FORGE')
		iBuildingMiningFacility = gc.getInfoTypeForString('BUILDING_MINING_FACILITY')[/COLOR]
		
		#Yields from buildings (XML tags can be used, except for the Forge trait providing extra for the mining facility)
		for iBuildingLoop in range(gc.getNumBuildingInfos()):
			if (self.isHasBuilding(iBuildingLoop)):
				iYieldChange = gc.getBuildingInfo(iBuildingLoop).getPlanetYieldChanges(iYieldID)
				iExtraYield += iYieldChange
				
				[COLOR="Red"]# Production boost for the Forge's Mining Facilities & Capital
				if (iYieldID == 1):
					if (pPlayer.hasTrait(iTrait)):
						if (iBuildingLoop == iBuildingMiningFacility):
							iExtraYield += 1[/COLOR]
		
		#Yields from civics (again, XML tags can be used)
		for iCivicOption in range(gc.getNumCivicOptionInfos()):
			for iCivic in range(gc.getNumCivicInfos()):
				if pPlayer.getCivics(iCivicOption) == iCivic:
					iYieldChange = gc.getCivicInfo(iCivic).getPlanetYieldChanges(iYieldID)
					iExtraYield += iYieldChange
					
		# CP - add golden age effect, thanks for the idea of doing it here go to TC01
		if pPlayer.isGoldenAge():
			if (self.getBaseYield(iYieldID) + iExtraYield) >= gc.getYieldInfo(iYieldID).getGoldenAgeYieldThreshold() :
				iExtraYield += gc.getYieldInfo(iYieldID).getGoldenAgeYield()
			
		return iExtraYield

This should remove every effect caused by traits in the Python.

There are still references to buildings, units, and unit classes in a bunch of places.
 
In v1.42 the iConquestProb related Python (line 1247 in CvFinalFrontierEvents.py) does not have the fix mentioned in posts 209-211 applied to it (it is still "<" instead of ">=").

Right now it has the strange situation that if you had two buildings that had iConquestProb values of 100 and 99, the one that was 100 would always survive since the condition in the "elif" would have it skip the check but the one that was 99 would have a 1% chance of surviving since the random number is from 0 to 99 so it would only survive on a 99.
 
I Have a question for you.

If you remove the standard civs from the FF game and replace them with your own custom civs, as we have done with the B5 mod, all civs get the Star fortress built around every system.

Mag levs are automatically built on all planets before you even have the tech to build them.

Civ's are automatically getting 4 prestige for all new units constructed, another hangover from the basic FF civs.

Is there any way to disable these things?

Well, since both Star Trek mod and MOO2Civ have their own custom civs I'd say yes there is. I don't know precisely in what way deanej modified the civ starts, but just like in MOO2Civ they don't start with either Mag Lev or Star Fortress. You can edit the start situation per civ without any python changes, although at this late hour the exact xml file eludes me... :sleep:
 
If I keep the default traits but add new ones (non-python) I shouldn't get this issue?
 
If I keep the default traits but add new ones (non-python) I shouldn't get this issue?

That should work.

On the other hand, you you could look about 5 posts back where I listed what needs to be removed from the Python to eliminate the existing traits. Nobody has commented on it, so as far as I know I didn't miss any pieces (not missing any would not be too surprising, I used Notepad++'s "Find in files" feature to locate every place that had the string "TRAIT_" to make sure I got them all).
 
If I keep the default traits but add new ones (non-python) I shouldn't get this issue?

That's what we did with MOO2Civ, so yes. (The FF traits are still there, but they aren't used. I removed the free Mag Lev network later, because it didn't make sense to me; the free Star Fortress issue didn't occur. The 4 free prestige/promotions did occur, but was both used in later promotion modifications and by linking certain promotions to certain techs; so units might theoretically have free promotions, but could only actually use them when those techs were discovered.)
 
Final Frontier Plus has broken into the top 100 downloaded Civ-4 mods here on CFC.

In the "Civ-4 Modpacks" section of the downloads, if you sort by number of downloads it is the last entry on the 4th page. 25 entries per page => number 100. A few days ago I got curious and checked. It was on page 5, around #107, so I started to check on it every day. It has been moving up 1 or 2 places per day (yesterday at about this time it was #102).
 
I suppose I really should start working on a next version now.

I want to get the "Inhabited Planets" goodies enabled, along with a "No Aliens" game-option that disables them.

I also decided that I'm going to add the Sensor Array unit from deanej's Star Trek mod (like a starbase, but with no attack and a really big line of sight). Unfortunately at present the AI won't build it- I know he was working on that for 3.0 but 3.0 is not yet out.

I'm also going to get the AI to build starbases near their solar systems (to serve as defensive platforms) in addition to near resources and wormholes. And fix the iConquestProb bug.

Maybe I'll go through this thread and implement stuff I haven't done yet (like the Sentry While Healing button).

Final Frontier Plus has broken into the top 100 downloaded Civ-4 mods here on CFC.

In the "Civ-4 Modpacks" section of the downloads, if you sort by number of downloads it is the last entry on the 4th page. 25 entries per page => number 100. A few days ago I got curious and checked. It was on page 5, around #107, so I started to check on it every day. It has been moving up 1 or 2 places per day (yesterday at about this time it was #102).

It's the 100th most downloaded mod at present.

Nice!
 
I was thinking about it, and I have a system worked out, but it got pushed back to 4.0, especially once I decided not to use the python mod helper in the main mod (and I don't think the AI stuff for the sensor post could be implemented with it anyways - or it might have been the cloaking AI).
 
Hi there (apologies if this has already been asked/posted):

I'm running FF on BTS for the Mac (from Aspyr) but seems like this is for the PC version?

Can you confirm that I could download/install/play this mod on the Mac version?

Looks like a lot of great work and I'm excited to see an updated/better version of the Final Frontier.

Thanks for the clarification!
 
Final Frontier Plus won't work on a Mac because it uses a custom DLL. No mod with a custom DLL works on the Mac.

My "Finaler Frontier" mod (it is not in the download database - it is posted in this thread, post 163 on page 9 and there is a link to it in the first post) should work on the Mac, although I can't be certain. There are minor differences in the Python and XML that could cause problems, but that is unlikely. At this point that would get you pretty much all of the the extra content and Python bug fixes (except those done after it was posted - I think that is only the ranged combat related fixes for the AI controlled starbases that would be missing) but not most of the speed-up. You even get some stuff that is not in FFP: a second leader for each civilization and minor traits (essentially half strength versions of the regular Civ traits, each leader gets one and the two leaders for each civ don't have the same secondary trait). One small problem - it doesn't work with the Worldbuilder saves as there has been nothing added to deal with the planet based resources (regular saved games do work).

EDIT: I just remembered that Finaler Frontier is in 7-zip format. I have no idea what software, if any, is available for the Mac to unpack a 7-zip file. OK - I just checked and there are something like 4 different versions of 7-zip for the Mac (see the list towards the end of the 7-zip download page).
 
I have filled in some of the missing stuff:

+ Buttons for the two UBs that don't have them (like the others, these are the non-UB buttons with an overlay in the upper right side of the UB's civ's symbol). Added entires in CIV4ArtDefines_Building.xml and adjusted CIV4BuildingInfos.xml.
- Technical Institute (AstroTech UB)
- Research Institute (Avowers UB)


+ Text for the Civilopedia and Strategy text keys for all of the new units and the pedia text for the Vacuum Engineering tech (also copied the English text into the strangely empty Spanish tag for TXT_KEY_BUILDING_COTTONMILL_STRATEGY):
TXT_KEY_TECH_MISC_0_PEDIA
TXT_KEY_UNIT_BATTLECARRIER_PEDIA
TXT_KEY_UNIT_BATTLECARRIER_STRATE
TXT_KEY_UNIT_BATTLECRUISER_PEDIA
TXT_KEY_UNIT_BATTLECRUISER_STRATEGY
TXT_KEY_UNIT_LR_SPACE_BOMBER_PEDIA
TXT_KEY_UNIT_LR_SPACE_BOMBER_STRATEGY
TXT_KEY_UNIT_LR_SQUADRON_Q_PEDIA
TXT_KEY_UNIT_LR_SQUADRON_Q_STRATEGY
TXT_KEY_UNIT_MISSILE_FRIGATE_PEDIA
TXT_KEY_UNIT_MISSILE_FRIGATE_STRATEGY
TXT_KEY_UNIT_PSU_PEDIA
TXT_KEY_UNIT_PSU_STRATEGY
TXT_KEY_UNIT_SQUADRON_Q_PEDIA
TXT_KEY_UNIT_SQUADRON_Q_STRATEGY
TXT_KEY_UNIT_RAPID_CONSTRUCT_SHIP_PEDIA
TXT_KEY_UNIT_RAPID_CONSTRUCT_SHIP_STRATEGY
TXT_KEY_UNIT_RECON_PEDIA
TXT_KEY_UNIT_RECON_STRATEGY
TXT_KEY_UNIT_SYSTEM_DEFENSE_BOAT_PEDIA
TXT_KEY_UNIT_SYSTEM_DEFENSE_BOAT_STRATEGY

Attached is a zip file that can be applied as a patch to 1.42. It includes a text file listing the changes.
 

Attachments

  • FFP-1-42a.zip
    50.4 KB · Views: 84
Thanks, God-Emperor! I'll merge it into the next version, but obviously anyone can download and apply it now.
 
There is still a lot of stuff left to do in this general area...

There are a bunch of non-existent text keys in use by the new buildings (including wonders), all but one of the new techs re-use quotes from other techs, two of the new techs are using the Astral Ascension button art, the flight school button is the same as the training compound button, most of the world wonders are using the button art for the Great Rings park, all of the shrines are using the Jewish Shrine button, and the two levels Neural Interface promotions are both using the Upgraded Weapons art.

I may upload another set this Sunday, probably some (or maybe all, but there are a lot - my list currently has 74 things including some that are not missing but need changes) of the missing text keys for the buildings.
 
Top Bottom