Trade, what can we mod?

Lord Yanaek

Emperor
Joined
Aug 15, 2003
Messages
1,662
So, most players agree that trade routes are quite overpowered. It looks like the actual calculation for the TR yield is buried inside the dll but there are values in defines that we can tweak. Not sure what they actually do (i will fill as i find out or somebody tells me)
  • OUTPOST_BASE_TRADE_GROWTH_MOD 50 : Pretty obvious. This tells how faster an outpost will grow (in % of normal growth)
  • TRADE_ROUTE_BASE_ENERGY 0
    TRADE_ROUTE_CAPITAL_POP_ENERGY_MULTIPLIER 0
    TRADE_ROUTE_CITY_POP_ENERGY_MULTIPLIER 100

    Did they plan to have internal TR produce energy, or does this refer to road connections. Have somebody messed with those values?
  • TRADE_ROUTE_BASE_TURN_DURATION 25 Obviously duration in turns. Mod this if you don't want to re-assign TRs so often. Is it modified by game speed?
  • TRADE_ROUTE_ORIGINATOR_BASE_RATE 60
    TRADE_ROUTE_RECEIVER_BASE_RATE 30

    Looks like receiver get more so i guess those 2 are for international TRs. Anybody tested this?
  • TRADE_ROUTE_INTERNAL_CITY_BASE_RATE 50
    Guess lowering this will reduce power of internal TR, guess both cities will receive less.
  • TRADE_ROUTE_MINIMUM_CITY_YIELD_SCALAR 35 ????
    [*]TRADE_ROUTE_SEA_DOMAIN_MODIFIER 50 Sea trade routes are stronger by 50%, affects both internal and international TRs.
  • INTERNATIONAL_TRADE_BASE_YIELD 100 Energy, Science, both?
  • INTERNATIONAL_TRADE_EXCLUSIVE_CONNECTION 0 ????
  • INTERNATIONAL_TRADE_CITY_GPT_DIVISOR 20 ????
  • INTERNATIONAL_TRADE_COOP_AGREEMENT_MOD 15 ????
  • INTERNATIONAL_TRADE_ALLIANCE_MOD 20 ????
  • TOURISM_MODIFIER_TRADE_ROUTE 25 ????
    Guess this one does nothing as BE does not have tourism.
  • AI_HOMELAND_MOVE_PRIORITY_TRADE_UNIT 100 OK this is probably AI parameter and not trade route parameter.
  • MINOR_QUEST_FRIENDSHIP_TRADE_ROUTE 40 ????
  • QUEST_DISABLED_TRADE_ROUTE 0 ????
  • OPINION_WEIGHT_TRADE_MAX -30
    OPINION_WEIGHT_STABLE_TRADE_ROUTE -20
    OPINION_WEIGHT_STABLE_TRADE_ROUTE_NUM_TURNS 45

    Diplomacy bonus??
  • MAX_PERCENT_RESEARCH_TRADED 20 ????
  • LAND_TRADE_UNIT 1 ????
  • SEA_TRADE_UNIT 2 ????
Other than this, it's possible to remove the trade route from autoplants by modifying the quest Lua files and of course to change the number of TRs that any building opens using the buildings table (with sql or xml).

Anything else we can do? What if we want to have internal TR give more to the city sending the TR than the one receiving. What if we want the city with the smallest yield to get more? I guess those 2 would require dll access.

Not directly related but is it possible to dynamically change some of those values with firetuner to see how TRs are affected without having to re-load a mod each time?
 
According to the upcoming patch's changelog, Firaxis is "implementing Trade Route balance and adjustments, including simpler UI", so I'd personally wait and see what they do before modding in this kind of changes.
 
And when Firaxis finally get them perfectly balanced, half the players will complain they have been nerfed too much and are now useless, another half will complain they are still OP and only the third half will consider them fine ;)

Conclusion being, it can help to know what we can mod and what we can't.

I realize i forgot to list the most obvious : we can change the number of TR any building opens (trade depot or anything else)
 
Hopefully, they will have fixed in BE the V "confusion" between "trade route" (ie road connection) and "trade route" (ie convoy/vessel connection) but I somehow doubt it. And if we're really lucky they won't have hard-coded 80% of the parameters in the DLL ... but I'm not holding my breath ;)
 
And if we're really lucky they won't have hard-coded 80% of the parameters in the DLL ... but I'm not holding my breath ;)
So as far as I can see it, you were right to worry about that hard-coding part. So grz for being a psychic (or just having a lot of experience with them ;)).

Especially
TRADE_ROUTE_ORIGINATOR_BASE_RATE 60
and
TRADE_ROUTE_RECEIVER_BASE_RATE 30
have been removed from the Defines and don't seem to work anymore.

So I guess there's currently no other way to directly influence (especially internal) trade route yields?
 
It is possible to use playerPerks to provide multipliers to the various yields from trade routes. It is also possible to provide a multiplier to a specific station.
 
Ah, right - didn't even think about that. PlayerPerks will at least solve some of my issues. Thanks a lot for that!
However, I'm trying to get the output that the "smaller" city gets without improving the yield of the "big" city. That doesn't seem to be possible?
 
It may be possible by adding or removing buildings that use Building_TradeYieldChanges (which is how the recycles, feedsite hubs and autoplants add yields per trade route). I haven't tested exactly how those work post-patch.
 
I recommend you guys look up those values in Civ5's DLL source code (available via the Civ5 SDK), seeing as BE is primarily based on Civ5:BNW. For example, the INTERNATIONAL_TRADE values all correspond to yields of trade routes to cities owned by other players: BASE_YIELD is the base amount of gold/energy generated from the route irrespective of other factors (times 100), CITY_GPT_DIVISOR is the amount that a city's gold/energy-per-turn is divided by before it is added to the trade route's yields, and EXCLUSIVE_CONNECTION is the extra gold/energy generated times 100 if there is no other international trade route to the destination city.

As for internal trade routes, the Civ5 DLL source code says that the base production/food values are actually in the EraInfos stuff, not in the global defines.
 
Back
Top Bottom