Sid Meier's Civilization VI

Sid Meier's Civilization VI

Great Sovereigns
Publicola 15 Dec, 2024 @ 12:55pm
Code for 'Oracle' to add GPP to Government Plaza
I *think* I figured out the code to get the Oracle to work correctly, though I still need to test it in-game, which may take some time.

EDIT: Well, it caused my game to not start up correctly, so I'm guessing I messed up somehow. Not sure which part of my code was the issue, but it's non-functional for now. If anyone wants to take a look, let me know what you find out!

<><><><><><><><><><>

The Oracle uses a 'SubjectRequirementSetId' to determine which districts are in a city so it knows to boost their GPP. Every other district is defined in (base game) Leaders.xml or Expansion1_Leaders.xml, but I have not found if/where there's a spot where 'District_Is_Government' has been defined, so I had to reverse-engineer that section of code (the part in <GameInfo>).

Apart from that, this is basically copy-pasted from the (confirmed working) 'Tweaks for JFD's Great Theologian' mod. Insert these lines into the GreatSovereigns_Core.xml, at the bottom after </Building_GreatPersonPoints>. The code below includes both </Building_GreatPersonPoints> and </GameData> so you can remove both lines.

<><><><><><><><><><><>

</Building_GreatPersonPoints>
<Modifiers>
<Row>
<ModifierId>ORACLE_GREATSOVEREIGNPOINTS</ModifierId>
<ModifierType>MODIFIER_SINGLE_CITY_DISTRICTS_ADJUST_GREAT_PERSON_POINTS</ModifierType>
<SubjectRequirementSetId>DISTRICT_IS_GOVERNMENT</SubjectRequirementSetId>
</Row>
</Modifiers>
<ModifierArguments>
<Row>
<ModifierId>ORACLE_GREATSOVEREIGNPOINTS</ModifierId>
<Name>GreatPersonClassType</Name>
<Value>GREAT_PERSON_CLASS_GreatSovereigns</Value>
</Row>
<Row>
<ModifierId>ORACLE_GREATSOVEREIGNPOINTS</ModifierId>
<Name>Amount</Name>
<Value>2</Value>
</Row>
</ModifierArguments>
<BuildingModifiers>
<Row>
<BuildingType>BUILDING_ORACLE</BuildingType>
<ModifierId>ORACLE_GREATSOVEREIGNPOINTS</ModifierId>
</Row>
</BuildingModifiers>
</GameData>
<GameInfo>
<RequirementSets>
<Row>
<RequirementSetId>DISTRICT_IS_GOVERNMENT</RequirementSetId>
<RequirementSetType>REQUIREMENTSET_TEST_ALL</RequirementSetType>
</Row>
</RequirementSets>
<RequirementSetRequirements>
<Row>
<RequirementSetId>DISTRICT_IS_GOVERNMENT</RequirementSetId>
<RequirementId>REQUIRES_DISTRICT_IS_GOVERNMENT</RequirementId>
</Row>
</RequirementSetRequirements>
<Requirements>
<Row>
<RequirementId>REQUIRES_DISTRICT_IS_GOVERNMENT</RequirementId>
<RequirementType>REQUIREMENT_DISTRICT_TYPE_MATCHES</RequirementType>
</Row>
</Requirements>
<RequirementArguments>
<Row>
<RequirementId>REQUIRES_DISTRICT_IS_GOVERNMENT</RequirementId>
<Name>DistrictType</Name>
<Value>DISTRICT_GOVERNMENT</Value>
</Row>
</RequirementArguments>
</GameInfo>
Last edited by Publicola; 15 Dec, 2024 @ 1:25pm
< >
Showing 1-2 of 2 comments
RoxyRiku94 18 Dec, 2024 @ 8:04pm 
If coding in SQL, you could actually write it for example like so:

INSERT OR IGNORE INTO Modifiers
(ModifierId, ModifierType, SubjectRequirementSetId)
VALUES ('ORACLE_PLATI_GREAT_SOVEREIGN_POINTS', 'MODIFIER_SINGLE_CITY_DISTRICTS_ADJUST_GREAT_PERSON_POINTS', 'DISTRICT_IS_GOVERNMENT');

INSERT OR IGNORE INTO ModifierArguments
(ModifierId, Name, Value)
VALUES ('ORACLE_PLATI_GREAT_SOVEREIGN_POINTS', 'GreatPersonClassType',
'GREAT_PERSON_CLASS_GreatSovereigns'),
('ORACLE_PLATI_GREAT_SOVEREIGN_POINTS', 'Amount',
2);

INSERT OR IGNORE INTO BuildingModifiers
(BuildingType, ModifierId)
VALUES ('BUILDING_ORACLE', 'ORACLE_PLATI_GREAT_SOVEREIGN_POINTS');

Of course, how the original modder wants to define the entries if up to Plati to decide.
Not gonna list setting up the custom Requirement like your post above bc of space constraints, but you'll get the idea how to code it properly if you know SQL ;-)

Source: Code Snippet from JNR's Great Explorer mod, just changed to adapt for Great Sovereigns (the same could be changed for Great Entertainers from Plati's mod as well)
Plati  [developer] 27 Dec, 2024 @ 11:23pm 
Thank you both, I have introduced theses changes in latest update.
< >
Showing 1-2 of 2 comments
Per page: 1530 50