Trade routes

Motoer

Chieftain
Joined
Apr 9, 2018
Messages
5
In the city screen i have the options to click import all and export all
When i do and watch in the following turns my wagons they dont move. So i still click in my export (to europe) towns every slot manual to import everything.
Also iam confused about the two fields where i set the number until they should import or from they should export.
Is there a general explanation for these changes anywhere?
 
The trade route interface has become a bit complex because multiple people (myself included) have just added buttons as needed. The problem is that the only alternative is to write a new screen from scratch as the vanilla system doesn't allow much freedom. I did try to add help popup text to the checkboxes, but it might be a bit short.

Trade routes can be accessed with two buttons, Imports and Exports. Imports list all yields while Exports list yields being produced to has at least one trade route in the colony in question.

There are 4 checkboxes, left to right:
  • Import
  • Export
  • Import feeder
  • Auto export
There are 2 spinbuttons. Left to right:
  • Maintain threshold
  • Max threshold
The buttons on top:
  • Clear All - quick reset
  • Import All Goods - checks import for most yields, mainly those intended for export to Europe
  • Auto Export All Goods - checks auto export for the same yields, useful to forward to the port exporting to Europe
How this works is fully automated transports will pick up from a colony where the export is on and has available cargo and move the yield to a colony where import is on. It moves according to the following rules:
  • Will only pick up yields, which are in excess of Maintain threshold and export is on
  • Will deliver yields if import is on, but only up to Max threshold
  • Import feeder will turn import off when going over Maintain threshold and back on when going below 75% of the threshold (prevents moving 3 yields each turn)
  • Auto export updates export on turn start. It turns on if there is something to export or off if not. Helps to keep the number of trade routes low, which helps performance
  • Import feeder has higher priority than regular import if the transport has multiple colonies to deliver to
  • Construction queue can temporally increase Maintain threshold (example: building requires 20 tools, threshold is 0, export will not drop below 20 stored and import tries to reach 20)
  • Nearly full warehouses are given lower priority, but nothing will prevent overfilling a warehouse if that is seen as the best or only option
Tips on using:
  • think of it as focusing on a single colony rather than a network. Tell what it wants to import and export. Do that for all colonies and the automation will form the links as needed
  • use Auto Export instead of Export for performance reasons unless a manually configured trade route use export to the colony in question
  • Auto Export with a threshold of 0 can be useful. Imagine a colony without fur and then natives gives you some. They will then be exported automatically and then export turns off again when not needed
  • Import Feeder and Auto Export combined with a threshold of 0 can be useful to distribute yields such as tools and stone automatically. Buildings are supplied without stockpiling
  • Import Feeder and Auto Export with a threshold higher than 0 can be useful for yields used by professions, such as lumber
  • Use Import Feeder to supply say cigar factory and then import in your port for transfer to Europe. This way the factory is supplied and only over production goes strait to the port
  • Fully automated transports aren't optimized to use many cargo slots effectively (vanilla problem). Speed is more important, making wagon trains good, particularly with Lewis&Clarke FF
Maybe it seems a bit complex at first, but once you figure it out, it becomes a great tool to minimize micro management. It also becomes very intuitive and easy to use.
 
Sorry, iam still confused. Dt knw why iam no get it. So "import all goods" and "auto export" dont work without activating the goods manually i wish to export from city to city? But when i click on beer export when more then 20 then i dont need to press auto export all goods? What happens when i click auto export all goods in any city and in my port town import all goods whithout changing anything in the list of goods?
 
First of all, stating what (at least in retrospect) is obvious is that you need to enable fully automated transport in your transport (most likely wagon train). There is a risk that it will not act until the turn after you set up the trade route and it can just end turn on the first turn. This is somewhat intentional for technical reasons (aka tricky to prevent all cases where this happens).

Ok, time for an example.

You found Jamestown and use this to export to Europe. You can click "import all goods" because you don't care much about what it is or where it comes from. If it should be sold in Europe, you want it moved here. For now you keep both thresholds on 0, meaning it will import regardless of current stockpile.

Next you found Plymouth, which produces tobacco. You want to sell this in Europe and as such need it to be transferred to Jamestown. What you do is clicking export or auto export on tobacco and keeping both thresholds on 0. Now fully automated transports will go to Plymouth, pick up all tobacco and then go to Jamestown and drop everything.
If you click "auto export all" in Plymouth, it will automatically export anything in stock, which is assumed to be sold to Europe. As a result, any gift from the natives will end up in Jamestown.

Later you build a cigar factory in Boston. You then need to export cigars. You click auto export on cigars or auto export goods. If you want to sell to the domestic marked, you might want to set the maintain threshold to say 10 as this will then leave just a little bit behind and keeping the local marked supplied.

Now say Boston can't supply itself with enough tobacco to keep the cigar factory running at full capacity. In this case you want to move tobacco from Plymouth to Boston. You open Boston and set tobacco to import feeder and disable export and auto export. You set maintain threshold to 100 and the max threshold to 175 (actual numbers needs to match your setup. This is in no way fixed). Now if Boston has less than 75 tobacco, it will import and it will try to fill up to 175, meaning it wants one full cargo slot of tobacco. It will however stop if the level goes over 100. Now whenever tobacco is picked up in Plymouth, it will most likely go to Boston because Import feeder has higher priority than just using Import. However if Boston is filled with tobacco and not accepting more, what's left is Jamestown with the Import, which never turns off. This mean if Boston needs 10 more tobacco than it produces each turn and Plymouth produces 20, on average 10 will go to Boston and 10 to Jamestown. Because Boston doesn't care where the tobacco comes from, getting 10 each turn can be from any colony if you have 5 producing 3/turn or it can all come from the same. Doesn't matter at all to Boston.


Jamestown and Plymouth is pretty much standard automated trade routes while Boston is more advanced usage.
 
Than you so much. Iam pretty sure i click every time on auto export all in inland city and auto import in my port town, the wagon is on full automatic but he never moves. But i try now again.
 
No. It wont work. I open the inland city and click on imports. Then i click on "auto export all goods". Then i open my harbort city, click on imports and click on "import all goods". My wagon is on auotmatic but dont move. Dt find the failure. When i use the auto trade system in the vanilla way it works.
 
It is not designed to be easy Motoer.

It is an advanced system for a complex trade-based game and you should not be starting with 'auto export all goods' if you don't understand the mechanics.

You need to learn the basics first.

Start by creating simple routes between your settlements first and work up from there.
 
Random,
everything is working fine with the raderoutes (i play this game and tac mod since the release). Just the "export all goods" and "import all goods" doesnt make anything happen. Iam pretty sure i miss anything.
 
Are you playing with the beta 2 fixes?

I'm not having a problem with import/export. It seems to be working fine for me.

Are you sure you are treating imports as imports and exports as exports and not having them muddled up? It can be confusing.

Edit: Also, don't forget it might take a turn or two for it to start working.
 
Last edited:
I'm still confused:
Maintain Threshold = if actual stock is below > Wagon sends goods?
Max Threshold = don't deliver more than this number?
In this case Maintain Threshold should be lower than Max Threshold.

But as soon as I click OK both numbers are exchanged for some reason!
Example: I'm going to import horses
my setting: Maintain Threshold = 150 ; Max Threshold = 400
I click ok => now Maintain Threshold = 400 ; Max Threshold = 150

Another question:
does it matter at all whether to click Import or Export?
(because in each of them you can make the same settings)
 
But as soon as I click OK both numbers are exchanged for some reason!
Example: I'm going to import horses
my setting: Maintain Threshold = 150 ; Max Threshold = 400
I click ok => now Maintain Threshold = 400 ; Max Threshold = 150
I fixed this bug in We the People 2.7.1. It is savegame compatible with RaR 2.7.

Another question:
does it matter at all whether to click Import or Export?
(because in each of them you can make the same settings)
Obviously yes. Import means the colony wants to get the goods from other colonies while export means it tries to send goods to other colonies. Sure the threshold is used for both, but they use it for different purposes.
 
Thanks!
I'm having installation problems with We the People 2.7.1. but will try it as I've got it working.
 
Thanks for fixing the bug I mentioned, and still working on the (ex-RaR) WeThePeople mod!
think of it as focusing on a single colony rather than a network. Tell what it wants to import and export. Do that for all colonies and the automation will form the links as needed
That's maybe the most important tip!
I tried having specified goods wagons, which doesn't work.
Wagon trains actually behave like cabs - say if you want to transport a commodity from A to B, C, and D, it delivers to B, then returns to A, then delivers to C, returns to A, delivers to D.
Which is annoying if B, C and D just need 20 or 30 items (e.g. for the home market). As time is crucial this makes no sense.
- would have been better if it behaved more like a bus: Load 100 items at A, than deliver 20 to B, 20to C, etc.
But I'm quite sure this is hardcoded and cannot be fixed.
 
Last edited:
I have a few additional questions:

* Can a transport drop off less than 100 of something if, for example, the Max threshold is set to 50? Or if I set the Maintain and Max both at 100, and turn on the import feeder, when a transport comes by and there are ~75 goods in the city, will it drop off only the ~25 required to top it off or is it going to drop off everything it's got?

* Pursuant to that, is the game "smart" enough to go "Oh there are five cities that need 20 goods each, I'll pick up 100 here and deliver them all around"?

* After a transport drops off goods, does it compare its own cargo + what's in the current city to what's "required" by nearby cities? Or does it complete a delivery, then look at a list of trade routes sorted by priority and pick the highest priority without regard to what it's already carrying or what's nearby? In other words, if a wagon picks up 100 tools, then drops off 50 of them, is it going to go "Where can I bring the rest of these tools?"

* Is there any mechanism that keeps track of whether a wagon is en route to fill a particular shortage? For example if Boston needs 20 tools, and a wagon picks up 20 tools and leaves for Boston, is Boston's tool import feeder removed from the list?

* If I dedicate a transport to a specific trade route (say moving silver from A to B,) will automated transports ignore the silver export for city A?

* Is there any mechanism or trick to make transports ignore long distance routes in favor of taking care of closer routes?

Finally, I'd like to take a crack at writing some code that will auto-update each city's import list each turn to accommodate the domestic market. It looks like the function call would go in CvCity::doTurn(), just after doPrices(). Should I create a bug / task on github for this?

Thanks!

EDIT: I just found this issue which addresses my last point: https://github.com/We-the-People-civ4col-mod/Mod/issues/265
 
First development of RaR has stopped. The code continues development under the name "We The People". It's savegame compatible with RaR (well it can import savegames, but the other way might not work) and so far it's mainly bugfixes (and many of those), which has been released. There is no point in using RaR and certainly not looking at the code.

Secondly about trade routes. Yes they AI is not great. It's mainly a tweaked vanilla system and it is designed to pick up one type of goods in one colony and drop it off in another colony. Nothing more fancy than that. We want something better and if you can come up with a new system, then it would be great. If you can code it, then it's even better.

I would recommend you read and reply to this thread: https://forums.civfanatics.com/threads/discussion-how-should-trade-routes-work.648488/
 
Top Bottom