Final Frontier Plus

I am forced to agree with Strategist83's assessment of the FF game. I've come across the same problem in the B5 mod and until recently have not been able to do very much about it. I've added 1 food to the benefits of having a trade route between 2 cities/solar systems. This has helped but I've also made having access to one of the food resources provide a benefit in food growth to all cities/star systems connected to it. The only problem with doing this is the AI is still not growing enough as, as stated above, the AI prefers production and/or credits over food planets.
Is there anything that can be done to get the AI to use the food planets as a higher priority?

It is possible to shift the priorities. It is also possible to make them reevaluate their population distribution across the planets in star systems more often - in the late game it is done rather infrequently.

Currently, the target minimum food surplus is 3. In the early game this is plenty and in the late game they are usually producing over that simply because the planets usually produce more than that. You could bump it up to 4, but I probably wouldn't go over that, or possibly give it a +1 for every 5 population in the system (if under the happy cap, anyway).
Perhaps something like this, in CvAI.py in the doCityAIUpdate function...
current:
Code:
		# Place population 1 by 1
		for iPopLoop in range(iPopulationToAssign):
			
			printd("\n   iPopLoop = %d" % (iPopLoop))
			#printd(iPopLoop)
			
			# Determine what the new most important yield is
			
			# Always need food to grow
			if (iSurplusFood < 3):
				iYieldNeededMost = 0
			else:
				iYieldNeededMost = 1
new (untested):
Code:
		[B][COLOR="DarkRed"]iFoodMin = 3 
		if (pCity.getPopulation() < pSystem.getPopulationLimit() and pCity.angryPopulation(0) == 0):
			iFoodMin += pCity.getPopulation()/5[/COLOR][/B]
		# Place population 1 by 1
		for iPopLoop in range(iPopulationToAssign):
			
			printd("\n   iPopLoop = %d" % (iPopLoop))
			#printd(iPopLoop)
			
			# Determine what the new most important yield is
			
			# Always need food to grow
			if (iSurplusFood < [B][COLOR="DarkRed"]iFoodMin[/COLOR][/B]):
				iYieldNeededMost = 0
			else:
				iYieldNeededMost = 1

The AI could also stand to do a full population reassignment from time to time. At the moment it will do a full reassignment only if the unassigned population is negative (which ought to happen if it whips or drafts or starves except for starving away an unhappy population point) or if the surplus food is less than 0, which normally only happens if the population has grown but there is either not place to put it or the only available planets for it produce no food. It might be better to make it do a reassignment if the food is <= 0 instead of just <0 if under the happy cap. It might also be good to just force a reassignment ever X turns regardless of any other consideration. For this, changes would be in FinalFrontierEvents.py in the updateHumanCityTurn function, right at the end.
current:
Code:
		elif (not pCity.isDisorder()): # post v1.81 - try to avoid starvation:
			# If the city is not in disorder, check to see if the food produced is less than the food consumed.
			# note: If the city has serious happiness or health issues it may do this every turn to no avail.
			#		Especially if it is The Forge with its -1 food per city. Oh well.
			iSurplusFood = pCity.getYieldRate(0) - (pCity.getPopulation() * gc.getDefineINT("FOOD_CONSUMPTION_PER_POPULATION"))
			if (iSurplusFood < 0):
				printd("updateHumanCityTurn: detected starvation in %s, net food = %d" % (pCity.getName(), iSurplusFood))
				AI.doCityAIUpdate(pCity)
new (also untested, of course):
Code:
		elif (not pCity.isDisorder()): # post v1.81 - try to avoid starvation:
			# If the city is not in disorder, check to see if the food produced is less than the food consumed.
			# note: If the city has serious happiness or health issues it may do this every turn to no avail.
			#		Especially if it is The Forge with its -1 food per city. Oh well.
			iSurplusFood = pCity.getYieldRate(0) - (pCity.getPopulation() * gc.getDefineINT("FOOD_CONSUMPTION_PER_POPULATION"))
			if (iSurplusFood < 0):
				printd("updateHumanCityTurn: detected starvation in %s, net food = %d" % (pCity.getName(), iSurplusFood))
				AI.doCityAIUpdate(pCity)
			[B][COLOR="DarkRed"]elif (iSurplusFood == 0 and pCity.getPopulation() < pSystem.getPopulationLimit() and pCity.angryPopulation(0) == 0):
				printd("updateHumanCityTurn: no food surplus when not at pop limit")
				AI.doCityAIUpdate(pCity)
			elif (CyGame().getGameTurn() % 15 == pCity.getOwner()):
				printd("updateHumanCityTurn: periodic population reassignment")
				AI.doCityAIUpdate(pCity)[/COLOR][/B]
With this, the star system will not only reassign all the population if the food used is greater than the food produced, but also if it is equal (no growth happening) and it is not at the population limit and not unhappy, and also once every 15 turns just in case. The turns the civs do this is staggered based on the player number (if you have more than 15 players at a time that check should be adjusted).

This might get the AI out of the "whipped and/or drafted my population way down and now the population is not growing" situation it gets itself into.

As pointed out, the current benefits from whipping are not fantastic and the AI still tends to do it more than it should even after I put some limits on it in the DLL, especially if the AI is also able to draft. It may be good to increase the production per population point from 30 to 40, or perhaps even 50, just to help the AI get more value from it. This involves bringing the CIV4HurryInfo.xml from plain Civ into the mod and editing it to change the iProductionPerPopulation value for the HURRY_POPULATION hurry type.

If anybody tries any of these changes, let me know if it helps any.
 
It is possible to shift the priorities. It is also possible to make them reevaluate their population distribution across the planets in star systems more often - in the late game it is done rather infrequently.

Currently, the target minimum food surplus is 3. In the early game this is plenty and in the late game they are usually producing over that simply because the planets usually produce more than that. You could bump it up to 4, but I probably wouldn't go over that, or possibly give it a +1 for every 5 population in the system (if under the happy cap, anyway).
Perhaps something like this, in CvAI.py in the doCityAIUpdate function...
current:
Code:
		# Place population 1 by 1
		for iPopLoop in range(iPopulationToAssign):
			
			printd("\n   iPopLoop = %d" % (iPopLoop))
			#printd(iPopLoop)
			
			# Determine what the new most important yield is
			
			# Always need food to grow
			if (iSurplusFood < 3):
				iYieldNeededMost = 0
			else:
				iYieldNeededMost = 1
new (untested):
Code:
		[B][COLOR="DarkRed"]iFoodMin = 3 
		if (pCity.getPopulation() < pSystem.getPopulationLimit() and pCity.angryPopulation(0) == 0):
			iFoodMin += pCity.getPopulation()/5[/COLOR][/B]
		# Place population 1 by 1
		for iPopLoop in range(iPopulationToAssign):
			
			printd("\n   iPopLoop = %d" % (iPopLoop))
			#printd(iPopLoop)
			
			# Determine what the new most important yield is
			
			# Always need food to grow
			if (iSurplusFood < [B][COLOR="DarkRed"]iFoodMin[/COLOR][/B]):
				iYieldNeededMost = 0
			else:
				iYieldNeededMost = 1

The AI could also stand to do a full population reassignment from time to time. At the moment it will do a full reassignment only if the unassigned population is negative (which ought to happen if it whips or drafts or starves except for starving away an unhappy population point) or if the surplus food is less than 0, which normally only happens if the population has grown but there is either not place to put it or the only available planets for it produce no food. It might be better to make it do a reassignment if the food is <= 0 instead of just <0 if under the happy cap. It might also be good to just force a reassignment ever X turns regardless of any other consideration. For this, changes would be in FinalFrontierEvents.py in the updateHumanCityTurn function, right at the end.
current:
Code:
		elif (not pCity.isDisorder()): # post v1.81 - try to avoid starvation:
			# If the city is not in disorder, check to see if the food produced is less than the food consumed.
			# note: If the city has serious happiness or health issues it may do this every turn to no avail.
			#		Especially if it is The Forge with its -1 food per city. Oh well.
			iSurplusFood = pCity.getYieldRate(0) - (pCity.getPopulation() * gc.getDefineINT("FOOD_CONSUMPTION_PER_POPULATION"))
			if (iSurplusFood < 0):
				printd("updateHumanCityTurn: detected starvation in %s, net food = %d" % (pCity.getName(), iSurplusFood))
				AI.doCityAIUpdate(pCity)
new (also untested, of course):
Code:
		elif (not pCity.isDisorder()): # post v1.81 - try to avoid starvation:
			# If the city is not in disorder, check to see if the food produced is less than the food consumed.
			# note: If the city has serious happiness or health issues it may do this every turn to no avail.
			#		Especially if it is The Forge with its -1 food per city. Oh well.
			iSurplusFood = pCity.getYieldRate(0) - (pCity.getPopulation() * gc.getDefineINT("FOOD_CONSUMPTION_PER_POPULATION"))
			if (iSurplusFood < 0):
				printd("updateHumanCityTurn: detected starvation in %s, net food = %d" % (pCity.getName(), iSurplusFood))
				AI.doCityAIUpdate(pCity)
			[B][COLOR="DarkRed"]elif (iSurplusFood == 0 and pCity.getPopulation() < pSystem.getPopulationLimit() and pCity.angryPopulation(0) == 0):
				printd("updateHumanCityTurn: no food surplus when not at pop limit")
				AI.doCityAIUpdate(pCity)
			elif (CyGame().getGameTurn() % 15 == pCity.getOwner()):
				printd("updateHumanCityTurn: periodic population reassignment")
				AI.doCityAIUpdate(pCity)[/COLOR][/B]
