This is for you if:
- After every dungeon you open eight paperdolls to work out who should wear the plate armour you just found.
- The Avatar is overloaded while Iolo carries almost nothing.
- Your backpacks hold five piles of gold and ten loose arrows scattered in a heap.
- You want this done by one key, but you do not want your magic ring, lit torch or spellbook touched.
Auto-equip: one key for the whole party
Press Q (or whatever key you bind to auto_equip). Each member, the Avatar first, gets the best armour, weapon and shield from everything the party carries but nobody wears — bags, bags inside bags, and the back slots. Gear another member is wearing is never taken.
- Armour — head, torso, legs, feet, gloves, cloak, amulet and earrings, compared by the armour value. Rings and belts are left alone.
- Weapon — compared by damage. Ammunition, explosives, thrown weapons that do not come back, and bows without arrows are skipped. A two-handed weapon is used only if the other hand is free.
- Shield — only while no two-handed weapon is readied.
A slot changes only if it is empty or holds ordinary gear that scores lower. What comes off goes into the wearer's backpack, or back where the new item came from; nothing is dropped on the ground.
Tidy: weight, stacks, order
Press Shift-Q (tidy_inventory). Three passes run in this order:
- Weight — single items move from the most loaded member to the least loaded one, measured as load ÷ capacity (capacity is 2 × strength stones, so a strong fighter carries more than a weak mage). It stops when everyone is within 5%. Nobody is pushed over capacity; bags themselves and spellbooks stay put. Gold and keys may move: Black Gate counts the whole party's gold and keys.
- Stacks — identical gold, arrows, reagents and the like are merged, up to the engine's 100 per stack. Stolen goods never merge with owned ones.
- Order — each bag is rebuilt as weapons, armour, ammo, other stacks, miscellaneous, then containers, and laid out again on screen.
A second press right after the first changes nothing. Both keys print what they did to the terminal ([autoequip] Iolo: great helm, [tidy] ...) and show a one-line summary in the game.
Build Exult with the patch
The patch is against upstream Exult commit 97984e9e0cbb4ccacaab0249da9c51b533818f74 (2026-10-29). It adds one source file pair and two key actions.
git clone https://github.com/exult/exult.git
cd exult
git checkout 97984e9e0cbb4ccacaab0249da9c51b533818f74
git apply /path/to/exult-inventory/exult_autoequip.patch
autoreconf -i && ./configure && make
sudo make install
It also applies together with Exult TTS, in either order.
Bind the keys
The patch adds the actions but no default keys. Copy Exult's default key file (data/bg/defaultkeys.txt, or data/si/defaultkeys.txt for Serpent Isle), add two lines, and point exult.cfg at it. Q and Shift-Q are unbound by default.
Q auto_equip
Shift-Q tidy_inventory
<config><disk><game><blackgate>
<keys>/path/to/mykeys.txt</keys>
</blackgate></game></disk></config>
Tested on
Ubuntu 26.04.1 LTS with Exult 97984e9, this patch and Exult TTS, playing Ultima VII: The Black Gate. On a copy of a save, Q put plate armour on the Avatar and a great helm on Iolo and returned the old armour to the bag; Shift-Q moved 7 items, merged a stack and sorted 3 bags, and a second press changed nothing. The patch applies cleanly to a fresh checkout of that commit and builds.
Serpent Isle was not tried. The sudo make install layout above was not itself run; the game was played from a local build.
How it works inside the engine: docs/inventory_patch.md. Not affiliated with the Exult team and not submitted upstream. The patch carries Exult's licence (GPLv2).