Add read-only game and league regulations to editor 0.5.2 (by Codex)
This commit is contained in:
1 parent
221478b629
commit
9f1928bd9e
27 files changed
+993
-22
No files matched your search
+26
-7
@@ -1,10 +1,10 @@
|
||||
# OpenBMH Editor 0.5.1
|
||||
# OpenBMH Editor 0.5.2
|
||||
|
||||
Der eigenständige, native Editor verwendet **RmlUI, SDL2 und OpenGL**. Er bearbeitet Startdatenbanken, keine laufenden Spielstände. Das Spiel und seine Classic-Prüfung bleiben unverändert. Editor 0.5.1 hat eine eigene Versionsreihe und den Release-Tag `editor-v0.5.1`; die Spielversion ist 0.2.0.
|
||||
Der eigenständige, native Editor verwendet **RmlUI, SDL2 und OpenGL**. Er bearbeitet Startdatenbanken, keine laufenden Spielstände. Das Spiel und seine Classic-Prüfung bleiben unverändert. Editor 0.5.2 hat eine eigene Versionsreihe und den Release-Tag `editor-v0.5.2`; die Spielversion ist 0.2.0.
|
||||
|
||||
## Starten und Daten öffnen
|
||||
|
||||
Das vollständige Paket `OpenBMHEditor-0.5.1-<plattform>.zip` entpacken und `OpenBMHEditor.exe` (Windows) beziehungsweise `OpenBMHEditor` (Linux/macOS) starten. `assets/editor` muss beim Programm bleiben. Auf macOS kann die unsignierte Anwendung über **Rechtsklick → Öffnen** gestartet werden. Eine Signatur/Notarisierung ist nicht Bestandteil dieser Version. `OpenBMHEditor --version` zeigt die Editorversion ohne Grafikstart.
|
||||
Das vollständige Paket `OpenBMHEditor-0.5.2-<plattform>.zip` entpacken und `OpenBMHEditor.exe` (Windows) beziehungsweise `OpenBMHEditor` (Linux/macOS) starten. `assets/editor` muss beim Programm bleiben. Auf macOS kann die unsignierte Anwendung über **Rechtsklick → Öffnen** gestartet werden. Eine Signatur/Notarisierung ist nicht Bestandteil dieser Version. `OpenBMHEditor --version` zeigt die Editorversion ohne Grafikstart.
|
||||
|
||||
**Öffnen** bietet OBW-Dateien und entpackte Welten an. **BMH / FLTD importieren** liest einen Ordner mit einer unterstützten BMH- oder Football-Limited-Installation durch den bestehenden Konverter. Das Original wird nicht überschrieben. Eine bestehende Classic-OBW wird zunächst überprüft und dann in eine bearbeitbare Editorwelt übernommen.
|
||||
|
||||
@@ -63,7 +63,24 @@ Der MCP-Server ist standardmäßig aktiviert und bindet ausschließlich `127.0.0
|
||||
|
||||
Implementiert ist [MCP Streamable HTTP 2025-11-25](https://modelcontextprotocol.io/specification/2025-11-25/basic/transports), mit Aushandlung von 2025-06-18; JSON-Antworten, ohne optionale SSE-Sitzungen. Neuere MCP-Versionen werden nicht als unterstützt beworben. Der Server prüft Token, Host und gegebenenfalls Origin. Oberfläche und Agent bearbeiten dieselbe Welt, verwenden dieselbe Validierung und dieselbe Undo-Historie. Für konkurrierende Änderungen `expected_revision` aus `editor_info`/`editor_get` mitsenden.
|
||||
|
||||
Werkzeuge: `editor_info`, `editor_open`, `editor_new`, `editor_list`, `editor_compare`, `editor_get`, `editor_apply`, `editor_rules`, `editor_validate`, `editor_history`, `editor_save`, `editor_undo`, `editor_redo`, `editor_roster_move`, `editor_roster_swap`, `editor_roster_order`, `editor_review_resolve`, `editor_image_import`, `editor_image_edit`, `editor_image_preview`, `editor_image_export`. Die eingeblendeten Tools enthalten Parameterschemata und Beschreibungen. Öffnen einer anderen Welt verwirft ungespeicherte Änderungen nur mit `discard: true`.
|
||||
Werkzeuge: `editor_info`, `editor_open`, `editor_new`, `editor_list`, `editor_compare`, `editor_regulations`, `editor_get`, `editor_apply`, `editor_rules`, `editor_validate`, `editor_history`, `editor_save`, `editor_undo`, `editor_redo`, `editor_roster_move`, `editor_roster_swap`, `editor_roster_order`, `editor_review_resolve`, `editor_image_import`, `editor_image_edit`, `editor_image_preview`, `editor_image_export`. Die eingeblendeten Tools enthalten Parameterschemata und Beschreibungen. Öffnen einer anderen Welt verwirft ungespeicherte Änderungen nur mit `discard: true`.
|
||||
|
||||
## Spiel- und Ligaregeln ansehen
|
||||
|
||||
**Regelwerk** zeigt Auf- und Abstieg, Ziel-Ligen, Relegation und internationale
|
||||
Qualifikation. Wettbewerbe lassen sich durchsuchen und nach Land filtern.
|
||||
**Spielregeln** zeigt die übernommenen Einträge aus `world/rules.json`, etwa
|
||||
Wertebereiche, Kreditfaktoren, Trainingslager und Classic-Verfahren. Phasen und
|
||||
weitere Originalfelder sind ebenfalls einsehbar. Dieser Bereich ist vollständig
|
||||
schreibgeschützt; er verändert weder Welt noch Undo-Historie.
|
||||
|
||||
Explizite OBW-Regeln werden direkt dargestellt. Bei Classic-Importen kennzeichnet
|
||||
die Ansicht die versionierten Classic-Verfahrensregeln. Parallel-Ligen behalten
|
||||
Meister plus bedingte Relegationsplätze; die unterste Liga nutzt den Nachrückerpool.
|
||||
Internationale Plätze folgen dem ursprünglichen Champions-League-/UEFA-/
|
||||
Pokalsieger-Cup-Verfahren. Nicht festgelegte Regeln bleiben als solche sichtbar.
|
||||
Das sind keine heutigen UEFA-Regeln und kein neuer Saison-Simulator.
|
||||
`editor_regulations` bietet dieselben Informationen schreibgeschützt über MCP.
|
||||
|
||||
## Kompilieren
|
||||
|
||||
@@ -71,8 +88,8 @@ Voraussetzungen entsprechen dem Hauptprojekt: C++20-Compiler, Git, CMake ≥ 3.2
|
||||
|
||||
```sh
|
||||
cmake -S . -B build-editor -G Ninja -DCMAKE_BUILD_TYPE=Release -DOPENBMH_BUILD_EDITOR=ON
|
||||
cmake --build build-editor --target openbmh_editor editor_core_tests editor_comparison_tests --parallel 2
|
||||
ctest --test-dir build-editor -C Release -R '^editor_(core_tests|comparison_tests|version)$' --output-on-failure
|
||||
cmake --build build-editor --target openbmh_editor editor_core_tests editor_comparison_tests editor_regulations_tests --parallel 2
|
||||
ctest --test-dir build-editor -C Release -R '^editor_(core_tests|comparison_tests|regulations_tests|version)$' --output-on-failure
|
||||
```
|
||||
|
||||
macOS ARM zusätzlich bei der Konfiguration: `-DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0`. Unter Windows das Argument nach `-R` ohne einfache Shell-Anführungszeichen verwenden. Der Editor wird beim normalen Spiel-Build standardmäßig nicht mitgebaut.
|
||||
@@ -95,8 +112,10 @@ Extract the complete package and run **OpenBMHEditor**. Open an OBW archive or a
|
||||
|
||||
Use **Comparison** to inspect sortable player, team and league ratings and per-season salaries. Select attribute columns and filter by country, league, club or attribute system. Group ratings are player-weighted means; salary totals and means use known player contracts only and explicitly flag incomplete coverage. Missing values remain unknown. The read-only MCP tool `editor_compare` returns the same data.
|
||||
|
||||
Use **Regulations** to inspect promotion, relegation, playoffs, international qualification and stored game rules. Explicit OBW declarations and versioned Classic policies are distinguished; missing rules stay unspecified. This page and `editor_regulations` are read only.
|
||||
|
||||
The editor retains full squads, original image data, source claims and unknown extensions. Its 24-player view does not remove players. Image import offers normalized crop, arbitrary rotation and mirroring; re-editing uses the preserved source. Classic portraits keep their frozen appearance recipe. Unsupported editing areas are preserved rather than replaced.
|
||||
|
||||
In **Options**, switch the interface to **English**, choose one of the three themes, and enable/disable the integrated local MCP server. **Copy connection** provides the authenticated configuration. The server defaults to loopback port 8765; use port 0 for a free port. GUI and MCP share the same world, validation and undo history. It supports MCP Streamable HTTP 2025-11-25/2025-06-18 and optional stdio mode. Use `expected_revision` for concurrent edits.
|
||||
|
||||
Build with the three commands above, including `-DOPENBMH_BUILD_EDITOR=ON`. The native application requires OpenGL 3.3 (macOS 4.1) and the platform development dependencies documented in the main README. Editor 0.5.1 is unsigned and does not bundle any real-world dataset or proprietary game assets.
|
||||
Build with the three commands above, including `-DOPENBMH_BUILD_EDITOR=ON`. The native application requires OpenGL 3.3 (macOS 4.1) and the platform development dependencies documented in the main README. Editor 0.5.2 is unsigned and does not bundle any real-world dataset or proprietary game assets.
|
||||
@@ -469,6 +469,22 @@ A resolver looks a key up in the active packs by priority (§9.5), then in the w
|
||||
|
||||
Asset metadata sits next to the files in `assets/index.json`: key, files per size, author, source and licence (required).
|
||||
|
||||
**Optional visual defaults (1.1).** A world may set
|
||||
`manifest.presentation: "assets/presentation.json"`. The referenced document has
|
||||
`schema: "asset-presentation@1"`, an optional `player_photo_fallback` asset key,
|
||||
`trophy_fallback` (normally `asset:comp/generic/trophy`), and
|
||||
`youth_photos: {assets: [<photo keys>], selection: "random-on-creation",
|
||||
fallback: <photo key>}`. All keys resolve through the normal asset index. A
|
||||
client supporting youth creation chooses once using its saved game RNG and
|
||||
persists the selected key; it does not reroll a face on display or rename. This
|
||||
document supplies pictures, never player records, ratings or generation rules.
|
||||
Readers without this optional feature retain it and use their existing visual
|
||||
fallbacks. The current editor preserves it without generating youth players.
|
||||
An explicitly indexed player `photo` is displayed before composing a retained
|
||||
`appearance` recipe. A visual overlay can therefore keep Classic appearance and
|
||||
all game data intact while displaying a supplied photo or silhouette. Sealed
|
||||
Classic rendering and runtime capabilities are unaffected.
|
||||
|
||||
**Player pictures** (`asset:player/<key>/photo`) resolve in this order:
|
||||
|
||||
1. A photo from an active pack.
|
||||
|
||||
@@ -126,6 +126,27 @@ the current edition's selection and qualification algorithm, including FA Cup
|
||||
qualifying/proper rounds and League Cup for English data, or indoor/Masters for
|
||||
German data. The generic `format` field alone is insufficient to execute a stage.
|
||||
|
||||
For inspection, `classic-season-entrants@1` assigns each first-division champion
|
||||
to the Champions League. A holder in that league also qualifies (or the
|
||||
runner-up if already champion). Domestic cup winners, with finalists as
|
||||
replacements, enter the Cup Winners' Cup. Title-holder overlap affects the
|
||||
remaining allocation. The regular UEFA-Cup quotas are `[4,4,4,4,3]` for source
|
||||
league indices `[0,5,6,7,8]`, taking the next unqualified clubs by rank. Foreign
|
||||
cup representatives follow the Classic selection procedure. The historical
|
||||
`x-legacy.europe_places` field is a prediction/colouring value, not that quota.
|
||||
|
||||
The versioned Classic ladder uses its first four domestic groups. Relegation
|
||||
counts come from each league's `x-legacy.relegation_places`. A single lower
|
||||
league supplies the corresponding top-ranked clubs; parallel lower leagues
|
||||
supply champions plus winners of the Classic playoffs. Without that playoff
|
||||
result only the champions are exchanged. The last domestic group draws from
|
||||
the newcomer pool, never a foreign league named by an unused `below` entry.
|
||||
License withdrawals and the Classic protection of a human manager at the
|
||||
bottom tier can affect the actual result. Foreign Classic leagues have no
|
||||
regular promotion/relegation. These are compatibility policy summaries, not
|
||||
independent typed modern rule declarations or permission to simulate them in
|
||||
the editor.
|
||||
|
||||
`classic-calendar@1` retains the complete source day table and bindings.
|
||||
`classic-season-calendar@1` applies options, season cycle, weekday alignment and
|
||||
leap-year behavior using the Classic calendar algorithm at runtime. Cup series
|
||||
|
||||
@@ -83,6 +83,33 @@ round to the nearest minor unit. Attribute means separately report their sample
|
||||
sizes in `attribute_counts`. No current date, invented contract or foreign-club
|
||||
strength-band interpretation is substituted for missing data.
|
||||
|
||||
### Read-only regulations (Editor 0.5.2)
|
||||
|
||||
The `regulations` command / `editor_regulations` MCP tool exposes the same
|
||||
read-only projection as the Regulations page. It accepts `language` (de/en),
|
||||
`search`, `nation` and `competition`. It returns `items`, all preserved `rules`,
|
||||
the world date, `read_only: true` and the session revision. It creates no table,
|
||||
edits, undo entries or runtime entrants.
|
||||
|
||||
Each item retains its full `record` and `stages`. Explicit `movement` entries
|
||||
retain rank ranges and destination references; tier comparisons label promotion
|
||||
and relegation, participant roles label playoffs. Competition/stage `slots`
|
||||
retain their full selector, fallback, explicit destination and phase; they are
|
||||
visible on both the source and destination competition. Fixed participant lists
|
||||
are not reinterpreted as qualification rules.
|
||||
|
||||
Imported `classic_runtime.qualifications: classic-season-entrants@1` and
|
||||
`legacy_ladder` records permit a labelled presentation of the existing Classic
|
||||
policy, documented in [classic-v1](classic-v1.md). Explicit declared rules take
|
||||
precedence. Unknown rules stay unspecified; the editor never substitutes modern
|
||||
UEFA quotas or infers qualification from historical colouring fields. This
|
||||
presentation registry does not implement a new season engine.
|
||||
|
||||
Optional `manifest.presentation` references the `asset-presentation@1` visual
|
||||
defaults described in [OBW §9.2](../OBW.md#92-resolution-and-image-formats).
|
||||
Youth pools, silhouette and generic trophy keys remain indexed assets. They are
|
||||
preserved across editor saves, independent of Classic source recipes or seals.
|
||||
|
||||
## Sources, conflicts and images
|
||||
|
||||
- `x-source/` can contain unchanged or losslessly gzipped normalized source
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<!-- SPDX-License-Identifier: GPL-3.0-only -->
|
||||
# Editor 0.5.2: read-only regulations
|
||||
|
||||
Native 1440×900 SDL2/OpenGL/RmlUI captures on Linux with software OpenGL. All
|
||||
records and artwork are synthetic. No installation, real club/player data,
|
||||
savegame, private archive or user profile is included.
|
||||
|
||||
| View | Capture |
|
||||
|---|---|
|
||||
| Before: competition inspector, released 0.5.1 | [Before](before-competitions-0.5.1.png) |
|
||||
| Promotion/relegation, Midnight Glass / German | [After](rules-midnight-de.png) |
|
||||
| International qualification and replacement | [Qualification](qualification-midnight-de.png) |
|
||||
| Preserved game rule and attribute ranges | [Game rules](game-rules-midnight-de.png) |
|
||||
| Silver Glass / English | [Silver](rules-silver-en.png) |
|
||||
| Matchday / German | [Matchday](rules-matchday-de.png) |
|
||||
|
||||
Create the display fixture using the editor's own synthetic demo:
|
||||
|
||||
```sh
|
||||
python3 docs/qa/editor-regulations/make_fixture.py PATH/TO/OpenBMHEditor TEMP/synthetic.obw
|
||||
OpenBMHEditor --open TEMP/synthetic.obw --page regulations
|
||||
```
|
||||
|
||||
The recipe adds synthetic upper/lower leagues, explicit rank ranges, a playoff,
|
||||
an international qualification selector and fallback. It is a display fixture,
|
||||
not a playable season. Options selects the language/theme. Scroll the right
|
||||
panel to qualification; select **Game rules** and `demo@1` to inspect the stored
|
||||
attribute ranges. Before was captured with the same fixture in the 0.5.1
|
||||
competition inspector, which had no dedicated rule view.
|
||||
|
||||
Validation: existing editor core/MCP tests, comparisons, version and new
|
||||
regulations tests; native mouse/keyboard integration and package-boundary
|
||||
checks. The regulations tests cover declared movement, both slot locations,
|
||||
explicit destinations, fallback preservation, language/filtering, parallel
|
||||
Classic champions/playoffs, the bottom newcomer pool, foreign closed leagues,
|
||||
the named UEFA quotas, declared-rule precedence, null extensions and unchanged
|
||||
revision/history. The GUI test switches both rule tabs, searches and verifies
|
||||
the shared read-only MCP projection without changing the world.
|
||||
|
||||
Actual Diamond source identity, unchanged game data, images, round-trip checks
|
||||
and captures are recorded separately in the private content repository.
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 187 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 152 KiB |
@@ -0,0 +1,54 @@
|
||||
#!/usr/bin/env python3
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
"""Make a synthetic display fixture; no real-world or installed game data."""
|
||||
import argparse
|
||||
import json
|
||||
from pathlib import Path
|
||||
import subprocess
|
||||
import tempfile
|
||||
import zipfile
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument('editor', type=Path)
|
||||
parser.add_argument('output', type=Path)
|
||||
args = parser.parse_args()
|
||||
with tempfile.TemporaryDirectory(prefix='obw-rule-fixture-') as temporary:
|
||||
root = Path(temporary)
|
||||
settings = root / 'settings.json'
|
||||
settings.write_text('{"mcp_enabled":false}')
|
||||
subprocess.run([str(args.editor.resolve()), '--headless', '--demo', '--settings', str(settings),
|
||||
'--output', str(root / 'demo.obw')], check=True)
|
||||
with zipfile.ZipFile(root / 'demo.obw') as source:
|
||||
docs = {file: source.read(file) for file in source.namelist()}
|
||||
comps = json.loads(docs['world/competitions.json'])
|
||||
league = comps['items'][0]
|
||||
league.update({'tier': 2, 'stages': [{'id': 'regular', 'format': 'league', 'teams': 18, 'legs': 2,
|
||||
'points': {'win': 3, 'draw': 1, 'loss': 0}, 'tiebreakers': ['points', 'goal_difference', 'goals_for']}],
|
||||
'movement': [{'ranks': [1, 2], 'to': 'comp:upper'},
|
||||
{'ranks': [3], 'to': 'comp:playoff', 'role': 'challenger'},
|
||||
{'ranks': [16, 18], 'to': 'comp:lower'}]})
|
||||
clubs = json.loads(docs['world/clubs.json'])
|
||||
for i in range(16):
|
||||
club_id = 'club:fixture-' + str(i)
|
||||
clubs['items'].append({'id': club_id, 'name': 'Testverein ' + str(i + 1), 'type': 'club',
|
||||
'nation': 'nation:de', 'competition': 'comp:demo'})
|
||||
league['members'].append(club_id)
|
||||
for code, title, tier in [('upper', 'Oberliga (Demo)', 1), ('lower', 'Unterliga (Demo)', 3)]:
|
||||
comps['items'].append({'id': 'comp:' + code, 'name': title, 'nation': 'nation:de', 'type': 'league',
|
||||
'tier': tier, 'stages': [{'id': 'regular', 'format': 'league', 'teams': 18}]})
|
||||
comps['items'].append({'id': 'comp:playoff', 'name': 'Relegation (Demo)', 'type': 'cup'})
|
||||
comps['items'].append({'id': 'comp:international', 'name': 'Internationaler Demo-Pokal',
|
||||
'type': 'club_international', 'slots': [{'from': 'comp:demo', 'ranks': [1, 4], 'stage': 'main',
|
||||
'fallback': {'from': 'comp:upper', 'next_unqualified': True}}]})
|
||||
for key, value in [('world/competitions.json', comps), ('world/clubs.json', clubs)]:
|
||||
docs[key] = json.dumps(value, ensure_ascii=False).encode()
|
||||
args.output.parent.mkdir(parents=True, exist_ok=True)
|
||||
with zipfile.ZipFile(args.output, 'w', zipfile.ZIP_DEFLATED) as output:
|
||||
for file, data in docs.items():
|
||||
output.writestr(file, data)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 165 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 139 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 158 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 147 KiB |
@@ -1,5 +1,21 @@
|
||||
<!-- SPDX-License-Identifier: GPL-3.0-only -->
|
||||
# OpenBMH Editor 0.5.1
|
||||
# OpenBMH Editor 0.5.2
|
||||
|
||||
Adds **Regulations / Regelwerk**, a read-only view of game and league rules.
|
||||
Inspect promotion/relegation places and destinations, playoff conditions,
|
||||
international qualification selectors and replacement rules. Search competitions
|
||||
and filter by country; inspect preserved game-rule records and stage details.
|
||||
Both interface languages and all three themes are supported. The read-only MCP
|
||||
tool `editor_regulations` returns the same projection.
|
||||
|
||||
Explicit OBW declarations take precedence. Imported worlds show the named
|
||||
Classic ladder and qualification policy, clearly labelled. The parallel third
|
||||
divisions retain champion-plus-playoff promotion; the bottom tier uses its
|
||||
newcomer pool. Historical display/colouring quotas are not reinterpreted as
|
||||
European qualification rules. Undeclared rules stay unspecified.
|
||||
This adds no season simulation or rule editing.
|
||||
|
||||
## Editor 0.5.1
|
||||
|
||||
Adds **Ratings & salaries / Wertevergleich**: sortable player, team and league
|
||||
overviews, searchable and filterable by country/league/club and attribute system.
|
||||
|
||||
Reference in new issue
Block a user