A HUMAN'S RANDOM LOOT
Random vendor stock and random enemy loot, using every item in your game, including items from your other mods. Fully configurable in MCM.
WHAT DOES IT DO?
- Random vendors: traders sell random items when you open their trade window, and restock with new random items after every long rest.
- Random enemy loot: enemies drop random items when they die, scaled to their level.
- Uses all your mods: items from your other installed mods are part of the loot pool automatically, no patches needed.
- Essential supplies: vendors can stock injury kits, revive and raise-dead scrolls, and camp supplies, so you're never stuck without them.
- Fixes modded item prices: modded items worth 0 or 1 gold can be given a proper price based on their rarity.
- Your own prices: set the exact price of any item, lock an item at its original price, or ban an item from random loot, all from a searchable in-game menu.
- Better loot as you progress: optional rarity weights for each act, so rare and legendary items become more common in Acts 2 and 3.
- Safe: story items, quest items, keys, bosses, gold and broken items are never touched.
REQUIREMENTS QUICK START
- Completely random vendors: turn on Random Vendor Stock.
- Random vendors without junk: turn on Filtered Vendor Stock.
- Keep normal vendor stock and add random extras: turn on Vendor++.
- Random enemy drops: turn on Enemy Random Loot.
- Sensible prices for modded items: turn on Correct Low-Value Modded Item Prices.
- Change the price of one item: use the Item Value Rules tab.
HOW IT WORKS
Vendors
A vendor is randomised when you open the trade window. Their safe existing stock can be removed, they may get a few essential utility items, and then they get random items from the loot pool. Items worth more than your level × 100 gold are skipped, so you can't buy endgame gear at level 2.
Each vendor is randomised only once, so their stock doesn't change every time you talk to them. They restock with new random items after a long rest, or after you change a setting in MCM.
Enemies
When an enemy dies (or is looted), its safe existing loot can be removed and it gets 1 to (level ÷ Enemy Drop Scaling) + 1 random items, each worth at most the enemy's level × 100 gold. With the default scaling of 4, a level 8 enemy drops 1 to 3 items.
Party members, companions and vendors are never touched. Bosses are skipped by default. Only enemies that are hostile to you count, unless you turn on Include Neutral NPCs.
ALL SETTINGS (MCM)
General
- Enable Random Loot (on): master switch for everything.
- Enable Bulk Loaded-Actor Scans (off): allows the two "Heavy" options below. Keep off for normal play.
- Apply On Load (Heavy) (off): when a save or level loads, randomise every loaded vendor and enemy straight away.
- Freeze Current Randomization (off): locks in the loot you have now. Nothing is rerolled on load, on settings changes, on long rests or by scans. Changes you make while frozen are applied when you unfreeze.
- Apply To New Actors While Frozen (off): while frozen, vendors and enemies that were never randomised still get randomised.
- Watch Loaded Actors (Heavy) (off): every 5 seconds, checks loaded characters for vendors and enemies that haven't been randomised yet.
- Debug Logging (off): prints details to the Script Extender console. Useful for bug reports.
At least one of the first three must be on for vendors to change.
- Random Vendor Stock (off): replaces the vendor's safe stock with random loot.
- Filtered Vendor Stock (off): the same, but without junk items.
- Vendor++ (off): keeps the vendor's normal stock and adds random items on top, once per long rest.
- Remove Existing Vendor Stock (on): when Vendor++ is off, removes the vendor's safe stock before adding random items.
- Duplicate Item Removal (off): removes duplicate non-stackable items and items over the level value cap.
- Generated Items Per Vendor (40): how many random items each vendor gets (0 to 100).
- Essential Utility Stock (on): gives some vendors injury kits, revive and raise-dead scrolls, and camp and rest supplies.
- Essential Vendor Chance (50%): chance that a vendor gets essential items. Set to 100 if you want every vendor to carry them.
- Essential Items Per Vendor (3): how many essential items are added (0 to 20). The mod rotates between injury kits, revive scrolls and supplies, so each type gets a turn.
- Preserve Essential Stock (on): never removes utility items a vendor already sells.
- Enemy Random Loot (off): enemies get random loot when they die.
- Remove Existing Enemy Loot (on): removes the enemy's safe loot first. Turn off to keep their normal loot and add random items on top.
- Include Neutral NPCs (off): also treats non-hostile NPCs as loot targets.
- Enemy Drop Scaling (4): enemies drop 1 to (level ÷ this) + 1 items. Lower means more drops.
Many modded items are worth 0 or 1 gold. These options give them proper prices. Base-game items are never changed by price correction.
- Correct Low-Value Modded Item Prices (off): gives modded items below the threshold, or with no price, a price based on their rarity.
- Only Apply Mod List Below (off): off means every mod is corrected except the listed ones; on means only the listed mods are corrected.
- Mod Price Correction List (empty): one mod UUID, mod name or file-path fragment per line. # for comments.
- Low-Value Modded Threshold (50): modded items worth less than this get corrected.
- Rarity prices: Common 500, Uncommon 650, Rare 800, Very Rare 1000, Legendary 1500 (all adjustable).
- Individual Item Value Rules and Excluded Items: your per-item rules. Easiest to manage from the Item Value Rules tab (below).
Loot Pool Filter
- Enable Loot Pool Mod Filter (off): choose which mods' items can appear as random loot.
- Filter Mode (Exclude): Exclude blocks the listed mods; Include Only allows only the listed mods; Vanilla Only allows only base-game items.
- Mod Filter List (empty): one mod UUID, mod name or file-path fragment per line.
Off by default. When on, each weight is the percent chance that an item of that rarity is accepted when picked.
- Common: Act 1 50, Act 2 30, Act 3 20
- Uncommon: Act 1 30, Act 2 30, Act 3 25
- Rare: Act 1 15, Act 2 25, Act 3 30
- Very Rare: Act 1 4, Act 2 10, Act 3 15
- Legendary: Act 1 1, Act 2 5, Act 3 10
Safety
- Protect Story Items (on): never removes or gives quest items, keys, letters, books, containers, Netherstones, the Astral Prism, Orphic items, tadpoles and other plot-critical items.
- Skip Broken Items (on): never gives items that show as "Not Found", items with a missing 3D model, or items that cast a spell that doesn't exist (which can crash the dice-roll screen). Skipped items are listed in Script Extender/A_Humans_Random_Loot/skipped_broken_items.txt.
- Protect Bosses (on): never touches boss inventories.
- Block Combinable Results (on): items made by combining are kept out of the loot pool.
- Level Value Cap (on): vendor items capped at your level × 100 gold, enemy items at the enemy's level × 100 gold.
- Allow Template-Only Items (on): allows items with no known price.
- Include Junk (on): allows junk in the loot pool (Filtered Vendor Stock always excludes it).
MCM has a second tab, Item Value Rules, where you can find any item in your game:
- Search by item name or StatName (small typos are fine), or pick a mod from the dropdown to see its items.
- For each item you can tick Keep (lock its original price), type a Custom price and press Set (Clear removes it), tick No Vendor (never sold as random stock), or tick No Enemy (never dropped as random loot).
- Press Refresh Item List if a newly installed mod's items don't show up.
Code: Select all
# Exact price
ARM_Boots_Leather=1200
# Keep original price
OBJ_Potion_Healing=lock
# Excluded Items: vendor, enemy or both
OBJ_Scroll_Fireball=vendor
- Injury kits: Grit and Glory.
- Revive scrolls: base-game Revivify and True Resurrection, plus Damage Destruction's revive and raise-dead scrolls.
- Supplies: base-game camp supplies and rations, Rest System supply packs and APC's Rest System tools and crafting items. (Another Mod of Mine which I will upload soon)
PERFORMANCE
The mod only does work when you open a trade or an enemy dies. The loot pool is built once after loading, each loot roll checks only the items it picks, and prices are corrected once per session. The only costly options are the ones marked (Heavy), which are off by default.
FAQ
A vendor didn't change.
Check that Enable Random Loot and at least one vendor mode are on, and that Freeze is off. Already-randomised vendors only restock after a long rest or a settings change.
Vendors only sell cheap items early on.
That's the Level Value Cap. Turn it off for no cap.
I changed a price but the vendor still shows the old one.
Close and reopen that vendor's trade window.
I keep seeing an item I don't want.
Find it in the Item Value Rules tab and tick No Vendor and/or No Enemy.
Found a bug?
Turn on Debug Logging, reproduce it, and post your Script Extender log. (Be Cordial in your Comments or Request or I won't attend to what you want)
UNINSTALLING
Items already given out stay in your save as normal items. Turn off price correction and clear your item rules first so original prices are restored, then save, quit and remove the mod.