{"id":47634270,"url":"https://github.com/michidk/redguard-preservation","last_synced_at":"2026-05-16T19:14:58.167Z","repository":{"id":344655372,"uuid":"1006699137","full_name":"michidk/redguard-preservation","owner":"michidk","description":"Preserving The Elder Scrolls Adventures: Redguard (1998) — reverse-engineered file format specifications, engine documentation, and a Rust CLI for parsing and converting game assets.","archived":false,"fork":false,"pushed_at":"2026-05-16T10:39:54.000Z","size":505,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-16T11:47:11.897Z","etag":null,"topics":["game-development","game-reversing","gamedev","preservation","reverse-engineering","tesv","the-elder-scrolls-redguard"],"latest_commit_sha":null,"homepage":"https://michidk.github.io/redguard-preservation/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/michidk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-06-22T20:24:07.000Z","updated_at":"2026-05-16T10:39:58.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/michidk/redguard-preservation","commit_stats":null,"previous_names":["michidk/redguard-preservation"],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/michidk/redguard-preservation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michidk%2Fredguard-preservation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michidk%2Fredguard-preservation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michidk%2Fredguard-preservation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michidk%2Fredguard-preservation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michidk","download_url":"https://codeload.github.com/michidk/redguard-preservation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michidk%2Fredguard-preservation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33115608,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T18:38:32.183Z","status":"ssl_error","status_checked_at":"2026-05-16T18:38:29.903Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["game-development","game-reversing","gamedev","preservation","reverse-engineering","tesv","the-elder-scrolls-redguard"],"created_at":"2026-04-02T00:00:19.143Z","updated_at":"2026-05-16T19:14:58.161Z","avatar_url":"https://github.com/michidk.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# redguard-preservation\n\nPreserving *The Elder Scrolls Adventures: Redguard* (1998) — reverse-engineered file format specifications, engine documentation, and a Rust CLI for parsing and converting game assets.\n\n\u003e **📖 Full documentation** — file format specifications, engine internals, INI references, and more — is published at **\u003chttps://michidk.github.io/redguard-preservation/\u003e**. This README is the CLI / library / FFI quick reference.\n\n## Conversion Matrix\n\n| Input Type | Input Extension(s) | Output File(s) |\n|---|---|---|\n| Model | `.3d`, `.3dc` | `.glb` |\n| ROB archive | `.rob` | `.glb` |\n| RGM scene | `.rgm` | directory: `.glb` + scene/actors/navigation `.json` + per-actor `.soup`/`.json` scripts |\n| WLD world | `.wld` | `.glb` + actor metadata `.json` (scene mode), or map `.png` set |\n| Font | `.fnt` | bitmap `.png` + BMFont `.fnt` + glyph metadata `.json`, or `.ttf` |\n| Visibility octree | `.pvo` | `.json` |\n| Palette | `.col` | swatch `.png` + palette metadata `.json` |\n| Sound effects bank | `.sfx` | extracted `.wav` files + `index.json` metadata (directory output) |\n| Dialogue audio | `.rtx` | extracted `.wav` files + `index.json` metadata (directory output) |\n| Texture bank | `TEXBSI.###` | animated `.gif` + static `.png` files + `index.json` (directory output) |\n| GXA bitmap archive | `.gxa` | animated `.gif` + `index.json` (directory output) |\n| Cheat states | `.cht` | `.json` |\n\nThe `scan` command recursively detects known Redguard files in a directory tree.\n\n## Convert Subcommands\n\nEach format has its own subcommand with scoped flags. `convert \u003cFILE\u003e` auto-detects the format and uses defaults.\n\n| Subcommand | Input | Output | Format-specific flags |\n|---|---|---|---|\n| `convert texbsi` | `TEXBSI.###` | `.gif` / `.png` | `--format gif\\|png\\|frames`, `--palette`, `--compress-textures` |\n| `convert gxa` | `.gxa` | `.gif` / `.png` | `--format gif\\|png`, `--compress-textures` |\n| `convert fnt` | `.fnt` | `.png` + `.fnt` + `.json`, or `.ttf` | `--format bitmap\\|ttf`, `--compress-textures` |\n| `convert col` | `.col` | `.png` + `.json` | `--format png\\|json` (default: both), `--compress-textures` |\n| `convert wld` | `.wld` | `.glb` + `.json`, or map `.png` set | `--assets`, `--palette`, `--terrain-only`, `--terrain-textures`, `--compress-textures` |\n| `convert model` | `.3d`, `.3dc`, `.rob` | `.glb` | `--assets`, `--palette`, `--compress-textures` |\n| `convert rgm` | `.rgm` | output directory | `--assets`, `--palette`, `--compress-textures` |\n| `convert rtx` | `.rtx` | `.wav` + `index.json` | `--resolve-names` |\n| `convert sfx` | `.sfx` | `.wav` + `index.json` | (none) |\n| `convert cht` | `.cht` | `.json` | (none) |\n| `convert pvo` | `.pvo` | `.json` | (none) |\n\n¹ Exported TTF fonts are bitmap-traced vector outlines without hinting. They can be installed on Windows, used in game engines (Unity, Godot, etc.), and previewed at [fontdrop.info](https://fontdrop.info).\n\n## Documentation\n\nThe full documentation is published at **\u003chttps://michidk.github.io/redguard-preservation/\u003e** (rendered with `mdBook`). The Markdown sources live under [`docs/`](docs/README.md) and are organised into three sections:\n\n- [**File Formats**](https://michidk.github.io/redguard-preservation/formats/) ([source](docs/formats/README.md)) — binary format specifications for models, textures, audio, maps, palettes, and other game assets\n- [**Engine Details**](https://michidk.github.io/redguard-preservation/engine/) ([source](docs/engine/README.md)) — reverse-engineered engine internals: cheat system, item attachment, SOUP scripting, sky renderer, water waves\n- [**Configuration**](https://michidk.github.io/redguard-preservation/config/) ([source](docs/config/README.md)) — text-based INI files shipped with the game (surface types, combat, keys, etc.)\n\n## Repository Layout\n\n- `src/` - Rust source\n- `src/import/` - format importers/parsers\n- `src/gltf/` - GLTF/GLB conversion (builder, primitives, terrain, texture cache)\n- `src/ffi/` - C-compatible FFI layer for native plugin use (Unity, etc.)\n- `src/cli/` - CLI command handlers (`cli/convert/` for per-format converters)\n- `src/error.rs` - shared error types\n- `docs/` - format specifications and engine notes\n- `tests/` - integration tests\n\n## Quick Start\n\nRequirements:\n\n- Rust stable toolchain\n- Cargo\n\nBuild:\n\n```bash\ncargo build\n```\n\nShow CLI help:\n\n```bash\nrgpre --help\n```\n\n## CLI Commands\n\n- `read` (`r`) — parse an input file and print decoded structure\n- `convert` (`c`) — export supported inputs to output formats\n  - `convert \u003cFILE\u003e` — auto-detect format, use defaults\n  - `convert \u003cFORMAT\u003e \u003cFILE\u003e` — format-specific subcommand with scoped flags\n- `scan` (`s`) — recursively scan a directory for known Redguard files\n\n## Asset Directories\n\nRedguard shipped with two parallel sets of 3D assets for different renderers:\n\n| Directory | Renderer | Model versions | Palette files | Included in GOG |\n|---|---|---|---|---|\n| `3dart/` | Software | v2.6, v2.7 | `art_pal.col` only | Original CD only |\n| `fxart/` | Glide (3dfx) | v4.0, v5.0 | 27 `.COL` palettes (per-scene) | ✓ |\n\nBoth directories are supported. The `fxart/` Glide assets are recommended — they are included in the GOG release and use the newer model format. Each scene uses its own palette (e.g. `ISLAND.COL` for the overworld, `NECRO.COL` for the Necropolis). Pass the matching palette via `--palette` — without it, 3D exports will have no textures.\n\n## Usage Examples\n\nAuto-detect format (uses defaults):\n\n```bash\nrgpre convert 3dart/LHBM4.3DC -o output/LHBM4.glb\nrgpre convert fxart/TEXBSI.302 -o output/TEXBSI_302/\n```\n\nConvert model with palette and asset root:\n\n```bash\nrgpre convert model fxart/BELLTOWR.ROB --palette fxart/ISLAND.COL --assets . -o output/BELLTOWR.glb\n```\n\nConvert RGM scene with palette and asset root:\n\n```bash\nrgpre convert rgm maps/BELLTOWR.RGM --palette fxart/ISLAND.COL --assets . -o output/BELLTOWR_scene.glb\n```\n\nConvert WLD world to GLB terrain + companion RGM placement:\n\n```bash\nrgpre convert wld maps/ISLAND.WLD --palette fxart/ISLAND.COL --assets . -o output/ISLAND_world.glb\n```\n\nConvert WLD terrain only:\n\n```bash\nrgpre convert wld maps/ISLAND.WLD --palette fxart/ISLAND.COL --assets . --terrain-only -o output/ISLAND_terrain.glb\n```\n\nConvert TEXBSI texture bank with palette:\n\n```bash\nrgpre convert texbsi fxart/TEXBSI.302 --palette fxart/ISLAND.COL -o output/TEXBSI_302/\n```\n\nExport all animation frames as separate PNGs:\n\n```bash\nrgpre convert texbsi fxart/TEXBSI.302 --palette fxart/ISLAND.COL --format frames -o output/TEXBSI_302/\n```\n\nConvert font to TrueType:\n\n```bash\nrgpre convert fnt input/FONT01.FNT --format ttf -o output/FONT01.ttf\n```\n\nExport COL palette as JSON only:\n\n```bash\nrgpre convert col fxart/ISLAND.COL --format json -o output/ISLAND.json\n```\n\nExtract RTX dialogue with resolved filenames:\n\n```bash\nrgpre convert rtx input/DIALOG.RTX --resolve-names -o output/dialog/\n```\n\nScan a directory:\n\n```bash\nrgpre scan 3dart\n```\n\n## Native Plugin (FFI)\n\nThe library builds as a C-compatible shared library (`cdylib`) alongside the CLI binary. This lets game engines like Unity load it as a native plugin and call the conversion functions directly at runtime.\n\nSee [`src/ffi/README.md`](src/ffi/README.md) for the full API reference — architecture, C struct definitions, function signatures, memory management, and error handling.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichidk%2Fredguard-preservation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichidk%2Fredguard-preservation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichidk%2Fredguard-preservation/lists"}