Dynamic Villager Trades Mod overhauls villager trading so you do not need huge trading halls anymore. Instead of fixed lists, this mod refreshes villager offers each day or every time they restock. Villagers also remember what you buy and sell, so a small group of villagers slowly specializes in the items and enchantments you want. You can tune how fast trades settle and refresh with four config options, customize or replace professions using JSON datapacks with two extra offer types, and export your current setup with a built-in command. The mod works with trades from other mods, does not work with mods that replace vanilla trades, and only needs to be on the server in multiplayer.

Features:

  • Trade Memory: Villagers choose new offers based on your past trades. For example, buying Looting books from a librarian makes that villager more likely to offer sword and luck enchantments later.
  • Refreshing Trades: Villagers update their offers every time they restock or each day, depending on your settings. The more you buy or sell an item, the higher the chance that trade comes back after a restock, and offers always refresh when a villager levels up.
  • Smaller Trading Setups: Lets you get the items and enchantments you want from a few specialized villagers instead of building giant trading halls.
  • Datapack Support: Allows you to add custom trades or replace full villager professions with JSON datapacks.
  • Builds trade configs automatically at runtime for trades from other mods and missing professions, grouping offers by tool materials, enchantment names, and vanilla trade levels so optional trades specialize within their own level.
  • Adds two custom trade offer types for datapacks: enchant_specific_book and sell_specific_potion_holding_item.
  • Stops librarians from selling two books with the same enchantment at once by default, such as Protection III and Protection IV.
  • Includes an option for Enchant & Repair compatibility that puts Curse of Vanishing on every book sold by librarians.
  • Keeps modded trades that cannot be exported to a datapack, like the random map from Supplementaries, working at runtime as long as a datapack does not replace that entire profession.
  • Needs to be installed only on the server side in multiplayer worlds.
  • Does not work with other mods that replace vanilla villager trades or control trades through their own JSON systems.

Datapack Mechanics:

  • Each profession JSON file stores trade groups inside an offers dictionary, where you can set min_trades, max_trades, optional affinity, and group randomness so lower numbers help villagers settle on trades faster.
  • Setting replace to true overwrites an existing profession or trade group, while false adds your new trades to the existing group with the same name.
  • Group names decide the display order in the trade menu, so default group names start with numbers instead of sorting alphabetically.
  • Each trade entry defines the minimum villager level (such as apprentice), the offer type, the attributes points gained when traded, and an optional affinity.
  • Villager attributes act as a hidden memory that starts at 0 and changes whenever a matching trade is used, and you can create any custom attribute name without declaring it first.
  • Affinities control how strongly an attribute boosts a trade’s pick chance, and they calculate automatically from attribute points if left blank, though you can set both separately when needed.
  • Putting affinity on a trade group instead of a single trade makes this mod pick the group first and then a trade inside it, stopping large groups from overpowering smaller ones when max_trades is greater than min_trades.

Librarian Enchanted Book Rules:

  • Default librarian setups use four matching enchanted book groups that only differ in the experience they give, keeping the feel close to vanilla trading.
  • Trades with closely matching affinities, such as tool and fast, make a villager switch randomly between similar books like Efficiency and the custom book.
  • Trades with rare custom attributes that do not match other offers take many restocks to appear, while pairing a custom attribute with a common one like fire lets players boost the chance by buying books like Fire Aspect.
  • Negative attribute increments and affinities work best only when a book is meant to clash with another attribute, such as giving a water-related book a negative fire value.
  • Default book weights add 1 to enchanter, from -1 to 0.5 to low_level based on the enchantment’s max level (such as -1 for Fire Aspect II or Efficiency V and 0.5 for Efficiency II), 1 to the primary category (armor, sword, tool, bow, fishing, trident, crossbow, or all), and 1 split across secondary categories (such as 0.333 each for melee, luck, and resource).

Commands:

  • /dynamicvillagertrades export: creates a datapack from the current trade setup, including auto-generated modded trades, so you can edit them. Some modded trades, such as the random map from Supplementaries, cannot be encoded and cause that profession’s export to fail.

Configuration:

  • global_randomness: defaults to 1.0 and multiplies each group’s randomness. Lower numbers make villagers settle on specific trades faster, while higher numbers make it take longer.
  • refresh_delay: defaults to 0 and sets how many times a villager must restock before its trades change. Trades still refresh whenever the villager levels up.
  • no_book_duplicates: defaults to true and stops each librarian from selling two books with the same enchantment at once, such as Protection III and Protection IV.
  • enchant_repair_compat: defaults to false and adds Curse of Vanishing to every book sold by librarians for compatibility with Enchant & Repair.

How to Use:

  1. Trade the same items or enchantments with one villager several times to build up its hidden attributes; for example, buying Looting books from a librarian makes sword and luck enchantments show up more often.
  2. Wait for the villager to restock, let a day pass, or level the villager up so its offers update based on your past trades and your refresh_delay setting.
  3. Type /dynamicvillagertrades export in chat to generate a datapack with your current trade setup, including auto-generated modded trades, so you can edit the JSON files.
  4. Edit a profession JSON file in your datapack and set replace to true to overwrite a profession or group, or set it to false to add new trades to an existing group.
  5. Add each new enchanted book to all four default librarian book groups if you do not replace the whole profession, and use existing attributes like enchanter, low_level, and standard categories so trade weights stay balanced.
  6. Keep replace set to false when a modded profession fails to export due to an unsupported trade (such as the random map from Supplementaries), so your extra trades load while the original modded trade keeps working at runtime.
  7. Change global_randomness, refresh_delay, no_book_duplicates, and enchant_repair_compat in the config file to control how fast villagers specialize, how often trades refresh, and how librarian books behave.

Screenshots:

A weaponsmith villager interface displaying dynamic trade offers in Minecraft
Weaponsmith trading menu showing refreshed emerald offers and iron weapon sales
The weaponsmith interface showing customizable trades and inventory slots
Villager trading interface displaying restocked weapon choices and player inventory slots
Expert weaponsmith villager trading custom diamond axe with emeralds
Expert level weaponsmith offering an enchanted diamond axe for emeralds
Custom weaponsmith villager wearing an eyepatch standing near a smithing table
Weaponsmith villager wearing an eyepatch stands beside a grindstone and workstation
Villager standing near profession tables in the village
Village merchant waits near job site blocks for daily trade restocks
Villager with eyepatch interacting with another villager
Two specialized villagers interact outdoors near wooden village buildings and fences
Two customized villagers standing together in a forest setting
Two specialized merchants stand together among oak trees during daylight hours

Dynamic Villager Trades Mod Download Links

For Minecraft 1.21.1, 1.21

Fabric version: Download from Server 1 – Download from Server 2

For Minecraft 1.20.1, 1.20

Forge version: Download from Server 1 – Download from Server 2

Fabric version: Download from Server 1 – Download from Server 2

For Minecraft 1.19.2

Forge version: Download from Server 1 – Download from Server 2

Fabric version: Download from Server 1 – Download from Server 2

For Minecraft 1.18.2

Fabric version: Download from Server 1 – Download from Server 2

Click to rate this post!
[Total: 0 Average: 0]
QUICK MINECRAFT SURVEY · ONE TAP
Mods & Modpacks

What is your stance on mods that feel 'overpowered' or break vanilla balance?

32 responses · See the full results →