Files
REM-Mod/AGENTS.md
T

72 lines
4.0 KiB
Markdown

# REM-Mod
The playable REM Freelancer mod: game data, the client binaries built from REM-Client, and the
mod's own scripts/resources. The working branch is **`new-rem-client`** (not `main`).
`README.md` only carries the mod version; `BUILD_INFO.txt` records the last full client package
and any later incremental client updates, with their source commits and validation evidence.
## Layout
| Path | Contents |
|---|---|
| `DATA/` | Freelancer game data: inis (`UNIVERSE/`, `EQUIPMENT/`, `SHIPS/`, `SOLAR/`, `MISSIONS/`, `INTERFACE/`, `constants.ini`, `initialworld.ini`, ...), models, textures, audio |
| `DATA/UNIVERSE/` | `universe.ini`, `SYSTEMS/<System>/` (system ini next to its bases), `sectors.ini` (nav map sectors and spacing) |
| `DATA/SCRIPTS/` | Compiled THN scripts (`*.thn`, Lua 3.2 bytecode); sources are in the `Lua-Scripts` repo |
| `DATA/INTERFACE/REM/` | REM HUD/window art (`rem_hud.txm`, `IMAGES/*.3db`) |
| `EXE/` | `Freelancer.exe`, engine DLLs (`common.dll`, `server.dll`, `rp8.dll`, ...), `dacom.ini`, `freelancer.ini`, `rem.ini`, `remgfx.ini`, VC runtime |
| `EXE/remui/` | RmlUi UI documents (`*.rml`, `*.rcss`, fonts, `img/`), copied from `REM-Client/assets/remui` |
| `EXE/REM/` | Mod runtime data: `Lua/` (`luastart.lua`, `Infocards.lua`, `DYNAMIC/`), `Audio/`, `Fonts/`, `Avatars/`, `ServerModule/missions/` |
| `DLLS/BIN/` | Resource DLLs loaded from the original install layout (e.g. `content.dll`) |
| `MATERIALS/` | `materials.json`, PBR texture maps, skybox for the RemGfx renderer |
| `ART/UI/` | Source PNGs for the REM interface art |
| `tools/` | Python 3 generators for REM UI art (see `tools/README.md`) |
| `SAVE/`, `LOGS/`, `FLDOCS/` | Default saves, log folder, original game docs |
## Updating the client binaries
The binaries come from `../REM-Client` (`bin64/`). Copy `freelancer.exe` / `Common.dll` (and any
other changed DLL) here keeping this repo's names (`EXE/Freelancer.exe`, `EXE/common.dll`), or run
`python tools/rem/update_mod.py` from REM-Client after `publish.py` (copies `EXE/` and `DLLS/BIN/`,
never `SAVE`/`DATA` or the mod's own `EXE/REM/`, commits nothing). For a manual copy, update
`BUILD_INFO.txt` in the same change: retain the full-package record and add the source commit,
changed files and actual validation of the incremental update. Do not reuse the old full-build
date/status for newer binaries. Then commit with:
```
REM-Client <short REM-Client hash>: <what the player gets>
```
## Generating UI art (`tools/README.md`)
```bash
python tools/make_image_3db.py ART/UI/ICON/Cargo_icon.png DATA/INTERFACE/REM/IMAGES/icon_cargo.3db icon_cargo --size 128
python tools/make_icon_3db.py <in.png> <out.3db> <name> [--color]
python tools/make_hud_txm.py <out.txm> <name>=<in.png> ...
```
`<name>` must be unique: Freelancer keys materials globally by the CRC of the name.
## Running
The game is started as `EXE/Freelancer.exe` with `EXE/` as working directory (under Wine/Lutris on
Linux). `rem-server` uses this folder as its game data (`--game <REM-Mod>/EXE`).
## Conventions
- Commit messages are descriptive English one-liners, prefixed with the area or file:
`REM-Client <hash>: ...`, `sectors.ini: ...`, `story_arc0_m01: ...`, `Missions: ...`, `Sol01: ...`.
No `Co-Authored-By` trailer.
- Most inis use CRLF line endings (some files are mixed); keep the existing endings of a file
and its key casing/ordering when editing.
- Keep path casing consistent with existing references (e.g. `Sol01/`, not `SOL01/`).
## Gotchas
- rem-server is a private project: nothing of it goes into this repo (`.gitignore` excludes
`EXE/rem-server*`, `flbot.exe`, `LargeID.dat`, server logs).
- Runtime files appear under `EXE/` while playing (logs, `remgfx_pipelines.bin/.keys` caches,
`EXE/REM/Lua/DYNAMIC/config.lua`, `SAVE/*.ini`); don't commit them unless intended.
- `DATA/` changes may need a matching rem-server data check (the server validates missions and
waypoints at start, see `EXE/REM/rem-server-*.txt` locally).
- `CHANGELOG.md` is inherited from Freelancer HD Edition, not the REM change history.