Final Frontier: Problems & Issues (Post-3.13 Update Available)

Yet another CvAI bug:

In doCityAIProduction, on line 425 (in the section on calculating the weights for the military type weight) it is trying to add the system's production (quadrupled) but is using pCity.getProduction(). Sadly, this is, according to the API docs as linked to at the Modiki, not the city's total production but rather the amount of production points it has spent on the thing it is currently building. But the thing is, I think, only calling this function when it is trying to figure out what to put into an empty build queue, so I would expect .getProdution to return 0.
Oops.

Has:
Code:
		aiWeights[iMilitaryWeightType] += (pCity.getProduction() * 4)
Should have:
Code:
		aiWeights[iMilitaryWeightType] += (pCity.getYieldRate(YieldTypes.YIELD_PRODUCTION) * 4)
if it should include all modifiers like factories and such, if not it should be pCity.getBaseYieldRate. I think it should be the entire modified total, so I did the above fix.
 
I haven't played the Final Frontier mod in about 6 months, but recently when I tried to play a game with it, the entire interface is missing. No technology bar, unit action buttons, leader score list, city build interface, mini-map, etc. I just see the map with the cities/units/features/etc.

Anyone come across this before? Could it be a problem with the 3.19 patch?

I'm not sure if it is 3.19 or my monitor (1920x1080) or nvidia drivers, but I get the same issue. If I switch to the windows desktop and back, the interface returns. This wasn't an issue before with 3.17.

But the foreign advisor tech and resource panels don't work -- they show empty lines, and no selection buttons to change views. I work around that by not selecting them.

The interface works normally in the regular game and some other mods, haven't tested everything.
 
It was because I was running BUG mod. Presumably some interface changes in the BUG mod mean that the entire interface for Final Frontier is broken. Removing the BUG mod code from Custom Assets fixed the problem.
 
I am just wondering: Are squadrons supposed to get prestige from buildings and civ traits like other ships? Does it display their experience? And of course: WHY AREN'T MY SQUADS GAINING EXPERIENCE! And star bases too. They have values in their XP area in the XMLs. Is it their domain?

I used debug to give them levels, which worked, but it doesn't display their XP, and killing any number of units doesn't do anything, barbarian or other.
 
Squadrons, as with all the air units in the regular game, only get experience from shooting down other squadrons. They get no experience for killing other units. They also don't get experieince from training compounds or zealot schools - both of these are defined to give 2 xp to units with domain = land (the map in FF is, technically, all land) via the DomainFreeExperiences tag in the CIV4BuildingInfos.xml. Squadrons do get experience from traits, but the only civ with a trait that gives experience is the Brootherhood (this is done in python; it is not defined in the XML because there is nothing in CIV4TraitInfos.xml that allows giving xp, only specific promotions). Squadrons the Brotherhood builds should start with 4xp, just like all the other units they build (technically, even their construction ships have them even though there is nothing they can do with the xp), although this may not apply to starbases since they are not built in the usual way.
 
Thank you very much for the explanation. Now if only the AI would use enemy squadrons....

So... bombers cannot get experience (cept through the Brotherhood)? And what about starbases? They are domain immobile. Do they also not get experience?
 
Bombers can shoot down an interecpting fighter, but it is very uncommon due to the strength differential (and possibly the way the interception stuff works, which is apparently not the same way regular combat works) - as I recall, you'll almost always see a bomber do less than 20% damage (and often none) to the intercepting fighter but the fighter will often just plain shoot down the bomber (that 200% strength bonus fighters have that bombers don't means that even with the somewhat lower base strength they are still stronger than a bomber, even a bomber that is one type ahead - a plain fighter is stronger than a delta bomber when they fight).

A starbase would get experience if a unit attacked it and lost. I don't think they get any if they use their ranged attack to kill something. The AI does not normally attack starbases.
 
And what about overflow from buildings? It seems hammers are not carried to the next construction item like in basic civ mod and all the other mods I played. Hammers do overflow after building units but they don't after comleting planet improvements (mag-lev network, university etc.). It's not fun and very annoying as I have to calculate a lot and adjust production to minimize loss of hammers, which do not overflow :(

Is there a patch which fixes this?

PS I searched through the whole tread and found no matches for "overflow". Rather surprised by this.
 
How do we enable the debug messages in the python code for FF? Do they need to have the comment characters edited out?
 
Near the beginnign of CvSolarSystem.py is a line that says "g_bPrintDebugText = false".
Change that to "g_bPrintDebugText = true". This wil make the "printd" statements actually do something.

This enables all the output that hasn't been commented out (there is quite a bit of it), sending it to PythonDbg.log. If you need output at other places uncomment the existing statements if there are any, or add your own.

Also, when messing with the python you should probably enable the python error message popups in the main Civ ini (via HidePythonExceptions = 0) and there are a couple of other settings in there to check: LoggingEnabled = 1, ShowPythonDebugMsgs = 1; the last two of these might be on by deafult already for FF - check the ini after firing up FF as the last thing you run in Civ.
 
God-Emperor, thanks. I'll give that a try. No up enough on python (hell any modern programming language), yet, so i'll probably be taking a learning-diversion. :)
 
