Sid Meier's Civilization VI

Sid Meier's Civilization VI

Renewable Energy Complexity
pauloel7 29 Dec, 2019 @ 3:01pm
Synthetic Technocracy
Synthetic Technocracy government provides +3 POWER to every city in your empire.
With REC mod your energy management will naturally shift from producing power locally (city-based) to collecting and distributing globally (empire-wise) "JNR RENEWABLE TRANSFERABLE ENERGY" resource (RTE), which will largely if not completely substitute POWER for you, with the added advantage of zero CO2 emissions.
That way, because of REC mod, you will eventually wish Synthetic Technocracy provided +3 RTE instead of +3 POWER, since will be operating in RTE terms then, and that would allow you better management and optimization of POWER/ENERGY generation/consumption.
Thus, following the same REC mod approach to improvements and buildings, when a city builds the Battery Storage Substation building, it should then shift from generating +3 POWER under Synthetic Technocracy to instead accumulate +3 RTE. That's it: simple and fair. Problem is coding.
< >
Showing 1-14 of 14 comments
pauloel7 29 Dec, 2019 @ 3:03pm 
So, please see below my failed attempt to code the above idea, and the pertaining Database.log error message. If you can help out, please do. Thank you in advance!
Last edited by pauloel7; 29 Dec, 2019 @ 3:05pm
pauloel7 29 Dec, 2019 @ 3:12pm 
Buildings.xml pertaining extracts:
<Modifiers>
<Update>
<Where>
<ModifierId>SYNTHETIC_TECHNOCRACY_CITY_POWER</ModifierId>
</Where>
<Set>
<SubjectRequirementSetId>JNR_RENEWABLE_TRANSFER_COLLECTION_IS_INACTIVE_REQUIREMENT</SubjectRequirementSetId>
</Set>
</Update>
<Row>
<ModifierId>JNR_SYNTHETIC_TECHNOCRACY_CITY_POWER</ModifierId>
<ModifierType>MODIFIER_PLAYER_CITIES_ATTACH_MODIFIER</ModifierType>
</Row>
<Row>
<ModifierId>JNR_SYNTHETIC_TECHNOCRACY_CITY_POWER_MODIFIER</ModifierId>
<ModifierType>MODIFIER_SINGLE_CITY_ADJUST_FREE_RESOURCE_EXTRACTION</ModifierType>
<SubjectRequirementSetId>JNR_RENEWABLE_TRANSFER_COLLECTION_IS_ACTIVE_REQUIREMENT</SubjectRequirementSetId>
</Row>
</Modifiers>
<ModifierArguments>
<Row>
<ModifierId>JNR_SYNTHETIC_TECHNOCRACY_CITY_POWER</ModifierId>
<Name>ModifierId</Name>
<Value>JNR_SYNTHETIC_TECHNOCRACY_CITY_POWER_MODIFIER</Value>
</Row>
<Row>
<ModifierId>JNR_SYNTHETIC_TECHNOCRACY_CITY_POWER_MODIFIER</ModifierId>
<Name>ResourceType</Name>
<Value>RESOURCE_JNR_RENEWABLE_TRANSFERABLE_ENERGY</Value>
</Row>
<Row>
<ModifierId>JNR_SYNTHETIC_TECHNOCRACY_CITY_POWER_MODIFIER</ModifierId>
<Name>Amount</Name>
<Value>3</Value>
</Row>
</ModifierArguments>
</GovernmentModifiers>
<Row GovernmentType="GOVERNMENT_SYNTHETIC_TECHNOCRACY">
<ModifierId>JNR_SYNTHETIC_TECHNOCRACY_CITY_POWER</ModifierId>
</Row>
</GovernmentModifiers>
<RequirementSets>
<Row>
<RequirementSetId>JNR_RENEWABLE_TRANSFER_COLLECTION_IS_INACTIVE_REQUIREMENT</RequirementSetId>
<RequirementSetType>REQUIREMENTSET_TEST_ALL</RequirementSetType>
</Row>
<Row>
<RequirementSetId>JNR_RENEWABLE_TRANSFER_COLLECTION_IS_ACTIVE_REQUIREMENT</RequirementSetId>
<RequirementSetType>REQUIREMENTSET_TEST_ALL</RequirementSetType>
</Row>
</RequirementSets>
<RequirementSetRequirements>
<Row>
<RequirementSetId>JNR_RENEWABLE_TRANSFER_COLLECTION_IS_INACTIVE_REQUIREMENT</RequirementSetId>
<RequirementId>JNR_RENEWABLE_TRANSFER_COLLECTION_IS_INACTIVE</RequirementId>
</Row>
<Row>
<RequirementSetId>JNR_RENEWABLE_TRANSFER_COLLECTION_IS_ACTIVE_REQUIREMENT</RequirementSetId>
<RequirementId>JNR_RENEWABLE_TRANSFER_COLLECTION_IS_ACTIVE</RequirementId>
</Row>
</RequirementSetRequirements>
pauloel7 29 Dec, 2019 @ 3:16pm 
Again, the idea in the code above was to simply replicate the improvements approach to Synthetic Technocracy government, in which a city switches from POWER generation to RTE accumulation when it completes the Battery Storage Substation building.
pauloel7 29 Dec, 2019 @ 3:21pm 
But, it does not work out. Trying to load a saved game fails, sends you back to main menu, and a "mod error" message pops up. Modding.log accuses Buildings.xml failed to load - yes it's this mod file, I tested. Database.log accuses pathing error or something I cannot work out:
[1406584.368] [Gameplay] ERROR: Database::XMLSerializer (Buildings.xml): Cannot parse file. Error at Line = 0, col = 0
[1406585.368] [Gameplay] ERROR: FOREIGN KEY constraint failed
[1406585.368] [Gameplay] ERROR: FOREIGN KEY constraint failed
[1406585.368] [Gameplay]: Validating Foreign Key Constraints...
[1406585.368] [Gameplay] ERROR: Invalid Reference on Project_BuildingCosts.ConsumedBuildingType - "BUILDING_JNR_RENEWABLE_DISTRIBUTION" does not exist in Buildings
[1406585.368] [Gameplay] ERROR: Invalid Reference on Project_BuildingCosts.ConsumedBuildingType - "BUILDING_JNR_RENEWABLE_DISTRIBUTION" does not exist in Buildings
[1406585.368] [Gameplay] ERROR: Invalid Reference on Project_BuildingCosts.ConsumedBuildingType - "BUILDING_JNR_RENEWABLE_DISTRIBUTION" does not exist in Buildings
[1406585.368] [Gameplay] ERROR: Invalid Reference on Projects_XP2.CreateBuilding - "BUILDING_JNR_RENEWABLE_DISTRIBUTION" does not exist in Buildings
[1406585.368] [Gameplay]: Failed Validation.
JNR  [developer] 11 Jul, 2020 @ 5:21am 
Sorry, accidentally unchecked getting notifications from this mod and never saw this thread. I'm currently working on an update for the mod. Good catch with the SynthTech bonus. How about simply changing it to: +1 TRE from every Campus.
pauloel7 11 Jul, 2020 @ 6:33am 
Jeisus! It's been ages on this. I remember tho. I like the vanilla per-city approach, rather than yours per-campus. Also, nerfing +3 to +1? Why? That'd yield like a tenth or so of the power. I'd keep it simple, allowing +3 RTE with Battery Storage Substation building on Synthetic Technocracy per-city. It's the shortest possible solution to integrate REC mod to vanilla - less barren criticism. Anyways, it's your mod.
JNR  [developer] 11 Jul, 2020 @ 6:48am 
oh right, for some reason I had "+3 for whole empire" in my mind lol. I might just make it +1 per Campus building then. It's just more flavorful. Will have to think about it though, you made some good points.
pauloel7 11 Jul, 2020 @ 11:46am 
Well, if you're changing away from the per-city base, please take in the Industrial Zone (Hansa) and Dam along with Campus (Seowon) then - otherwise it's unrealistic, immersion braking. If you're coming from a place where +3 per city was too much - which I remember once feeling that way - this 3-district based change should cut total by at least half... I'd say around a third.... which not too bad. Cheers, JNR.
JNR  [developer] 11 Jul, 2020 @ 2:02pm 
ok update is done, will be uploaded soon. I did not change the government bonus though. Here's why: The bonus is applied to each of your cities already. The wide application is part of its design. I appreciate your input, however!
pauloel7 12 Jul, 2020 @ 1:18pm 
No.... JNR, the whole point here was to make use of the batteries, the tech, your mod. Not changing anything let the cities without the ability to collect/distribute its free power from Synthetic Technocracy, as if your mod did not exist. Is that what you want?
pauloel7 12 Jul, 2020 @ 2:25pm 
Another way to look at the problem is to consider that the game does not allow to "pinch out" the power surplus (production-consumption) from a single city to transform it into RTE with the city Battery Storage Substation building. I believe I've asked you this before. Because of that, the majority of the Synthetic Technocracy power bonus is wasted. If that was possible, I would not have started this discussion thread.
pauloel7 12 Jul, 2020 @ 2:35pm 
JNR, aside this thread subject, since you're reviewing this mod, may I ask you to consider including a few mod compatibilities? Details are in the "Buildings.xml" file in the link: https://www.dropbox.com/sh/8zkf8kj3rsglts9/AACuOiQTN1wrczHtFRpA0ZIca?dl=0
JNR  [developer] 12 Jul, 2020 @ 2:55pm 
Ok I see your point. Now that I streamlined the improvements, I might be able to have them convert 1 more local power into the resource. Will look into it. Would rather do that than take a bonus explicitly said to be a *per city* thing and turn it into an empire-wide bonus.
pauloel7 12 Jul, 2020 @ 3:29pm 
You meant so under Synthetic Technocracy only, right? If so, agreed. That'd be really nice! As usual your approach is straight up better than vanilla's. Also, please, take a look into the mod compatibility. It would work for those using the mods, and do nothing for those who don't, correcto?
Last edited by pauloel7; 12 Jul, 2020 @ 3:31pm
< >
Showing 1-14 of 14 comments
Per page: 1530 50