play-test copies are temporary (levels/.playtest, removed and mod selection restored when the game ends), add to llamamod and keep option in the editor, remove level and open levels folder in the launcher plus --remove-level, unique level mod ids for files differing only in case, esc leaves the waypoint tool
This commit is contained in:
1 parent
2386443fac
commit
1c8b766454
24 files changed
+823
-87
No files matched your search
@@ -15,17 +15,26 @@ seconds after the game window opens, and **Escape** quits back to the editor.
|
||||
| Play boots straight into the level | Level menu (check) | off = old behaviour (main menu, map cursor) |
|
||||
| Escape quits the play-test | Level menu (check) | boot mod option `quitOnEscape` |
|
||||
|
||||
* Run: `PlayTest.build` (built-in, background) → the project snapshot is written to
|
||||
`<data>/levels/<stem>.llamalevel` → the user's **active** mods (others on the same WAD and Test
|
||||
* Run: `PlayTest.build` (built-in, background) → the project snapshot is written to the
|
||||
**temporary** `<data>/levels/.playtest/<stem>.llamalevel` (mod id `playtest-<stem>`; with
|
||||
"Keep play-tested level in LlamaMod" on: `<data>/levels/<stem>.llamalevel` as before) → the user's **active** mods (others on the same WAD and Test
|
||||
World on chapter 1 turned off) + the level mod become `enabledMods`; `boot-to-level` is applied
|
||||
**in addition** (not stored in `enabledMods`) with world/chapter of the project, slot
|
||||
(Preferences, default 3), `logos=true`, `quitOnEscape`, `start` → save slot unlocked up to the
|
||||
level → `GameLauncher.launch`.
|
||||
* **Restore**: a daemon thread polls `GameLauncher.isRunning()` every 2 s; when the game has
|
||||
ended it re-applies the user's selection without the boot mod (cached outputs, < 1 s) and
|
||||
restores the boot mod's own options → LlamaMod's normal Play starts at the menu again
|
||||
(`RestoreCheck`: active `[level-…, boot-to-level]` → `[level-…]`, exe without mod patches).
|
||||
If the editor is closed before the game, LlamaMod shows the selection as "apply needed".
|
||||
ended it re-applies the user's **previous** active mods and enabled list (stored in the
|
||||
session: `mods`, `enabled`, `bootOptions`), restores the boot mod's own options and deletes
|
||||
`levels/.playtest/` plus `playtest-*` entries in `enabledMods`/`modOptions`
|
||||
(`LevelProjects.clearPlaytest`). With "keep" the level stays enabled/active (old behaviour).
|
||||
The session file `<data>/editor/playtest-session.json` lets the next editor start finish it;
|
||||
without a session, the next editor start deletes leftover copies if no game runs
|
||||
(`clearStale`). The non-boot Play (menu, map cursor) uses the same install/restore path now.
|
||||
* **Level → Add to LlamaMod…**: writes the snapshot to `<data>/levels/` (`PlayTest.installTarget`:
|
||||
the same project's file is reused, file names compared case-insensitively) and sets the mod's
|
||||
`chapter` option to the project's TestLevel chapter.
|
||||
* The launcher hides `playtest-*` mods unless enabled/active (then: "(play-test)" + blue badge
|
||||
"temporary play-test", no Remove button).
|
||||
* **Play from camera position**: ground point = depth-buffer hit at the viewport centre
|
||||
(export space → game x, y, −z), heading = camera yaw (`atan2(f.x, −f.z)`, 0 = +z).
|
||||
`FloorFinder` then looks for **collision**: highest floor polygon (|n.y| ≥ 0.5) at or below
|
||||
@@ -102,7 +111,17 @@ hardware is untested.
|
||||
|
||||
## Tests
|
||||
|
||||
`BootToLevelModTest` (hooks at both frame handlers, logo patch, exe re-parses; Escape hook only
|
||||
`PlaytestLifecycleTest` (temporary copy listed as `playtest-…` → restore removes it and puts
|
||||
the enabled list back; keep → stays; stale copies cleared; Remove → backups, refused while the
|
||||
game runs; regression: `My-level`/`my-level` get distinct ids), `BootToLevelModTest` (hooks at both frame handlers, logo patch, exe re-parses; Escape hook only
|
||||
when asked; start parsing; original village: only the llama moves, file size unchanged;
|
||||
editor-style chain moves and turns with the llama), `RestoreCheck` (manual), `EdTour` +
|
||||
`PlayTourSteps` (scripted editor runs on an X display: camera placement, play-from-here).
|
||||
|
||||
## Temporary play-test copies – verified in game (apptest lvlrm, game on :5, editor on :31, 2026-11-07)
|
||||
|
||||
EdTour `run:level.play` on `/tmp/…/mytest.llamalevel` (real launch, private pulse): during the
|
||||
game `levels/.playtest/mytest.llamalevel`, enabled `[playtest-mytest]`, active
|
||||
`[playtest-mytest, boot-to-level]`, Testwelt plaza in game (`img/mods/levels_playtest_temporary.jpg`);
|
||||
Escape → game gone → `.playtest` deleted, enabled `[]` and active `[level-old-village-test]` as
|
||||
before the test, session file removed. Launcher badge: `img/mods/levels_playtest_badge.jpg`.
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 135 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 53 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 123 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 137 KiB |
@@ -39,6 +39,7 @@ Runtime modules: java.base, java.desktop, java.prefs, java.logging, jdk.charsets
|
||||
llamamod --version --install <iso|folder> --mods --launch [--wait]
|
||||
llamamod --apply [id,id] [--opt id.key=value ...]
|
||||
llamamod --registry --saves --unlock <slot 1-3> <world> <chapter> [--cursor]
|
||||
llamamod --import-level <file> --remove-level <id|file>
|
||||
```
|
||||
`--mods` lists every mod with category and its options (current value, type, range, default).
|
||||
`--opt` values are validated and saved in config.json like the GUI does. Errors (e.g. "The game is
|
||||
@@ -60,6 +61,8 @@ different folder chosen in the wizard is remembered via `java.util.prefs`.
|
||||
| `cd-active/` | what the game sees as its CD: hard links to originals + mod outputs |
|
||||
| `cache/<mod>/<key>/` | mod outputs + `manifest.json` |
|
||||
| `backups/saves/<timestamp>/` | save game backups (taken before every write) |
|
||||
| `levels/` | level projects = level mods (`.playtest/`: temporary editor play-test copies) |
|
||||
| `backups/levels/<timestamp>/` | level mods removed with "Remove…" / `--remove-level` |
|
||||
| `wine/` | own Wine prefix (Linux) |
|
||||
| `logs/` | game.log, wineboot.log, registry.log |
|
||||
|
||||
|
||||
+13
-1
@@ -6,7 +6,7 @@ Code: `mods/levels/LevelProjectSource` (a `ModSource`), `LevelProjectMod`, `Leve
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| id | `level-<file name>` (lower case, non-alphanumerics → `-`) |
|
||||
| id | `level-<file name>` (lower case, non-alphanumerics → `-`); names that collide (`My-level` / `my-level`) get `-2`, `-3`… (first in name order keeps the plain id, a suffix never takes an id another file has) |
|
||||
| name / description | level name, description and author from the project |
|
||||
| version | first 16 hex digits of the file's SHA-256 (any change of the file rebuilds) |
|
||||
| order | 60: after Test World (50, chapter 1), before Mirror (75) and the debug view (100), so those also apply to the level |
|
||||
@@ -24,6 +24,18 @@ the lowest provided chapter fills all missing chapters 1..49 (the map crashes on
|
||||
chapter WAD), loading pictures as before. To play chapter n: unlock it in the save editor (or
|
||||
`--unlock <slot> 9 <n> --cursor`), then select it on the world-9 map.
|
||||
|
||||
**Temporary play-test copies**: `levels/.playtest/*.llamalevel` are listed too, as
|
||||
`playtest-<stem>` (`LevelProjectMod.playtest()`, name "… (play-test)", chapter = the project's
|
||||
own, not counted for other levels' defaults). The editor deletes them after the play-test
|
||||
(`LevelProjects.clearPlaytest`), see editor-playtest.md. Files from older play-tests in `levels/`
|
||||
cannot be told apart from saved levels and are left alone (users remove them).
|
||||
|
||||
**Removing** (`LevelProjects.remove`, launcher card "Remove…", CLI `--remove-level <id|file>`):
|
||||
moves the file to `<data>/backups/levels/<yyyyMMdd-HHmmss>/`, takes the id out of `enabledMods`
|
||||
(`activeMods` stays → the launcher shows "Apply" pending), refused while the game runs and for
|
||||
play-test copies. The Levels header has "Open levels folder". Screenshots:
|
||||
`img/mods/levels_remove_dialog.jpg`, `levels_removed.jpg`.
|
||||
|
||||
CLI (`EditorCli`): `--editor-import`, `--editor-new`, `--editor-build`, `--import-level`, see
|
||||
editor-format.md. The registry reads the folder when it is created (restart the app / create a
|
||||
new `ModRegistry` after importing).
|
||||
|
||||
Reference in new issue
Block a user