Page 1 of 2 12 LastLast
Results 1 to 30 of 42

Thread: How does TRADE work in the game?

  1. #1

    Default How does TRADE work in the game?

    Can someone tell me how the game figures out the trade routes and what is traded where for how much? I'm not talking about merchants, I'm talking about the basic "connections" over sea and land that you see all those ox carts and ships automatically moving around the map on. It seems like there's some sort of interesting mechanism behind it, and I'm curious if anyone has figured out how it all works...

  2. #2
    Cynic Senior Member sapi's Avatar
    Join Date
    Oct 2004
    Location
    Brisbane
    Posts
    4,970

    Default Re: How does TRADE work in the game?

    Quote Originally Posted by ArchieGremlin
    I did a bit of digging in order to work out what effect the various trade buildings have on the value of a settlement's trade routes and I thought you might like to see the results.

    The short answer is that anything in the building browser with the property "Increase in tradeable goods" will increase your trade income by 10% or 20% of the base value.

    It's hard to tell how much extra money you'll make when you're choosing which building to construct next. However, the increase in trade value will affect all land trade and sea export routes in the settlement with the new building. It will also increase the value goods imported from this settlement by other settlements.

    For example, if Bruge exports cloth to London then upgrading Bruge's Market to a Fairground will increase the value of London's sea import route from Bruge. (But not the other import routes in London.)

    I you want to work out a settlement's total trade bonus then just add the bonuses for each building together. For example, if London has a Shipwright, a Great Market and a Merchant's Guild then the trade bonus is 90%. (30% + 50% + 10%) This means that the value of each trade route is 190% of the basic value. (i.e. 1.9 x base value) The bonuses are all listed in the table below.

    Note that the bonuses aren't multiplied together. If you add Merchant's Wharf to London then the value of each trade route won't increase by 20%; it'll increase by a factor of 210/190. (about 10.5%)

    A good strategy for maximising your income is build ports first and then the other improvements starting with the cheapest.

    I don't know what determines the base value for each trade route.

    I haven't looked at the effect of roads on trade.




    The buildings listed in this table are the ones that are shown in the game with the property "Increase in tradeable goods". (This matches the "trade_base_income_bonus bonus" property in export_descr_buildings.txt.)

    * I've checked the behaviour of most buildings but the ones I couldn't check are marked with a *.

    # The "Sea Trade" buildings have the property "Trade fleets available x". As far as I can tell this has no effect on the value of trade. Does anyone know if this property does anything at all? (It maps to the "trade_fleet" property in export_descr_buildings.txt.)

    enjoy,
    Archie
    Thanks Archie
    From wise men, O Lord, protect us -anon
    The death of one man is a tragedy; the death of millions, a statistic -Stalin
    We can categorically state that we have not released man-eating badgers into the area -UK military spokesman Major Mike Shearer

  3. #3

    Default Re: How does TRADE work in the game?

    Thanks for the info, but that's not quite what I was getting at.

    I'm not so much interested in the "player perspective" of how to make the most money (percentage bonuses, etc), but rather, I'm curious how the game actually figures out that BRUGE trades CLOTH with LONDON, rather than something else with someplace else, and WHY... obviously it has something to do with the goods that Bruge and London have, but I'd really like to know the specifics of how the game figures out that since province X makes cloth, the cloth should pass through province Y, where it is put on a ship and is transported by sea to province Z.

  4. #4

    Default Re: How does TRADE work in the game?

    Or, to ask about it a different way: there is a file called "map_trade_routes.tga". How is it used in the game??

  5. #5
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: How does TRADE work in the game?

    Not really sure but iirc each city can trade with each other city if it wants to (only one-sided restrictions for the number of trade routes) so the game uses the cities that generate the most income to trade with.
    Which factors influence that, I have no idea though.

  6. #6
    Masticator of Oreos Member Foz's Avatar
    Join Date
    Dec 2006
    Posts
    968

    Default Re: How does TRADE work in the game?

    Quote Originally Posted by alpaca
    Not really sure but iirc each city can trade with each other city if it wants to (only one-sided restrictions for the number of trade routes) so the game uses the cities that generate the most income to trade with.
    Which factors influence that, I have no idea though.
    Well, some of them are obvious at least: trade route distance and the value of the resource(s) involved both seem to affect the value of the trade route. I would speculate trade rights do too, though IIRC you can't have trade with a nation you don't have trade rights with, so this is difficult to test - what seems clear is that you get more benefit from routes to other faction's provinces, which is likely the effect of trade rights with that faction.

    As for determining the routes you get, I imagine there is a maximum distance that a trade route is allowed to span. With that knowledge, the game can determine how much profit you'd make from trading with each province that is in range, and order the list by profitability. Then it could select the top N of them to establish trade with, where N is how many trade routes the current settlement is allowed. In reality the problem is probably a bit more complex than this to solve completely since full trade routes would presumably eat 1 available fleet from each end of the route. This means that a route from Rennes to London for instance might be among the most profitable for Rennes, while London may be able to do far better than that if trading with the Danes. In that case it may be beneficial to accept a lower trade route for Rennes in order to give London more routes to Danish settlements. So in reality the game probably generates all possible trade route networks for your nation, and then selects the optimal configuration, since a settlement-centered view can easily lead to a less-than-optimal solution. I realize it sounds like a lot of work, but to current processors this is more akin to counting on one hand than anything else really...


    See my Sig+ below! (Don't see it? Get info here)

  7. #7

    Default Re: How does TRADE work in the game?

    This is how it works in RTW. I think it is the same in MTW2

    First thing is the resources a region has. It can only trade a resource contained in it's region.

    It will trade this resource with each adjacent land region the faction is not at war with who *don't* have that resource i.e two adjacent regions which both have iron won't trade it.. The base value is determined by the value of the resource and the population size of the recieving city. (I think it is just the recieving cities pop size that matters.) Dirt roads don't increase it but the higher level roads do. (In RTW the paved roads doubled the income from land trade IIRC.) Trade rights double the amount you get, markets etc add a percentage.

    Sea trade works in a similar way. The different port buildings give you a number of export trade fleets. For each trade fleet you have you can have one export route. The game will look at the resources in your region (if any) and look for nearby (non-adjacent) regions that don't have that resource and calculate the most profitable one. The base value of the resource plus the shortness of the distance plus pop size of recieving city determines the value of the trade. Trade rights double it, markets etc add a percentage.

    You also get a smaller amount from the trade of other cities exporting their resources to you.
    It's not a map.

  8. #8
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: How does TRADE work in the game?

    Foz: I think export only takes one of the fleets of the exporting cities, and trade routes aren't two-sided (so you can have cities that export to a city but not import from it and vice-versa). This would make sense because you can only export specific resources.

  9. #9
    Masticator of Oreos Member Foz's Avatar
    Join Date
    Dec 2006
    Posts
    968

    Default Re: How does TRADE work in the game?

    Quote Originally Posted by alpaca
    Foz: I think export only takes one of the fleets of the exporting cities, and trade routes aren't two-sided (so you can have cities that export to a city but not import from it and vice-versa). This would make sense because you can only export specific resources.
    Is there no difference then between "export routes" and "trade fleets available?" The chart Sapi posted (by ArchieGremlin) says that the Port series gives the former, while the Merchant's Wharf series gives the latter. It's been my experience that building the Port series gives smaller boosts to trade (though still better than land usually) while the Merchant's Wharf series gives absolutely HUGE boosts to my sea trade. I was rolling with the assumption that they are in fact two different things.

    In fact I would've said I think the following:

    Export route - a single resource trade route, exported to the most profitable place. Agreed these are one-way. I'm not sure each is for one resource only, but that's been my impression.

    Trade fleet - gives a full trade lane with another settlement, the two then exchanging all possible resources (i.e. every resource the other does not have). IMO this would be the only way to explain the massive numbers of resources I usually see being traded by sea on the trade details scroll - it's generally WAY more than how many exports I'd be allowed. It's not entirely clear if they go both ways.

    So that's what I've been assuming is going on...
    Last edited by Foz; 03-19-2007 at 21:41.


    See my Sig+ below! (Don't see it? Get info here)

  10. #10
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: How does TRADE work in the game?

    Quote Originally Posted by Foz
    Is there no difference then between "export routes" and "trade fleets available?" The chart Sapi posted (by ArchieGremlin) says that the Port series gives the former, while the Merchant's Wharf series gives the latter. It's been my experience that building the Port series gives smaller boosts to trade (though still better than land usually) while the Merchant's Wharf series gives absolutely HUGE boosts to my sea trade. I was rolling with the assumption that they are in fact two different things.

    In fact I would've said I think the following:

    Export route - a single resource trade route, exported to the most profitable place. Agreed these are one-way. I'm not sure each is for one resource only, but that's been my impression.

    Trade fleet - gives a full trade lane with another settlement, the two then exchanging all possible resources (i.e. every resource the other does not have). IMO this would be the only way to explain the massive numbers of resources I usually see being traded by sea on the trade details scroll - it's generally WAY more than how many exports I'd be allowed. It's not entirely clear if they go both ways.

    So that's what I've been assuming is going on...
    Never heard of export routes to be honest, afaik (and can tell from edb) the port series simply increases the trade income for each route you have, the merchant wharfs add fleets.

  11. #11
    Masticator of Oreos Member Foz's Avatar
    Join Date
    Dec 2006
    Posts
    968

    Default Re: How does TRADE work in the game?

    Quote Originally Posted by alpaca
    Never heard of export routes to be honest, afaik (and can tell from edb) the port series simply increases the trade income for each route you have, the merchant wharfs add fleets.
    Yeah it's not in the EDB, but definitely in the game. At the very start of the game, if you check a settlement right after you build a port for it to see what it's trading, it'll show some sea trade even though it obviously doesn't have any wharfs yet. In fact I doubt there's any wharfs anywhere in the world that could be trading with it, so that pretty much guarantees that some sort of sea trade "fleet" for lack of a better term is granted by the port. I'll see if I can figure out more about how the export routes (granted by ports) are different from trade fleets (granted by wharfs) tomorrow, if they are at all.

    Note: I'm sticking with ArchieGermlin's naming conventions here for the sake of clarity, not because I'm set on them being correct. It just seems more simple to call whatever trade is granted by ports "export routes" and whatever is granted by wharfs "trade route." So, hopefully that will head off some potential confusion, and help keep everyone on the same page.


    See my Sig+ below! (Don't see it? Get info here)

  12. #12
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: How does TRADE work in the game?

    Hmm there's indeed a bug, I just tested this a bit, and it appears that the trade fleets don't change anything (not even the value of trade routes), whereas the actual fleets you have at your disposal are linked to the port building.
    I remember noticing it before, but I didn't play the game for a while ;)

  13. #13
    Masticator of Oreos Member Foz's Avatar
    Join Date
    Dec 2006
    Posts
    968

    Default Re: How does TRADE work in the game?

    Quote Originally Posted by alpaca
    Hmm there's indeed a bug, I just tested this a bit, and it appears that the trade fleets don't change anything (not even the value of trade routes), whereas the actual fleets you have at your disposal are linked to the port building.
    I remember noticing it before, but I didn't play the game for a while ;)
    I just played with this for a while last night, and agree with you. And here I thought I was doing myself a favor rushing to build those silly wharves...

    They have some impact on trade though - the details scroll correctly predicts how much they raise the city's trade by...

    A related problem is that the port series has no idea how to correctly tell you how much it will raise trade by. It gives an amount (via the usual grayed out icon that tells you the result of whatever building is in production) but the amount is always off - the game fails to account for the new trade route that will spring up when the building completes. It's relatively misleading, and it would sure be nice to know what you're getting ahead of time.


    See my Sig+ below! (Don't see it? Get info here)

  14. #14

    Default Re: How does TRADE work in the game?

    Just wanted to add something I discovered recently.

    The maximum distance trade fleets may travel between ports is controlled by the descr_campaign_db.xml file.

    If you increase the value from the default value of 100, you can increase the number of ports available to trade with, as the fleets can travel greater distances.

    Here are some screens I took last night

    Value set at 100:




    Value set at 400:



    Read The House of Seleukos: The History of the Arche Seleukeia
    for an in-depth and fascinating history of the heirs of Seleukos Nikator.

  15. #15

    Default Re: How does TRADE work in the game?

    (Don't know how to edit my own post)

    Forgot to add that it's the port_to_port_mp_min float line in the descr_campaign_db.xml that controls the distance between ports.

    Read The House of Seleukos: The History of the Arche Seleukeia
    for an in-depth and fascinating history of the heirs of Seleukos Nikator.

  16. #16
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: How does TRADE work in the game?

    @Foz: The slight increase comes from a change in trade_base_income or whatever the keyword is

    @social_infidel: Interesting find, this could allow a bit of tweaking to either make sea trade more important or less important.

  17. #17

    Default Re: How does TRADE work in the game?

    @Alpaca

    Yeah, I'd been trying to figure out how to increase the distances for awhile. Part of an effort to increase the emphasis on trade income and decrease the amount of income you get from farms. It just struck me as unrealistic (or maybe just unsatisfying) at how short the sea trade routes were in this game.

    Especially if you check out some of these maps:




    Read The House of Seleukos: The History of the Arche Seleukeia
    for an in-depth and fascinating history of the heirs of Seleukos Nikator.

  18. #18
    Masticator of Oreos Member Foz's Avatar
    Join Date
    Dec 2006
    Posts
    968

    Default Re: How does TRADE work in the game?

    @Alpaca: Yeah I know that's why... I just wanted to point out that the wharf buildings at least aren't entirely useless

    @SI: Nice find. I agree about trade routes seeming too short... and was wondering myself where this was controlled. How much does the value of the average trade route seem to go up when you allow them to be 4 times longer (400)? I would suspect quite a bit, because it seems like the length of the route affects its value. Not only that, but you now give each port far wider choices of where to export to, which means they can also select more compatible cities to trade with, more easily avoiding resource overlap and the lost revenue it brings.

    On a side note, when I see info like this, I always end up trying to think up more useful applications than just getting something we've been wanting (always nice). What came to mind for this is that it might help the AI considerably to have all the extra income that longer trade routes are bound to be generating. AI right now is excessively good at using up every last florin at its disposal, it just seems to run short of cash too quickly to get everything done that it needs to - it eats with its eyes, not its stomach. So, the influx of money might actually help the AI function efficiently by allowing it to actually do all the stuff it wants to. Granted the player may then be rolling in obscene amounts of money, but it's probably best to err on that side of things so the AI can at least put up a good fight. Besides, the player will probably have more trouble figuring out good uses for all that cash.

    If you've played much with the higher distance, SI, could you comment a bit on what it seems to have done to the AI factions, if anything? I'm interested now


    See my Sig+ below! (Don't see it? Get info here)

  19. #19
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: How does TRADE work in the game?

    The royal pain in the butt with the AI is that it will always build buildings in every city (because of the automation), and then won't have much money left for units, which it will invest in cheap ones that are of course relatively costly to maintain and which it can't disband.
    So the AI will often go broke if you don't play on VH where it has a cheat of 10k per round (and even then it'll sometimes happen)

  20. #20

    Default Re: How does TRADE work in the game?

    Just did some testing and it appears that the increased trade distances not only doesn't help sea trade income, but in fact, hurts it.

    This was done using my custom mod (which substantially increases trade income and reduces farm and tax income).

    Genoa - port_to_port_mp value set at default 100:

    Trades with Toulouse



    Toluouse - port_to_port_mp value set at default 100:

    Trades with Genoa



    Genoa - port_to_port_mp value set at 400:

    Trades with Bologna:



    Toulouse - port_to_port_mp value set at 400:

    Trades with Rome



    It looks like that with the increased distance modifier, trade routes are chosen based on the furthest port you can reach. Not on whether you can actually make more trading with that port. It's not like Genoa ditched Toulouse (or vice versa) for a more lucrative trading partner in this case, so it must just go for the furthest port within distance (just a guess).

    Read The House of Seleukos: The History of the Arche Seleukeia
    for an in-depth and fascinating history of the heirs of Seleukos Nikator.

  21. #21
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: How does TRADE work in the game?

    Aaah great, suddenly the name makes sense!
    It's probably a setting how far the port the settlement trades with must be away from it at the very least. So if you set this to 400, you'll get trade routes only with settlements that are at least 400 mp away.

    Incidentally, it looks like distance is detrimental to trade income which is a bit strange (notice how it exports the same wares to Genoa and Rome, but Rome only generates a third of the revenue - or did you sign a trade agreement with Milan but not with the Papacy?).

  22. #22

    Default Re: How does TRADE work in the game?

    @alpaca

    Come to think of it, in this particular set-up of my ongoing WIP mod, I had Milan and HRE began the game as allies with trade rights (to simulate vassal-ship). France and Milan had no such treaties.

    So maybe once Milan could reach Bologna the game had Genoa open up trade with Bologna (its ally and whom it held trade rights with) instead of Toulouse. In which case, Toulouse sought out the next-best port to trade with - Rome in this instance.

    I'll have to do more testing when I get home from work. But it does seem strange that Toulouse received substantially less income from the exact same exports when it was trading with Rome as opposed to Genoa, even though Rome is further away. So who knows how trade is calculated...

    Read The House of Seleukos: The History of the Arche Seleukeia
    for an in-depth and fascinating history of the heirs of Seleukos Nikator.

  23. #23

    Default Re: How does TRADE work in the game?

    This is great stuff. What you might want to do is create a test where you control all or almost all of the provinces in the game, so that there's a level playing field and so you can see all of the financial data.

    One problem I see is how to make a province like Venice have its historical trade importance. Obviously Venice didn't do that much trade because it manufactured more products... it simply was very good at trading goods from other nations. So, I would think that means trade would be more a function of the size of your port... but then everyone could build huge ports in every single coastal province, which doesn't make sense. Basically, there needs to be a reason why some cities gain importance over others.

  24. #24
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: How does TRADE work in the game?

    Quote Originally Posted by Belisarius Invictus
    This is great stuff. What you might want to do is create a test where you control all or almost all of the provinces in the game, so that there's a level playing field and so you can see all of the financial data.

    One problem I see is how to make a province like Venice have its historical trade importance. Obviously Venice didn't do that much trade because it manufactured more products... it simply was very good at trading goods from other nations. So, I would think that means trade would be more a function of the size of your port... but then everyone could build huge ports in every single coastal province, which doesn't make sense. Basically, there needs to be a reason why some cities gain importance over others.
    Since we can't do much stuff on a per-faction basis here, you could add buildings to venice that substancially increase trade revenue (the fleet keyword unfortunately doesn't work as explained above), or you could raise the agent limit for merchants and/or give them better traits for Venice.

  25. #25

    Default Re: How does TRADE work in the game?

    Is the entire wharf line of buildings bugged? I thought I remember reading once that it was just the initial wharf building that was bugged. It grants you one trade fleet, but since the port already grants you one anyway, the wharf has no net benefit aside from the trade bonus...

    Originally Posted by Belisarius Invictus

    One problem I see is how to make a province like Venice have its historical trade importance. Obviously Venice didn't do that much trade because it manufactured more products... it simply was very good at trading goods from other nations. So, I would think that means trade would be more a function of the size of your port... but then everyone could build huge ports in every single coastal province, which doesn't make sense. Basically, there needs to be a reason why some cities gain importance over others.
    Just give Venice a Merchants Guild HQ from the get-go...

    Read The House of Seleukos: The History of the Arche Seleukeia
    for an in-depth and fascinating history of the heirs of Seleukos Nikator.

  26. #26
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: How does TRADE work in the game?

    Quote Originally Posted by socal_infidel
    Is the entire wharf line of buildings bugged? I thought I remember reading once that it was just the initial wharf building that was bugged. It grants you one trade fleet, but since the port already grants you one anyway, the wharf has no net benefit aside from the trade bonus...



    Just give Venice a Merchants Guild HQ from the get-go...
    Nope, the trade_fleet keyword doesn't do anything.
    I just did a quick test, and still only one trade route in Venice (which is generated by the port)

  27. #27
    Masticator of Oreos Member Foz's Avatar
    Join Date
    Dec 2006
    Posts
    968

    Default Re: How does TRADE work in the game?

    Quote Originally Posted by alpaca
    Aaah great, suddenly the name makes sense!
    It's probably a setting how far the port the settlement trades with must be away from it at the very least. So if you set this to 400, you'll get trade routes only with settlements that are at least 400 mp away.
    I concur. I would guess that its primary purpose is to prevent neighboring ports from trading with each other.

    I'll see if I can do some tests on a saved game where I own the British Isles, Europe, and some extra, and see what happens to my trade (if it applies to a saved game, which I think it will).


    See my Sig+ below! (Don't see it? Get info here)

  28. #28
    Masticator of Oreos Member Foz's Avatar
    Join Date
    Dec 2006
    Posts
    968

    Default Re: How does TRADE work in the game?

    Here are the results:

    This first one is the base summary screen for the game with default trade min distance (100).



    Next is what happens when I set the distance to 400.



    And finally here is what happens with it set to 0.




    As you can see, the shorter trade min distance does provide better trade income, so it seems for certain that shorter routes are inherently more valuable (though obviously a longer route could still be more profitable if there is less resource overlap and therefore it trades more resources). This may reflect a correct economic view most of the time - a longer route would have less trips total since it takes so much longer to reach the destination, or else would require more vessels (bigger investment and operating costs) to have the same frequency of arrival. Either way you look at it, it would be more profitable to trade 3 times as often with your neighbor than it would be to trade with a city 3 times further away, even if that city would offer you a bit more for the cargo.

    As a side note to this, there may in fact be no max trading distance - it's in the city's interest to trade as close to home as possible, so there should be no need for an upper limit ever.
    Last edited by Foz; 03-24-2007 at 22:04.


    See my Sig+ below! (Don't see it? Get info here)

  29. #29

    Default Re: How does TRADE work in the game?

    Quote Originally Posted by Foz
    As a side note to this, there may in fact be no max trading distance - it's in the city's interest to trade as close to home as possible, so there should be no need for an upper limit ever.
    Right. That makes sense to some extent. What's unfortunate, though, is it fails to cause exotic goods (like silk) to travel the long distances they did.

    What's missing in the current game is the ability for cities to re-sell the goods they import. This would make particular sense for "gateway cities" like Venice, that are on the coast but have the shortest land connection to inland german provinces. So, all those german provinces wanting silk would "pull" it through Venice, because the silk could travel more of the distance over water (more efficient than road).

    What would be good is if upgrading your roads increased the distance goods could travel. No roads would only allow goods to travel to the adjacent province, while dirt and paved roads would be two and three province trips, respectively.

    There also needs to be some mechanism for why certain strategic port cities like Venice and Constantinople were the "magnets" for trade they were. Perhaps larger ports would not only allow more connections, but also reduce the re-sale costs, so such cities could serve as hubs for trade rather than simply consumers of goods.

  30. #30

    Default Re: How does TRADE work in the game?

    So, can a new building called "trade hub" or "trade nexus" be created and preplaced in those cities? Have it add sea routes and merchant goods. That would give them their strategic significance.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO