Help With Modding Eras

Discussion in 'Mod Creation Help' started by HarryAB, Apr 24, 2018.

  1. HarryAB

    HarryAB Chieftain

    Joined:
    Apr 24, 2018
    Messages:
    3
    Gender:
    Male
    Hey all,

    I'm pretty green when it comes to Modding (and XML and SQL for that matter!), but I've got a friend coming over this weekend to drink beers and play a hot-seat game of Civ VI and I wanted to iron out some minor kinks in the game beforehand. I'm a bit of a pedant, and one of my gripes with Civ VI is that the buildings upgrade with each era automatically, and as the civic and science trees are decoupled this means you can have cities that look totally out of touch with your society if you advance along the culture tech tree at a much faster rate than the science tech tree (I had cities made of glass skyscrapers before I had even started research on machinery in my last game). I've wanted to try my hand at modding for a while now, so I thought I'd have a shot and correct this so the visual changes only advance with the science tree after the medieval era.

    I've had a look at the game's XML and ArtDef files and I've come up with some ideas as to how to do this. Looking in the Civics and Eras XML files, I can see that in the civics table in the Civics xml, each row corresponds a civic with a corresponding era (so CIVIC_CODE_OF_LAWS shares a row with ERA_ANCIENT). Initially, I thought that if I capped the eras in the civics to the renaissance era (for example, using a SQL statement to change all the ERA_MODERN to ERA_RENAISSANCE in the rows in the civics table in the civics XML) then this would solve the problem (along with a few game play adjustments to compensate for the lack of era points). After doing this, the civics no longer triggered the change of era and the subsequent change of architecture. However, the Civic tree was totally FUBARed as all the civics became squashed into the Renaissance era and so it was impossible to select most things! Does anyone have any suggestions of how I could stop the era progression being triggered by civics without wrecking the UI?
     
    Last edited: Apr 24, 2018
  2. Bosworth II VII

    Bosworth II VII Chieftain

    Joined:
    Dec 23, 2016
    Messages:
    33
    Gender:
    Male
    I have always had the same issue with the city graphics even if it is a mod where you have to build skyscrappers into a city after a certain tech that would be preferable, unfortunatey my modding skills are 0 so i have to hope someone with the skills has the same idea :(
     
  3. HarryAB

    HarryAB Chieftain

    Joined:
    Apr 24, 2018
    Messages:
    3
    Gender:
    Male
    Glad to hear someone else is on board with the idea! I'd like to see whether creating new eras specifically for culture will fix the problem. What I've tried to do in the below code is create four new eras, the thinking behind it being that if I make eras from scratch they hopefully won't be linked to the variables which trigger architectural changes when you enter a new era. At the bottom of the code, I changed Civic Colonialism to cost 10 to check if the code works - however it doesn't! If I run the Civics section by itself without the update to change ERA_INDUSTRIAL to ERA_INDUSTRIAL_CULTURE and without the Types and Eras sections of the code, the code works fine and the cost of Civic Colonialism is indeed reduced to 10. Could anyone suggest any improvements to the code below to get it up and running as it should?


    <GameData>
    <Types>
    <Row Type="ERA_INDUSTRIAL_CULTURE" Kind="KIND_ERA"/>
    <Row Type="ERA_MODERN_CULTURE" Kind="KIND_ERA"/>
    <Row Type="ERA_ATOMIC_CULTURE" Kind="KIND_ERA"/>
    <Row Type="ERA_INFORMATION_CULTURE" Kind="KIND_ERA"/>
    </Types>

    <Eras>
    <Row EraType="ERA_INDUSTRIAL_CULTURE" Name="LOC_ERA_INDUSTRIAL_NAME" Description="LOC_ERA_INDUSTRIAL_DESCRIPTION" ChronologyIndex="5" WarmongerPoints="24" GreatPersonBaseCost="420" EraTechBackgroundTexture="TechTree_BGIndustrial" EraCivicBackgroundTexture="TechTree_BGIndustrial" WarmongerLevelDescription="LOC_WARMONGER_LEVEL_SEVERE" EmbarkedUnitStrength="35"/>
    <Row EraType="ERA_MODERN_CULTURE" Name="LOC_ERA_MODERN_NAME" Description="LOC_ERA_MODERN_DESCRIPTION" ChronologyIndex="6" WarmongerPoints="24" GreatPersonBaseCost="660" EraTechBackgroundTexture="TechTree_BGModern" EraCivicBackgroundTexture="TechTree_BGModern" WarmongerLevelDescription="LOC_WARMONGER_LEVEL_EGREGIOUS" EmbarkedUnitStrength="50"/>
    <Row EraType="ERA_ATOMIC_CULTURE" Name="LOC_ERA_ATOMIC_NAME" Description="LOC_ERA_ATOMIC_DESCRIPTION" ChronologyIndex="7" WarmongerPoints="24" GreatPersonBaseCost="960" EraTechBackgroundTexture="TechTree_BGAtomic" EraCivicBackgroundTexture="TechTree_BGAtomic" WarmongerLevelDescription="LOC_WARMONGER_LEVEL_EGREGIOUS" EmbarkedUnitStrength="55"/>
    <Row EraType="ERA_INFORMATION_CULTURE" Name="LOC_ERA_INFORMATION_NAME" Description="LOC_ERA_INFORMATION_DESCRIPTION" ChronologyIndex="8" WarmongerPoints="24" GreatPersonBaseCost="1320" EraTechBackgroundTexture="TechTree_BGInformation" EraCivicBackgroundTexture="TechTree_BGInformation" WarmongerLevelDescription="LOC_WARMONGER_LEVEL_EGREGIOUS" EmbarkedUnitStrength="55"/>
    </Eras>

    <Civics>
    <Update>
    <Where EraType = "ERA_INDUSTRIAL"/>
    <Set EraType = "ERA_INDUSTRIAL_CULTURE"/>
    </Update>
    <Update>
    <Where CivicType = "CIVIC_COLONIALISM"/>
    <Set Cost ="10"/>
    </Update>
    </Civics>

    </GameData>
     

Share This Page