Development

Here's the first one: some stuff for version 1.6.
Includes:

CvAI.py for doCityAIProduction updates to have it build the various planetary resource related buildings (Farm, Harbor, Plantation, etc.), a bug-fix to have it check for the presence of a mag-lev on the planet before pushing the construction of a commercial satellites, and the addition of extended habitation systems and nanoextraction upgrades as things it can try to build using logic like that of the commercial satellites.

CvGameUtils.py for getCityFoundValue to add soem value to the plots' ratings when planetary reousrces are present.

CIV4LeaderHeadInfos.xml for an update to Lu Tianqu to give him a Science type flavor value of 2 to go with his Culture flavor value of 10.

CIV4TechInfos.xml for an update to Terrestrial Networking which increases its Science and Gold flavor values from 8 to 10 in an attempt to increase the likelihood that the AIs will research it (they usually bypass it until they have to get it for one of the techs that have it as a prereq).

Also includes a text file with a detailed list of changes.
 

Attachments

  • FFP for 1.6.zip
    31.8 KB · Views: 98
Some code to fix the "nuke the capitol building" problem.

This should replace the onNukeExplosion function in CvFinalFrontierEvents.py.

I have only done a limited amount of testing, but since the code that shipped with 1.6 is non-functional (it uses an undefined pCity variable which makes it bail out before it does anything) I'm posting it.

It covers every case I could think of except one. The strange case is when not only is this the players only system, but all of the planets in the system except this one have already been nuked. This should leave no valid place to put a capitol building. Currently it will select one of the nuked planets and move the capitol to it since disabled planets are still in the list returned by "pSystem.getSizeYieldPlanetIndexList(1)" but they are at the end since their "size" is 0 (since the "size" value is actually their population limit which is 0 for disabled planets). I don't expect this to come up very often.

Code:
	def onNukeExplosion(self, argsList):
		'Nuke Explosion'
		pPlot, pNukeUnit = argsList
		
		if (pPlot.isCity()):

			pCity = pPlot.getPlotCity()
			pSystem = self.getSystemAt(pPlot.getX(), pPlot.getY())
			pBestPlanet = pSystem.getPlanetByIndex(getBestPlanetInSystem(pSystem))
			
			pBestPlanet.setDisabled(true)
			pBestPlanet.setPopulation(0)			

			for iBuilding in range(gc.getNumBuildingInfos()):
				if pBestPlanet.isHasBuilding(iBuilding):
					if (gc.getBuildingInfo(iBuilding).isCapital()):
						pPlayer = gc.getPlayer(pCity.getOwner())
						if (pPlayer.getNumCities () > 1):
							# The following call moves the capitol building, removing it from this city's data
							# in the DLL (which is why there is no manual setNumRealBuilding in here)
							# and adding it to the new capital city's data in the DLL plus adding it to that system's
							# current build planet to get it into the Python planet data.
							printd("Nuked: finding new capial system")
							pPlayer.findNewCapital()
						else :
							# This is this civ's only system so we can't move the capitol building to a different one.
							# Try to move it to a different planet instead.
							printd("Nuked: moving capitol to different planet in same system")
							if (pSystem.getBuildingPlanetRing() == pBestPlanet.getOrbitRing()):
								# This system's current build ring is the planet being wiped out,
								# change it to some other planet and set that planet to have the building
								# select the planet as the largest planet (using production as tie breaker)
								# that is not the planet being wiped out
								aiPlanetList = pSystem.getSizeYieldPlanetIndexList(1) # 1 is production, arbitrarily selected
								for iLoopPlanet in range( len(aiPlanetList)):
									pLoopPlanet = pSystem.getPlanetByIndex(aiPlanetList[iLoopPlanet][2])	
									if (pLoopPlanet.getOrbitRing() != pBestPlanet.getOrbitRing()):
										pSystem.setBuildingPlanetRing(pLoopPlanet.getOrbitRing())
										pLoopPlanet.setHasBuilding(iBuilding, true)
										break
					else :
						pCity.setNumRealBuilding(iBuilding, pCity.getNumRealBuilding(iBuilding)-1)
						
					pBestPlanet.setHasBuilding(iBuilding, false)
			
			if (pBestPlanet.isBonus()): # planet being nuked has a bonus, remove it from the planet and the plot
				pBestPlanet.setBonusType(-1)
				pPlot.setBonusType(-1)			
			
			self.getAI().doCityAIUpdate(pPlot.getPlotCity())
			
			pSystem.updateDisplay()
 
Okay, I realized that it was relatively simple to get the Star Fortress working...

In CvSolarSystem.py, updateDisplay, right where it says, "# Add on-map Star System-based buildings", I replaced the old code with this:

Code:
				# Add on-map Star System-based buildings
				aiArray = self.getSingleBuildingLocations()
				for aiBuildingLocation in aiArray:
					iBuildingType = aiBuildingLocation[0]
					iRing = aiBuildingLocation[1]
					iXMLOverride = gc.getBuildingInfo(iBuildingType).getSingleRingBuildingLocation()
					if iXMLOverride != -1:
						szBuildingString = "FEATURE_DUMMY_TAG_BUILDING_" + str(iXMLOverride)
					else:
						szBuildingString = aszBuildingDummyTypes[iRing-1]
					szBuilding = gc.getBuildingInfo(iBuildingType).getSystemArtTag()
					pPlot.addFeatureDummyModel(szBuildingString, szBuilding)