With this, the star system will not only reassign all the population if the food used is greater than the food produced, but also if it is equal (no growth happening) and it is not at the population limit and not unhappy, and also once every 15 turns just in case. The turns the civs do this is staggered based on the player number (if you have more than 15 players at a time that check should be adjusted).

This might get the AI out of the "whipped and/or drafted my population way down and now the population is not growing" situation it gets itself into.

As pointed out, the current benefits from whipping are not fantastic and the AI still tends to do it more than it should even after I put some limits on it in the DLL, especially if the AI is also able to draft. It may be good to increase the production per population point from 30 to 40, or perhaps even 50, just to help the AI get more value from it. This involves bringing the CIV4HurryInfo.xml from plain Civ into the mod and editing it to change the iProductionPerPopulation value for the HURRY_POPULATION hurry type.

If anybody tries any of these changes, let me know if it helps any.

Thanks God-Emperor, I'll try out the changes today.
 
I've spent 4 days now trying to install ff+ onto my steam civ 4 bts...no luck. I've tracked down posts from God-Emperor and TC01 about this issue, and none of their listed fixes work. I've uninstalled and reinstalled the game numerous times as well.

Anybody out there have any advice? Has anyone actually managed to install ff+ onto a steam edition civ4?
 
I've spent 4 days now trying to install ff+ onto my steam civ 4 bts...no luck. I've tracked down posts from God-Emperor and TC01 about this issue, and none of their listed fixes work. I've uninstalled and reinstalled the game numerous times as well.

Anybody out there have any advice? Has anyone actually managed to install ff+ onto a steam edition civ4?

Are you getting a GFC error? If so, download the full install file and move the files manually into the mods folder in Program Files and NOT the one in your Documents folder.


I will say that I'm also having a problem where everything runs fine and I can get the game to start, but for some reason there are no actual planets populating. They are missing graphically and also produce no hammers, food, etc.
 
