1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

How to? Make trade routes permanent

Discussion in 'Civ5 - Creation & Customization' started by SchmuckyTheCat, Feb 1, 2020.

  1. SchmuckyTheCat

    SchmuckyTheCat Chieftain

    Joined:
    Jan 15, 2002
    Messages:
    19
    Location:
    Seattle
    I'm annoyed playing marathon games where every few turns I have to reset trade routes.

    How can I set a trade route to be permanent? Or, change the value from 30 to something like 900.
     
    TheOneHitPupper likes this.
  2. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    6,756
    Location:
    Illinois, USA
    Code:
    <GameInfo>
    	<GlobalParameters>
    		<Replace Name="TRADE_ROUTE_TURN_DURATION_BASE" Value="20" />
    	</GlobalParameters>
    </GameInfo>
    Snippet from file GlobalParameters.xml in folder
    .The base duration is effected by selected game-speed, world-sizes, city-distance, etc. Higher number for the Value setting ought to make all trade routes endure for much longer. But longer trade route durations also means fewer trading posts are added to cities, so you sacrifice the advantage of getting the trading post for completing a trade route assignment.

    You can directly edit the base files or you can make a mod to alter the value in the parameter.



    OOPPSSS !!! That was Civ6 stuff. Sorry.
     
  3. SchmuckyTheCat

    SchmuckyTheCat Chieftain

    Joined:
    Jan 15, 2002
    Messages:
    19
    Location:
    Seattle
    In Civ5 that controls the length of trade deals, but not trade routes.
    This sucks, because confirming trade routes is sheer monotony.

    Thanks though, if that works in Civ6 - at least they fix things. I don't think I have a computer good enough for Civ6.
     
  4. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,399
    Location:
    Near Portsmouth, UK
    Bad news is it is hard coded in the DLL at 30 turns. Good news is if you're using my DLL, VP or one based on it, the fixes are already in place - you'll just need to enable them
     
    TheOneHitPupper likes this.
  5. TheOneHitPupper

    TheOneHitPupper Chieftain

    Joined:
    Jun 15, 2017
    Messages:
    84
    I'd love to get this done for my future playthroughs! How do you go about enabling them?
     
  6. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,399
    Location:
    Near Portsmouth, UK
    In my DLL, it's off by default, you'll need a micro-mod to enable TRADE_ROUTE_SCALING

    The following additional parameters added to various tables (these are in DB\TRADE\RouteScaling.sql in the VMC mod folder if you want to edit them directly) then control the scaling

    Code:
    -- Scales the trade route distance based on map size
    -- On a Standard map, the base caravan length is 10
    -- On a Tiny map it will be 8, and on a Huge map 16
    ALTER TABLE Worlds
      ADD TradeRouteDistanceMod INTEGER DEFAULT 100;
    
    -- Calculated as the percentage of map diagonal vs standard maps
    UPDATE Worlds SET TradeRouteDistanceMod=80 WHERE Type='WORLDSIZE_DUEL';
    UPDATE Worlds SET TradeRouteDistanceMod=80 WHERE Type='WORLDSIZE_TINY';
    UPDATE Worlds SET TradeRouteDistanceMod=90 WHERE Type='WORLDSIZE_SMALL';
    UPDATE Worlds SET TradeRouteDistanceMod=100 WHERE Type='WORLDSIZE_STANDARD';
    UPDATE Worlds SET TradeRouteDistanceMod=130 WHERE Type='WORLDSIZE_LARGE';
    UPDATE Worlds SET TradeRouteDistanceMod=160 WHERE Type='WORLDSIZE_HUGE';
    
    
    -- Scales the trade route turns between choosing a new destination based on game speed
    -- On Standard speed the trade route target turns is 30 (rounded based on actual route length)
    -- On Quick speed the target turns will be 20, and on Marathon speed 90
    -- The number of turns the AI remembers a plundered trade route is also scaled using this value
    ALTER TABLE GameSpeeds
      ADD TradeRouteSpeedMod INTEGER DEFAULT 100;
    
    UPDATE GameSpeeds SET TradeRouteSpeedMod=67  WHERE Type='GAMESPEED_QUICK';
    UPDATE GameSpeeds SET TradeRouteSpeedMod=100 WHERE Type='GAMESPEED_STANDARD';
    UPDATE GameSpeeds SET TradeRouteSpeedMod=150 WHERE Type='GAMESPEED_EPIC';
    UPDATE GameSpeeds SET TradeRouteSpeedMod=300 WHERE Type='GAMESPEED_MARATHON';
    
    
    -- Number of tiles moved is now determined by the movement rate of the unit, (not hard-coded to 2 and 4)
    UPDATE Units SET Moves=2 WHERE Type='UNIT_CARAVAN';
    UPDATE Units SET Moves=4 WHERE Type='UNIT_CARGO_SHIP';
    
    
    -- Trade route related constants (moved from hard-coded values int the <Defines> table)
    INSERT INTO Defines(Name, Value) VALUES('TRADE_ROUTE_BASE_TARGET_TURNS', 30);
    INSERT INTO Defines(Name, Value) VALUES('TRADE_ROUTE_BASE_LAND_DISTANCE', 10);
    INSERT INTO Defines(Name, Value) VALUES('TRADE_ROUTE_BASE_LAND_MODIFIER', 0);
    INSERT INTO Defines(Name, Value) VALUES('TRADE_ROUTE_BASE_SEA_DISTANCE', 20);
    INSERT INTO Defines(Name, Value) VALUES('TRADE_ROUTE_BASE_SEA_MODIFIER', 100);
    INSERT INTO Defines(Name, Value) VALUES('TRADE_ROUTE_BASE_FOOD_VALUE', 300);
    INSERT INTO Defines(Name, Value) VALUES('TRADE_ROUTE_BASE_PRODUCTION_VALUE', 300);
    INSERT INTO Defines(Name, Value) VALUES('TRADE_ROUTE_SCIENCE_DIVISOR_TIMES100', 200);
    INSERT INTO Defines(Name, Value) VALUES('TRADE_ROUTE_DIFFERENT_RESOURCE_VALUE', 50);
    INSERT INTO Defines(Name, Value) VALUES('TRADE_ROUTE_RIVER_CITY_MODIFIER', 25);
    INSERT INTO Defines(Name, Value) VALUES('TRADE_ROUTE_BASE_PLUNDER_GOLD', 100);
    INSERT INTO Defines(Name, Value) VALUES('TRADE_ROUTE_PLUNDER_TURNS_COUNTER', 30);
    
     
    TheOneHitPupper likes this.
  7. TheOneHitPupper

    TheOneHitPupper Chieftain

    Joined:
    Jun 15, 2017
    Messages:
    84
    So for anyone looking to do this, essentially you can alter the 30 value at
    INSERT INTO Defines(Name, Value) VALUES('TRADE_ROUTE_BASE_TARGET_TURNS', 30);

    Changing it to 1000 will be enough for permanent trade routes for most games at any game speed. I also highly recommend downloading Trade Routes Enhancements by Whoward to be able to call back caravans/cargo ships at any point instead of waiting for the Target Turn value.
     
  8. SchmuckyTheCat

    SchmuckyTheCat Chieftain

    Joined:
    Jan 15, 2002
    Messages:
    19
    Location:
    Seattle
    I need to do this without a DLL. I'm using the MPMPM method of creating a DLC from a modpack so I can go achievement collecting on Steam. Having a DLL in one of the mods seems to trigger it to turn off achievements again. I wish I could verify that, but there's no way I've seen to test this in a positive way ie, by seeing output. You have to play through for hours and then see an achievement not get awarded when it should.

    Thanks for documenting this for your DLL though whoward. There's a bunch of small tweaks I hate playing without.
     
  9. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,399
    Location:
    Near Portsmouth, UK
    Ummmm … you do know I wrote a mod that can award "missing" achievements …

    It's documented somewhere in these forums, but as it was "frowned upon" I won't link to it (but Google should be your friend)
     
  10. SchmuckyTheCat

    SchmuckyTheCat Chieftain

    Joined:
    Jan 15, 2002
    Messages:
    19
    Location:
    Seattle
    Dropbox says the file is gone. Want to send it private?
     

Share This Page