Adjacency Bonus from improvement as a pantheon

TTSev

Chieftain
Joined
Oct 25, 2019
Messages
28
Hello,

1) I'd like to create a pantheon with the following effect: pastures and camps give adjacency bonuses to districts. But I'm having trouble.

I started by creating the relevent district adjacency bonuses but I actually have no idea how to link them to a pantheon, if even possible:
Spoiler :
Code:
    <District_Adjacencies>
    
        <Row DistrictType="DISTRICT_HOLY_SITE" YieldChangeId="SPM_DOMESTICATION_PASTURE_FAITH" />
        <Row DistrictType="DISTRICT_HOLY_SITE" YieldChangeId="SPM_DOMESTICATION_CAMP_FAITH" />
        <Row DistrictType="DISTRICT_LAVRA" YieldChangeId="SPM_DOMESTICATION_PASTURE_FAITH" />
        <Row DistrictType="DISTRICT_LAVRA" YieldChangeId="SPM_DOMESTICATION_CAMP_FAITH" />
        <Row DistrictType="DISTRICT_CAMPUS" YieldChangeId="SPM_DOMESTICATION_PASTURE_SCIENCE" />
        <Row DistrictType="DISTRICT_CAMPUS" YieldChangeId="SPM_DOMESTICATION_CAMP_SCIENCE" />
        <Row DistrictType="DISTRICT_SEOWON" YieldChangeId="SPM_DOMESTICATION_PASTURE_SCIENCE" />
        <Row DistrictType="DISTRICT_SEOWON" YieldChangeId="SPM_DOMESTICATION_CAMP_SCIENCE" />
        <Row DistrictType="DISTRICT_COMMERCIAL_HUB" YieldChangeId="SPM_DOMESTICATION_PASTURE_GOLD" />
        <Row DistrictType="DISTRICT_COMMERCIAL_HUB" YieldChangeId="SPM_DOMESTICATION_CAMP_GOLD" />
        <Row DistrictType="DISTRICT_SUGUBA" YieldChangeId="SPM_DOMESTICATION_PASTURE_GOLD" />
        <Row DistrictType="DISTRICT_SUGUBA" YieldChangeId="SPM_DOMESTICATION_CAMP_GOLD" />
        <Row DistrictType="DISTRICT_INDUSTRIAL_ZONE" YieldChangeId="SPM_DOMESTICATION_PASTURE_PRODUCTION" />
        <Row DistrictType="DISTRICT_INDUSTRIAL_ZONE" YieldChangeId="SPM_DOMESTICATION_CAMP_PRODUCTION" />
        <Row DistrictType="DISTRICT_HANSA" YieldChangeId="SPM_DOMESTICATION_PASTURE_PRODUCTION" />
        <Row DistrictType="DISTRICT_HANSA" YieldChangeId="SPM_DOMESTICATION_CAMP_PRODUCTION" />
        <Row DistrictType="DISTRICT_THEATER" YieldChangeId="SPM_DOMESTICATION_PASTURE_CULTURE" />
        <Row DistrictType="DISTRICT_THEATER" YieldChangeId="SPM_DOMESTICATION_CAMP_CULTURE" />
        <Row DistrictType="DISTRICT_ACROPOLIS" YieldChangeId="SPM_DOMESTICATION_PASTURE_CULTURE" />
        <Row DistrictType="DISTRICT_ACROPOLIS" YieldChangeId="SPM_DOMESTICATION_CAMP_CULTURE" />
    
    </District_Adjacencies>
    <Adjacency_YieldChanges>
    
        <Row ID="SPM_DOMESTICATION_PASTURE_FAITH" Description="LOC_SPM_DOMESTICATION_PASTURE_FAITH_DESCRIPTION" YieldType="YIELD_FAITH" YieldChange="1" AdjacentImprovement="IMPROVEMENT_PASTURE" />
        <Row ID="SPM_DOMESTICATION_CAMP_FAITH" Description="LOC_SPM_DOMESTICATION_CAMP_FAITH_DESCRIPTION" YieldType="YIELD_FAITH" YieldChange="1" AdjacentImprovement="IMPROVEMENT_CAMP" />
        <Row ID="SPM_DOMESTICATION_PASTURE_SCIENCE" Description="LOC_SPM_DOMESTICATION_PASTURE_SCIENCE_DESCRIPTION" YieldType="YIELD_SCIENCE" YieldChange="1" AdjacentImprovement="IMPROVEMENT_PASTURE" />
        <Row ID="SPM_DOMESTICATION_CAMP_SCIENCE" Description="LOC_SPM_DOMESTICATION_CAMP_SCIENCE_DESCRIPTION" YieldType="YIELD_SCIENCE" YieldChange="1" AdjacentImprovement="IMPROVEMENT_CAMP" />
        <Row ID="SPM_DOMESTICATION_PASTURE_GOLD" Description="LOC_SPM_DOMESTICATION_PASTURE_GOLD_DESCRIPTION" YieldType="YIELD_GOLD" YieldChange="1" AdjacentImprovement="IMPROVEMENT_PASTURE" />
        <Row ID="SPM_DOMESTICATION_CAMP_GOLD" Description="LOC_SPM_DOMESTICATION_CAMP_GOLD_DESCRIPTION" YieldType="YIELD_GOLD" YieldChange="1" AdjacentImprovement="IMPROVEMENT_CAMP" />
        <Row ID="SPM_DOMESTICATION_PASTURE_PRODUCTION" Description="LOC_SPM_DOMESTICATION_PASTURE_PRODUCTION_DESCRIPTION" YieldType="YIELD_PRODUCTION" YieldChange="1" AdjacentImprovement="IMPROVEMENT_PASTURE" />
        <Row ID="SPM_DOMESTICATION_CAMP_PRODUCTION" Description="LOC_SPM_DOMESTICATION_CAMP_PRODUCTION_DESCRIPTION" YieldType="YIELD_PRODUCTION" YieldChange="1" AdjacentImprovement="IMPROVEMENT_CAMP" />
        <Row ID="SPM_DOMESTICATION_PASTURE_CULTURE" Description="LOC_SPM_DOMESTICATION_PASTURE_CULTURE_DESCRIPTION" YieldType="YIELD_CULTURE" YieldChange="1" AdjacentImprovement="IMPROVEMENT_PASTURE" />
        <Row ID="SPM_DOMESTICATION_CAMP_CULTURE" Description="LOC_SPM_DOMESTICATION_CAMP_CULTURE_DESCRIPTION" YieldType="YIELD_CULTURE" YieldChange="1" AdjacentImprovement="IMPROVEMENT_CAMP" />

    </Adjacency_YieldChanges>

