Skip to content

Admin panel: configure all item drops on one page - #987

Merged
sven-n merged 8 commits into
masterfrom
claude/beautiful-albattani-oy2xfd
Sep 27, 2026
Merged

sven-n merged 8 commits into
masterfrom
claude/beautiful-albattani-oy2xfd

Conversation

@sven-n

@sven-n sven-n commented Sep 27, 2026 •

Copy link
Copy Markdown
Member

Supersedes #587. Adds a new admin panel page, Game configuration → Item Drops (/edit-item-drops), that brings all drop-related configuration onto one page. It builds on the idea of #587 and is rebased onto current master.

Screenshots

Drop chance overview per monster
Drop chance overview per monster

Monster drops (possible items in the second row)
Monster drops

Item box drops
Item box drops

Page sections

All sections can be collapsed, and one search box at the top filters them all. Save and Discard buttons are at the top and bottom. Leaving the page with unsaved changes asks for confirmation.

  1. General settings: ShouldDropMoney, ItemDropDuration (in seconds), MaximumItemOptionLevelDrop, ExcellentItemDropLevelDelta.
  2. Drop chance overview per monster: one block per map, with a row for each monster definition spawned there, taken from the map's monster spawn areas (attackable monsters and destructibles).
    • Each row shows the monster's level, maximum item drops, the number of drop groups that apply (names and chances in a tooltip), guaranteed drops, the total chance per drop roll and the "no drop" chance.
    • The groups are selected like DefaultDropGenerator does: the monster's own groups, plus the map groups whose monster level range and monster restriction match. Destructibles only use their own groups.
    • Quest and character specific drops are not included.
  3. Map drop groups: description, type, chance (entered as %), item level and monster level range are edited directly in the table. The possible items are listed in a second row below each group. An expandable row edits the possible items, the assigned maps (with assign to / remove from all maps) and the Monster restriction. Groups can be added and deleted.
  4. Monster drops: one block per monster with NumberOfMaximumItemDrops and its own groups. Groups can be added, and drops can be added for another monster. Removing a group from a monster also deletes it once nothing else references it.
  5. Quest and event drop groups: groups used by quest item requirements or mini game rewards, with a "Used by" column. They can be edited, but deleting them is blocked while they are still used.
  6. Item box drops (ItemDefinition.DropItems): source item level, min/max item level, money amount, required character level and drop effect, with the possible items in a second row. Groups can be added and removed.
  7. Randomly dropped items: DropsFromMonsters, DropLevel and MaximumDropLevel for every item.
  8. Item option chances: the part from Added item drop configuration page #587 (luck, excellent and normal options), plus AddsRandomly.

Implementation notes

  • New components live in Components/ItemDrops:
    • DropItemGroupTable: the inline-editable table used by the group sections.
    • CollapsibleSection: only renders its body when expanded, which keeps the large item list cheap.
    • Two small IList adapters, so the existing MultiLookupField can edit PossibleItems and the map assignment (map.DropItemGroups).
  • The overview reads the monster level from the monster's attributes. Monsters without a level attribute, such as some destructibles, are treated as level 0.
  • Descriptions are edited in the neutral language (en); existing translations are kept.
  • The new UI strings are added to Resources.resx in English only. Resources.Designer.cs was updated by hand, since it couldn't be regenerated in this environment.

Testing

  • Built src/Web/AdminPanel and src/Startup; the new files produce no errors and no warnings.
  • Ran Startup -demo (in-memory data) and drove the page with Playwright:
    • login, then expanding every section, including the per-monster overview;
    • editing a chance, adding a group and saving;
    • reloading the page: both the new chance and the new group were still there.
  • Not tested against PostgreSQL.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NGrcDosfNzYj4hMQNhfQYP

Allows to configure all drops on one page: general drop settings,
drop chance overview per map, map drop groups (incl. map assignment),
monster specific drops, quest and mini game drop groups, item box drops,
randomly dropped items and item option chances. Groups can be added,
edited and deleted inline.

Based on the initial work of #587.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NGrcDosfNzYj4hMQNhfQYP
…p order

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NGrcDosfNzYj4hMQNhfQYP
@Mosch0512

Copy link
Copy Markdown
Contributor

i love it i will provide a huch spec planning file which is not ready yet but was also about the exact same problem :D

…second row

The overview now shows each monster which is spawned on a map, with the
drop groups which actually apply to it (monster groups plus map groups
which match its level and monster restriction), instead of summing up all
map groups regardless of the monster level.

The possible items of a drop group are shown in a separate row below the
group, so they are no longer cut off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NGrcDosfNzYj4hMQNhfQYP
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NGrcDosfNzYj4hMQNhfQYP
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NGrcDosfNzYj4hMQNhfQYP
@sven-n
sven-n merged commit 0d5973f into master Sep 27, 2026
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants