(by Codex) Preserve long-career player counts and title history

This commit is contained in:
Codex committed 2026-11-01 18:15:55 +01:00
1 parent 8e2f491d5e
commit 30843fc9f3
23 files changed
+491 -47

No files matched your search

+20
View File
@@ -112,3 +112,23 @@ boundaries. Post-match overview dismissal owns its full mouse gesture, including
release after pointer movement, before the following calendar decision can open.
The pitch uses each edition's original position-distance tables, atlas swatches
and pointer bitmap for placement feedback; this display state is not serialized.
OpenBMH deviates from the original: cumulative human-club appearances, goals and
assists have optional 64-bit counters. Original byte/word fields keep their
modulo representation for gameplay/layout compatibility; roster projections use
the wider values. Tracking begins with the surviving legacy values, so high bits
already lost in an imported save cannot be recovered. A new arrival clears the
previous squad occupant's totals. Club promotion remaps counter ownership.
Title-holder and cup-winner lists retain all observed seasons in the same optional
OpenBMH save extension. The Original nine-by-fifty table remains a rolling window.
The archive captures that window before it shifts, and the title list can page
through the archived rows. Late legacy imports start with their surviving fifty
seasons; earlier winners are unknown and are not fabricated. Stored winner names
are historical snapshots, so later renaming and promotion cannot change them.
The separate manager-achievements graph retains its Original fifty-season view.
These records use a versioned `OBMHEXT1` extension after the Original name pools;
see [save format](formats/LONG_CAREER.md). Original programs and older OpenBMH
writers do not preserve this archive. Keep an OpenBMH backup when exchanging
careers with those writers. The native calendar still has its existing signed
16-bit season limit; this patch does not claim an unlimited calendar.
+34
View File
@@ -0,0 +1,34 @@
# Optional long-career statistics and title archive
The existing `OBMHEXT1` container can contain block `0x4f424c43` (OpenBMH-owned,
not a guest memory address). Original state blocks and all four name pools retain
their sizes and ordering. No extension is emitted until an archive is needed.
Payload integers use little-endian encoding:
| Field | Encoding |
|---|---|
| Payload version | u32, currently 1 |
| Player/club record count | u32 |
| Known season record count | u32 |
| Each player/club record | u32 key, then six u64 counters |
| Each season record | u32 absolute zero-based season, then nine names |
| Each name | u16 byte length followed by Original-encoding bytes |
The player key is `(runtime_club << 12) | player_id`. The six counters are league,
national-cup and European-cup appearances, total appearances, goals and assists.
Club swaps remap keys; fresh squad entry initialization resets the new player's
club record. The Original byte/word fields continue to update normally.
Season names follow the nine Original title categories. An empty name is a known
season with no holder for that category. Missing season records are unknown,
not an assertion that no competition was held. Names are owned snapshots at the
award/capture time, independent of future club-number and name-pool changes.
A legacy import contributes only its surviving window; no earlier information
is inferred. The title list uses the earliest known absolute season when paging
and compensates for the native rolling-window year offset.
The decoder rejects unknown versions, truncated payloads, invalid/duplicate
identities and seasons, duplicate blocks and trailing bytes before publishing
archive state. Season records remain within the native signed 16-bit calendar
range. The surrounding FBM checksum covers the extension. Older writers may
discard extensions; Original-game roundtrip preservation is not promised.