My other attempt was to do it like dance of the aurora (+faith to holy sites from tundra) with using a similar modifier MODIFIER_ALL_CITIES_IMPROVEMENT_ADJACENCY but to create it I would need the effect EFFECT_IMPROVEMENT_ADJACENCY which I couldn't find in the database.

Am I in a dead end?

2) I also have an issue with another pantheon that is supposed to give a religious great work slot to shrines but when I try it, I get 2 slots in my shrines. And when I make the mod give 2 slots (for testing purposes) I got 4 slots ingame so it seems like the modifier is applied twice, but I'm quite lost here.
Here's the code part about this pantheon:
Spoiler :
Code:
    <Beliefs>

        <Row BeliefType="BELIEF_SPM_SPIRIT_OF_SCRIPTURES"
             Name="LOC_BELIEF_SPM_SPIRIT_OF_SCRIPTURES_NAME"
             Description="LOC_BELIEF_SPM_SPIRIT_OF_SCRIPTURES_DESCRIPTION"
             BeliefClassType="BELIEF_CLASS_PANTHEON" />

    </Beliefs>
    <Types>

        <Row Type="BELIEF_SPM_SPIRIT_OF_SCRIPTURES"
             Kind="KIND_BELIEF" />

    </Types>
    <BeliefModifiers>

        <Row BeliefType="BELIEF_SPM_SPIRIT_OF_SCRIPTURES"
             ModifierID="SPM_SPIRIT_OF_SCRIPTURES_WRITING_SLOT" />

    </BeliefModifiers>
    <Modifiers>

        <Row ModifierId="SPM_SPIRIT_OF_SCRIPTURES_WRITING_SLOT"
             ModifierType="MODIFIER_ALL_CITIES_ATTACH_MODIFIER"
             SubjectRequirementSetId="PLAYER_HAS_PANTHEON_REQUIREMENTS" />
        <Row ModifierId="SPM_SPIRIT_OF_SCRIPTURES_WRITING_SLOT_MODIFIER"
             ModifierType="MODIFIER_PLAYER_CITIES_ADJUST_EXTRA_GREAT_WORK_SLOTS" />

    </Modifiers>
    <ModifierArguments>

        <Row ModifierId="SPM_SPIRIT_OF_SCRIPTURES_WRITING_SLOT"
             Name="ModifierId"
             Value="SPM_SPIRIT_OF_SCRIPTURES_WRITING_SLOT_MODIFIER" />
        <Row ModifierId="SPM_SPIRIT_OF_SCRIPTURES_WRITING_SLOT_MODIFIER"
             Name="BuildingType"
             Value="BUILDING_SHRINE" />
        <Row ModifierId="SPM_SPIRIT_OF_SCRIPTURES_WRITING_SLOT_MODIFIER"
             Name="GreatWorkSlotType"
             Value="GREATWORKSLOT_CATHEDRAL" />
        <Row ModifierId="SPM_SPIRIT_OF_SCRIPTURES_WRITING_SLOT_MODIFIER"
             Name="Amount"
             Value="1" />

    </ModifierArguments>
 
