Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/MAP_MODDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 8 additions & 0 deletions openrac/tools/map_mod.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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():
Expand Down
Loading