1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  3. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  4. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  5. Dismiss Notice
  6. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

What are the chances of doing these things?

Discussion in 'Civ4 - Final Frontier Plus' started by PsiCorps, Feb 2, 2013.

  1. PsiCorps

    PsiCorps FF: Babylon 5 mod team

    Dec 30, 2007
    It's been a while since there were any updates and I was hoping to have seen at least one around christmas. I know I am keenly awaiting the merger of other modcomps to enable me to develop the B5 Mod as I'd like and whilst I've been waiting I've come up with some other ideas and questions I'd like to explore and see if any of them are possible.

    There is a section in the buildings xml as shown below
    The two lines I am most interested in are the <bNeededInCity> and <bNeededOnPlanet>. If I understand this correctly the b in front means it is a Boolean and is either a yes or no thing a 0 means you don't need a building and a 1 means you do.
    My question here then is this. Is it possible to set up this section a little differently. So that you have <bNeededOnPlanet>1</bNeededOnPlanet> means you need at least one of these in buildings on any planet in the star system but then have <bNeededInCity>3</bNeededInCity> so you would need at least 3 orbital shipyards to enable construction of the new building? I've tried changing the numbers but the game didn't like it.

    The idea behind this being as follows. I'm trying to stop small star systems with only 1 planet in the inner culture ring being able to build a Capital Shipyard because the infrastructure of the star system will not support it. As the sytem grows and it's influence expands you would then be able to build the Capital Shipyard once all three planets of the small system are settled. I've not seen this happen yet but it's possible you may only have one planet in the inner ring, one in the middle ring and one in the outer ring.

    My next idea revolves around the new military buildings I've added in. All the new buildings are one of a kind so you can only have one per system. I know you can limit the maximum number of buildings a planet can have but I'd like a little more user friendly control than is currently in the game. You can build as many of these types of building on a planet as you like.

    I currently have seven Military Buildings that are one per system and are all planet based. These are the Enlistment Centre, Officer Training School, Military Academy, Gunnery School, Engineering School, Sensor Systems School and Electronic Warfare School. There is also the Flight School, making 8, which I'd like to limit to one per system but am still awaiting the merger of the Fighters gaining experience from combat missions modcomp.I'd like to limit it so you can only build a maximum of two of these buildings on a planet. It would mean that a 3 planet system would have to forego two of these buildings and players would have to consider a lot more carefully what they are going to build in a star system.

    I may have asked this before in another thread somewhere but another idea I had was to make some hostile terrain features invisible until such time as you have researched a tech that will reveal them, is this possible?

    Starbases currently generate a fixed area of influence when they are built. Is it possible to cahnge this so that the Alpha Starbase generates a 1 radius influence are, the Beta Starbase has the standard 2 radius influence and the Omega Starbase has a 3 Radius influence?

    Extraction Facilities are currently more like an automated mining operation. Is it possible to change the Extraction Facility so that when it is constructed it consumes the construction ship and becomes a self sufficient mining colony with a population of 1 that exerts a 1 radius influence and generates a small amount of commerce/wealth as well as the resource it provides?

    On the subject of mining colonies another option I'd like to explore is that they could be built on any asteroid tile and would then generate a small amount of hammers each turn back to the closest star system of the building Civ it is connected to.

    This may still be a feature of Civ but I couldn't see anything after a quick search. When a Colony Ship is built you are effectively taking some of the population away and dropping them onto a new planet. Is there a facility in this version of Civ of the population of a system being reduced by one when a colony ship is completed?
  2. God-Emperor

    God-Emperor Chieftain

    Jul 18, 2009
    Out of everything in your post, this is the easiest.

    A tag for doing this was added quite a while ago. Currently, it only has an effect the moment the base is created because the Python that reapplies the plot ownership each turn was never updated to use it.

    In CIV4UnitInfos.xml you can see that (in FFP, and possibly B5 as well) the bases have a tag called iCultureRange. That should be set to be the desired range.

    In the FinalFrontierEvents.py file change the beginning of the updateStarbaseCulture function to this, changes are the bold red parts:
    	def updateStarbaseCulture(self, iPlayer, iX, iY[B][COLOR="DarkRed"], iRange[/COLOR][/B]):
    		# Create culture around unit
    		for iXLoop in range(iX-[B][COLOR="darkred"]iRange[/COLOR][/B], iX+[B][COLOR="darkred"]iRange+1[/COLOR][/B]):
    			for iYLoop in range(iY-[B][COLOR="darkred"]iRange[/COLOR][/B], iY+[B][COLOR="darkred"]iRange+1[/COLOR][/B]):
    Then in the updateAllStarbases function there are 2 changes to make:

    First, this section that starts with a bunch of comments needs one more thing (the range) put in the list it is building, also shown in bold red:
    				# # FFP - Starbase & Station UnitAI adjustment
    				# if pUnitLoop.isStarbase() or pUnitLoop.isOtherStation():
    					# printd("Base UnitAI check: Starbase = %d, OtherStation = %d, UnitAI = %d" % (pUnitLoop.isStarbase(), pUnitLoop.isOtherStation(), pUnitLoop.getUnitAIType()))
    					# if pUnitLoop.getUnitAIType() != UnitAITypes.UNITAI_CARRIER_SEA :
    						# pUnitLoop.setUnitAIType(UnitAITypes.UNITAI_CARRIER_SEA)
    						# printd(" --- set unit's UnitAI type to UNITAI_CARRIER_SEA")
    				if (pUnitLoop.isStarbase() and (not pUnitLoop.isOtherStation())):
    					[B][COLOR="DarkRed"]pUnitInfo = gc.getUnitInfo(pUnitLoop.getUnitType())[/COLOR][/B]
    					aaiStarbaseList.append([pUnitLoop.getGameTurnCreated(), iPlayerLoop, pUnitLoop.getX(), pUnitLoop.getY()[B][COLOR="DarkRed"], pUnitInfo.getCultureRange()[/COLOR][/B]])
    Second, it needs to be used in the call to updateStarbaseCulture on the last line of the function like so:
    			for iStarbaseLoop in range(len(aaiStarbaseList)):
    				self.updateStarbaseCulture(aaiStarbaseList[iStarbaseLoop][1], aaiStarbaseList[iStarbaseLoop][2], aaiStarbaseList[iStarbaseLoop][3][B][COLOR="darkred"], aaiStarbaseList[iStarbaseLoop][4][/COLOR][/B])
    For a change I even tested it, and it works. (So this code should make it into the next FFP release, whenever that is. The Omega starbase may even get a culture radius of 3, which would go nicely with its greater range for the ranged attack.)
  3. PsiCorps

    PsiCorps FF: Babylon 5 mod team

    Dec 30, 2007
    That's excellent, I had a feeling there was something to be done with that tag but I'd forgotten all about it until you mentioned it, though I think it must have been at the back of my subconcious mind for me to have asked the question.

    Really hope there may be some more positive stuff to come from the other questions/ideas I had?:please:

Share This Page