Skip to content

characterstate: raw game data, game type, backend and stack counts - #68

Merged
ResurrectedTrader merged 1 commit into
mainfrom
characterstate-raw-game-data
Oct 7, 2026
Merged

ResurrectedTrader merged 1 commit into
mainfrom
characterstate-raw-game-data

Conversation

@ResurrectedTrader

Copy link
Copy Markdown
Owner

Summary

Character-state snapshot (sent to the D2BotNG manager) improvements:

  • core: CompatibilityFlags::BypassScope - while alive, IsEnabled() answers false for every flag on the creating thread only; stored states and other threads are untouched; scopes nest.
  • The capture (OnTick, RecordKill) runs under one, so the snapshot carries the game's own data rather than the script-facing view. docs/compatibility.md gains a "Raw game data" section.
  • New additive keys (schemaVersion stays 2): top-level backend, identity.gameType, stackCount on items of advanced stash pages, and the wearer's lastUsedSkill (new Unit::LastUsedSkill()).
  • GetBackendVersion() reads the running game executable's version resource once and returns "LOD/<version>" (1.14.3.71 -> "LOD/1.14d"; previously the fixed "1.14d"), via a new utils::GetModuleVersion. The startup log line names it; analytics' backendVersion follows (docs/analytics.md).

No script-visible change.

Stack

Stacked on #67 (this PR's base branch); it depends on that change and the ones below it. Merge in order; once the base merges, this PR is retargeted to main (automatically when the merged branch is deleted).

Verification

  • build.ps1 Release (Win32, the 1.14d DLL): builds
  • build.ps1 test: 169/169 pass
  • build.ps1 check-format: clean

🤖 Generated with Claude Code

@ResurrectedTrader
ResurrectedTrader added this pull request to stack #78 October 6, 2026 23:12
@ResurrectedTrader
ResurrectedTrader force-pushed the characterstate-raw-game-data branch from d0007f0 to 593d856 Compare October 6, 2026 23:14
@ResurrectedTrader
ResurrectedTrader force-pushed the characterstate-raw-game-data branch 4 times, most recently from 2e41529 to 627ca49 Compare October 7, 2026 07:29
Base automatically changed from legacy-skill-names to main October 7, 2026 07:30
- core: CompatibilityFlags::BypassScope. While one is alive, IsEnabled()
  answers false for every flag on the thread that created it; stored
  states and every other thread are untouched. Scopes nest.
- The character-state capture (OnTick, RecordKill) runs under one, so
  the snapshot sent to the D2BotNG manager carries the game's own data
  rather than the script-facing view. docs/compatibility.md gains a "Raw
  game data" section.
- The snapshot names the game it describes: a top-level `backend`
  (game::GetBackendVersion()) and identity.gameType. Items on an
  advanced stash page carry their stack size as `stackCount`, and the
  wearer its `lastUsedSkill` (a new Unit::LastUsedSkill(); left out when
  there is none). All keys are additive; schemaVersion stays 2.
- GetBackendVersion() reads the running game executable's version
  resource once and formats it "LOD/<version>" (1.14.3.71 ->
  "LOD/1.14d"), via a new utils::GetModuleVersion that parses the
  FileVersion string (falling back to the numeric FILEVERSION). The
  startup log line names it, and analytics' backendVersion follows
  (docs/analytics.md).

Script-visible behaviour: none.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@ResurrectedTrader
ResurrectedTrader force-pushed the characterstate-raw-game-data branch from 627ca49 to 3452b3b Compare October 7, 2026 07:30
@ResurrectedTrader
ResurrectedTrader merged commit 21b4aba into main Oct 7, 2026
1 check passed
@ResurrectedTrader
ResurrectedTrader deleted the characterstate-raw-game-data branch October 7, 2026 07:42
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