Repository navigation
feat: a live game feed, and an XP tracker that updates after every fight - #44
Merged
Merged
Conversation
…nly watched XP windows
Levels have no cap in the game, and the decoder is strict: a level above 999 would have made the account's live feed unavailable. A misread message still fails the end-of-payload check.
…oll as the fallback
A game update that changes only the battle result leaves login and scene decoding, so the feed stayed active with no results and XP/hr decayed to 0. Two compared windows in a row with polled XP and no results now mark the feed unavailable.
…r a live stretch - EndLive(at) stores the stretch since the last fight as watched time that gained nothing, so XP/hr doesn't jump back up after a disconnect or F5. - ResetRate/ResetAll(now) move a live account's mark to the press. - The rebase poll uses the live progress as its baseline when the poll lags the last fight, so the next poll doesn't count that fight again. - A poll while live no longer reports a partial interval.
…m crashing the app Results in one frame share its time, so the session dropped every one but the first. The feed now sends their sum with the last result's state. A throwing call queued to the UI thread is swallowed, unlogged, like the worker's.
…nd start the count over after a skipped window A stale miss from before a level-up, a reconnect or the feed switching back on could pair with a later ordinary timing miss, and a class the game spells differently from the website read as every fight missing. Either one switched the live feed off for every account.
… last fight's time The panel showed the last poll's time and a rate worked out only at polls and fights, so a live tracker looked once-a-minute. The rate shown (panel, cards, xp.get) is now the rate at the time of asking, the panel redraws every 5 s while an account is live, and the row shows the last fight's time. Plugins still get xp.updated only for a poll, a fight or a reset, not for every redraw.
…e tracker redraws The status now reads from the rate shown beside it, going off live keeps the rate that had fallen with the idle time, the 5-s redraw skips while a mouse button is down, and the timer stops at shutdown.
The rows are rebuilt every second while an account is live, which disconnected an open menu from its row, so Reset XP/hr did nothing. The menu now takes its account when it opens.
CodySimonds65
force-pushed
the
feature/live-game-feed-public
branch
from
October 7, 2026 04:33
c65e0fe to
d822948
Compare
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.
FourFold now reads each fight as it happens, so the XP tracker, the XP calc card, the overlay cards and plugins update after every fight instead of once a minute. The once-a-minute profile read stays as the fallback, so everything keeps working when the live feed is off or a game update breaks it.
The live game feed
The XP tracker goes live
5·L·(L+1)curve. The rate counts XP over real time, so it falls between fights. The panel redraws once a second and shows the last fight's time.Plugin API 3
battle.onStarted,onEnded,onResultandonSkillResult;location.getandonChanged;session.onLoggedInandonDisconnected;live.getStatusandonStatusChanged. Plugins get only the fields listed inPLUGIN_AUTHORS.md, for the user's own accounts.xp.getfollows each fight while the feed watches the account.xpPerHouris the rate at the time of asking.updatedAtandisStalestill describe the last read, andxp.onUpdatedfires on a read, a fight or a reset.PLUGIN_AUTHORS.mddocuments all of it. The template'sfourfold.d.tsand the first-party plugins are updated in their own repositories, and their hub updates follow this release.Testing