Add "Hidden icons" rules, applied at draw time - #9
Open
LostPoE wants to merge 1 commit into
Open
Conversation
Both existing ways to suppress an icon run at icon *creation*: an entry in ignored_entities.txt or in the hardcoded MinimapIcons.Ignored list makes IconsBuilder.SkipIcon return before an icon object exists. That has two consequences. An exclusion cannot be undone without an area change, because ReadIgnoreFile only runs on AreaChange and the icon was never built; and the hardcoded list cannot be undone at all without editing the plugin. There is also no way to add one from the UI. This adds a ContentNode of rules to the settings menu, each with a label, an unanchored metadata regex, and its own Hide toggle. They are applied in the draw loop instead, so toggling one takes effect on the next frame in both directions, and an unwanted icon can be silenced without a restart or a rebuild. The list ships empty, so behaviour is unchanged unless a rule is added. Render() runs every frame, so the matching is kept cheap: regexes compile once per pattern, path -> hide answers are cached, and the cache is invalidated by a per-frame integer hash of the rule set rather than by rebuilding a string. A pattern that fails to compile is logged once and skipped, since a half-typed regex is a normal state while editing the field. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Both existing ways to suppress an icon run at icon creation. An entry in
ignored_entities.txt, or in the hardcodedMinimapIcons.Ignoredlist, makesIconsBuilder.SkipIconreturn before an icon object exists:Two consequences:
ReadIgnoreFileonly runs onAreaChange, and even after a reload the icon was never built, so there's nothing to draw.MinimapIcons.Ignoredcan't be undone at all without editing the plugin and rebuilding.There's also no way to add an exclusion from the UI — you have to find the metadata path, locate the right file, and change zone.
What sent me looking: a Fortress map with ~30
Metadata/Monsters/LeagueHeist/Robot/LightBot/MapLightBotin it. They're hostile white monsters, soMonsterIcongives them the same large red circle as a real pack, but they're ambient props you never fight — enough dots to make the map hard to read.Change
A
ContentNode<IconIgnoreRule>in the settings menu. Each row is a label, an unanchored metadata regex, and its ownHidetoggle. Matching runs in the draw loop, right after the existingIgnoredcheck:Because it's applied at draw time rather than at creation, a toggle takes effect on the next frame in both directions — an unwanted icon can be silenced, and brought back, without a restart or a rebuild.
The list ships empty, so behaviour is unchanged unless a rule is added. The change is purely additive: 156 insertions, no deletions, nothing existing touched.
Performance
Render()runs every frame, so the matching is kept cheap:path -> hideanswers are cached, so a breach with hundreds of entities behind a handful of distinct paths costs one dictionary hit per icon.Notes
IconIgnoreRule.ToString()names the row in the settings UI, which otherwise falls back toobject.ToString()and shows every row asMinimapIcons.IconIgnoreRule. It ends in###so the ImGui id stays stable while the visible label changes, otherwise the row collapses itself as you type — same idiom used forContentNoderows elsewhere in the ecosystem.Testing
Built against ExileCore on
net10.0-windows, 0 warnings, 0 errors, and run in-game. Verified with a temporary per-frame dump of every icon that survives the filter chain:Metadata/Monsters/RockGolem/→ 91 icons drawn, noRockGolemSummoned, whileChaosElementalSummoned,LightningGolemSummonedandFireElementalSummonedall still drew. Sibling paths unaffected.RockGolemSummonedback.🤖 Generated with Claude Code