I've incorporated God-Emperor's AI changes into git and played a test game with them; they seemed to help (or the AI wasn't worse at any rate).

Rushing now provides 50 hammers. The AI still seems to use it all the time, but hopefully that helps a bit. EDIT: well, some of them do. Maybe Slave State should be de-prioritized by the AI, too?

I also tried to implement some of what was discussed on the last page. I shifted the war and unit production knobs a bit, and in CvAI I prevented the AI from considering starbases as military units when determining whether or not to prioritize military (as was suggested). Though currently, this will merely force the AI to prioritize capital shipyards even more than it already did and sometimes also prioritize squadrons and carriers.

Along with some AI tweaks (I know, it needs more than just tweaking, but...), a few miscellaneous bugfixes, plus a patch from DarkLunaPhantom to allow FF+ to work in PitBoss mode, and some unique leader diplo text (including annoyed/furious greeting text, which we currently don't have any of) will probably be coming out in a patch by sometime next week.

Are you getting a GFC error? If so, download the full install file and move the files manually into the mods folder in Program Files and NOT the one in your Documents folder.


I will say that I'm also having a problem where everything runs fine and I can get the game to start, but for some reason there are no actual planets populating. They are missing graphically and also produce no hammers, food, etc.

Interesting. Are you on Windows Vista/7 or above? Is user access control enabled?

How did you install the mod-- using the manual zip file?

Can you enable logging/python debugging (see here), if you haven't already?
 
I have uploaded v1.84, almost two years to the day of the last release!

Full changelog (derived from git):

Code:
-Merged patch from DarkLunaPhantom to allow BUG to work in PitBoss mode.
-Added some new unique diplomacy text to all leaders, based on suggestions from the forums ([url]http://forums.civfanatics.com/showthread.php?t=517635[/url])
-Improved the efficiency of rushing via Slave State from 30 hammers to 50.
-Modified the AI to now forces a population reassignment every fifteen turns.
-The target minimum food surplus for the AI has been changed to vary over the course of the game, as cities grow larger.
-All AI leaders are now slightly more likely to build ships and plan war.
-Fixed rare potential CTD that could happen if a unit withdrew off the map.
-Fixed Wormholes bug that would stop Wormholes from working if their x *or* y coordinate happened to be the same.
-Fixed potential minor Python bug involving adding a planet to a solar syste.m
-Fixed PlotListEnhancements (BUG) crash when a starbase is built while the construction ship building it is selected.
-Defined the TXT_KEYs for the (useless/hidden/ignored) Alien civilization to clean up the pedia.
-Flavor change: adjusted land area computation to use lightyears as a unit.
-Flavor change: slightly adjusted average lifespan in demographics upwards.

I will be uploading a manual install version of the patch to the ModDB site, but I just installed v1.83 + patch on my laptop, where Beyond the Sword is installed via Steam, and had no problems.

It's a patch, so you need 1.83 installed first.

Thanks to everyone for the kind words and criticism over the past two years-- and from the beginning, of course! It means a lot. :)

I certainly haven't done a very good job responding in a timely fashion to people for a few years now-- you can blame university for that (mostly). I have vague ambitions of doing more work on the mod, especially now that I sat down, played a few games for the first time in literally years, and did a bit of work. Of course, university is about to start back up again...

But I did read everything that's been written over the past two years when I decided to assemble this patch, and have some ideas of my own that I'd quite like to pursue, time permitting. Maybe there will be another release by next summer, or a couple of prototype modmods. Who knows?

Civ 4 is an old game these days, but I find it as enjoyable as ever to play and mod.
 
So I installed this mod, and the patch but it just keeps giving an error about it not being able to load the primary control theme? I do not know what is going on here, but FF works fine, FF+ does not.


EDIT: After a quick review of a few posts above I think it may be fixed.
 
So I installed this mod, and the patch but it just keeps giving an error about it not being able to load the primary control theme? I do not know what is going on here, but FF works fine, FF+ does not.


EDIT: After a quick review of a few posts above I think it may be fixed.

So the usual questions for this sort of thing are:

1. Are you on Windows Vista+, and if so, do you have User Access Control enabled? If you do, you need to disable it. (I cannot guarantee that the mod works at all on Windows 8 or 10, unfortunately).

2. Where is the mod installed? It should not be installed under your Documents tree, but under Program Files, as was mentioned above.
 
Windows 8, and it was under documents. I moved it and it wouldn't show up in the mods list so I just gave up. I'll give it a go again at a later date.
 
Windows 8, and it was under documents. I moved it and it wouldn't show up in the mods list so I just gave up. I'll give it a go again at a later date.

Can you post the full path?

It should be located alongside e.g. Final Frontier, FfH: Age of Ice, Next War, and so on. Note that if you have the game through Steam this might be slightly special; IIRC there is a Beyond the Sword folder inside the steamapps/Sid Meier's Civilization IV Beyond the Sword.../ folder. This is because BTS wasn't originally designed as a standalone game and depends on some vanilla Civ stuff that is installed to this toplevel directory, and then all the actual Beyond the Sword content is in the "Beyond the Sword" directory.

(I'm not sure that made sense; when I'm next on a Windows machine I post a slightly more detailed explanation).

You want to install into Beyond the Sword/Mods, not /Mods. (I should edit the first post / install instructions with all this information).

If it's still not showing up in the BTS menu, I'm afraid I'm not sure what to suggest.

EDIT: For the 1.9 release, the installers will auto-detect a Steam install and fill in the path properly (I started working on this for 1.84 but didn't get it completed). Also I realized I never posted a zip of the patch to ModDB-- I will do this tomorrow.
 
Greetings everyone

We are currently playing version v1.83 in a PBEM game, we lost one of our players and need a replacement player in our Civilization_IN_SPACE!

It is AD-2310-September_to_Lu_Tianqu

If interested please click on the game's title above.

Thank you and my apologies for posting here but I thought fans would be subscribed

ps Awesome Modmod and game
 
I'm trying Download Main Mod (3) with the zip version of the patch. When I start a game I get a number of error messages, star system graphics don't appear, the city menu and icons don't appear properly and the score gets multiplied by 50. The thing is that I have very similar issues when I try the MOO2 5.3 mod. I've reinstalled Civ4, which makes suspect that if the issue isn't within the mod, something in the civ4 folders in my documents is causing this.



 
Well, I've tried it with another reinstall and the content of the Civ4 folders in my documents moved elsewhere and I still have the same issue. Something is wrong with the mod.
 
Well, I've tried it with another reinstall and the content of the Civ4 folders in my documents moved elsewhere and I still have the same issue. Something is wrong with the mod.

What version of Windows do you have? Do you have User Access Control enabled? If you do, you must turn this off for things to work properly.

Where exactly is the mod installed?

Can you turn on debugging if you haven't already?

EDIT: So, from the error messages in that screenshot, I would guess that you have UAC on, but I could be wrong. For whatever reason BUG was unable to create an INI file at that path, for instance. The mod install path looks fine though.
 
Do you mean User Account Control? I had it on default, changing it to never didn't change anything.

I have Windows 7 64bits, mod is in Program Files (x86)/2k games/...yada-yada.../Beyond The Swords/mods.

I don't think I can turn on debugging because I'm having weird issues with the .ini file. Those entries you mention in the link don't appear in it.

(in fact hardly any appear in the .ini file - if you're interested: http://forums.civfanatics.com/showthread.php?t=557707 )
 
I think 2k games is an additional folder that comes with the Complete Edition (before Firaxis). Perhaps it makes a difference for the Mod.
 
I have the complete edition yes, though it never caused me any issues in the past.
 
Top Bottom