I also changed the code in setSingleBuildingRingLocation under "#XML Override" to this (just to make sure that overrides didn't clutter the list of rings):

Code:
		#XML override (use iRing = 0 to avoid cluttering the real rings, for the Star Fortress) 
		iXMLOverride = gc.getBuildingInfo(iBuildingType).getSingleRingBuildingLocation()
		if iXMLOverride != -1:
			iRing = 0

If there are no other bugs, I'll post a small patch later with these fixes.
 
With the update to CvSolarSystem.py posted above by TC01, the star fortress/citadel is appearing correctly but the other 3 buildings that ordinarily orbit the star are now stacked on top of the star. The full fix involves a DLL change (to have a value default to -1 instead of 0 when the building XML is being loaded) which will be coming soon, but there is a workaround.

In the attached zip file are replacements for CvSolarSystem.py and CIV4BuildingInfos.xml. This will correct the problem, although for a saved game where some have already been built the existing ones will all be stacked in the outermost orbit and it is also possible for a new one to be stacked there as well. The only change to the XML file is the addition of a tag for the 3 misplaced buildings, setting iSingleRingBuildingLocation to -1 for each of them. The only changes to the Python file are those in TC01's post.

The zip file contains the proper folder structure so simply copying the Assets file from the zip file into the Final Frontier Plus folder and allowing the 2 matching files to overwrite the existing files is all that needs to be done. You will need to find the mod's folder to do this. There is some info in the Readme.txt file in the zip file if you don't know where it is.
 

Attachments

  • FFP-1-6-1-a.zip
    23.3 KB · Views: 77
I've attached a version of the advanced space station construction AI, for testing.

What this should do is easily enable you to add additional space stations along with checks for whether or not the AI should construct it.

It contains both the starbase AI and the sensor station AI that I recently wrote, for Star Trek and for Final Frontier Plus (and, of course, any other mod that wants it).

However, I have not tested it nor had the time to test it (apart from non-modding stuff, I'm working on the FF+ plugins, planning for the next version of FF+, working on a new FFH 2 modcomp, and eventually need to get back to my Colonization mod as well). I ran a test game of 150 AI Auto-played turns and there weren't any Python exceptions, but I didn't notice any starbases built either.... so there could very well be bugs.

To install, copy CvAI.py and CvAI.py.bak into Final Frontier Plus\Assets\Python. It overwrites CvAI.py. The .bak file is the original version, unchanged, so you can restore it if you want to. If you've modified CvAI.py, back it up before testing this.
 

Attachments

  • CvAI.zip
    26.6 KB · Views: 80
Here is an update that has replacements for two XML files.
It fixes two of the current issues: some buildings don't increase in cost for multiples of them in a star system, and the extra yields from trade routes for the Red Syndicate (via a workaround that counters the bug in the 1.62 DLL for how it makes these adjustments).

The included CIV4BuildingInfos.xml file has added iCostModIncrease tags for buildings that didn't have them. Theya re all set to 2, which gives them an increasing cost at the slower rate (the cost of the 2nd is 2 times the cost of the first, the 3rd is 3 times the first...). This covers 4 regular buildings and all of the UBs that needed the fix:
  • Cryogenic Granary,
  • Nanoextraction Upgrade
  • Flight School
  • Moon Base
  • Technical Institute
  • Research Institute
  • Spacepark
  • Space Bazaar
  • Public Broadcasting System
  • Nanoseparation System

Also included is a CIV4TraitInfos.xml which improves the situation for TRAIT_SYNDICATE. The contents of the TradeRouteYieldChanges group have been fixed to be iYield tags instead of iCommerce tags and in this version it is set to
Code:
			<TradeRouteYieldChanges>
				<iYield>1</iYield>
				<iYield>0</iYield>
				<iYield>-1</iYield>
			</TradeRouteYieldChanges>
Due to the current bug in the DLL for processing this, which makes them cumulative, this results in +1 food and +1 production, with no commerce adjustment, per trade route as is intended.

When a version with a fixed DLL is released, these should be changed to 1, 1, 0 in that release.

Included is a file listing the changes and the two files. They are not arranged in sub-folders as a patch - they need to be manually copied to the correct places to replace the two existing files.
 

Attachments

  • FFP-1-6-2-a.zip
    15.3 KB · Views: 90
This is intended to be part of v1.65 but it works just fine with 1.64 (and probably most earlier versions).

It is an new CvAI.py file. It is based on the one that comes with 1.64, not the experimental one in post #6 above (which I had actually forgotten about and have never tested - partly because my download of it wasn't even in the right folder).

This update should give a small improvement to the AIs behavior in the mid to late game, once its system populations are up at (or over) the limit of the population that can actually work on the planets and it can build the various buildings that it uses to solve health, happiness, and food issues. From the included text file:
Spoiler :
Code:
- If the population of a star system is above the actual limit of how many can
	currently work the planets then don't count unhappy citizens over that limit
	in the weighting system. They just don't matter because they couldn't do any
	work even if they were not unhappy.
	Also check to see if the remedy to unhappy population that we use (build a
	Sports Arena) is possible by counting them. If we can not currently build
	any more then drop the weight to 0 so that we do not mask some other problem
	that we could actually do something about.
	Also change the wight reduction for each existing sports arena from -10 to
	-15 for each.
	Note: if specialists are ever implemented, or this is used in a modmod that
		has them, then the first change that checks the system's population
		limit for planets should not be done.
- Check to see if the remedy to unhealthy population that we use (build a
	Recycling Center) is possible by counting them. If we can not currently
	build any more then drop the weight to 0 so that we do not mask some other
	problem that we could actually do something about.
	Also change the wight reduction for each existing recycling center from -10
	to -15 for each.
- Likewise for food. If we can't currently build any more Nutrition Facilities
	then zero the weight.
	Also zero the weight if the current population is above the system's
	population limit. If we ahve more population than can work the planets
	then we don't need any more food.
	Note: If specialists are ever implemented, or this is used in a modmod that
		has them, then that 2nd "if population is above the system's population
		limit" condition for zeroing the weight should be removed.
 

Attachments

  • FFP-1-6-4a.zip
    14.3 KB · Views: 77
This is intended to be part of v1.65 but it works just fine with 1.64 (and probably most earlier versions).

It is an new CvAI.py file. It is based on the one that comes with 1.64, not the experimental one in post #6 above (which I had actually forgotten about and have never tested - partly because my download of it wasn't even in the right folder).

This update should give a small improvement to the AIs behavior in the mid to late game, once its system populations are up at (or over) the limit of the population that can actually work on the planets and it can build the various buildings that it uses to solve health, happiness, and food issues.

Thanks for this.

deanej found a simple syntax error in that version, but I doubt I ever reattached a version with it fixed. I'll reupload a fixed version after I release 1.65 (whenever I have the time to do that), but if you want to test it maybe you could fix it on your own. Somewhere, I'm using the first line when I should be using the second line:

Code:
#Wrong
for object in range(objects):

#Right
for object in objects:
 
Yesterday and today I worked at making mapscripts place a player's starting units based on the <FreeUnitClasses> array in CIV4CivilizationInfos.xml. In the process, I also implemented a new FFMapscriptCore module (python file). Eventually, that file will be used to contain Final Frontier mapscript code which doesn't have to be in each individual mapscript. This means mapscripting will be:

1. Less confusing (less complex code to mess with and confuse beginner modders)

2. Produce smaller maps (if large chunks of rarely-modified code is in only one file, the file size of the scripts will be smaller)

The only disadvantage is that it means if you want to mod a function I've moved to FFMapscriptCore, you must copy it back into your mapscript.

Currently, FFMapscriptCore only contains findStartingPlot(), which I moved because it satisfies both of the goals above (it's long, and it's complicated). This change means FinalFrontier, FinalFrontierFlat, and Wormholes are both about 4 KB smaller, and SpiralGalaxy and WormholesSpiralGalaxy no longer depend on the presence of FinalFrontier in the same folder.

This will be included in the next full version of FF+, this is just a development version for testing (not that any should be necessary) and for the use of other modders. It contains all five FF+ mapscripts, so if you've modified them and you want to install this, back them up. It's really not of any use for people who aren't modders, though...
 

Attachments

  • FFMapscriptCore.zip
    38.4 KB · Views: 65
Sneak preview, without explanation...

Spoiler :
 

Attachments

  • Civ4ScreenShot0047.JPG
    Civ4ScreenShot0047.JPG
    183.1 KB · Views: 570
Resurrecting this thread for some development notes.

I've added a CIV4CivilizationClassInfos.xml XML file to the game. This file is very barren at the moment, and very little of the tags do anything in the DLL- but it's there! Civilizations can now be assigned a "class".

As you might guess, this means we can later add distinct races to the game that have different behaviors without having to abuse, say, the Traits system further.
 
Some things I'm considering for v1.8.

Part Upgrade adjustments (plus another new one):

The current state of the repair promotions doesn't make much sense to me. A ship repairing itself out to be easier than repairing another ship. It also ought to be easier to heal while moving.

Currently the 3 "x Repair Staff" promotions each give +10% heal to all units in plot, and the Repair Facilities give +10% heal to units in adjacent plots and the ability to heal while moving. This gives a theoretical maximum (with all 4 on one ship) of +30% to all units in same plot and +10% to units in adjacent plots.

The adjusted version, if all 5 are on one ship, gives the ship +20% healing rate for self everywhere, +20% to all units in same plot (including self, for a total of 40%), and +10% to units in adjacent plots and the ability to heal while moving. This would actually be 10% more healing for itself and 10% less healing for other units on the same plot, but it would require 1 more part upgrade. I expect very few ships would get all 5.

So:
  • Change the "x Repair Staff" promotions from healing all in plot to just the unit itself (mostly).
  • Rename them from "x Repair Staff" to "x Damage Control" (not really necessary, but it sounds better to me).
  • Change the existing Repair Facilities to remove repair while moving and give +10% to units in same plot (not adjacent). It would no longer require the 3 Repair Staff part upgrades, probably just upgraded weapons or armor.
  • Add 2nd level Repair Facilities (Improved Repair Facilities) for another +5% in same plot, +10% in adjacent.
  • Starbases would be adjusted to start with Upgraded Damage Control and Repair Facilites for free.
This makes it look like this:
  • Upgraded Damage Control
    +10% heal in friendly/neutral/enemy territory
  • Improved Damage Control
    +5% heal in friendly/neutral/enemy territory
    can heal while moving
  • Advanced Damage Control
    +5% heal in friendly/neutral/enemy territory
    heals units in same plot +5%

  • Repair Facilities - now only requires Upgraded Weapons or Upgraded Armor
    heal units in same plot +10%
  • Improved Repair Facilities - new part upgrade, req. Repair Facilities, available at Terrestrial Networking (?)
    heal units in same plot +5%
    heal units in adjacent plot +10%

In addition to this possible set of changes, I have already added 4 promotions to the SVN:
Code:
- PROMOTION_PREDICTIVE_ALGORITHMS added
	Predictive Algorithms (button: navigation2.dds from Planetfall)
		Requires Trained Officers
		Available at Extended Range Systems
		Available to light ships, carrier ships, and capital ships
		+5% withdraw
		+5% strength
		+1 first strike chance
		+10% attack and defense in asteroid fields
- PROMOTION_IMPROVED_TRACKING_SYSTEM added		
	Improved Tracking System
		(based on Jabie's DEFLECTOR ARRAY in his Part upgrades mod)
		Available at Space Exploration Tech
		Available to recon ships, light ships, carrier ships, and capital ships
		+20% attack and +20% defense in asteroid fields
- PROMOTION_ADVANCED_TRACKING_SYSTEM aded
	Advanced Tracking System
		(modified from Jabie's IMPROVED DEFELCTOR ARRAY in his Part upgrades mod)
		Requires Improved Tracking System
		Available at Intuitive Computers (Light Craft Manufacture was rather early)
		Available to recon ships, light ships, carrier ships, and capital ships
		+30% attack and +10% defense in asteroid fields
		double move in asteroid fields
- PROMOTION_WARP_PM added
	Warp Phase Modulator (button: Commando from BtS)
		(based on Jabie's WARP CONDUITS in his Part upgrades mod)
		Requires Upgraded Engines
		Available at Space Elevator
		Available to recon ships and light ships
		can use enemy routes
 
Here's an opportunity for opinions on more things being considered for 1.8.

Last post it was promotions. This time we get buildings. Bunches of buildings.

Early in the life of a new colony it has issues with low production and influence. Therefore I plan to add a new relatively cheap building to give a little boost. Enough to be useful when a star system has a low population, but low enough to be nearly irrelevant in a well developed star system. I also don't think it should be available at the start of the game, so the initial parts of the game are unchanged. Therefore...

Precision Instruments Maker
  • one per star system
  • +1 production, +1 commerce, +1 influence
  • cost 30
  • prereq tech of TECH_MISC_0 (Vacuum Engineering) (?)
  • maybe obsolete with TECH_INDUSTRY_10 (Advanced Nanite Construction)

A little production to speed up everything after it, plus some influence to get the borders popped for access to the outer planet zones quicker. The commerce is more or less just an add-on and not really a vital part of it. This is a lot cheaper than building a second mine (since you get one for free, the the first one you actually build is really the second one and gets the higher cost for repeating buildings) and can be started, maybe finished, before the population grows to a second planet, but the :hammers: bonus is a flat +1, not +1 per population. (The name came to me during my first game with the Caveman to Cosmos mod when I initially misread the "Percussion Instrument Maker" and wondered just how precise of an instrument a caveman could make.)


And a bigger thing. I'm considering expanding the buildings related to the resources, at least the planetary resources.

Each planetary resource would get a 2nd building which requires the first and is only available after some early-to-mid-game tech, possibly Domestic Development but perhaps something a little later (maybe Space Elevator).

Each would cost something like 100 (the current resource buildings are set to a cost of 50, so double that cost but still not very expensive considering the benefits).

The specific buildings would be something like this:

Grain allows: Agricultural Center
  • requires Farm on the planet
  • +2 food, +1 commerce
  • +1 trade route
  • +1 population limit
Note: this is a flat :food: bonus, not per population, to even out the variations from planet size. The same is true for all these buildings' yield bonuses.

Cattle allows: Cattleman's Association
  • requires Ranch on the planet
  • +1 food, +1 production, +1 commerce
  • +1 trade route
  • +1 population limit

Seafood allows: Aquaculture Bureau
  • requires Harbor on the planet
  • +1 food, +2 commerce
  • +1 trade route
  • +1 population limit

Cotton allows: Textile Industry
  • requires Cotton Mill on the planet
  • +3 commerce
  • +25% trade route yield

Spices allows: Spice Merchant Network
  • requires Plantation on the planet
  • +2 commerce
  • +1 trade route
  • +25% trade route yield

Wine allows: Vintners' Association
  • requires Winery on the planet
  • +3 commerce, +1 influence
  • +25% trade route yield

The 2nd buildings for the luxury resources could (but probably won't) also allow a +1 population since the presence of non-food plants from Earth would still indicate that the planet has a relatively good environment for the descendants of Earth.

I might also adjust the names of the existing buildings to indicate that they are not a single thing ("Farm", "Ranch", etc.), but an entire system or network of such things ("Farming Industry", "Ranching Industry", etc.).

And now an even more drastic addition:
Buildings that can be built in any system that has access to the resource while they are being built. One per resource (planetary and not, maybe) and only 1 of each in a system (for simplicity and balance). These should be a little more expensive, perhaps 120 or 150 :hammers:, and probably only available after some mid-game tech like Space Elevator or Environmentalism.

Access to Grain allows: Local Farms
  • requires Grain resource to build
  • one per star system
  • can not build on planet with Farm
  • +1 food
  • +1 population limit
  • +1 health

Access to Cattle allows: Local Ranches
  • requires Cattle resource to build
  • one per star system
  • can not build on planet with Ranch
  • +1 food
  • +1 population limit
  • +1 health

Access to Seafood allows: Local Fishfarms
  • requires Seafood resource to build
  • one per star system
  • can not build on planet with Harbor
  • +1 food
  • +1 population limit
  • +1 health

Access to Cotton allows: Local Cotton Mill
  • requires Cotton resource to build
  • one per star system
  • can not build on planet with Cotton Mill
  • +1 commerce/population
  • +1 happy

Access to Spices allows: Local Plantations
  • requires Spices resource to build
  • one per star system
  • can not build on planet with Plantation
  • +1 commerce/population
  • +1 happy

Access to Wine allows: Local Vinyards
  • requires Wine resource to build
  • one per star system
  • can not build on planet with Winery
  • +1 commerce/population
  • +1 happy

Similarly, the non-planetary resources could allow buildings. I'm not sure that it makes sense, though. The planetary resources are all biological and the local buildings represent keeping a local stock of animals or growing plants locally, presumably in specialized buildings of some sort to provide the proper environment. But the non-planetary resources are not things that you can grow, they are things that are mined or otherwise extracted. If the supply for these is cut off, the building should stop working. There is no such functionality at this time, so it would need to be added to the DLL and I'm not sure it is currently worth the effort.

Anyhow, a possible set of non-planetary resource buildings. Their cost would probably be the same as the planetary resource type. The tech they become available would probably be the same or close as well - possibly Industrialism.

Access to Oil allows: Oil Refinery
  • requires Oil
  • one per star system
  • +1 production, +5% military unit production

Access to Titanium allows: Titanium Purification Plant
  • requires Titanium
  • one per star system
  • +1 production, +1 research

Access to Iron allows: Iron Smelter
  • requires Iron
  • one per star system
  • +2 production

Access to Hydrogen allows: Hydrogen Liquifier
  • requires Hydrogen
  • one per star system
  • +1 production, +1 commerce

Access to Uranium allows: Uranium Enrichment Plant
  • requires Uranium
  • one per star system
  • +1 production, +1 production at TECH_INDUSTRY_10 (Advanced Nanite Construction)

Access to Crystals allows: Jeweler
  • requires Crystals
  • one per star system
  • +1 commerce

Access to Gold allows: Goldsmith
  • requires Gold
  • one per star system
  • +1 commerce

Access to Water allows: Water Purification Plant
  • requires Water
  • one per star system
  • +1 food

Access to Oxygen allows: Oxygen Extractor
  • requires Oxygen
  • one per star system
  • +1 production

These non-planetary resource buildings have a low probability of being added, at least for 1.8.
 
With the non-planetary resource buildings, is it presently possible to have the benefit only be active with access to the resource (similar to the +x% bonus with [resource])?
 
Apparently only for percentage modifiers, via the BonusYieldModifiers tag. This is used for +50% production for each coal and iron by the Ironworks wonder in regular BtS (the only building in BtS that uses this feature), or the longer list for the version of this in FFP (the Industrial Complex national wonder).

I was mostly trying to avoid percentage yield modifiers so these buildings' benefits would not scale with population very much - the only one I gave a % bonus to was Oil and that was only 5% (and I wasn't sure I wanted to do that since in systems with low production, whether from low population or poor production planets, it adds nothing). When using fixed yield changes even low output systems get the benefit. Also, other buildings with % modifiers do increase the amount but with the flat increases being so small the additional effect is not large, particularly since the bonuses are fixed values rather than per population point on the planet where it is built.

My general idea was that these would usually just barely be worth building in a few of your star systems, considering the benefit vs. the cost and the amount of time it would take for the building to pay for itself (by returning a number of points of production, and such, that equals the points it took to build it). That way, having access to lots of resources would not become an overwhelming advantage. Each should be a trade-off of a small advantage later for some noticeable, but not huge, cost in the short term. The cost and/or benefits for each may need to be adjusted to reach this goal, if they are added at all.

By the way... One fun result of the planetary resource buildings will be that you can build the "Local X" buildings for resources you trade for as long as the trade is active. The value the AI gives these resources in a trade will probably need to be adjusted up for these, since buildings they allow give significant benefits that will persist even if the trade is canceled.

One problem with all the resource buildings that can be built on planets that don't have the resource is that the AI is still frequently not very good at keeping its star systems attached to its trade network. Even with the AI adjustments for 1.8 (which improve its military some) it is pretty random, with some AI civs spend most of the game with most of their planets not connected to anything and other civs usually having at least most of their systems connected almost all the time. So to some extent this will probably make these resources more valuable for the human than for the AI. This is one of the reasons the value of these buildings can not be very high compared to their cost and they have to be limited to 1 per star system.
 
Some things I'm considering for v1.8.

Part Upgrade adjustments (plus another new one):

The current state of the repair promotions doesn't make much sense to me. A ship repairing itself out to be easier than repairing another ship. It also ought to be easier to heal while moving.

Currently the 3 "x Repair Staff" promotions each give +10% heal to all units in plot, and the Repair Facilities give +10% heal to units in adjacent plots and the ability to heal while moving. This gives a theoretical maximum (with all 4 on one ship) of +30% to all units in same plot and +10% to units in adjacent plots.

The adjusted version, if all 5 are on one ship, gives the ship +20% healing rate for self everywhere, +20% to all units in same plot (including self, for a total of 40%), and +10% to units in adjacent plots and the ability to heal while moving. This would actually be 10% more healing for itself and 10% less healing for other units on the same plot, but it would require 1 more part upgrade. I expect very few ships would get all 5.

So:
Change the "x Repair Staff" promotions from healing all in plot to just the unit itself (mostly).
Rename them from "x Repair Staff" to "x Damage Control" (not really necessary, but it sounds better to me).
Change the existing Repair Facilities to remove repair while moving and give +10% to units in same plot (not adjacent). It would no longer require the 3 Repair Staff part upgrades, probably just upgraded weapons or armor.
Add 2nd level Repair Facilities (Improved Repair Facilities) for another +5% in same plot, +10% in adjacent.
Starbases would be adjusted to start with Upgraded Damage Control and Repair Facilites for free.
This makes it look like this:
Upgraded Damage Control
+10% heal in friendly/neutral/enemy territory
Improved Damage Control
+5% heal in friendly/neutral/enemy territory
can heal while moving
Advanced Damage Control
+5% heal in friendly/neutral/enemy territory
heals units in same plot +5%
Repair Facilities - now only requires Upgraded Weapons or Upgraded Armor
heal units in same plot +10%
Improved Repair Facilities - new part upgrade, req. Repair Facilities, available at Terrestrial Networking (?)
heal units in same plot +5%
heal units in adjacent plot +10%

In addition to this possible set of changes, I have already added 4 promotions to the SVN:

Code:
- PROMOTION_PREDICTIVE_ALGORITHMS added
Predictive Algorithms (button: navigation2.dds from Planetfall)
Requires Trained Officers
Available at Extended Range Systems
Available to light ships, carrier ships, and capital ships
+5% withdraw
+5% strength
+1 first strike chance
+10% attack and defense in asteroid fields
- PROMOTION_IMPROVED_TRACKING_SYSTEM added
Improved Tracking System
(based on Jabie's DEFLECTOR ARRAY in his Part upgrades mod)
Available at Space Exploration Tech
Available to recon ships, light ships, carrier ships, and capital ships
+20% attack and +20% defense in asteroid fields
- PROMOTION_ADVANCED_TRACKING_SYSTEM aded
Advanced Tracking System
(modified from Jabie's IMPROVED DEFELCTOR ARRAY in his Part upgrades mod)
Requires Improved Tracking System
Available at Intuitive Computers (Light Craft Manufacture was rather early)
Available to recon ships, light ships, carrier ships, and capital ships
+30% attack and +10% defense in asteroid fields
double move in asteroid fields
- PROMOTION_WARP_PM added
Warp Phase Modulator (button: Commando from BtS)
(based on Jabie's WARP CONDUITS in his Part upgrades mod)
Requires Upgraded Engines
Available at Space Elevator
Available to recon ships and light ships
can use enemy routes

Some things I'm considering for v1.8.

Part Upgrade adjustments (plus another new one):

The current state of the repair promotions doesn't make much sense to me. A ship repairing itself out to be easier than repairing another ship. It also ought to be easier to heal while moving.

Currently the 3 "x Repair Staff" promotions each give +10% heal to all units in plot, and the Repair Facilities give +10% heal to units in adjacent plots and the ability to heal while moving. This gives a theoretical maximum (with all 4 on one ship) of +30% to all units in same plot and +10% to units in adjacent plots.

The adjusted version, if all 5 are on one ship, gives the ship +20% healing rate for self everywhere, +20% to all units in same plot (including self, for a total of 40%), and +10% to units in adjacent plots and the ability to heal while moving. This would actually be 10% more healing for itself and 10% less healing for other units on the same plot, but it would require 1 more part upgrade. I expect very few ships would get all 5.

So:
  • Change the "x Repair Staff" promotions from healing all in plot to just the unit itself (mostly).
  • Rename them from "x Repair Staff" to "x Damage Control" (not really necessary, but it sounds better to me).
  • Change the existing Repair Facilities to remove repair while moving and give +10% to units in same plot (not adjacent). It would no longer require the 3 Repair Staff part upgrades, probably just upgraded weapons or armor.
  • Add 2nd level Repair Facilities (Improved Repair Facilities) for another +5% in same plot, +10% in adjacent.
  • Starbases would be adjusted to start with Upgraded Damage Control and Repair Facilites for free.
This makes it look like this:
  • Upgraded Damage Control
    +10% heal in friendly/neutral/enemy territory
  • Improved Damage Control
    +5% heal in friendly/neutral/enemy territory
    can heal while moving
  • Advanced Damage Control
    +5% heal in friendly/neutral/enemy territory
    heals units in same plot +5%

  • Repair Facilities - now only requires Upgraded Weapons or Upgraded Armor
    heal units in same plot +10%
  • Improved Repair Facilities - new part upgrade, req. Repair Facilities, available at Terrestrial Networking (?)
    heal units in same plot +5%
    heal units in adjacent plot +10%

In addition to this possible set of changes, I have already added 4 promotions to the SVN:
Code:
- PROMOTION_PREDICTIVE_ALGORITHMS added
	Predictive Algorithms (button: navigation2.dds from Planetfall)
		Requires Trained Officers
		Available at Extended Range Systems
		Available to light ships, carrier ships, and capital ships
		+5% withdraw
		+5% strength
		+1 first strike chance
		+10% attack and defense in asteroid fields
- PROMOTION_IMPROVED_TRACKING_SYSTEM added		
	Improved Tracking System
		(based on Jabie's DEFLECTOR ARRAY in his Part upgrades mod)
		Available at Space Exploration Tech
		Available to recon ships, light ships, carrier ships, and capital ships
		+20% attack and +20% defense in asteroid fields
- PROMOTION_ADVANCED_TRACKING_SYSTEM aded
	Advanced Tracking System
		(modified from Jabie's IMPROVED DEFELCTOR ARRAY in his Part upgrades mod)
		Requires Improved Tracking System
		Available at Intuitive Computers (Light Craft Manufacture was rather early)
		Available to recon ships, light ships, carrier ships, and capital ships
		+30% attack and +10% defense in asteroid fields
		double move in asteroid fields
- PROMOTION_WARP_PM added
	Warp Phase Modulator (button: Commando from BtS)
		(based on Jabie's WARP CONDUITS in his Part upgrades mod)
		Requires Upgraded Engines
		Available at Space Elevator
		Available to recon ships and light ships
		can use enemy routes

Here's an opportunity for opinions on more things being considered for 1.8.

Last post it was promotions. This time we get buildings. Bunches of buildings.

Early in the life of a new colony it has issues with low production and influence. Therefore I plan to add a new relatively cheap building to give a little boost. Enough to be useful when a star system has a low population, but low enough to be nearly irrelevant in a well developed star system. I also don't think it should be available at the start of the game, so the initial parts of the game are unchanged. Therefore...

Precision Instruments Maker
  • one per star system
  • +1 production, +1 commerce, +1 influence
  • cost 30
  • prereq tech of TECH_MISC_0 (Vacuum Engineering) (?)
  • maybe obsolete with TECH_INDUSTRY_10 (Advanced Nanite Construction)

A little production to speed up everything after it, plus some influence to get the borders popped for access to the outer planet zones quicker. The commerce is more or less just an add-on and not really a vital part of it. This is a lot cheaper than building a second mine (since you get one for free, the the first one you actually build is really the second one and gets the higher cost for repeating buildings) and can be started, maybe finished, before the population grows to a second planet, but the :hammers: bonus is a flat +1, not +1 per population. (The name came to me during my first game with the Caveman to Cosmos mod when I initially misread the "Percussion Instrument Maker" and wondered just how precise of an instrument a caveman could make.)


And a bigger thing. I'm considering expanding the buildings related to the resources, at least the planetary resources.

Each planetary resource would get a 2nd building which requires the first and is only available after some early-to-mid-game tech, possibly Domestic Development but perhaps something a little later (maybe Space Elevator).

Each would cost something like 100 (the current resource buildings are set to a cost of 50, so double that cost but still not very expensive considering the benefits).

The specific buildings would be something like this:

Grain allows: Agricultural Center
  • requires Farm on the planet
  • +2 food, +1 commerce
  • +1 trade route
  • +1 population limit
Note: this is a flat :food: bonus, not per population, to even out the variations from planet size. The same is true for all these buildings' yield bonuses.

Cattle allows: Cattleman's Association
  • requires Ranch on the planet
  • +1 food, +1 production, +1 commerce
  • +1 trade route
  • +1 population limit

Seafood allows: Aquaculture Bureau
  • requires Harbor on the planet
  • +1 food, +2 commerce
  • +1 trade route
  • +1 population limit

Cotton allows: Textile Industry
  • requires Cotton Mill on the planet
  • +3 commerce
  • +25% trade route yield

Spices allows: Spice Merchant Network
  • requires Plantation on the planet
  • +2 commerce
  • +1 trade route
  • +25% trade route yield

Wine allows: Vintners' Association
  • requires Winery on the planet
  • +3 commerce, +1 influence
  • +25% trade route yield

The 2nd buildings for the luxury resources could (but probably won't) also allow a +1 population since the presence of non-food plants from Earth would still indicate that the planet has a relatively good environment for the descendants of Earth.

I might also adjust the names of the existing buildings to indicate that they are not a single thing ("Farm", "Ranch", etc.), but an entire system or network of such things ("Farming Industry", "Ranching Industry", etc.).

And now an even more drastic addition:
Buildings that can be built in any system that has access to the resource while they are being built. One per resource (planetary and not, maybe) and only 1 of each in a system (for simplicity and balance). These should be a little more expensive, perhaps 120 or 150 :hammers:, and probably only available after some mid-game tech like Space Elevator or Environmentalism.

Access to Grain allows: Local Farms
  • requires Grain resource to build
  • one per star system
  • can not build on planet with Farm
  • +1 food
  • +1 population limit
  • +1 health

Access to Cattle allows: Local Ranches
  • requires Cattle resource to build
  • one per star system
  • can not build on planet with Ranch
  • +1 food
  • +1 population limit
  • +1 health

Access to Seafood allows: Local Fishfarms
  • requires Seafood resource to build
  • one per star system
  • can not build on planet with Harbor
  • +1 food
  • +1 population limit
  • +1 health

Access to Cotton allows: Local Cotton Mill
  • requires Cotton resource to build
  • one per star system
  • can not build on planet with Cotton Mill
  • +1 commerce/population
  • +1 happy

Access to Spices allows: Local Plantations
  • requires Spices resource to build
  • one per star system
  • can not build on planet with Plantation
  • +1 commerce/population
  • +1 happy

Access to Wine allows: Local Vinyards
  • requires Wine resource to build
  • one per star system
  • can not build on planet with Winery
  • +1 commerce/population
  • +1 happy

Similarly, the non-planetary resources could allow buildings. I'm not sure that it makes sense, though. The planetary resources are all biological and the local buildings represent keeping a local stock of animals or growing plants locally, presumably in specialized buildings of some sort to provide the proper environment. But the non-planetary resources are not things that you can grow, they are things that are mined or otherwise extracted. If the supply for these is cut off, the building should stop working. There is no such functionality at this time, so it would need to be added to the DLL and I'm not sure it is currently worth the effort.

Anyhow, a possible set of non-planetary resource buildings. Their cost would probably be the same as the planetary resource type. The tech they become available would probably be the same or close as well - possibly Industrialism.

Access to Oil allows: Oil Refinery
  • requires Oil
  • one per star system
  • +1 production, +5% military unit production

Access to Titanium allows: Titanium Purification Plant
  • requires Titanium
  • one per star system
  • +1 production, +1 research

Access to Iron allows: Iron Smelter
  • requires Iron
  • one per star system
  • +2 production

Access to Hydrogen allows: Hydrogen Liquifier
  • requires Hydrogen
  • one per star system
  • +1 production, +1 commerce

Access to Uranium allows: Uranium Enrichment Plant
  • requires Uranium
  • one per star system
  • +1 production, +1 production at TECH_INDUSTRY_10 (Advanced Nanite Construction)

Access to Crystals allows: Jeweler
  • requires Crystals
  • one per star system
  • +1 commerce

Access to Gold allows: Goldsmith
  • requires Gold
  • one per star system
  • +1 commerce

Access to Water allows: Water Purification Plant
  • requires Water
  • one per star system
  • +1 food

Access to Oxygen allows: Oxygen Extractor
  • requires Oxygen
  • one per star system
  • +1 production

These non-planetary resource buildings have a low probability of being added, at least for 1.8.

I like the look of all of these, can't wait to see what you do put in!
 
Hi Guys
I've had a couple of ideas bouncing around in my head, one of which I have seen in other mods the other is a, potentially, new idea.

Suggestion 1
Purchasable promotions.
I've asked about this in other threads throughout the forums but have had no response to the suggestion. With FFP, designed as it is, around units that, for the most part, require human crews there is scope for a second promotion tree. The current promotion tree allows for all promotions and they are all payed for by Prestige/Experience. This makes perfect sense when talking about crews becoming more and more experienced due to combat situations or through dedicated training schools. But not when talking about equipment. Equipment, in my experience, is something that is paid for with cash and installed on a ship. Things like new Sensor Arrays, Scanners, Armour, Shield Generators, Point Defense Weapons, Beam Weapons, Hangar Bays, Cargo Space, Command/Flag Bridges and Power Systems are all physical things. What I would love to see is a new promotion tree. You could call them CrewPromotionTree & EquipmentPromotionTree. The only difference between the two would be that to purchase an equipment upgrade the ship would need to be either on a space occupied by a starbase or a planetary system owned by the player and there would be a cost in credits to purchase the equipment. There would be similar restrictions as the normal promotion tree has ie you can't get armour III unless you also have armour I & II.
I'm pretty certain FFH has a system like this but my request for help on their forum was ignored. If it is possible to implement this it would also open up the possibility of some new buildings which you need to build to make the equipment promotion available.

Suggestion 2
This idea came to me after playtesting the Babylon 5 mod at different speeds. Currently the turn that barbarians/pirates/raiders appear is governed by the Global Defines. If it is set to turn 20 then no matter the speed of the game you are playing after 20 turns the bad guys will start spawning. On a quick game this isn't so bad as you will have had a chance to build at least one or two additional defence units. Playing over a longer period/slower game there is increasingly less chance of having recruited any units to defend your territory.
Is it possible to change this so that the bad guys turn of appearance is governed by the game speed settings? IE. 20 turns for Quick, 40 for Normal, 60 for Slow and 80 for Snail. This would then allow players a reasonable chance of having enough units to defend against any barbarian onslaught no matter the game speed.

If neither suggestion is any way achievable just let me know and i'll kill the dream.:lol:
 
Top Bottom