# Loot filter (Beute page) Request (2026-10-19): on the options window's *Beute* tab, per category — Gold, Tränke, and the item colours white / blue / yellow / brown / green — one of: - **Löschen** (Void): the drop is deleted at once; - **Ignorieren** (Ignore): the pickup key leaves it; - **Standard** (Default): picked up, label with the labels key (Alt); - **Immer anzeigen** (Always Show): picked up, label without the key too. Decided with the user: the filter replaces the game's PICKUPAUTO choice (all / valuable / gold only; its radio buttons are hidden, the animation checkbox stays); Void deletes loot only (monster drops, chests), not items the player puts down. Settings: `[loot]` in `sacredK.ini` (`Gold=Default`, keys Quest, Gold, Potions, White, Blue, Yellow, Brown, Green; values Void, Ignore, Default, AlwaysShow). Code: `src/mods/lootfilter.cpp`, page in `src/mods/options.cpp`. ## What decides the category (read from the game) - Quest items (request 2026-10-25: "Quest Items are currently potentially being destroyed, it needs to be top priority, also Löschen is not an option for those"), checked first: the type's quest number (type table +0x1c) or the scripts' QuestItem / MainQuestItem marks (+0x61 / +0x62; the script parser 0x4584a9 turns those words into tokens 0x61 / 0x62), as the quest book reads them (0x43ad80). The game's always-collect test `0x428550` requires type flag 0x1000000 besides, so quest items without it fell into their colour's category and could be voided. Their row has no *Löschen* box; a `Void` in the ini is read as Default. - Gold: `0x43ae20` (thiscall on the item type table, (type)): one of four types listed at `0x947920`. The labels show its amount, the collect mode takes it without inventory space, the loot drop sets the amount after creating it. - Potions: item class 9 (type table +0x2e). - Item colour (`0x5c1330`, the items' vf24 case 2): set items green (type group record `0x433f00` +0x23); otherwise, with the game's `UNIQUE_COLOR` option (on by default), by the quality tier, bits 16..19 of the item's quality flags (+0x11c): up to 4 white `ffefefef`, 5..11 blue `ffa0a0ff`, 12..14 yellow `fff0e040`, 15 brown `ffc19a33`; set green `ff15ff25`. (Without UNIQUE_COLOR, items with special bits get other colours from `0x5c1260`; the filter uses the tier regardless.) - Not filtered: runes (class 0x1c) and objects with flag 0x800 (the game's CanCollectItem always takes those). ## Where it acts - **Pickup**: `cCreature::CanCollectItem` (`0x4ec170`, (item), ret 4) is the filter of the collect mode (`0x4ec3a0`, the pickup key's order 0x113): its ring scan and the follow-up scan next to a picked item. A clicked item does not ask it. Original: refuses carried items (+0x14 bit 2), takes the always-collected ones, then filters by PICKUPAUTO (`0x819580`; 1 by value against the hero level, 2 gold only). Now: carried → no; else by mode. - **Void**: the loot drop `cCreature 0x559a30` ((forced type, ?, ?, killer), ret 0x10; logs `Drop from [%d] %s`) makes its items with `cObjectManager::CreateAt` (`0x5fbaa0`, ret 0x14) and tosses them (`0x44e0a0`). Chests keep their contents as ids at +0x1e4/+0x1e8; `cChest3D::dropItems` (`0x5c9b10`, ret 4) throws them out. Ids from both are queued and handled on the next engine tick (the callers use the item after creating it, e.g. `0x4d0f29` uses the returned object): still on the map (no carried / dead flag) and Void → `RemoveFromMap` (`0x5fc910`) and `DestroyObject(id, 0, 0, 0)`, as the loot drop itself replaces an item. Player drops go through `cEngine::dropItem` (`0x6116c0`), not touched. - **Always Show**: `cWorldView0::DrawObjectLabels` (`0x627260`, (renderer), ret 4) draws the labels list (+0x96b30, 0x1c per entry, +0 object id; an entry with the high bit set is skipped) only with the key held (it sets +0x10 bit 0x4000 from the key). Without the key, if an always-shown item is listed: all other entries are marked skipped, the key reads as held (`input::ForceLabels`), the original runs, the marks and bit 0x4000 go back. Clicking such a label without the key does not pick it up (PickObjectAt `0x626d30` uses its own list); clicking the item does. ## The page The auto-pickup frame (now only *Animation*) stays at the top left; below it, across both columns, a framed table: a row per category (name in the game's colour), a box per mode, the chosen one highlighted; the title "Beutefilter" in the header row (above the frame it met the backdrop); hints at the bottom. Changes are kept until OK (`0x717460`), Cancel drops them, like the key bindings.