Last edited:
Code:
       <Row ModifierId="SPM_SPIRIT_OF_SCRIPTURES_WRITING_SLOT"
             ModifierType="MODIFIER_ALL_CITIES_ATTACH_MODIFIER"
             SubjectRequirementSetId="PLAYER_HAS_PANTHEON_REQUIREMENTS" />
        <Row ModifierId="SPM_SPIRIT_OF_SCRIPTURES_WRITING_SLOT_MODIFIER"
             ModifierType="MODIFIER_PLAYER_CITIES_ADJUST_EXTRA_GREAT_WORK_SLOTS" />
You are doubling down here. You are using a modifier
Code:
       <Row ModifierId="SPM_SPIRIT_OF_SCRIPTURES_WRITING_SLOT"
             ModifierType="MODIFIER_ALL_CITIES_ATTACH_MODIFIER"
             SubjectRequirementSetId="PLAYER_HAS_PANTHEON_REQUIREMENTS" />
to attach a second modifier to all cities, but the second modifier
Code:
       <Row ModifierId="SPM_SPIRIT_OF_SCRIPTURES_WRITING_SLOT_MODIFIER"
             ModifierType="MODIFIER_PLAYER_CITIES_ADJUST_EXTRA_GREAT_WORK_SLOTS" />
is already inherently attached to all cities.
 
Thanks for your help! As I was hoping that second one was something stupid and easy to fix so that's that.
 
For the other you won't be able to do it via a District Adjacency since those have no "requirements" capability -- the district either qualifies or does not inherently by what it is placed adjacent to. The Pantheons that give "adjacency" for a Holy Site or whatever being next to Tundra or Rivers or what-have-you are not using an Adjacency_YieldChanges nor a DistrictAdjacency, they are using modifiers.
 
Temple of Artemis does not actually use a BuildingModifier, it uses
Code:
	<RequirementSets>
		<Row>
			<RequirementSetId>TEMPLE_ARTEMIS_REQUIREMENTS</RequirementSetId>
			<RequirementSetType>REQUIREMENTSET_TEST_ANY</RequirementSetType>
		</Row>
	</RequirementSets>
	<RequirementArguments>
		<Row>
			<RequirementId>REQUIRES_PLOT_HAS_ARTEMIS_WITHIN_4</RequirementId>
			<Name>BuildingType</Name>
			<Value>BUILDING_TEMPLE_ARTEMIS</Value>
		</Row>
		<Row>
			<RequirementId>REQUIRES_PLOT_HAS_ARTEMIS_WITHIN_4</RequirementId>
			<Name>MinRange</Name>
			<Value>0</Value>
		</Row>
		<Row>
			<RequirementId>REQUIRES_PLOT_HAS_ARTEMIS_WITHIN_4</RequirementId>
			<Name>MaxRange</Name>
			<Value>4</Value>
		</Row>
	</RequirementArguments>
	<Requirements>
		<Row>
			<RequirementId>REQUIRES_PLOT_HAS_ARTEMIS_WITHIN_4</RequirementId>
			<RequirementType>REQUIREMENT_PLOT_ADJACENT_BUILDING_TYPE_MATCHES</RequirementType>
		</Row>
	</Requirements>
	<RequirementSetRequirements>
		<Row>
			<RequirementSetId>TEMPLE_ARTEMIS_REQUIREMENTS</RequirementSetId>
			<RequirementId>REQUIRES_PLOT_HAS_ARTEMIS_WITHIN_4</RequirementId>
		</Row>
	</RequirementSetRequirements>
	<Modifiers>
		<Row>
			<ModifierId>TEMPLE_ARTEMIS_CAMP_AMENITY</ModifierId>
			<ModifierType>MODIFIER_SINGLE_CITY_ADJUST_IMPROVEMENT_AMENITY</ModifierType>
			<SubjectRequirementSetId>TEMPLE_ARTEMIS_REQUIREMENTS</SubjectRequirementSetId>
		</Row>
	</Modifiers>
	<ModifierArguments>
		<Row>
			<ModifierId>TEMPLE_ARTEMIS_CAMP_AMENITY</ModifierId>
			<Name>Amount</Name>
			<Value>1</Value>
		</Row>
	</ModifierArguments>
	<ImprovementModifiers>
		<Row>
			<ImprovementType>IMPROVEMENT_CAMP</ImprovementType>
			<ModifierId>TEMPLE_ARTEMIS_CAMP_AMENITY</ModifierId>
		</Row>
		<Row>
			<ImprovementType>IMPROVEMENT_PASTURE</ImprovementType>
			<ModifierId>TEMPLE_ARTEMIS_PASTURE_AMENITY</ModifierId>
		</Row>
		<Row>
			<ImprovementType>IMPROVEMENT_PLANTATION</ImprovementType>
			<ModifierId>TEMPLE_ARTEMIS_PLANTATION_AMENITY</ModifierId>
		</Row>
	</ImprovementModifiers>
