Skip to content

feat(helpers): sync game data constants with client schema 0.41.2115745 - #273

Merged
MarTrepodi merged 1 commit into
developfrom
feat/gamedata-0.41-overcharge
Nov 23, 2026
Merged

MarTrepodi merged 1 commit into
developfrom
feat/gamedata-0.41-overcharge

Conversation

@MarTrepodi

Copy link
Copy Markdown
Collaborator

Closes #216

What changed

Game client 0.41.2115745 added the Overcharge game data bit (252) and folded it into segment 4. Comlink 4.6.0 (spec 0.41.1) is the first public release that accepts it, so the helpers can now follow the client.

  • DataItems.OVERCHARGE (252) requests overchargeDefinition, overchargeStatGroup and overchargePointMissionLookup. Each also has its own alias: OVERCHARGE_DEFINITION, OVERCHARGE_STAT_GROUP, OVERCHARGE_POINT_MISSION_LOOKUP. Constants.get("Overcharge") resolves it.
  • DataItems.SEGMENT4 / Constants.Segment4 change from 3377424842620928 to 7881024469991424, the game's new segment 4 mask.
  • Stat and enum tables: STATS gains UnitStat 62 (Critical Defense, UNIT_STAT_CRITICAL_DAMAGE_NEGATE), ITEM_TYPES gains 36 OVERCHARGE_POINT, and CURRENCY_TYPES gains 51 ARENA_CURRENCY ("Arena Tokens").
  • Docs: the DataItems docstring and docs/api/helpers.md now give the accepted items range as 1 to 253 − 1. A new docs/migration.md v2.9 bullet says that OVERCHARGE and the new SEGMENT4 need Comlink 4.6.0 or later.

Breaking changes

DataItems.SEGMENT4 now includes the Overcharge bit. Comlink releases older than 4.6.0 reject any items value of 252 or above with an HTTP 400, so SEGMENT4 and OVERCHARGE fail against them. Upgrade Comlink to 4.6.0, or request the older collections by their own bits. Code that hard-coded 3377424842620928 keeps working against either release, but leaves out the Overcharge collections.

Type of change

  • New feature (non-breaking change that adds functionality)
  • Breaking change (only for users on Comlink older than 4.6.0, see above)
  • Documentation
  • Tests

Checklist

  • This PR targets the develop branch
  • Commits follow the Conventional Commits convention
  • CHANGELOG.md not edited by hand
  • Docstrings updated for changed public members
  • Docs updated (docs/api/helpers.md, docs/migration.md)
  • Unit tests cover the changes (mocked)
  • Tests pass
  • Ruff linter and formatter pass
  • Type check passes
  • No unrelated changes

Verification

  • uv run ruff check src/ tests/: passed
  • uv run ruff format --check src/ tests/: passed
  • uv run ty check src/swgoh_comlink/: passed
  • uv run pytest tests/ -q: 2105 passed, 31 skipped
  • Live, against a public Comlink 4.6.0 instance (spec 0.41.1, game data 0.41.1), without HMAC:
    • items up to 253 − 1 is accepted, and 253 returns HTTP 400.
    • Through SwgohComlink.get_game_data, DataItems.OVERCHARGE returns the three overcharge* collections, and OVERCHARGE_STAT_GROUP returns the same set.
    • items=DataItems.SEGMENT4 returns exactly the same 24 collections as request_segment=4, Overcharge included.
    • /enums matches the library's ITEM_TYPES and CURRENCY_TYPES tables exactly, and its UnitStat maximum is 62 (UNIT_STAT_CRITICAL_DAMAGE_NEGATE), matching STATS.

🤖 Generated with Claude Code

Client 0.41.2115745 adds the Overcharge game data bit (2**52) and folds it
into segment 4, so DataItems gains OVERCHARGE (aliases
OVERCHARGE_DEFINITION, OVERCHARGE_STAT_GROUP,
OVERCHARGE_POINT_MISSION_LOOKUP), Constants.get("Overcharge") resolves it,
and SEGMENT4 / Constants.Segment4 move to the game's new 7881024469991424.

The stat and enum tables gain UnitStat 62 (Critical Defense,
UNIT_STAT_CRITICAL_DAMAGE_NEGATE), ItemType 36 OVERCHARGE_POINT and
CurrencyType 51 ARENA_CURRENCY ("Arena Tokens").

Requires Comlink 4.6.0 or later, which accepts items up to 2**53 - 1.
Earlier releases reject OVERCHARGE and the new SEGMENT4 with HTTP 400.

Closes #216

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added documentation Improvements or additions to documentation code testing labels Nov 23, 2026
@MarTrepodi
MarTrepodi merged commit 3f54d7e into develop Nov 23, 2026
12 checks passed
@MarTrepodi
MarTrepodi deleted the feat/gamedata-0.41-overcharge branch November 23, 2026 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code documentation Improvements or additions to documentation testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant