Development tools extension for KeeperFX modding.
- View .raw files: Opens 256×256 8-bit indexed
.rawimage files used by KeeperFX - Game palette: Automatically loads
data/palette.datfrom your workspace to display images with correct colors - Transparency support: Shows color index 0 as transparent with a checkerboard background
- Zoom controls: Fit, 100%, 200%, 400%, and 800% zoom levels
- Pixel-perfect rendering: Uses nearest-neighbor scaling to preserve sharp pixels
- A KeeperFX workspace containing
data/palette.dat(768 bytes: 256 colors × RGB with 6-bit values) .rawfiles must be exactly 65536 bytes (256×256 pixels)
- Open a KeeperFX workspace in VS Code
- Open any
.rawfile (e.g.,config/mods/your-mod/data/overlay_test.raw) - The custom viewer will automatically open showing the image with the correct palette
- Use the toolbar buttons to zoom in/out
- Reads the 256×256 indexed pixel data from the
.rawfile - Loads the palette from
data/palette.datin your workspace - Converts 6-bit RGB palette values (0-63) to 8-bit (0-255) by multiplying by 4
- Maps each pixel's color index to RGB using the palette
- Renders transparency (color 0) with checkerboard background
- Displays the result in a webview canvas with zoom controls
To test the extension:
- Press F5 to launch the Extension Development Host
- In the new window, open a KeeperFX workspace
- Open a
.rawfile to see the viewer in action
- Only supports 256×256
.rawfiles (the standard size for KeeperFX lens overlays and mists) - Requires
data/palette.datin the workspace (falls back to grayscale if not found) - Read-only viewer (no editing capabilities)
src/extension.ts: Extension entry point, registers the custom editorsrc/rawImageEditor.ts: Custom editor provider implementing the viewer logicpackage.json: Declares the custom editor contribution for*.rawfiles
Initial release:
- Basic
.rawfile viewing - Palette loading from workspace
- Zoom controls
- Transparency support