Modding district adjacency bonus

zypholus

Chieftain
Joined
Nov 19, 2019
Messages
4
Hi guys I'm new to modding and trying to experiment making my own civilization.

I've been using Keniisu's civ creation template and have been trying to essentially recreate Japan's Meiji restoration ability - +1 adjacency bonus for each adjacent district.

I cannot for the life of me seem to get it to work however and I'm not sure which effect is even the right one.
I've tried

"EFFECT_DISTRICT_ADJACENCY"
"EFFECT_ADJUST_DISTRICT_YIELD_BASED_ON_ADJACENCY_BONUS"

I've even tried EFFECT_ADJUST_DISTRICT_BASE_YIELD_CHANGE to see if I can just alter the base district yields but with no effect.

I've put my code below if anyone could tell me where I'm going wrong?

/*
UA
Authors: ChimpanG
*/
-----------------------------------------------
-- Types
-----------------------------------------------
INSERT INTO Types
(Type, Kind )
VALUES ('TRAIT_CIVILIZATION_KENI_UNITED_KINGDOM_UA', 'KIND_TRAIT' ),
('MODTYPE_KENI_UNITED_KINGDOM_UA_DISTRICT_ADJACENCY', 'KIND_MODIFIER' );
-----------------------------------------------
-- Traits
-----------------------------------------------
INSERT INTO Traits
(TraitType, Name, Description )
VALUES ('TRAIT_CIVILIZATION_KENI_UNITED_KINGDOM_UA', 'LOC_TRAIT_CIVILIZATION_KENI_UNITED_KINGDOM_UA_NAME', 'LOC_TRAIT_CIVILIZATION_KENI_UNITED_KINGDOM_UA_DESCRIPTION' );

