Coastal City Buff

LanguishViking

Warlord
Joined
May 10, 2012
Messages
104
This is what I want to mod in

1. Cities founded on the coast build port districts in half the time and port districts do not count towards the district limit.
2. Coastal city tiles within city borders count as a district, farm or mine for adjacency if the city has port or is coastal.
3. Port Districts get coastal fortifications with bombard options just like encampments.

I am a complete beginner at Civ modding of any kinds. I'm reasonably certain for points 1 and 2 doing it form me is simpler that explaining to me how to do it, but I would appreciate if somebody did. I think 3 might require modding the port graphic since you'd have to add the fortification bar feature you have with the encampment to the port as well.

I have no clue how to do this nor am I certain that it is possible, but this would be the place to ask right?
 
Just bear in mind that the expertise level is not as high as yet. You may be asking about something you know more about at the moment than anyone else, for example.

Harbor and Royal Dockyard District definitions as in the game: (taken from C:\Program Files (x86)\Steam\SteamApps\common\Sid Meier's Civilization VI\Base\Assets\Gameplay\Data/Districts.xml )
Code:
<GameInfo>
 <Districts>
  <Row DistrictType="DISTRICT_HARBOR"
   Name="LOC_DISTRICT_HARBOR_NAME"
   Description="LOC_DISTRICT_HARBOR_DESCRIPTION"
   PrereqTech="TECH_CELESTIAL_NAVIGATION"
   PlunderType="PLUNDER_GOLD"
   PlunderAmount="50"
   AdvisorType="ADVISOR_GENERIC"
   Cost="60"
   CostProgressionModel="COST_PROGRESSION_NUM_UNDER_AVG_PLUS_TECH"
   CostProgressionParam1="25"
   RequiresPlacement="true"
   RequiresPopulation="true"
   Coast="true"
   Aqueduct="false"
   FreeEmbark="true"
   NoAdjacentCity="false"
   AdjacentToLand="true"
   InternalOnly="false"
   ZOC="false"
   TradeRouteCapacity="1"
   TradeEmbark="true"
   CaptureRemovesBuildings="false"
   CaptureRemovesCityDefenses="false"
   MilitaryDomain="DOMAIN_SEA"
   TravelTime="2"
   CityStrengthModifier="2"/>

  <Row DistrictType="DISTRICT_ROYAL_NAVY_DOCKYARD"
   Name="LOC_DISTRICT_ROYAL_NAVY_DOCKYARD_NAME"
   Description="LOC_DISTRICT_ROYAL_NAVY_DOCKYARD_DESCRIPTION"
   PrereqTech="TECH_CELESTIAL_NAVIGATION"
   PlunderType="PLUNDER_GOLD"
   PlunderAmount="50"
   AdvisorType="ADVISOR_GENERIC"
   Cost="30"
   CostProgressionModel="COST_PROGRESSION_NUM_UNDER_AVG_PLUS_TECH"
   CostProgressionParam1="25"
   RequiresPlacement="true"
   RequiresPopulation="false"
   Coast="true"
   Aqueduct="false"
   FreeEmbark="true"
   NoAdjacentCity="false"
   AdjacentToLand="true"
   InternalOnly="false"
   ZOC="false"
   TradeRouteCapacity="1"
   TradeEmbark="true"
   CaptureRemovesBuildings="false"
   CaptureRemovesCityDefenses="false"
   MilitaryDomain="DOMAIN_SEA"
   TravelTime="2"
   CityStrengthModifier="2"
   TraitType="TRAIT_CIVILIZATION_ROYAL_NAVY_DOCKYARD"/>
 </Districts>
</GameInfo>
The important parts would be the two columns CostProgressionModel and CostProgressionParam1. I've sucessfully removed all district cost progressions by the following code
Code:
<GameInfo>
 <Districts>
  <Update>
   <Set CostProgressionModel="NO_COST_PROGRESSION" />
  </Update>
 </Districts>
</GameInfo>
The code has to be in a file set as <UpdateDatabase> within your modinfo file as in like this
Code:
 <Components>
  <UpdateDatabase id="LEETEST_DATBASE_UPDATES">
   <Items>
    <File>Gameplay.xml</File>
   </Items>
  </UpdateDatabase>
  <LocalizedText id="LEETEST_TEXT">
   <Items>
    <File>Text.xml</File>
   </Items>
  </LocalizedText>
 </Components>
where the Gameplay.xml contains any actually game effect xml commands, and file Text.xml contains any text LOC_ tag definitions.

I would think to accomplish what you are after you would need:
Code:
<GameInfo>
 <Districts>
  <Update>
   <Where DistrictType="DISTRICT_HARBOR" />
   <Set CostProgressionModel="NO_COST_PROGRESSION" />
  </Update>
  <Update>
   <Where DistrictType="DISTRICT_ROYAL_NAVY_DOCKYARD" />
   <Set CostProgressionModel="NO_COST_PROGRESSION" />
  </Update>
 </Districts>
</GameInfo>
To be more double sure you could also do as:
Code:
<GameInfo>
 <Districts>
  <Update>
   <Where DistrictType="DISTRICT_HARBOR" />
   <Set CostProgressionModel="NO_COST_PROGRESSION" CostProgressionParam1="0" />
  </Update>
  <Update>
   <Where DistrictType="DISTRICT_ROYAL_NAVY_DOCKYARD" />
   <Set CostProgressionModel="NO_COST_PROGRESSION" CostProgressionParam1="0" />
  </Update>
 </Districts>
</GameInfo>
 
Last edited:
OK,

I have figured out that I need to create a third unique harbor district, I think I can do that
I have figured out how to give farms adjecency bonuses and I can add that for mines too, but the "Farms_MedievalAdjacency" is tech related and I can't find out how

the other BIG problem is that I can't figure out how to link all of this to city founded on a coast. I looked at the boosts file and it referred to the code itself, so I assume trying to use the same mechanism for the sailing boost isn't an option. I need some way to get

IF city = coastal
THEN TRAIT:_CITY_CHEAP_DOCKYARD = true
which I don't know.
 
I don't think you need to do anything fancy to achieve this. Have you tried giving the district hit points? The encampment is the only district with hitpoints, other than the city center and from the way the game looks coded, nothing about walls, encampments, masonry or bronze working actually point to what to give strike capability to. Walls specify outerdefensestrength, or something like that so having hitpoints should give you what you need.
Tying it to a coastal city looks extremely easy. I was shocked when I thought of it. The Eiffel Tower has code that ties it to the city center. [ AdjacentDistrict="DISTRICT_CITY_CENTER" ] Just stick that in, and only Coastal Cities will be able to build it. It won't be invisible to non-coastal cities but the game shows you every wonder you can't build anyway.
 
Locking the new harbor district to be next to city center is straightforward, but then how to stop such a city from building the regular harbor district in addition to the new one?
There has to be some way to check if the city is on a coast as that rule determines whether you can make naval units in a city with no harbor.
 
Locking the new harbor district to be next to city center is straightforward, but then how to stop such a city from building the regular harbor district in addition to the new one?
There has to be some way to check if the city is on a coast as that rule determines whether you can make naval units in a city with no harbor.

I think you can make them mutually exclusive like archeological and arts museums are or barracks and stables are. But that doesnt' stop you building the wrong port building.... hmm.. so that doesn't solve the problem
 
I think you can make them mutually exclusive like archeological and arts museums are or barracks and stables are. But that doesnt' stop you building the wrong port building.... hmm.. so that doesn't solve the problem
you could name your new harbor "Seaport" or "Docks" so you can see a difference between the more expensive "Harbor" and your new sea district
 
I'm wondering if its possible to simply reduce the era increment costs for districts rather than removing it completely. Also I would be interested in significantly reducing district repair costs as well.
 
it is completely possible to only reduce build time increment from eras

Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- TODO: Add all updates for the database -->
<GameInfo>
    <Districts>
        <!-- District production cost fixes -->
        <Update>
            <Where DistrictType="DISTRICT_HARBOR" />
            <Set>           
                <CostProgressionModel>COST_PROGRESSION_GAME_PROGRESS</CostProgressionModel> <!-- default model: COST_PROGRESSION_GAME_PROGRESS -->
                <CostProgressionParam1>100</CostProgressionParam1> <!-- default value: 1000 -->
            </Set>   
        </Update>
    </Districts>
<GameInfo>
 
it is completely possible to only reduce build time increment from eras

Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- TODO: Add all updates for the database -->
<GameInfo>
    <Districts>
        <!-- District production cost fixes -->
        <Update>
            <Where DistrictType="DISTRICT_HARBOR" />
            <Set>         
                <CostProgressionModel>COST_PROGRESSION_GAME_PROGRESS</CostProgressionModel> <!-- default model: COST_PROGRESSION_GAME_PROGRESS -->
                <CostProgressionParam1>100</CostProgressionParam1> <!-- default value: 1000 -->
            </Set> 
        </Update>
    </Districts>
<GameInfo>
Thanks for this. I'll be looking forward to implementing it tonight :)
 
Now that I looked at Districts.xml I noted that most of the CostProgressionParam1 values are 25. Does setting a higher value to CostProgressionParam1 increase the era increment cost or decrease it?
 
im not entirely sure how the COST_PROGRESSION_NUM_UNDER_AVG_PLUS_TECH and COST_PROGRESSION_GAME_PROGRESS models work yet, will have to look through the lua codes for them
 
Top Bottom