This mod allows you to buy and sell items automatically. It is highly configurable to meet your playstyle. You decide if it manages the trades for you or just sells your loot.
Requirements
This mod does not have any known dependencies other than the base game.
Other user's assetsAll the assets in this file belong to the author, or are from free-to-use modder's resources
Upload permissionYou are not allowed to upload this file to other sites under any circumstances
Modification permissionYou are allowed to modify my files and release bug fixes or improve on the features so long as you credit me as the original creator
Conversion permissionYou can convert this file to work with other games as long as you credit me as the creator of the file
Asset use permissionYou are allowed to use the assets in this file without permission as long as you credit me
Asset use permission in mods/files that are being soldYou are not allowed to use assets from this file in any mods/files that are being sold, for money, on Steam Workshop or other platforms
Asset use permission in mods/files that earn donation pointsYou are not allowed to earn Donation Points for your mods if they use my assets
Author notes
Source files can be found on my github page.
File credits
This author has not credited anyone else in this file
Donation Points system
Please log in to find out whether this mod is receiving Donation Points
Fixed buying too few pack animals (AutoTrader will still not cause herding)
Restocking consumables has higher importance
When autotrading fails the game should not crash anymore
Version 1.30.0
Fixes an issue where you would need to autotrade multiple times to sell everything
Version 1.24.0
Changed color-based selling to only trade on bright green color
Version 1.21.0
Added Harmony patches to avoid crashes of the mod introduced by the latest Bannerlord build.
Version 1.17.0
Fix for beta 1.4
Option to disable hotkey
Adapted default configuration
Version 1.16.0
Made removing main menu entry optional
Version 1.15.0
Removed the config from the main menu
Added hotkey for opening settings ingame (ALT + A)
Version 1.14.0
Added caravan autotrade
Added weighted average price
Added show/hide additional settings
Version 1.12.0
Added special option to keep and restock hardwood
Added korean translation
Version 1.11.0
Added buy/ sell options for livestock
Version 1.10.2
Fixed critical issue with buying horses
Version 1.10.1
Coupled the new setting with buying food
Version 1.10.0
Added the optional resupply feature: It buys food no matter the price to the specified keep value
Version 1.9.3
Fixed important bug that was introduced in 1.9.0
Added the optional "resupply" feature: It buys food no matter the price to the specified "keep" value
some small fixes
Version 1.9.0
Added the basic "buy at green, sell at red" AI as alternative setting (works like it did before 1.5.0)
Version 1.8.1
Chinese translations for 1.8.0
Version 1.8.0
Reworked settings
Introducing presets
Added Auto Sell behavior (you can define weapon/armor tiers to sell)
Changed default settings to global trade
Version 1.7.0
- Added chinese translations
- Fixed issue with lock not considered when "sell smithing material" is active
Version 1.6.6
- fixed max percentage weight setting
- some ui adjustments
- added infinite grain keep
- added infinite search range
- added keep smithing material setting
- fixed herding (will improve that in the future)
Version 1.6.5
Removed debug print
Version 1.6.4
Fixed the keep grains/consumables setting not working
Version 1.6.3
Fixed Horse buy setting, adjusted horse trading behavior (buys at maximum half your troops amount of carry horses now)
Version 1.6.2
Fixed version 1.6.0 and 1.6.1. Only buys as much carry horses as you have troops now, fixed gold calculation, fixed weight calculation, enhanced settings, ...
Version 1.6.0
Seperate settings for buying and selling, Seperate behaviors for horse, weapon and armor trading, some minor improvements
Version 1.5.3
Removed debug print
Version 1.5.2
Removed the fixed amount of goods that the bot leaves a merchant (will be a setting later). Adjusted default settings
Fixed issue with items not selling, Fixed bug that only trading food did not work
Version 1.4.1
Added two new settings, adjusted default settings
Version 1.4.0
Added settings, fixed issue with custom game
Version 1.3.1
Reduced sell threshold to 100 percent of base value
Version 1.3.0
You can now lock items to prevent them from selling. Set max limit of goods to buy based on your weight. Buys expencive goods before cheap goods.
Version 1.2.0
Fixed bug which resulted in too few goods being bought, updated XML file
Version 1.1.0
Great improvement in calculation as it now considers the price increase of a good when selling multiple units. This should have been in the initial version, sorry!
Pressing on the "Automatically trade goods" dialog option in settlements opens a trade window with preselected trade options. To finish trading, just press "Done". However, you can continue trading or adjust the offer.
It automatically buys items that are cheaper than the buy-setting percentage of the average price(*)
It only trades with an amount of money equal to your current money + everything you sell - X days of wages (setting)
It only fills your inventory as much as you allow it to (setting)
If you don't have enough money/capacity, it buys the cheapest items in town first for maximum profit
It buys at maximum as much goods of the same type as your defined percentage of your carry capacity (setting)
It automatically sells goods that are more expensive than the sell-setting percentage of the average price(*)
It leaves a small amount of each food to keep your troops happy (setting)
It leaves an amount of grains (setting)
It considers the amount of money the merchant has
It won't sell items you lock
It won't sell carry horses
It won't sell smithing material except hardwood and ore (setting)
You have a lot of options for customization. You can even change the behavior of the mod such that it only sells your loot. You can use it to resupply your food or keep stocked on carry horses. And even more features are yet to come.
(*) for how the average price is calculated, please see "Info about the different bot behaviors" Info about the different bot behaviors you can choose
Spoiler:
Show
General info:
Use the default value of the bot settings if you just want to play and don't bother with details and configurations. Jump right into the user preferences and adjust them to your liking
The default bot AI (since version 1.7.1):
It will buy and sell based on the red and green price coloring you get with the second trading perk
This makes the performance of the bot tied with the amount of trade rumors you get
Before you get the perk or if you have no rumors AutoTrader will substitute this information
The custom AI:
AutoTrader will calculate prices independent of trade rumors or price coloring in this configuration
You can set a "search radius" to select which prices to consider
The search radius can be infinite
The mod will find the average price for the goods of all towns inside the search radius and then will buy if the price is below the "buy" slider percentage and sell if its above the "sell" slider percentage
You can set it to global and activate a weighting. The weighting will make towns that are further away have less influence on the average price
What are the settings doing?
Spoiler:
Show
Please note: The default settings of the mod are my current personal preferences. I think they are working best in each circumstance (user preference settings excluded). However, you may think otherwise and I want to provide you with the freedom to modify as much of the mods behavior as possible.
Basic options:
Show advanced settings (beta): Shows additional advanced options when selected
Buy under X% of the average price: Autotrade if the price is smaller than X% of the items average value
Sell above X% of the average price : Autotrade if the price is higher than X% of the items average value
Use Simple AI: Changes the mods price calculation system to the generic "buy at green, sell at red" system. For more info, see "Info about the different bot behaviors"
Use weighted average price (beta): Use an average price weighted by distance instead of a fixed radius
Average price search radius: Define the price search radius. That practically defines how much towns and villages are considered into the calculation of the average price. You can see an image of the radius of the default value (300) on this mod page.
User preferences:
Total % of inventory space available for mod: This setting defines with how much percent of your maximum carry capacity the mod works.
Maximum % of inventory filled by same item: A single item will only be bought until it reaches the selected percentage of your inventory. E.g: you have 1000 inventory capacity and the setting is set to 10, so the bot will buy a resource (e.g. oil) at maximum until you have 100 kilos of it.
Amount of grains to keep: This amount of grains will be kept in your inventory and not be automatically sold
Amount of each other consumable to keep: This amount of other consumables will be kept in your inventory
Keep X amount of days of troop wages: Will leave enough money after the trade for the set amount of days. Does currently NOT calculate in expenses for workshops or caravans.
Sell weapons/armor of tier X and below: Automatically sells all weapons/armor of the given tier and below.
Special options:
Sell charcoal and ingots: If not active, those items won't be automatically sold
Resupply hardwood to 'keep consumables' value: buys hardwood no matter the price up to the amount specified by the "Amount of each other consumable to keep" slider
Resupply food to 'keep consumables' value: buys food no matter the price up to the amount specified by the "Amount of each other consumable to keep" slider
Troubleshooting
Spoiler:
Show
Q: I don't get trading xp:
A: This is an issue with the base game. It solves itself, simply by moving around and trying again.
Q: The mod is not profitable
A: Give the mod some time and try the default bot settings.
Q: I want to prevent X from being autotrated
A: Just use the "lock" functionality of your inventory
Q: The game does not start
A: Unblock the dll file of the mod
Q: What is the hotkey for the options menu?
A: ALT + A + T
Next Features to add:
Spoiler:
Show
Hints for settings menu
Exclude cities you can not enter from average price consideration
Horse trading rules
Fine tuning of trade behavior
Customizing shortcuts
Max herding setting
Money to keep setting
Repository - I want this mod to be open source, however, I am currently not clear about proper licensing for Bannerlord mods. I disabled the repository until I found it out. - Want to contribute/ Got an idea? Feel free to let me know!
Special thanks: - GlorifiedPig for his videos on BannerlordModding - gdliu (悠悠小墨) for chinese translations - golgo13131313 for korean translations - bittu0812 for showcasing the mod in one of his videos My other mods: ArrowCam