diff --git a/docs/MAP_MODDING.md b/docs/MAP_MODDING.md index 5e462b83..c2a85b04 100644 --- a/docs/MAP_MODDING.md +++ b/docs/MAP_MODDING.md @@ -226,6 +226,11 @@ In practice, memory and frame time become the useful limits well before that. planet**. It packs the level, exports it and adds it to your mods in one step. 3. Turn on **Mods** and play (section 4). +For the flight there, put two PNGs in the level's `textures` folder: `flight_picture.png` +(128x128, the planet the ship flies to, transparent around it) and `flight_caption.png` (256x32, +its name). The game shows them in place of the template planet's. Without them the flight shows +the template's. + The first add gives the planet an id (`planet/id` in the project's `project.godot`). Keep it: adding again updates the same planet instead of adding a second one. **Export the levels again** keeps the name and id. The same step from a shell, in your OpenRAC checkout: diff --git a/openrac/tools/map_mod.py b/openrac/tools/map_mod.py index dc2351bd..3ee9252e 100644 --- a/openrac/tools/map_mod.py +++ b/openrac/tools/map_mod.py @@ -17,6 +17,10 @@ import games import overrides +# A destination's own picture and caption for the flight there (128x128 and 256x32 PNGs in its +# level's textures): the game shows them in place of the template planet's. +FLIGHT_PICTURES = ("flight_picture.png", "flight_caption.png") + def export_map(packed: Path, project: Path, out: Path, name: str, level: int, spawn: list[float] | None = None, heading: float | None = None, skip_movies: bool = True, @@ -116,6 +120,10 @@ def export_map(packed: Path, project: Path, out: Path, name: str, level: int, path = terrain.parent / "textures" / (texture + ".png") if path.is_file() and not path.is_symlink(): files[f"{prefix}/textures/{texture}.png"] = path + for picture in FLIGHT_PICTURES if destination else (): + path = level_dir / "textures" / picture + if path.is_file() and not path.is_symlink(): + files[f"{prefix}/textures/{picture}"] = path patches = [] patch_file = packed / "patches.tsv" if patch_file.is_file():