[Help] How you allow a building to create a city connection over sea, just like the harbor does?

theGuitarist27

Chieftain
Joined
Nov 4, 2017
Messages
16
I have created a Unique Building for my modded civ that replaces the harbor, and I found out I forgot to add creating a city connection. I've been looking at it, but I can't find the xml tag that does this. I also couldn't find the harbor xml file online, so I couldn't just look at how the harbor does this.
Maybe someone here does know how the harbor does this and can help me, or maybe people are just better at finding stuff than me. Anyway, any help is appreciated.
Thanks in advance
 
Straight from the game's base files (from Vanilla or either expansion). Found using Agent Ransack.
Code:
<Row>
            <Type>BUILDING_HARBOR</Type>
            snip
            <AllowsWaterRoutes>true</AllowsWaterRoutes>
            snip
</Row>
 
Hmm, I actually have that one on. Yet I still don't get a city connection.
I've added my buildings xml-file, it would be appreciated if you could take a look at it, maybe there's something else I did wrong.

I've also thought about removing the bonusses that overlap with the harbor and just adding a free harbor to the building (although that would make the building better than intended, but I can live with that). Is it possible to both get my building and a habor when they are in the same building class? Or can a civ only get one building from a class?
 

Attachments

  1. No single civ can have more than one building from within the same Building-class.
  2. For effects like the Water Route Connection, the building must be assigned as the unique within the Building-Class for that civ, or else it must be the default building within the class that that civ is entitled to construct.
  3. Attempting to make a building give the same class of building as its "FreeBuildingThisCity" will not work since <FreeBuildingThisCity> is specified by the Class of the building, so the game would want to give the same building.
  4. The water connection only works if one of the following is true
    • Both the capital and the other city are coastal and both have the water connection building, and there is an unobstructed explored continuous line of coastal or sea tiles between the two cities. Sea tiles in this case will only count after the appropriate tech (Sailing, Navigation ?) is discovered that allows sea routes over non-coastal tiles.
    • There is a road connection between the capital city and a coastal city with the water connection building, which coastal city can then act as a connection for a third coastal city which has an explored and un-obstructed chain of tiles "connecting" it to the second city. Both coastal cities must have the water-connection building.
    • There is a road network connecting one or more cities to a coastal city that has the water connection building, and this coastal city is connected to the capital via one of the previously-mentioned methods.
I can't remember whether the connection is made instantaneous with the construction of the building or whether it only implements as part of the next turn's processing.

-------------------------------------

All the files for the base-game stuff are on your computer. You don't need to look online for definition of any base-game building. But Firaxis does not have a seperated file for each base-game building, for example. All buildings added by one of the exansions are in the "buildings" file for that expansion.

  1. Vanilla files are at:
    C:\Program Files (x86)\Steam\SteamApps\common\Sid Meier's Civilization V\assets\Gameplay\XML
  2. G&K files are at:
    C:\Program Files (x86)\Steam\SteamApps\common\Sid Meier's Civilization V\assets\DLC\Expansion\Gameplay\XML
  3. BNW files are at:
    C:\Program Files (x86)\Steam\SteamApps\common\Sid Meier's Civilization V\assets\DLC\Expansion2\Gameplay\XML
The beginning portion of your file path might be slightly different depending on whether you have Win7, Win10, etc. (I have Win8.1)

The CIV5Buildings.xml file will have everything introduced in the original (Vanilla) version of the game.
For BNW, the CIV5Buildings_Inherited_Expansion2.xml will have everything introduced by Gods & Kings, and the CIV5Buildings_Expansion2.xml file will have everything introduced by BNW.
 
Last edited:
Back
Top Bottom