-----------------------------------------------
-- CivilizationTraits
-----------------------------------------------
INSERT INTO CivilizationTraits
(CivilizationType, TraitType )
VALUES ('CIVILIZATION_KENI_UNITED_KINGDOM', 'TRAIT_CIVILIZATION_KENI_UNITED_KINGDOM_UA' );
-----------------------------------------------
-- TraitModifiers
-----------------------------------------------
INSERT INTO TraitModifiers
(TraitType, ModifierId )
VALUES ('TRAIT_CIVILIZATION_KENI_UNITED_KINGDOM_UA', 'MODIFIER_KENI_UNITED_KINGDOM_UA_INDUSTRIAL_ZONE_PRODUCTION' ),
('TRAIT_CIVILIZATION_KENI_UNITED_KINGDOM_UA', 'MODIFIER_KENI_UNITED_KINGDOM_UA_CAMPUS_SCIENCE' ),
('TRAIT_CIVILIZATION_KENI_UNITED_KINGDOM_UA', 'MODIFIER_KENI_UNITED_KINGDOM_UA_THEATER_CULTURE' ),
('TRAIT_CIVILIZATION_KENI_UNITED_KINGDOM_UA', 'MODIFIER_KENI_UNITED_KINGDOM_UA_HOLY_SITE_FAITH' ),
('TRAIT_CIVILIZATION_KENI_UNITED_KINGDOM_UA', 'MODIFIER_KENI_UNITED_KINGDOM_UA_HARBOR_GOLD' ),
('TRAIT_CIVILIZATION_KENI_UNITED_KINGDOM_UA', 'MODIFIER_KENI_UNITED_KINGDOM_UA_COMMERCIAL_HUB_GOLD' );
-----------------------------------------------
-- DynamicModifiers
-----------------------------------------------
INSERT INTO DynamicModifiers
(ModifierType, CollectionType, EffectType )
VALUES ('MODTYPE_KENI_UNITED_KINGDOM_UA_DISTRICT_ADJACENCY', 'COLLECTION_OWNER', 'EFFECT_DISTRICT_ADJACENCY' );
-----------------------------------------------
-- Modifiers
-----------------------------------------------
INSERT INTO Modifiers
(ModifierId, ModifierType, OwnerRequirementSetId, SubjectRequirementSetId, RunOnce, Permanent )
VALUES ('MODIFIER_KENI_UNITED_KINGDOM_UA_INDUSTRIAL_ZONE_PRODUCTION', 'MODTYPE_KENI_UNITED_KINGDOM_UA_DISTRICT_ADJACENCY', NULL, NULL, 0, 0 ),
('MODIFIER_KENI_UNITED_KINGDOM_UA_CAMPUS_SCIENCE', 'MODTYPE_KENI_UNITED_KINGDOM_UA_DISTRICT_ADJACENCY', NULL, NULL, 0, 0 ),
('MODIFIER_KENI_UNITED_KINGDOM_UA_THEATER_CULTURE', 'MODTYPE_KENI_UNITED_KINGDOM_UA_DISTRICT_ADJACENCY', NULL, NULL, 0, 0 ),
('MODIFIER_KENI_UNITED_KINGDOM_UA_HOLY_SITE_FAITH', 'MODTYPE_KENI_UNITED_KINGDOM_UA_DISTRICT_ADJACENCY', NULL, NULL, 0, 0 ),
('MODIFIER_KENI_UNITED_KINGDOM_UA_HARBOR_GOLD', 'MODTYPE_KENI_UNITED_KINGDOM_UA_DISTRICT_ADJACENCY', NULL, NULL, 0, 0 ),
('MODIFIER_KENI_UNITED_KINGDOM_UA_COMMERCIAL_HUB_GOLD', 'MODTYPE_KENI_UNITED_KINGDOM_UA_DISTRICT_ADJACENCY', NULL, NULL, 0, 0 );
-----------------------------------------------
-- ModifierArguments
-----------------------------------------------
INSERT INTO ModifierArguments
(ModifierId, Name, Value )
VALUES ('MODIFIER_KENI_UNITED_KINGDOM_UA_INDUSTRIAL_ZONE_PRODUCTION', 'DistrictType', 'DISTRICT_INDUSTRIAL_ZONE' ),
('MODIFIER_KENI_UNITED_KINGDOM_UA_INDUSTRIAL_ZONE_PRODUCTION', 'YieldType', 'YIELD_PRODUCTION' ),
('MODIFIER_KENI_UNITED_KINGDOM_UA_INDUSTRIAL_ZONE_PRODUCTION', 'Amount', 100 ),
('MODIFIER_KENI_UNITED_KINGDOM_UA_INDUSTRIAL_ZONE_PRODUCTION', 'TilesRequired', 1 ),
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
('MODIFIER_KENI_UNITED_KINGDOM_UA_CAMPUS_SCIENCE', 'DistrictType', 'DISTRICT_CAMPUS' ),
('MODIFIER_KENI_UNITED_KINGDOM_UA_CAMPUS_SCIENCE', 'YieldType', 'YIELD_SCIENCE' ),
('MODIFIER_KENI_UNITED_KINGDOM_UA_CAMPUS_SCIENCE', 'Amount', 100 ),
('MODIFIER_KENI_UNITED_KINGDOM_UA_CAMPUS_SCIENCE', 'TilesRequired', 1 ),
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
('MODIFIER_KENI_UNITED_KINGDOM_UA_THEATER_CULTURE', 'DistrictType', 'DISTRICT_THEATER' ),
('MODIFIER_KENI_UNITED_KINGDOM_UA_THEATER_CULTURE', 'YieldType', 'YIELD_CULTURE' ),
('MODIFIER_KENI_UNITED_KINGDOM_UA_THEATER_CULTURE', 'Amount', 100 ),
('MODIFIER_KENI_UNITED_KINGDOM_UA_THEATER_CULTURE', 'TilesRequired', 1 ),
----------------------------------------------------------------------------------------------------------------------------------------------------------------
('MODIFIER_KENI_UNITED_KINGDOM_UA_HOLY_SITE_FAITH', 'DistrictType', 'DISTRICT_HOLY_SITE' ),
('MODIFIER_KENI_UNITED_KINGDOM_UA_HOLY_SITE_FAITH', 'YieldType', 'YIELD_FAITH' ),
('MODIFIER_KENI_UNITED_KINGDOM_UA_HOLY_SITE_FAITH', 'Amount', 100 ),
('MODIFIER_KENI_UNITED_KINGDOM_UA_HOLY_SITE_FAITH', 'TilesRequired', 1 ),
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
('MODIFIER_KENI_UNITED_KINGDOM_UA_HARBOR_GOLD', 'DistrictType', 'DISTRICT_HARBOR' ),
('MODIFIER_KENI_UNITED_KINGDOM_UA_HARBOR_GOLD', 'YieldType', 'YIELD_GOLD' ),
('MODIFIER_KENI_UNITED_KINGDOM_UA_HARBOR_GOLD', 'Amount', 100 ),
('MODIFIER_KENI_UNITED_KINGDOM_UA_HARBOR_GOLD', 'TilesRequired', 1 ),
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
('MODIFIER_KENI_UNITED_KINGDOM_UA_COMMERCIAL_HUB_GOLD', 'DistrictType', 'DISTRICT_COMMERICAL_HUB' ),
('MODIFIER_KENI_UNITED_KINGDOM_UA_COMMERCIAL_HUB_GOLD', 'YieldType', 'YIELD_GOLD' ),
('MODIFIER_KENI_UNITED_KINGDOM_UA_COMMERCIAL_HUB_GOLD', 'Amount', 100 ),
('MODIFIER_KENI_UNITED_KINGDOM_UA_COMMERCIAL_HUB_GOLD', 'TilesRequired', 1 );
 