I would love to see the Aircraft(Spacecraft?) experience thing fixed.

But, what truly needs to be made is a late game generalist capital/Carrier ship

Something moderate in everything like the Galactica from the new Battlestar series.

Maybe something with 10-20% intercept, 1-2 slots of aircraft, decent movement( greater than battleship less than destroyer) and enough strength to hunt cruiser's and destroyers.

The reason for this is that destroyers, carriers, and battleships all are too specialized and nothing can take the place of something else as a stand in when needed.

(Lost my Carrier groups because my friend cut me off from the resource to make Battleships cheaper and buried my (few) battleships in Delta Cruisers until I lost them)

Also add more resource types or buildings that control health and happiness. I played a long conquest and diplomatic victory match that ended with my systems crippled by pollution and unhappiness. You would think they could shoot the pollution into the sun or something.
 
I just had a thought.

Is it possible to make paradrop activate from any tile?

If so all you need is a appropriate animation and a tech that add a new upgrade(something like FTL drive or hyperdrive) and you could create a way to travel rapidly across the map. just give the paradrop a range of 15-20. plus it can be intercepted by destroyers and fighters representing mine field deployment.
 
Guys, jusrt tell me. do you have production overflow in your games or I'm the only one who can see the little red bird?

I see no production overfolow from buildings either. I don't know what the cause is. Currently I suspect the plot yield update that is done in the onBuildingBuilt python that is not done in onUnitBuilt, as this appears to tbe the only thing going on that is different than for regular BtS that looks like it might be able to cause this.
 
Is it possible to make paradrop activate from any tile?
It is possible with a bit of work, we have managed to do this with the Babylon 5 Mod of FF. Ships should have a jump engine to enable them to open a jump point, they can then paradrop. Unfortunately we haven't been able to deactivate the option to jump from a system until jump points are researched. I've also been too busy with RL to do any work on this mod for quite a while.
 
I have found another FF bug.

This may be the main thing making FF based mods not do so well when trying to implement unique buildings.

In CvGameUtils.py, in the cannotConstruct function, on lines 272 to 275 you find:
Code:
			pBuildingInfo = gc.getBuildingInfo(eBuilding)
			for iNeededBuildingLoop in range(gc.getNumBuildingInfos()):
				if (pBuildingInfo.isBuildingClassNeededInCity(iNeededBuildingLoop)):
					if (not pPlanet.isHasBuilding(iNeededBuildingLoop)):

Note that iNeededBuildingLoop is using the number of building infos as its range.
It is, however, being passed to the isBuildingClassNeededInCity(i) function, which does not take a building info value. It takes a building class info value.

In plain old Final Frontier this works because not only is the number of building class infos identical to the number of building infos but they are also in the same order. The building class info 0 and building info 0 refer to the same building (the Capitol), likewise the value 6 for each is the same building (the Training Compound) - ditto for all the rest too.

Try to add in unique buildings and you hit two problems, neither of which has any obvious indications that it is happening until something goes completely wrong: 1) the number of building infos becomes larger than the number of building classes, and 2) they also no longer have a direct correspondence such that the same number always refers to the same variety of building. Problem 1 leads to the above loop going off the end of the building class info list when checking for prerequisites, leading to some random junk being read instead of the expected true/false value. Sooner or later it will start to return true instead of false and your building buttons will tend to disappear in the user interface because cannotConstruct starts blocking all of them.

How to fix this? Well, I did this (edited to just show this - my version of this function is modified inother ways as well so I hope I have not left anything out here):
Code:
		pCivilization = gc.getCivilizationInfo( gc.getPlayer(pCity.getOwner()).getCivilizationType())
		pBuildingInfo = gc.getBuildingInfo(eBuilding)
		for iNeededBuildingClassLoop in range(gc.getNumBuildingClassInfos()):
			if (pBuildingInfo.isBuildingClassNeededInCity(iNeededBuildingClassLoop)):
				iNeededBuildingLoop = pCivilization.getCivilizationBuildings(iNeededBuildingClassLoop ) # get this civilization's building for this buildingclass
				if (not pPlanet.isHasBuilding(iNeededBuildingLoop)):

