When leaving the dock, a docker is either carrying an import or is expecting to pick up a specific export, and chooses a storage yard (SY) based on that trade good. A trade caravan also seems to choose an SY based on a specific trade good. Therefore, in this thread, I assume that a docker or caravan wants to trade a single good. Reply #2 assumes that a caravan trades a single good. Some aspects of caravans trading multiple goods are discussed in reply #9. Some aspects of ships importing multiple goods are discussed in reply #10.
I also assume that a building does not touch multiple unconnected roads.
All my tests were done with the patched Cleopatra. I'd guess (but could easily be wrong) that the only difference between versions is that with the unpatched non-Cleopatra Pharaoh, a trade caravan will check all SYs including those that it cannot reach.
The "access tile" of a building is the first road (which may be roadblocked) encountered when starting on the tile NE of the N tile and going clockwise around the building on tiles that are adjacent to a side (not a corner) of the building. The "access distance" is the shortest distance from the entry point to the access tile, going only through passable tiles and only moving NE, SE, SW, or NW. (These were defined by Trium in the Caesar III Game Help forum threadCartpushers, traders, etc. - which building is nearest?, although he did not use the term "access distance".)
The "crow-flies-distance" to an SY is the shortest distance from the position of the caravan or docker to the N tile of the SY, going over any tiles in any direction (NE, E, SE, S, SW, W, NW, or N). Dockers waiting beside the dock are invisible but can be detected by clicking on the road.
A "bay" is a 1-tile section of an SY, excluding the N tile, which will either be empty or hold a single good. A completely filled bay will hold 4 stones, 4 weapons, 4 chariots, or 400 of another good.
A "selection value" is calculated for each SY which might trade the good. The docker or caravan goes to the SY with the lowest selection value. If multiple SYs have the same lowest selection value, the docker or caravan goes to the first one in the building list (which will often, but not always, be the first one that was built).
Dockers and caravans are described in my next two replies.
[Edited to mention that caravans trading multiple goods are discussed in reply #9.]
[Edited to mention that ships importing multiple goods are discussed in reply #10.]
I also assume that a building does not touch multiple unconnected roads.
All my tests were done with the patched Cleopatra. I'd guess (but could easily be wrong) that the only difference between versions is that with the unpatched non-Cleopatra Pharaoh, a trade caravan will check all SYs including those that it cannot reach.
The "access tile" of a building is the first road (which may be roadblocked) encountered when starting on the tile NE of the N tile and going clockwise around the building on tiles that are adjacent to a side (not a corner) of the building. The "access distance" is the shortest distance from the entry point to the access tile, going only through passable tiles and only moving NE, SE, SW, or NW. (These were defined by Trium in the Caesar III Game Help forum thread
The "crow-flies-distance" to an SY is the shortest distance from the position of the caravan or docker to the N tile of the SY, going over any tiles in any direction (NE, E, SE, S, SW, W, NW, or N). Dockers waiting beside the dock are invisible but can be detected by clicking on the road.
A "bay" is a 1-tile section of an SY, excluding the N tile, which will either be empty or hold a single good. A completely filled bay will hold 4 stones, 4 weapons, 4 chariots, or 400 of another good.
A "selection value" is calculated for each SY which might trade the good. The docker or caravan goes to the SY with the lowest selection value. If multiple SYs have the same lowest selection value, the docker or caravan goes to the first one in the building list (which will often, but not always, be the first one that was built).
Dockers and caravans are described in my next two replies.
[This message has been edited by Brugle (edited 02-29-2016 @ 08:21 PM).]