RimWorld

RimWorld

153 ratings
Realistic Trade
3
2
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.3, 1.4, 1.5
File Size
Posted
Updated
4.225 MB
Mar 12, 2023 @ 5:44am
Nov 17, 2024 @ 5:10am
4 Change Notes ( view )

Subscribe to download
Realistic Trade

Description
Description:
This mod aims to improve Rimworld’s trader caravans system (make it more realistic) by using effective travel distance, weather conditions, your wealth and faction relationships to determine how often would traders arrive at your settlement and which faction will they come from.

In short - what this mod does:
- if you settle near a large number of friendly settlements, on a flat plane with lots of roads, and be rich - you will have much more traders coming
- If you settle in an faraway frozen wasteland, with no friendly neighbors and be dirt poor - you will have very little to no traders
- if you leave close enough to several settlements of a faction with which you have good relationship - most traders who will eventually visit your colony will be from this faction

Why?
In vanilla Rimworld, the only thing that affects how often will you get caravans per year (“trader caravan arrival” event) is based only on a single fixed value (either in storyteller settings or game default):
  • 5 caravans per year (for Cassandra, Phoebe and other similar storytellers, which have their own value)
  • 4 caravans per year (for Randy and other similar storytellers, which use game default value)
And you have no way to increase / decrease this set frequency. The faction of the caravan will just be random (just non-hostile).

When I first started to play Rimworld (after something like EUIV or other strategies), I thought that the distance to other neutral / ally bases would be key to my trading, and so I was surprised when none of that mattered at all and I had no way to actually influence this by my actions in-game. This frustration led to this idea that, even though we are on a futuristic and far-away Rimworld, the laws of commerce and trade are actually kinda the same as in real life :)

How it works?
The key concept is “effective trade range” - the area around your settlement that will be used for the simulation. By default it is the area in 7 days of travel from your settlement.

Then trade calculation will happen based on the following modifiers:

Amount of traders per year:
  • Amount of non-hostile settlements in effective trade range. More settlements around, the higher the chance that traders will visit you.
  • Weather conditions (time of the year). Summer is best (dry and warm), Autumn and Spring are mediocre (rains and muddy roads), Winter is worst (cold and snowy)
  • Colony wealth. The more money and goods you have, the higher chance somebody will want to trade for them with you.
Trader belonging to a specific faction:
  • Quantity of non-hostile factions settlements in effective trade range. If you live close to somebody, there is a high chance you will be trading with them most often.
  • Shortest travel times from non-hostile settlements. Closest ones will visit most often
  • Relationship value (-75 to +100) with the faction.
Calculations and weights are updated each 24 in-game hours, meaning that any changes (faction relationships, new settlements in effective range, new roads, weather conditions) would take effect roughly the next day.

How to use & adjust for yourself in Mod Settings:
You can see the actual calculation and weights assigned (both for amounts of caravans yearly and caravan faction) in dev mode console log, if you trigger Map incident > Caravan arrival:
  1. Mod would be activated with default set values (balanced around 7 days of travel “trading range”), so you can just play with it and see how it works for you.
  2. For “amount of caravans per year”, you will see your game default and mod adjusted values in the Mod Settings.
  3. All mod settings and weights can be changed in the Mod Settings. As this is my idea of how “these things should work”, and it may not be the same for everybody (or specific scenarios) - we’ve tried to make all the settings as flexible as possible.
  4. There is a “default” (restore default values) button should you need it.

Scope & Limitations:
What this mod DOES NOT change:
  1. Space ship traders are NOT affected. The mod is centered around land-base trade (i.e. where people and pack animals need to physically travel on foot, from their base to yours), and so far I have no idea how that can relate to space-travelling traders.
  2. Money of traders (how much they have) is NOT affected. Maybe in the future releases, but for now the mod is only about “how often?” and “who will it be?”.
  3. The mod does NOT change the requirement that you should have at least Knight / Dame title to trade with the Empire (Royalty). Until you have a title on at least 1 colonist - Empire will not be calculated as “eligible for trade”
  4. The mod does NOT change the default game setting that does not allow caravans from 2 different factions (who are enemies of each other) to be present on your map at the same time. So if there is already a trader caravan from faction X present on your map, no traders can arrive from factions who are enemies of faction X (even though they may have higher chance of arrival) until it leaves. It should be possible to change it, but so far I have no idea how to balance that and if there is really a need to change.

