• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Kuzma Minin

Second Lieutenant
69 Badges
Feb 5, 2016
173
169
  • Victoria 2
[SUBMOD] BASIC TRADE V 0.5

So, I was reading the Cutthroat Trade Development mod and was inspired to create a smaller version of the mod while I wait for it to be finished.

AIM
The idea of this mod is to introduce the few luxury resources that were traded over long distances and to allow Merchant Republics to make money off of this trade.

CURRENT STATUS
Pepper, cinnamon, amber, diamonds, silk and jade are in the mod right now.
Produced along the Malabar coast and Ceylon.
Produced along the Malabar coast and Ceylon.
Produced only in Kollipake.
Produced only in Sambia and Marienburg. Production starts small but can be increased.
Produced in developed Indian and Tibetan provinces as well as Constantinople. China also supplies a portion via the silk road. Chinese supply depends on its status.
Produced in and around Khotan. China diverts a portion of the resource towards itself, removing it from the map. Chinese demand depends on its status.

FEATURES
- A trade network that transports resources from a starting region to the rest of the world.
- The ability to siphon some of the trade as MR holding a trade post in a resource producing province. The MR can then sell the resources via decision or keep it for themselves.
- The ability to lease trade posts as an MR. You no longer have to worry about not being able to reach India as a European MR.
- The ability to buy a resource if your capital contains enough of it. This creates an artifact that you can gift for opinion bonuses.

I intend to include up to 10~15 luxury resources to be traded around the world. The reason there's an upper limit is the number of calculations that need to be performed per resource.

This is how the distribution of a resource occurs:
1) Resource is generated in provinces with the appropriate province modifier.
2) Regional demand is met first. If excess resource remains, it is exported to neighbouring regions. MRs can buy from producing provinces before they export.
3) The amount a region receives is proportional to its total tax value.
4) Once in a region, it is distributed to provinces based on weighted tax values. Provinces on trade routes are weighted higher.
5) Rich provinces can pull resources from neighbouring or same realm provinces even if they are not on a trade route.
6) Costs are generated based on demand/supply ratios for both individual provinces and regions.

TO DO
- Add more resources.
- Teach the AI to use the new MR functions.

I welcome suggestions on resources to add or changes to the algorithm used.

LIMITATIONS
1) If production is very high, resources might end up pooling in end nodes (West Africa, Scandinavia, Eastern Steppe). This most likely won't happen.
2) MRs in Europe can't actually build trade posts in India. CK2+ also destroys trade posts whenever they are transferred in a war. To circumvent this, take and Indian province and give it to a vassal. When the vassal finishes building a trade post, revoke the title.
3) The cost of a resource depends on the supply/demand ratio which currently means that poor tribal areas with low demand have lower cost than richer feudal areas.

Version 0.1 : Started with pepper.
Version 0.2 : Added cinnamon and diamonds
Version 0.3 : Added amber. Fixed some calculation issues.
- MRs now buy resources proportional to the number of trade posts they own. Exact formula is N/(N+25) of the excess resource, where N is the number of trade posts.
- Added Silk and Jade.
- Changed provincial distribution. Provinces with less than 4 settlements, that don't produce the resource being distributed and are not on any trade route cannot receive the resource. If the province in question is a capital of a duke or higher, it can still attempt to 'pull' from nearby provinces. Province distribution is still based on tax income.
- Filled in the map with generic resources. Some of these will be replaced over time with luxuries or finished goods.
- MRs can now lease trade posts for 50 years. It is a trade post targetted decision, so right click on a trade post to access it. You can't target the trade posts of other patricians.
- MRs can now sell the excess resources that they have accumulated in their capital.
The AI won't use either of the two decisions above as I need to teach them how to value certain
provinces.
- Switched to using custom defines instead of fixed values. To edit resource prices or consumption ratios, go to the scripted_effects file.
 

Attachments

  • BasicTrade_V0.5.7z
    83,6 KB · Views: 41
Last edited:
Hehe nice, good luck with it :)
I must admit it'll probably still take a long time till I am finished with anything, so I am pretty sure some people here will gladly use your mod. Frankly, it might be a viable alternative altogether because some folks probably prefer a less extensive and more "clean and simple" trade mod like this here, with less of an performance impact.

Well, I don't have anything to suggest myself, because you should do your own thing and your design sounds alright. But if you want to ask anything about medieval trade/resources, I can point you to lots of interesting things to read... (on second thought, better don't, lest you end up ever-researching and unproductive like me ;))
 
Hehe nice, good luck with it :)
I must admit it'll probably still take a long time till I am finished with anything, so I am pretty sure some people here will gladly use your mod. Frankly, it might be a viable alternative altogether because some folks probably prefer a less extensive and more "clean and simple" trade mod like this here, with less of an performance impact.

Well, I don't have anything to suggest myself, because you should do your own thing and your design sounds alright. But if you want to ask anything about medieval trade/resources, I can point you to lots of interesting things to read... (on second thought, better don't, lest you end up ever-researching and unproductive like me ;))

Thanks. I decided to make this mod when I realised how boring Merchant Republics are. I only intend to include long range trade goods that you can trade as a MR, so it won't have as many resources as your mod. I welcome suggestions on which resources to add since I spent most of my time working on the trade algorithm, and not on researching.

Also, I don't think this mod will end up being clean and simple since it takes ~3000 lines of code per resource.
 
Last edited:
Thanks. I decided to make this mod when I realised how boring Merchant Republics are. I only intend to include long range trade goods that you can trade as a MR, so it won't have as many resources as your mod. I welcome suggestions on which resources to add since I spent most of my time working on the trade algorithm, and not on researching.

Also, I don't think this mod will end up being clean and simple since it takes ~3000 lines of code per resource.
Yeah I meant clean and simple to use, not to code. Coding never turns out to be so simple alas :(
 
With the addition of leasing trade posts and selling resources, this mod has reached a somewhat playable level. Playing as a merchant republic, you know have something to work towards. This project started out as a personal mod, and will mostly stay so. This means that I will stop developing it when I feel that MRs are fleshed out.