I cannot for the life of me seem to get it to work however and I'm not sure which effect is even the right one.
I've tried
This will become long but I'll try to keep it simple. I learned how to do this like 2 weeks ago, I feel your struggle!

First, all the "regular" adjacency effects for districts and improvements go in the table Adjacency_YieldChanges. This table only defines what the effect is. For example, the generic effect that campuses get +1 science per 2 adjacency districts has the ID District_Science, and it specifies a yield type Science, yield change 1, tilesrequired 2, and the column that tells the effect what triggers it is "OtherAdjacentDistrict" which is how you say any old district. Specific districts (like commercial gets a bonus from harbors) is a different adjacency.

But, this adjacency effect isn't attached to anything, so you have to go to the table District_Adjacencies to define what district gets what effects assigned to it. You can assign a production adjacency to a campus if you want, but the UI might not cooperate.
Improvements is similar.

However, anything in this table is assigned to the district itself, not a civilization ability. Those abilities- Japan, Indonesia's coast adjacency, Brazil's jungle adjacency- are in fact modifiers, and they use these modifier types:
MODIFIER_PLAYER_CITIES_FEATURE_ADJACENCY (brazil jungle)
MODIFIER_PLAYER_CITIES_DISTRICT_ADJACENCY (japan)
MODIFIER_PLAYER_CITIES_RIVER_ADJACENCY (dutch ability)
MODIFIER_PLAYER_CITIES_TERRAIN_ADJACENCY. (indonesia)
There's one modifier for each district targeted; the arguments for them are all
DistrictType
FeatureType/TerrainType (dutch and japan's modifiers don't have this, they implicitly work on rivers & any district)
YieldType
Amount
Description

Now, Japan's modifier applies +1 from districts (you can only use integers with those 4 modifiers afaik.) but japan doesn't get the regular +1 per 2 districts like everyone else. Likewise, Brazil's campus gets +1 from jungle, but not the regular +1 per 2.
To 'turn off' adjacencies, you use the table
Excluded_Adjacencies. This table links those YieldIds from Adjacency_YieldChanges, and a TraitType from the traits table. So, for example, that yield ID District_Science is listed in the first row of this table with TRAIT_CIVILIZATION_ADJACENT_DISTRICTS, which is Meiji Restoration. (An aside: all vanilla Traits are named by what they do; all DLC traits use the actual ability name, which is way easier.)

To recreate japan's UA, you'd create 1 modifier for each district you want it to affect, and make sure to attach it to your civilization's trait; you would then and rows to Excluded_Adjacencies to turn off the regular 1 yield per 2 districts that all civs get.