There is a REQUIREMENT_PLOT_ADJACENT_DISTRICT_TYPE_MATCHES so you should be able to adapt the way Artemis works for any combination of Improvement and District and then string your requirement setups so that the player also has to have the correct pantheon or other belief-type. You aren't adjusting the district, you are adjusting the improvement in such a case, and even though you don't want Amenity the same basic logic should apply.

In order to directly alter the "adjacency" yield of the nearby district you would have to use an effect-type that adjusts a district's "adjacency-yield" and you might need to use a Modifier-Type that effects all of a player's districts, then limit by the desired district(s) and then by the REQUIREMENT_PLOT_ADJACENT_DISTRICT_TYPE_MATCHES to the desired improvement, and then even further by whether or not the player has the correct pantheon.

It can be done, I think, but there is a lot of logic to work through.
 
Last edited:
Ok thanks for the lead, I'll look into that.
Naively I thought it would be easy to do simply using a modifier equivalent to the one for Dance of the aurora but mentionning improvement type instead of terrain type.
 
There might be a way to do it that way, but you would need to look through the SQL database table GameEffects to see if there is an Effect-type and Requirement-Type that would result in what you are looking for. The contents of table GameEffects are not shown anywhere in the game's XML files -- you have to use an SQL database viewer program to first open file
~\Documents\My Games\Sid Meier's Civilization VI\Cache/DebugGameplay.sqlite
And then look at the contents of table GameEffects from within the database viewer program.

For posterity and for other readers of this thread: You cannot in any way shape or form hurt the game by opening this file or changing data within it outside of the game environment, or even by entirely deleting the file on purpose or by accident -- the entire file is re-constructed by the game every time you start up Civ6 -- and all changes made by mods are added to it after you hit start game or load saved game as part of the process of getting into the actual play of the game.​

It does not really matter whjich database viewer program you decide to download -- most are freeware at least for the "home use" versions. I use SQLite Browser.. Others use other programs.

Using a database viewer program allows you to see the entire database in one place, and to compare data from one table to what gets added into another table and see better the interlocking relationships. Being able to inspect the contents of table GameEffects also allows you to find not-often-used requirement-types and effect-types which you might otherwise not be aware of.
 
Last edited:
That's what I checked (I installed DB Browser when I started modding), I went to the DynamicModifiers table and typed 'ADJACENCY' in the filter for EffectType hoping to see EFFECT_IMPROVEMENT_ADJACENCY but no luck, they only use terrain, feature, river and district adjacencies. And I just looked at the GameEffects table, same result.
Sometimes I wish that for the purpose of modding they would code a little more than they need.
 
...I installed DB Browser when I started modding
:thumbsup:

Sometimes I wish that for the purpose of modding they would code a little more than they need.
We all feel that from time to time. It's nothing new -- Civ5 had its own "holes" in the code which made modders :cry:
 
I looked a little into it and I don't think it can be done as adjacency, there is no general adjacency effect, the only ones existing refer to what is giving the adjacency and it can only be a terrain type, a feature type, a district type or a river.
Maybe using a modifier granting yield to districts with the requirement that there's such improvement within 1 tile of the district. But in that case not sure it can be applied for each such improvement (plus there won't be a tooltip like for adjacency).
 
Back
Top Bottom