Is it possible to make trade routes benefit both cities?

Mettpawwz

Chieftain
Joined
Feb 4, 2017
Messages
73
The Distict_TradeRouteYields table is the only one I can find that modifies trade route yields, but it only ever adjusts the yield for the city sending the trader, not the city receiving it.

Is there some way to make the city receiving a route also get yields, but based on the sending city's districts?
 
I believe AnanseTheSpider has this in his mod, maybe he can help you out if you PM him.
 
Thank you! I'll take a look at his Redistricting code, if I can't figure it out I'll message him. :p

EDIT: Awe, it looks like his mod doesn't actually do what I asked. Ananse's mod only ever affects the city sending the trade route, with a food/production/science/culture/faith penalty but a gold yield whenever there is an appropriate district at the sending city, and a gold penalty but a food/production/science/culture/faith yield when there is an appropriate district at the destination city.

Either way, in his mod the receiving city never gets or loses anything.

Has anyone else managed to do this without resorting to lua?
 
Last edited:
While you can't (short of lua) do exactly what you want, but there are the following modifiers:

MODIFIER_SINGLE_CITY_ADJUST_TRADE_ROUTE_YIELD_TO_OTHERS
MODIFIER_SINGLE_CITY_ADJUST_TRADE_ROUTE_YIELD_FROM_OTHERS

These will allow you to add or subtract yield to the sending and receiving city (respectively) for international trade routes. There are player level versions of these modifiers as well.

By connecting these modifiers to buildings (or districts) you can make building in a sending city determine how much it gets out of the trade route, or make buildings in a receiving city determine what it gets from a trade route. But you can't make one city's buildings influence the opposite city's yields.
 
Last edited:
fodazd's Incoming Trade Route Gold mod does it via district modifiers.
Code:
INSERT INTO DistrictModifiers (DistrictType, ModifierId)
 VALUES ('DISTRICT_CITY_CENTER', 'CITY_CENTER_INCOMING_TRADE_ROUTE_GOLD');

INSERT INTO Modifiers (ModifierId, ModifierType, RunOnce, Permanent, SubjectRequirementSetId)
 VALUES ('CITY_CENTER_INCOMING_TRADE_ROUTE_GOLD', 'MODIFIER_SINGLE_CITY_ADJUST_TRADE_ROUTE_YIELD_FROM_OTHERS', '1', '1', NULL);

INSERT INTO ModifierArguments (ModifierId, Name, Value)
 VALUES ('CITY_CENTER_INCOMING_TRADE_ROUTE_GOLD', 'YieldType', 'YIELD_GOLD'),
 ('CITY_CENTER_INCOMING_TRADE_ROUTE_GOLD', 'Amount', '2');
I've not tried the mod as yet but it seems like it ought to work to make the destination city always get 2 gold.
 
Sweet, thanks. I'll give that a try. It's unfortunate that there isn't just a table for it, but at least it can be done with modifiers after all. :D
 
fodazd's Incoming Trade Route Gold mod does it via district modifiers.
I've not tried the mod as yet but it seems like it ought to work to make the destination city always get 2 gold.

Assuming I got this right, I could use this as basis to change it where I generate Culture from each incoming trade route...
Code:
INSERT INTO DistrictModifiers (DistrictType, ModifierId)
 VALUES ('DISTRICT_CITY_CENTER', 'CITY_CENTER_INCOMING_TRADE_ROUTE_CULTURE');

INSERT INTO Modifiers (ModifierId, ModifierType, RunOnce, Permanent, SubjectRequirementSetId)
 VALUES ('CITY_CENTER_INCOMING_TRADE_ROUTE_CULTURE', 'MODIFIER_SINGLE_CITY_ADJUST_TRADE_ROUTE_YIELD_FROM_OTHERS', '1', '1', NULL);

INSERT INTO ModifierArguments (ModifierId, Name, Value)
 VALUES ('CITY_CENTER_INCOMING_TRADE_ROUTE_CULTURE', 'YieldType', 'YIELD_CULTURE'),
 ('CITY_CENTER_INCOMING_TRADE_ROUTE_CULTURE', 'Amount', '2');
 
That looks like it ought to work. You'll just have to test in-game. Not sure if the culture will show directly on the city banner when you hover the mouse over the culture icon or whether it wil be calculated at an empire level on the overall empire yields display.

Spoiler :
and now when you want them to, no Ai will send a trade route to any of your cities. har de har de har de har :crazyeye: :wallbash: :aargh:
 
Has anyone developed a lua utility to allow domestic destination cities to receive yields?

It's such a glaring oversight to have these two effects
Code:
EFFECT_ADJUST_PLAYER_TRADE_ROUTE_DESTINATION_YIELD_FOR_ALLY_ROUTE
EFFECT_ADJUST_TRADE_ROUTE_YIELD_FROM_OTHERS
and no EFFECT_ADJUST_TRADE_ROUTE_YIELD_FROM_DOMESTIC. It's so frustrating, this modifier system really is incredibly flexible, but Firaxis has left some baffling holes in the framework for it.
 
Last edited:
Back
Top Bottom