That said, what about other things you may want to make a district adjacency for? Are there just those 4 modifiers? Yes, there are just those modifiers to circumvent the normal Adjacency_YieldChanges table- remember, if you add to that table, it applies to everyone!

But, there's another modifiertype, the one used by the Royal Navy Dockyard to grant its off continent bonus, called MODIFIER_PLAYER_DISTRICT_ADJUST_BASE_YIELD_CHANGE. It's already a default dynamic modifier, but it uses the effect EFFECT_ADJUST_DISTRICT_BASE_YIELD_CHANGE. If you use this effect, it will not display when you place it nor on the empire lens but it will function as adjacency and is seen if you get the tooltip over the district. You must attach this to the district via district modifiers.

I created a custom civ ability that adds +2 adjacency for districts if they are next to the city center. A snippet of the campus modifier:
Code:
<DistrictModifiers>
        <Row DistrictType="DISTRICT_CAMPUS" ModifierId="MODIFIER_JPH_ORLIN_UA_DISTRICT_ADJACENCY_SCIENCE"/>
</DistrictModifiers>
<Modifiers>
    <Row ModifierId="MODIFIER_JPH_ORLIN_UA_DISTRICT_ADJACENCY_SCIENCE" ModifierType="MODIFIER_PLAYER_DISTRICT_ADJUST_BASE_YIELD_CHANGE" SubjectRequirementSetId="JPH_REQUIRES_CAMPUS_ADJACENT_CITY_CENTER"/>
</Modifiers>
<ModifierArguments>
<Row ModifierId="MODIFIER_JPH_ORLIN_UA_DISTRICT_ADJACENCY_SCIENCE" Name="DistrictType" Value="DISTRICT_CAMPUS"/>
        <Row ModifierId="MODIFIER_JPH_ORLIN_UA_DISTRICT_ADJACENCY_SCIENCE" Name="YieldType" Value="YIELD_SCIENCE"/>
        <Row ModifierId="MODIFIER_JPH_ORLIN_UA_DISTRICT_ADJACENCY_SCIENCE" Name="Amount" Value="2"/>
        <Row ModifierId="MODIFIER_JPH_ORLIN_UA_DISTRICT_ADJACENCY_SCIENCE" Name="Description" Value="LOC_MODIFIER_JPH_ORLIN_UA_DISTRICT_ADJACENCY_SCIENCE"/>
</ModifierArguments>
In the requirements, I have the usual suspects: the standard REQUIRES_DISTRICT_IS_X requirement for the correct district, the REQUIREMENT_PLOT_ADJACENT_DISTRICT_TYPE_MATCHES requirementType to check if it's next to the city center, and then, because this is a district modifier, and third requirement that it's my civ's leader- REQUIREMENT_PLAYER_LEADER_TYPE_MATCHES. This is because the Royal navy dockyard's effect is attached to the district, but only england can build that. But if your ability makes uses of non-unique districts, you have to control for your civ, otherwise everyone will get this effect.
 
Another thing: , you can get around adjacency_yieldchanges applying to everyone. Ideally we could just make an entry into the excluded adjacencies table, and select an "inverse" column to give the effect to no one except the target civ, but alas. No dice.

Depending on your appetite for working with ArtDef files, you can create a unique district for your civ for the normal districts, and just make them identical to the regular ones- this would let you add new rows in District_Adjacencies and only attach them to the districts of your civ. However, if you do this, you need to define the art assets (you can reuse standard arts, but it's a chore to do this.)

Alternatively, if you are completely shameless and don't care about other custom civs someone might have, you can just add the desired effects into Adjacency_YieldChanges and then in Excluded Adjacencies, create new rows to exclude every single civ except yours. This is ~42 rows per district involved, but it works.

The only reason to do either of these instead of using that modifier type is if you really want the effect to show up when you're placing the district itself.
And if your desired ability falls within the parameters of the existing 4 modifiers for district adjacency i mentioned, you're home free.

Lastly, watch out for effect types that are deceptively named but actually affect the +% yield of the district, the same way those +100% adjacency cards work.
 
A third thing: I strongly strongly suggest downloading DB Browser and using it to look at the in game database, which is stored in: /Documents/My Games/ Sid Meier's Civilization VI/Cache/DebugGameplay.sqlite.
Using the "browse data" tab, you can actually look through the tables and see how things are defined and connected. For example, using this to find a modifier you want to emulate, and track down its modifiertype, effect type, arguments, requirements, etc. This is also very handy for looking for stuff like effects that are in the game but not really exposed to you in the .xml files so you can experiment.
 
Thank you so much!!! That was super helpful. Took me a while to try and disseminate what you were saying haha. Once I had a look through the databases as you suggested I managed to figure it out though. I've definitely learnt a lot from this process that I didn't before...now time to see what else I can do now I understand the modifies and tables a bit better!
 
Code:
-----------------------------------------------
-- Types
-----------------------------------------------

INSERT INTO    Types
        (Type,                                            Kind            )
VALUES    ('TRAIT_CIVILIZATION_LUKE_ENGINEERS_UA',            'KIND_TRAIT'    ),
        ('MODTYPE_LUKE_ENGINEERS_UA_DISTRICT_SCIENCE',        'KIND_MODIFIER'    ),
        ('MODTYPE_LUKE_ENGINEERS_UA_DISTRICT_FAITH',        'KIND_MODIFIER'    ),
        ('MODTYPE_LUKE_ENGINEERS_UA_DISTRICT_GOLD',            'KIND_MODIFIER'    ),
        ('MODTYPE_LUKE_ENGINEERS_UA_DISTRICT_CULTURE',        'KIND_MODIFIER'    ),
        ('MODTYPE_LUKE_ENGINEERS_UA_DISTRICT_PRODUCTION',    'KIND_MODIFIER'    );
        

-----------------------------------------------
-- Traits
-----------------------------------------------

INSERT INTO    Traits   
        (TraitType,                                Name,                                            Description                                            )
VALUES    ('TRAIT_CIVILIZATION_LUKE_ENGINEERS_UA',    'LOC_TRAIT_CIVILIZATION_LUKE_ENGINEERS_UA_NAME',    'LOC_TRAIT_CIVILIZATION_LUKE_ENGINEERS_UA_DESCRIPTION'    );
        
-----------------------------------------------
-- CivilizationTraits
-----------------------------------------------

INSERT INTO    CivilizationTraits
        (CivilizationType,                TraitType                            )
VALUES    ('CIVILIZATION_LUKE_ENGINEERS',    'TRAIT_CIVILIZATION_LUKE_ENGINEERS_UA'    );

-----------------------------------------------
-- TraitModifiers
-----------------------------------------------

INSERT INTO    TraitModifiers   
        (TraitType,                                ModifierId                                        )
VALUES    ('TRAIT_CIVILIZATION_LUKE_ENGINEERS_UA',    'MODIFIER_LUKE_ENGINEERS_UA_DISTRICT_SCIENCE'    ),
        ('TRAIT_CIVILIZATION_LUKE_ENGINEERS_UA',    'MODIFIER_LUKE_ENGINEERS_UA_DISTRICT_FAITH'        ),
        ('TRAIT_CIVILIZATION_LUKE_ENGINEERS_UA',    'MODIFIER_LUKE_ENGINEERS_UA_DISTRICT_GOLD'        ),
        ('TRAIT_CIVILIZATION_LUKE_ENGINEERS_UA',    'MODIFIER_LUKE_ENGINEERS_UA_DISTRICT_CULTURE'    ),
        ('TRAIT_CIVILIZATION_LUKE_ENGINEERS_UA',    'MODIFIER_LUKE_ENGINEERS_UA_DISTRICT_PRODUCTION'    );



-----------------------------------------------
-- Modifiers
-----------------------------------------------

INSERT INTO DistrictModifiers
        (DistrictType,ModifierId,)
VALUES  ('DISTRICT_HOLYSITE', 'MODIFIER_LUKE_ENGINEERS_UA_DISTRICT_ADJACENCY_FAITH'),
        ('DISTRICT_CAMPUS', 'MODIFIER_LUKE_ENGINEERS_UA_DISTRICT_ADJACENCY_SCIENCE'),
        ('DISTRICT_HARBOR','MODIFIER_LUKE_ENGINEERS_UA_DISTRICT_ADJACENCY_GOLD'),
        ('DISTRICT_COMMERCIALHUB', 'MODIFIER_LUKE_ENGINEERS_UA_DISTRICT_ADJACENCY_GOLD'),
        ('DISTRICT_THEATER', 'MODIFIER_LUKE_ENGINEERS_UA_DISTRICT_ADJACENCY_CULTURE'),
        ('DISTRICT_INDUSTRIALZONE', 'MODIFIER_LUKE_ENGINEERS_UA_DISTRICT_ADJACENCY_PRODUCTION');

INSERT INTO Modifiers
        (ModifierId,ModifierType,SubjectRequirementSetId)
VALUES  ('MODIFIER_JPH_ORLIN_UA_DISTRICT_ADJACENCY_FAITH','MODIFIER_PLAYER_DISTRICT_ADJUST_BASE_YIELD_CHANGE','LUKE_REQUIRES_HOLYSITE_ADJACENT_DISTRICT')'
        ('MODIFIER_JPH_ORLIN_UA_DISTRICT_ADJACENCY_SCIENCE' , 'MODIFIER_PLAYER_DISTRICT_ADJUST_BASE_YIELD_CHANGE','LUKE_REQUIRES_CAMPUS_ADJACENT_DISTRICT')'
        ('MODIFIER_JPH_ORLIN_UA_DISTRICT_ADJACENCY_GOLD','MODIFIER_PLAYER_DISTRICT_ADJUST_BASE_YIELD_CHANGE','LUKE_REQUIRES_HARBOR_ADJACENT_DISTRICT')'
        ('MODIFIER_JPH_ORLIN_UA_DISTRICT_ADJACENCY_GOLD','MODIFIER_PLAYER_DISTRICT_ADJUST_BASE_YIELD_CHANGE','LUKE_REQUIRES_COMMERCIALHUB_ADJACENT_DISTRICT')'
        ('MODIFIER_JPH_ORLIN_UA_DISTRICT_ADJACENCY_CULTURE','MODIFIER_PLAYER_DISTRICT_ADJUST_BASE_YIELD_CHANGE','LUKE_REQUIRES_THEATRE_ADJACENT_DISTRICT')'
        ('MODIFIER_JPH_ORLIN_UA_DISTRICT_ADJACENCY_PRODUCTION','MODIFIER_PLAYER_DISTRICT_ADJUST_BASE_YIELD_CHANGE','LUKE_REQUIRES_INDUSTRIALZONE_ADJACENT_DISTRICT');

        
        
-----------------------------------------------
-- ModifierArguments
-----------------------------------------------

INSERT INTO    ModifierArguments
        (ModifierId,                                                    Name,                            Value)
VALUES    ('MODIFIER_LUKE_ENGINEERS_UA_DISTRICT_ADJACENCY_FAITH',            'YieldType',                    'YEILD_FAITH'                                                    ),
        ('MODIFIER_LUKE_ENGINEERS_UA_DISTRICT_ADJACENCY_FAITH',            'Amount',                            1                                                            ),
        ('MODIFIER_LUKE_ENGINEERS_UA_DISTRICT_ADJACENCY_FAITH' ,        'Description',                    'LOC_MODIFIER_LUKE_ENGINEERS_UA_DISTRICT_ADJACENCY_FAITH'        ),
        ('MODIFIER_LUKE_ENGINEERS_UA_DISTRICT_ADJACENCY_SCIENCE',        'Amount',                            1                                                            ),
        ('MODIFIER_LUKE_ENGINEERS_UA_DISTRICT_ADJACENCY_SCIENCE',        'YieldType',                    'YIELD_PRODUCTION'                                                ),
        ('MODIFIER_LUKE_ENGINEERS_UA_DISTRICT_ADJACENCY_SCIENCE' ,        'Description',                    'LOC_MODIFIER_LUKE_ENGINEERS_UA_DISTRICT_ADJACENCY_SCIENCE'        ),
        ('MODIFIER_LUKE_ENGINEERS_UA_DISTRICT_ADJACENCY_GOLD',            'YieldType',                    'YEILD_GOLD'                                                    ),
        ('MODIFIER_LUKE_ENGINEERS_UA_DISTRICT_ADJACENCY_GOLD',            'Amount',                            1                                                            ),
        ('MODIFIER_LUKE_ENGINEERS_UA_DISTRICT_ADJACENCY_GOLD' ,            'Description',                    'LOC_MODIFIER_LUKE_ENGINEERS_UA_DISTRICT_ADJACENCY_GOLD'        ),
--        ('MODIFIER_LUKE_ENGINEERS_UA_DISTRICT_ADJACENCY_GOLD',            'YieldType',                    'YEILD_GOLD'                                                    ),
--        ('MODIFIER_LUKE_ENGINEERS_UA_DISTRICT_ADJACENCY_GOLD',            'Amount',                            1                                                            ),
--        ('MODIFIER_LUKE_ENGINEERS_UA_DISTRICT_ADJACENCY_GOLD' ,            'Description',                    'LOC_MODIFIER_LUKE_ENGINEERS_UA_DISTRICT_ADJACENCY_GOLD'        ),
        ('MODIFIER_LUKE_ENGINEERS_UA_DISTRICT_ADJACENCY_CULTURE',        'YieldType',                    'YEILD_CULTURE'                                                    ),
        ('MODIFIER_LUKE_ENGINEERS_UA_DISTRICT_ADJACENCY_CULTURE',        'Amount',                            1                                                            ),
        ('MODIFIER_LUKE_ENGINEERS_UA_DISTRICT_ADJACENCY_CULTURE' ,        'Description',                    'LOC_MODIFIER_LUKE_ENGINEERS_UA_DISTRICT_ADJACENCY_CULTURE'        ),
        ('MODIFIER_LUKE_ENGINEERS_UA_DISTRICT_ADJACENCY_PRODUCTION',    'YieldType',                    'YEILD_PRODUCTION'                                                ),
        ('MODIFIER_LUKE_ENGINEERS_UA_DISTRICT_ADJACENCY_PRODUCTION',    'Amount',                            1                                                            ),
        ('MODIFIER_LUKE_ENGINEERS_UA_DISTRICT_ADJACENCY_PRODUCTION' ,    'Description',                    'LOC_MODIFIER_LUKE_ENGINEERS_UA_DISTRICT_ADJACENCY_PRODUCTION'    );
This is where i got to, do i need to add a req set or something???
 

Attachments

I am trying to make a civ with Chinas' and japans' abilities this is supposed to be the japan part.

I did what you did but for all the districts and tried changing the requirement to adjacent to district
 
i think i also need to add district into the modifier arguments.

(id also like to say thank you so much because ive been lost for a while and this post already helped me so much)
 
I am trying to make a civ with Chinas' and japans' abilities this is supposed to be the japan part.

I did what you did but for all the districts and tried changing the requirement to adjacent to district
So if you just want a carbon copy of japan's district ability, you can save yourself a ton of work by just granting your civilization the trait TRAIT_CIVILIZATION_ADJACENT_DISTRICTS. Since it is already defined you should be ready to roll and everything will be taken care of neatly.

To do it yourself, it looks like you need to fill out the requirement sets in your code, eg
LUKE_REQUIRES_HOLYSITE_ADJACENT_DISTRICT
etc.
You need to define each requirement set's constituent requirements and then each requirement if it isn't already defined. If you use DBBrowser you can look up the sets for japan and just recycle their requirements.
You also need to add a row to excluded adjacencies to turn off your custom civs' minor adjacency from districts.
If you haven't look up LeeS' modding guide. It's amazing for explaining the basics of using requirement sets, modifiers, etc. Don't be daunted by the length.

I haven't modded civ6 in a bit so i am a bit hazy but past me definitely had it together with the explanations in this thread.
 
Haha, I actually just found Lees through another one of your posts so thank you it looks perfect.
I think i understand what you mean about the requirements now.

Cheers and hope you have a great day! :)
 
Back
Top Bottom