After adding a couple of unique buildings things seemed to work OK for quite a while. Then I added another (non-unique) building and the buildings all disappeared from the lists of things to build (the pop-up you get when there is nothing in the queue, the basic city display from selecting a city, and in the city screen). Units were still there, abd the "process builds" (research and such) were still there. No buildings of any sort. Printing out a lot of debug info showed that the original version was returning a True value for "isBuildingClassNeedInCity" when checking building 6 (as the pBuildingInfo) for the last building info, which happened to be a UB and also 2 past the end of the number of building class infos. Using a debug DLL would have cause an assert to fire indicating that the passed value was larger than allowed.

This has, so far, solved the problem - I'm still running the test game, but the buildings are showing correctly in the game up to about turn 130.
 
I've done a test, and it does not remove the requirement that there be a matching number of building and buildingclass entries. I guess garbage entries such as:
Code:
		<BuildingClassInfo>
			<Type>BUILDINGCLASS_DOM_UB</Type>
			<Description>TXT_KEY_BUILDING_BARRACKS</Description>
			<iMaxGlobalInstances>-1</iMaxGlobalInstances>
			<iMaxTeamInstances>-1</iMaxTeamInstances>
			<iMaxPlayerInstances>-1</iMaxPlayerInstances>
			<iExtraPlayerInstances>0</iExtraPlayerInstances>
			<bNoLimit>0</bNoLimit>
			<bMonument>0</bMonument>
			<DefaultBuilding>NONE</DefaultBuilding>
			<VictoryThresholds/>
		</BuildingClassInfo>
aren't going anywhere (at least if you want UBs).
 
This would be yet another FF bug...

I'm surprised this hasn't been noticed before, but I can't find any mention of it.

If a "city" is razed then the next colony to be founded in that same system can have problems. Specifically, the individual planets can claim to have buildings on them that the game DLL doesn't think exist. These phantom buildings can't be built on these planets since the python function cannotConstruct thinks they already exist on the planet so indicates that you cannot do so. You also may be unable to build any buildings that require the phantom buildings for the opposite reason: it appears that if you have not built one of the prereq buildings somewhere in the system then the DLL knows you don't have the prereq at all and won't let you build the building.

I noticed this after I settled in a system that had formerly been a colony of the Paradise civ until a pirate invasion ship killed the defending destroyer and razed the colony maybe 10 turns after it was settled. Since it was a Paradise colony, every planet in the system had a mag-lev system added to it when they colonized it. When I colonized it, the main building list on the left side of the city screen (which is built from data frmothe DLL, not the planets' building data) showed no mag-lev systems but 3 of the 6 planets were still showing mag-lev systems - I assume that the other 3 were wiped out by the random 50% chance for buildings to be destroyed that happens in the onCityAcquired callback.

Tha cause of this is that in the DLL when a city is razed all of the buildings are deleted. This makes sense because in the regular game you can't have buildings anywhere but in a city, no city = no buildings.

The solution is to add an onCityRazed callback to CvFinalFrontierEvents.py so that all of the planets in the system are actually cleared of all buildings when the "city"/colony is razed. Something like this:
Code:
	def onCityRazed(self, argsList):
		'City Razed'
		self.parent.onCityRazed(self, argsList)
		
		pCity, iPlayer = argsList
		
		# Wipe out all of the buildings on all of the planets in the system.
		# They will be destroyed by the DLL shortly after this returns (there's no way to avoid it - you can't
		# have buildings without a city for them to be in, from the DLL's perspective).
		
		pSystem = self.getSystemAt(pCity.getX(), pCity.getY())
		
		pSystem.aaiSingleBuildingLocations = [] # clear this list

		# Loop through all the planets in the system
		for iPlanetLoop in range(pSystem.getNumPlanets()):
			pPlanet = pSystem.getPlanetByIndex(iPlanetLoop)
			# Loop through all building types
			for iBuildingLoop in range(gc.getNumBuildingInfos()):
				# Set the planet to not have one of these
				pPlanet.setHasBuilding(iBuildingLoop, false)
				
		# There are now no buildings left in the system.

There may be a related bug when a system is nuked with a doomsday missile. A planet is disabled but the buildings on it are not removed, either from the planet data or in the DLL's data. I would have to guess that if there was, for example, a bank on the disabled planet it would still give the +25% bonus to money. (I have seen a very small number of doomsday missiles used, but never against a system. I've only ever seen them used against ships in open space.)
 
Back
Top Bottom