Translate campaign editor and scripting docs, update status

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Richard ZinkandClaude Opus 5.5 committed 2026-11-05 14:48:01 +01:00
1 parent 1ef2239fbf
commit 5adf3d0e00
3 files changed
+1201 -808

No files matched your search

+24 -6
View File
@@ -53,19 +53,37 @@ per turn. Fog of war, particles and the camera are local and not part of the sha
- Savegames, tests and the standalone file are unchanged: `cargo test --release` covers the command path
(including "the same actions on both paths build the same world").
## Server and client
- **Relay** (`server/src/netplay.rs`, route `/api/netplay/ws`, proxied by nginx): rooms with a six-letter code,
seats, ready flags, a 100 ms turn clock, checksum forwarding, chat (`all` / `team` channel), pause when a player
is missing (`resume` by side 0), `abort`, `leave` (a started human seat becomes AI-controlled), `set_ai` for
empty seats before the start, and a `ping`/`pong` round trip. The message list is at the top of the file.
- **Client bridge** (`src/lobby.rs`, WebSocket in `www/dc_plugin.js`): `MatchClient` turns orders into JSON and
turns back into commands, tracks the lobby state (rooms, seats, AI seats), chat and the relay ping (`ping_ms`,
shown by the ping debug overlay).
- **Menu**: *Multiplayer* in the title menu with the match list, create (versus or co-op mission), join by code,
seat choice, AI seat toggles for the host, ready/start, chat; the match keeps running in the background while
menus are open.
- **AI seats** (`Game::sync_ai_sides`): empty seats marked by the host and seats of players who left are played
by the simplified rival AI on every client, so they stay deterministic.
- **Co-op** (`Game::coop`): the master sides are allies against the heroes; allied creatures never target each
other, allied ground does not block claims. Co-op campaign matches use `campaign::start_coop_mission`.
## Steps
| # | Step | Status |
|---|---|---|
| A | Simulation per master: gold, mana, research, rooms, hand, flag, traps, payday... per side; up to four masters (red, green, blue, yellow) | built |
| B | All player actions as commands (`Command` + `Game::apply`), single player uses the same path; fixed time step | built |
| C | Server: lobby and match relay over WebSocket (axum), turns, pause on disconnect, AI takeover on leave, chat | next |
| D | Client: *Multiplayer* menu (lobby, create, join, ready, teams), WebSocket bridge in `dc_plugin.js`, chat, gold sending | planned |
| E | Alliances and coop rules, AI masters for free and abandoned slots | planned |
| F | Coop campaign: 20 missions with story (EN/DE) | planned |
| C | Server: lobby and match relay over WebSocket (axum), turns, pause on disconnect, AI takeover on leave, chat, ping | built |
| D | Client: *Multiplayer* menu (lobby, create, join, seats, ready), WebSocket bridge in `dc_plugin.js`, chat, ping | built |
| E | Alliances and co-op rules, AI masters for free and abandoned seats | partly built: co-op alliance and AI seats work; free teams in versus and sending gold are missing |
| F | Co-op campaign: 20 missions with story (EN/DE) | partly built: co-op matches reuse the single player missions that fit the master areas (`coop_mission_indexes`); no own co-op missions or story yet |
Still open on the way to C: heroes and alliances for the new sides (today the hero gate path always leads to
side 0's core, and in free play 2 and 3 are the rivals' sides), and what a match leaves out of savegames.
Still open: teams/alliances in versus, sending gold to allies, own co-op campaign missions with story; still to be
checked against the decisions above: a fallen heart only knocking out that player (who may keep watching), and how
savegames treat a running match.
## Masters and sides