Compatibility / Mod Conflicts:
We tried to only modify the default values (to cover compatibility with all possible storytellers), so this mod should theoretically work with any modded storytellers or other similar trading mods, unless they directly touch the game “trader caravan arrival” event (which probably will still work, but change the balance). In any case, testing / bug reports would be very welcomed.

Load order:
TBD

Notes / Planned features:
  1. Balancing. As this is a 1.0 version release and more of a concept I had (so we had limited testing, mostly to see if the system works correctly), I do not know yet how balanced it would be, especially for late-game colonies (i.e. trader spam).
  2. Adjust “world size scaling” sliders (so far they are WIP)
  3. Add modifiers to trader amount of money (based on relationship level + colony wealth, and maybe something else)
  4. Figure out the balancing needed to increase the “Effective trade range” based on your technology & buildings, in order to add a sense of progress (gradual increase in your travel range distance during the game and therefore more traders)
  5. Add modifiers (primarily to trader frequency) from Ideology (native ideos or support the VE Ideology mod)
Special / future idea - if this mod works OK and looks to be useful to the community, my original goal was actually to have the same system manage the Raiding mechanics. So, in my mind, raids must too primarily depend on geography (ease of travel), relationships and wealth. There may be a mod later that will be “Realistic Raids” :)

Translations:
n/a at the moment (English only)

Credits and thanks:
  • Raug - concept author, balance adjuster, commissioner.
  • Taranchuk - master of coding, who materialised this idea and brought it to life, with great balancing ideas.
65 Comments
sybersmoke Apr 22 @ 5:11pm 
Hello Raug. I am getting the fun pause error. I removed your mod and have gotten caravans. But with I am playing with your mod, I am getting the linked error. Specifically "Pathing from 374945 to 221099 hit search limit of 500000 tiles."

https://gist.github.com/HugsLibRecordKeeper/7b5b8795c6e0487acd39860a5cb0c386

I am not sure why and I really love the goal of your mod. So I hope this can be resolved with this help.
Ġedryht of Wōden Mar 25 @ 12:36pm 
Does this work with the "Safely Hidden Away" mod?
Clarke's Third Mage Feb 19 @ 1:40pm 
Does anyone know how this interacts with the visiting trader changes in "More Faction Interaction"?
ttyet Nov 18, 2024 @ 3:31am 
Thanks. Dont worry about the issue now. I recently found the issue not that annoying since it seems happened only on those "naturally-lag-somehow" biomes like the rainy tropical rain forest. If someday I was insanely troubled by the issue I will take some time to reproduce and record it and sent it to Taranchuk via DC.
Raug  [author] Nov 17, 2024 @ 5:14am 
Mod file has been updated to 1.5.

My apologies for a long delay - it was ready quite some time ago, but I did not have time to do this.

@CuuLaaaBu - if you can share anby specific logs / reproductioins steps, I can contract Taranchuk to take a look. I myself don't play Rimworld lately and won't be of much help.
ttyet Nov 1, 2024 @ 12:39pm 
used it for a new save.
on my highly modded save, you can witness obvious tps drops per ingame day, lasts around 5-10sec at 3X speed. No error log pops up.
I can easily reproduce the issue.
Hope you can fix it.
ttyet Sep 4, 2024 @ 7:30pm 
YES! lets go! update it already!
Raug  [author] Aug 30, 2024 @ 9:00am 
Hi guys. I've recomissioned Mr. Taranchuk for an update, and asked him to look into optimization.

Since I don't play Rimworld lately I won't be able to test it properly, so if anyone one who uses the mod can provide their logs when they've seen large lag spikes (for Taranchuk to review) - that would be great,

Otherwise, the mod will just be updated to 1.5
ttyet Aug 26, 2024 @ 9:59pm 
thank you! and one more waiting for 1.5
Raug  [author] Apr 12, 2024 @ 9:23am 
If I would catch Taranchuk and re-comission him for an official update to 1.5 - it will be updated, but I have no idea when this may happen.

My apologies, I don't play Rimworld lately.