Skip to content

Detect local player & filter party-member level events (auto-pin via 'You have entered')#7

Draft
PrEvIeS wants to merge 1 commit intoezbooz:mainfrom
PrEvIeS:upstream-pr/owner-detection
Draft

Detect local player & filter party-member level events (auto-pin via 'You have entered')#7
PrEvIeS wants to merge 1 commit intoezbooz:mainfrom
PrEvIeS:upstream-pr/owner-detection

Conversation

@PrEvIeS
Copy link
Copy Markdown

@PrEvIeS PrEvIeS commented May 5, 2026

Summary

Adds a small owner-detection state machine so Discord presence stays attached to the local player when other party members are in the same instance. Currently any party member's : <name> (<class>) is now level <n> line will overwrite the local player's presence — see README "Detect which player started the script (avoid party-conflict mis-detection)".

How it works:

  • Listen for : You have entered <area>. (a per-client event — only the local player's Client.txt records it) → open a fresh "AREA_ENTERED" window.
  • If a <name> has joined the area. line fires inside that window → INVALIDATE it (we can't disambiguate the next level event).
  • Otherwise, the first : <name> (<class>) is now level <n> after You have entered belongs to the local player → PIN that name. All subsequent level events for other names are ignored until the next area entry.
  • POE2_CHARACTER_NAME env var short-circuits the state machine to PINNED on first area entry — useful if you tend to enter zones already in a party.

Diff

main.py: +38 / -0. Two new compiled regexes, three module-level state vars, a few branches at the top of the line-processing loop. No new dependencies, no other files touched. Regexes are taken verbatim from klayveR/poe-log-monitor resource/events.json which has been parsing PoE1 client logs reliably for years (PoE2 inherits the same line format).

Test plan

  • Solo: enter zone → level up → presence updates with my name (state goes UNKNOWN → AREA_ENTERED → PINNED).
  • In party: enter zone alone → party member joins → party member levels → presence does NOT update (window INVALIDATED).
  • In party with override: POE2_CHARACTER_NAME=MyName set → enter zone with party already there → presence updates only on MyName level events.
  • Pinned then party joins: party member joining mid-zone after pin keeps the pin and logs a warning (does not overwrite).

Notes

More features in this series follow (AFK status, background tray launcher) — happy to flag intent so you can signal scope appetite before I open the next one.

…vel events

Tracks the local player by listening for `: You have entered <area>.` and
the next level event in that window, then ignores subsequent `: <name>
(<class>) is now level <n>` lines for any other character. Party joins
inside an unpinned area window mark the window INVALIDATED so we don't
mis-attribute a party member's level event to the local player. Setting
`POE2_CHARACTER_NAME` short-circuits the state machine to PINNED on first
area entry.
PrEvIeS added a commit to PrEvIeS/Path-Of-Exile-2-RPC that referenced this pull request May 5, 2026
…in EN/RU/UA

The 4-PR upstream campaign (panvex-b6p) is feature-complete on this stacked
branch. Updates the user-facing READMEs and CLAUDE.md to reflect the four
shipped capabilities:

- Official PoE2 client support (Steam + PathOfExile.exe)
- Owner auto-pin (party-mate disambiguation)
- AFK / DND status with small-image override + restore
- Background tray service + Windows Startup shortcut

README.md / README.ru.md / README.ua.md
- Add explicit Features bullets for all four capabilities.
- Flip the To-Do checklist (now 5/5 complete).
- RU/UA translations get the new "Run as a background service" section
  to match the English README that was added during PR-4.

CLAUDE.md
- Replace the four open-work items with checked-off equivalents and a
  pointer to the upstream draft PRs (ezbooz#6, ezbooz#7, ezbooz#8, ezbooz#9). Notes that the
  remaining work is the end-of-campaign Windows live-smoke pass.
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.

1 participant