Download Latest Version

I must say I am enjoying this mod. Not exactly sure what the optimum amount of players are on huge maps. Playing as Cadet, I played with teams (3 klingons, 2 romulans, 2 cardassians etc.)

Some minor things I would like to change are;

1) Experience Points should be based on the size of the opponent
2) Radiation clouds should be able to be cleaned up by workers (albeit slowly)
3) Buildings should have a restricted path. i.e. you can't build building 2 if you don't have building 1, etc.
4) The scale of the units, should give a better indication of the strength of the unit.
 
The avoid growth button should work (unless it was changed for ST).

When it is active, the population will just not grow when it should. All food will be retained up to the amount needed to grow, anything over that is thrown away (very wasteful, don't you know there are starving children over in the Klingon Empire?). Activating it doesn't reassign any population, which is why it does not initially seem to do anything, so if you want to switch population to lower food planets to get more production or commerce you have to do it manually (it affects the population distribution for the AI when a full population reassignment happens, in the seemingly rare event that an AI has activated it, since v1.4 of FFP).
 
The avoid growth button should work (unless it was changed for ST).

When it is active, the population will just not grow when it should. All food will be retained up to the amount needed to grow, anything over that is thrown away (very wasteful, don't you know there are starving children over in the Klingon Empire?). Activating it doesn't reassign any population, which is why it does not initially seem to do anything, so if you want to switch population to lower food planets to get more production or commerce you have to do it manually (it affects the population distribution for the AI when a full population reassignment happens, in the seemingly rare event that an AI has activated it, since v1.4 of FFP).

I do not even find it... in other mods it used to be next to automate production, there on the right box. Where is it here?
 
On the messages window in the middle it comes up as "dicovered" instead of "discovered" for a number of discoveries by nations.

Also there appears to be an odds message error as well when I am attacking - see screenshots.
 
I do not even find it... in other mods it used to be next to automate production, there on the right box. Where is it here?

It is at the usual location, here:
 

Attachments

  • AvoidGrowth.jpg
    AvoidGrowth.jpg
    6.3 KB · Views: 3,213
The avoid growth button should work (unless it was changed for ST).

When it is active, the population will just not grow when it should. All food will be retained up to the amount needed to grow, anything over that is thrown away (very wasteful, don't you know there are starving children over in the Klingon Empire?). Activating it doesn't reassign any population, which is why it does not initially seem to do anything, so if you want to switch population to lower food planets to get more production or commerce you have to do it manually (it affects the population distribution for the AI when a full population reassignment happens, in the seemingly rare event that an AI has activated it, since v1.4 of FFP).

In Star Trek it remained with the Final Frontier system of using it to disable the auto-assignment of population.
 
Just a suggestion - post your downloads at another site than Atomic Gamer. It makes you wait before a download starts, it contains adverts, and it features very slow dl speeds (34 minutes to download your mod).

Why not upload to something like mediafire to provide alternatives? :)
 
Since the discarding of food that would make you grow is in the DLL, it should still do that (unless changed for ST).

I have just looked at the ST Python code relating to population assignment a bit and I think it has some issues. Some of it is just a preference, but some of it is more serious and is likely to be having a significant adverse effect on the AI players.

I prefer the fix FFP has to the updateHumanCityTurn Python that makes it ignore the avoid growth setting so that it is allowed to assign population points even when this is active. It is relevant mainly for two situations. The first is when the borders expand, it allows formerly unassigned population to be assigned to any newly available planets. The second is when you gain happiness so that formerly unhappy population can work. In ST (and the original FF, as I recall) they are not automatically assigned in either case if you have the avoid growth turned on - you have to do it manually or they do not work, which is just a waste of production and commerce. With the FFP adjustment those now happy people (or people with newly available planets to work) will automatically go to work on a planet that it picks. I just checked and in FFP even for the human player if avoid growth is on it prioritizes (randomly) either production or commerce for the newly assigned population, so that isn't done just for the AI like I was thinking it was. I also checked ST and this particular priority adjustment is not in there (it is a comment and two lines of code after the "Barebones Production" lines in doCityAIUpdate, so it would be around line 199 of ST's CvAI.py if it was in there).

I also see that ST is only doing anything in updateHumanCityTurn for the human. This will tend to leave the AI with unassigned population points for various reasons. If the city loses happiness (perhaps a happy resource was plundered or there was some unhappiness from the war weariness effect, for example) and then regains the happiness, the population that was deassigned for being unhappy will not get reassigned unless there is a full reassignment (which only happens for getting nuked or captured). If the population grows, only one population point gets added to a planet - it does not do not a full reassignment for that, so if there was already a point or more unassigned from a temporary loss of happiness it will still have the same amount not working the planets. In effect, if you plunder a civs last copy of a specific happy resource you can permanently reduce the working population of any star system that was, at that time, at the happy cap or below it by less than the amount of happiness you just reduced them by. Each of those newly unhappy population points will never work for that AI player again even if they regain the happiness resource or build happy producing buildings. I also think that any population point that a city grows by that is over its happy cap will also never get assigned at any time in the future either, no matter how much more happiness they get in that city. Once it is unhappy for any reason, it looks like it will never get reassigned to a planet by anything short of being nuked (which tends to reduce the population, as well as wipe out a planet, so most of them probably won't be working after that either since they will probably be dead).

Since the border pop code in onCultureExpansion is using updateHumanCityTurn and in ST that does nothing if the player is an AI, it will also not assign any unassigned population points (if there are any) to work the newly available planets from the cultural expansion if the player is an AI (but will do so for the human, if they do not have avoid growth turned on). They will just keep being unassigned even though there are now places for them to work, so a system with sufficient food to grow the population over the inner zone planets' total population limit before the borders pop is actually a bad thing (ideally, it would go over that limit right after the borders pop, so the new population point has a place to work), and ditto for the second border increase. It looks like this is also an effectively permanent condition since it would take a full reassignment to get them reassigned which, again, only happens when getting nuked or captured. But when getting captured the cultural borders are almost certainly only going to cover the innermost zone unless it is recapturing a system that was taken from it. So it looks like the best way for the AI to get fully productive star systems in a lot of cases is to have them captured by someone else and then recapture them...

I'm pretty sure you should have the updateHumanCityTurn actually do its thing for any player, not just the human (in spite of the function name). Alternatively, the onCultureExpansion function could directly run AI.doCityAIUpdate(pCity) (no second parameter specified gives it the default of -1, forcing a complete reassignment of all population) instead of calling updateHumanCityTurn, and the onCityGrowth function could remove the second parameter to also force a full reassignment if it is an AI controlled city. Just making updateHumanCityTurn work for everybody is easier.

One of the more significant AI alterations in FFP was to make sure the AI was always assigning all available population to work, up to the current limit. This improved its performance significantly and the performance cost is small (and easily worth it for the better AI).
 
too bad that romulan daughter of tasha yar is not a playable romulan, i mean she had a lot of influence in various episodes including the duras scheme.
 
I'd like to try this, but atomicgamer limits my DL speed to 5k/sec (18h download time).

Isnt there any alternative DL available?
 
God-Emperor, these changes you are talking about is there a way to implement them now? Something of a patch that could be added to the current game?
 
Love this Mod guys is there any plans on merging or updating the MODMOD for theversions?
I dig the turn speed and the more specialized units / buildings but not the slow turn speeds.


Thanks for making such a great mod :goodjob:
 
Since the discarding of food that would make you grow is in the DLL, it should still do that (unless changed for ST).

I have just looked at the ST Python code relating to population assignment a bit and I think it has some issues. Some of it is just a preference, but some of it is more serious and is likely to be having a significant adverse effect on the AI players.

I prefer the fix FFP has to the updateHumanCityTurn Python that makes it ignore the avoid growth setting so that it is allowed to assign population points even when this is active. It is relevant mainly for two situations. The first is when the borders expand, it allows formerly unassigned population to be assigned to any newly available planets. The second is when you gain happiness so that formerly unhappy population can work. In ST (and the original FF, as I recall) they are not automatically assigned in either case if you have the avoid growth turned on - you have to do it manually or they do not work, which is just a waste of production and commerce. With the FFP adjustment those now happy people (or people with newly available planets to work) will automatically go to work on a planet that it picks. I just checked and in FFP even for the human player if avoid growth is on it prioritizes (randomly) either production or commerce for the newly assigned population, so that isn't done just for the AI like I was thinking it was. I also checked ST and this particular priority adjustment is not in there (it is a comment and two lines of code after the "Barebones Production" lines in doCityAIUpdate, so it would be around line 199 of ST's CvAI.py if it was in there).

I also see that ST is only doing anything in updateHumanCityTurn for the human. This will tend to leave the AI with unassigned population points for various reasons. If the city loses happiness (perhaps a happy resource was plundered or there was some unhappiness from the war weariness effect, for example) and then regains the happiness, the population that was deassigned for being unhappy will not get reassigned unless there is a full reassignment (which only happens for getting nuked or captured). If the population grows, only one population point gets added to a planet - it does not do not a full reassignment for that, so if there was already a point or more unassigned from a temporary loss of happiness it will still have the same amount not working the planets. In effect, if you plunder a civs last copy of a specific happy resource you can permanently reduce the working population of any star system that was, at that time, at the happy cap or below it by less than the amount of happiness you just reduced them by. Each of those newly unhappy population points will never work for that AI player again even if they regain the happiness resource or build happy producing buildings. I also think that any population point that a city grows by that is over its happy cap will also never get assigned at any time in the future either, no matter how much more happiness they get in that city. Once it is unhappy for any reason, it looks like it will never get reassigned to a planet by anything short of being nuked (which tends to reduce the population, as well as wipe out a planet, so most of them probably won't be working after that either since they will probably be dead).

Since the border pop code in onCultureExpansion is using updateHumanCityTurn and in ST that does nothing if the player is an AI, it will also not assign any unassigned population points (if there are any) to work the newly available planets from the cultural expansion if the player is an AI (but will do so for the human, if they do not have avoid growth turned on). They will just keep being unassigned even though there are now places for them to work, so a system with sufficient food to grow the population over the inner zone planets' total population limit before the borders pop is actually a bad thing (ideally, it would go over that limit right after the borders pop, so the new population point has a place to work), and ditto for the second border increase. It looks like this is also an effectively permanent condition since it would take a full reassignment to get them reassigned which, again, only happens when getting nuked or captured. But when getting captured the cultural borders are almost certainly only going to cover the innermost zone unless it is recapturing a system that was taken from it. So it looks like the best way for the AI to get fully productive star systems in a lot of cases is to have them captured by someone else and then recapture them...

I'm pretty sure you should have the updateHumanCityTurn actually do its thing for any player, not just the human (in spite of the function name). Alternatively, the onCultureExpansion function could directly run AI.doCityAIUpdate(pCity) (no second parameter specified gives it the default of -1, forcing a complete reassignment of all population) instead of calling updateHumanCityTurn, and the onCityGrowth function could remove the second parameter to also force a full reassignment if it is an AI controlled city. Just making updateHumanCityTurn work for everybody is easier.

One of the more significant AI alterations in FFP was to make sure the AI was always assigning all available population to work, up to the current limit. This improved its performance significantly and the performance cost is small (and easily worth it for the better AI).

How hard would this be to implement for Star Trek? I haven't played this mod in some time, but if the AI were made better I'd fire this mod right back up.
 
How hard would this be to implement for Star Trek? I haven't played this mod in some time, but if the AI were made better I'd fire this mod right back up.

Pretty easy. It's just a few changes to the Python. The ST mod is actually multiple mods, so you'd need to do the same thing in each of them (except the one that is on a normal map, as I recall).

To get almost everything I mentioned, just open up the CvFinalFrontierEvents.py file in the specific actual mod you are trying to modify (like the one in the main "Star Trek" mod - Star Trek\Assets\Python is the folder it is in for that mod), find the updateHumanCityTurn function, and replace it with this (fun with cut'n'paste, remember that the leading tabs on each line are important):
Code:
	def updateHumanCityTurn(self, pCity):
		pSystem = self.getSystemAt(pCity.getX(), pCity.getY())
		
		printd("\n\n\nWheeeee: Checking City System at %d, %d" %(pCity.getX(), pCity.getY()))
			
		iMax = pSystem.getPopulationLimit(true)#pCity.getPopulation()
		printd("Max Pop is %d" %(iMax))
		iUnassigned = iMax
		for iPlanetLoop in range(pSystem.getNumPlanets()):
			iUnassigned -= pSystem.getPlanetByIndex(iPlanetLoop).getPopulation()
			
		printd("Population which should be assigned on cultural expansion: %d" %(iUnassigned))
			
		if (iUnassigned > 0):
			AI.doCityAIUpdate(pCity, iUnassigned)
		elif (iUnassigned < 0): # for 1.81 - if the system has "gone negative", do a full reassignment
			AI.doCityAIUpdate(pCity)
		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)
Make a backup copy of the file first, just in case.

This is a slightly modified version of what is in my local version of FFP (well, it is on the SVN too; it has a few things not in the current v1.81, like that last "elif" section of that code). I had to modify this from what FFP uses because ST does not have the changes to the code that were done when BUG was merged into FFP (which changes one line of code: the first one that gets the star system). I don't think I missed anything but I did not test it...

Mostly, it just makes this function do everything in it for the AI players too and has some checks to see if it should do a full reassignment of the population.

The only thing I mentioned before that this one change doesn't do for you is the random picking of commerce or production as the priority if growth is turned off, over in doCityAIUpdate. Getting it to keep the population assigned at all is the most important thing, making it not be as concerned with food when growth is shut off is a less important factor.

This should help the AI some. Not necessarily a huge amount, but some. It will keep more of their population working and therefore tend to lead to them having some more production and commerce, but it won't help it make better use of that. (It may just build the wrong things faster, but it also opens up the opportunity to maybe get around to building the right things sooner. It should also give them a small increase to their research rate from the extra commerce.)
 
I haven't had a chance to try this out, but will let you know when I've had the chance... I play about in a month what I used to play in a few days haha, work and life... Anyhow thanks!
 
Still haven't had more than 10 minutes to play any game recently let alone this one, but this next weekend looks up...

I can't remember exactly what release of Star Trek it was, 2.x or 3.x, but I remember a very challenging game in which towards the end game research wise, I had multiple civilizations more than equaling me in power and on the warpath, a very fun game indeed.

The latest version is faster performance wise, and I do run into powerful enemies, but towards the end of the research tree there are multiple larger empires with descent fleets tech wise, but they seem to be underbuilt compared with what I've seen in the past.

If this change will make them build more of said ships, and be more productive in general, I think it will be a big win. Again thank you very much for taking the time to put this out, it's much appreciated.
 
Top Bottom