_geol engine game files.
- Python 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| src/gpskit | ||
| tests | ||
| .gitignore | ||
| .python-version | ||
| main.py | ||
| pyproject.toml | ||
| README.md | ||
| uv.lock | ||
GPSKit: Modern Reverse Engineering & Modding Toolkit for Geo-Political Simulator 5 (.gp Asset Packs)
A fast, robust, modular command-line toolkit for reverse-engineering, inspecting, unpacking, editing, and repacking ALL varieties of .gp binary asset packs used across Eversim's Geo-Political Simulator 5 (_geol game engine).
Designed to be fully compatible with uv and Python 3.10+, matching the architectural design of modern reverse-engineering toolkits like RePy.
Features
- Universal
.gpFormat Support:- Handles all 32-bit standard asset packs (930+ packs in GPS5).
- Handles 64-bit large asset packs (
flags & 0x40, e.g.g5mapf.gp,g5cover8.gp). - Supports non-standard table capacities and sparse/null entry slots (e.g.,
fg_gps_base.gp,g5mapf.gp). - Preserves 100% of header flags, engine version numbers, checksums, and alignment padding.
- Open Standards & Human-Editable Modding:
- Unpacks
.gpbinary containers into structured folders with cleanindex.ymlmanifests. - Automatically decodes and converts zlib compressed textures (deflate level 9) to standard 32-bit RGBA
.pngfiles. - Automatically extracts embedded JPEG textures to standard
.jpgfiles. - Supports raw uncompressed 16-bit (RGB565/RGBA5551) and 32-bit RGBA pixel formats.
- Exports meshes, nodes, groups, attachments, video tiles, and cursors as organized typed resource files with full metadata.
- Unpacks
- Lossless & Bit-for-Bit Repacking:
- Repacks modified open-standard directories back into production-grade
.gpfiles. - Full bit-for-bit byte identity verified across packs in the game installation.
- Automatically handles 16-byte entry alignments and calculates offset tables.
- Repacks modified open-standard directories back into production-grade
- Deep Inspection & Diffing:
info: Rich terminal visualization of container properties, versioning, memory layouts, texture stats, and entry catalogs.diff: Deep side-by-side binary and structural comparison of two.gppacks.batch test: Automated verification harness to validate roundtrip integrity against all game packs.
Architecture of .gp Asset Packs
The _geol engine's .gp archive format consists of three primary regions:
+-------------------------------------------------------------------+
| Pack Header (0x00..0x50 or 0x58) |
| - u32 stream_size, u32 file_size, u32 hash, u32 flags |
| - char name[16], char name2[16] |
| - u32 version (engine build 190..340), u32 count |
| - u32 capacity (optional at 0x40, e.g. 10000 or 100) |
+-------------------------------------------------------------------+
| Offset Table (0x50/0x58 .. table_end) |
| - Array of u32 (standard) or u64 (if flags & 0x40) offsets |
| - 0 indicates a null/empty entry slot |
+-------------------------------------------------------------------+
| Alignment Padding (0 to 15 bytes to align to 16 bytes) |
+-------------------------------------------------------------------+
| Entries Data Blocks |
| - Each entry starts at its offset in the offset table |
| - 0x00: u32 type (low byte = kind: 1 texture, 2 node, etc.) |
| - 0x04: u32 size (always a multiple of 16 bytes) |
| - 0x08: u32 unk08, 0x0c: u32 flags |
| - 0x10..0x20: char name[16] |
| - 0x20..size: Entry Payload (Texture header, Mesh, etc.) |
+-------------------------------------------------------------------+
| Trailing File Padding (0 to 80 zero bytes before EOF) |
+-------------------------------------------------------------------+
Entry Kinds
| Kind ID | Enum | Description | Payload Format |
|---|---|---|---|
1 |
TEXTURE |
2D UI & 3D Model Textures | RGBA Deflate stream, JPEG (ffd8ffe0), or raw 16-bit/32-bit |
2 |
NODE |
Scene graph transformation nodes | Transform matrices, bounding boxes, hierarchy pointers |
5 |
GROUP |
Scene node grouping container | Component list, slot identifiers, material groupings |
7 |
ATTACHMENT |
Particle / weapon / bone attachment | 3D coordinate offsets, scale vectors, Euler angles |
8 |
MESH |
3D Geometry | Vertex positions, normals, UVs, face indices, materials |
10 |
VIDEO_TILE |
Video frames / character render tiles | Compressed animation streams, aspect frames |
11 |
CURSOR |
Mouse and UI pointers | Cursor hotspot offsets, bitmasks, frame buffers |
Installation Guide
Prerequisites
- Python 3.10+: Ensure Python is installed and available on PATH.
uv(recommended modern Python package runner):powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" # Or via winget: winget install astral-sh.uv
Install Methods
Method 1: Global CLI Tool via uv tool (Recommended)
Installs gpskit globally into your user environment so it can be run from any terminal:
# From local repository clone:
uv tool install .
# Or directly from a Git repository:
uv tool install git+ssh://git@direct.cthulhub.net:2222/7S/GPSKit.git
To update later:
uv tool upgrade gpskit
Method 2: Zero-Install Ephemeral Execution (uvx)
Run the toolkit instantly without installing it:
# Run GPSKit directly
uvx --from . gpskit --help
# Inspect a pack directly
uvx --from . gpskit info <path\to\pack.gp>
Method 3: Development / Editable Clone
For developing or contributing to GPSKit:
git clone <repo_url>
cd GPSKit
uv sync
Run GPSKit in the local virtual environment:
uv run gpskit --help
uv run gpskit info <path\to\pack.gp>
uv run pytest
Method 4: Standard pip Installation
# In your active Python environment:
pip install .
# Or for editable/development mode:
pip install -e .
Quick Start
Once installed or running via uv:
# CLI diagnostics
gpskit --version
gpskit --help
# Inspect a pack
gpskit info <path\to\target.gp>
# Root script wrapper
python main.py [args]
CLI Usage Guide
1. Inspect a .gp Pack
Display container metadata, engine version, 32-bit vs 64-bit status, texture breakdown, and sample entries:
uv run gpskit info "E:\Epic\Geo_Political_Simulator_5\accueil.gp"
2. Extract / Unpack to Open Standard
Unpack any .gp container into a human-editable folder with standard .png textures and index.yml:
uv run gpskit unpack "E:\Epic\Geo_Political_Simulator_5\accueil.gp" -o ./accueil_unpacked
Extracted structure:
accueil_unpacked/
├── index.yml # Open YAML manifest with all pack and entry metadata
├── textures/ # Editable RGBA .png and .jpg texture files
│ ├── 000_nuage.png
│ ├── 001_nuage_old.png
│ └── ...
└── entries/ # Typed raw binaries for meshes, nodes, groups, etc.
├── 108_flag.node.bin
├── 122_Cone01.mesh.bin
└── ...
3. Modding & Repacking
- Edit any image in
textures/*.pngortextures/*.jpgusing your preferred image editor (Photoshop, GIMP, Paint.NET). - Modify properties or entry names in
index.yml. - Repack the folder back into a production-ready
.gpfile:
uv run gpskit pack ./accueil_unpacked -o "E:\Epic\Geo_Political_Simulator_5\accueil.gp"
4. Compare Packs (diff)
Verify whether two .gp packs match byte-for-byte or inspect their structural differences:
uv run gpskit diff original.gp repacked.gp
5. Texture Decoding & Editing (tex)
Decode, inspect, encode, and edit .tex and .raw.bin textures standalone:
# View texture header diagnostics, format, dimensions, crop bounds, and leading meta
gpskit tex info "path/to/texture.raw.bin"
# Decode texture binary to standard PNG image and metadata YAML
gpskit tex decode "path/to/texture.raw.bin" -o my_texture.png --meta my_texture.meta.yml
# Re-encode edited PNG and metadata back into engine texture binary
gpskit tex encode my_texture.png -o my_texture.tex.bin --meta my_texture.meta.yml
# In-place edit of texture metadata (leading tint/blend metadata, crop bounds, flags)
gpskit tex edit "path/to/texture.raw.bin" --crop-width 255 --crop-height 255 --leading-meta "01020304"
6. Binary Payload Decoding & Editing (bin)
Decode, inspect, encode, edit, and patch .bin payloads (nodes, attachments, groups, meshes, and generic binaries):
# Inspect binary structure, detected kind, candidate vectors, and extracted strings
gpskit bin info "path/to/entry.node.bin"
# Decode binary to human-editable structured YAML (nodes, attachments, groups, meshes)
gpskit bin decode "path/to/entry.node.bin" -o entry.node.yml
# Re-encode edited YAML back to exact binary
gpskit bin encode entry.node.yml -o entry.node.bin
# In-place patch binary fields via offset and type specifications
gpskit bin edit "path/to/entry.bin" --set 0x10=3.1415:f32 --set 0x24=595959ff:hex --set 0x30=82:u32
# In-place string find & replace
gpskit bin edit "path/to/entry.bin" --find-replace "old_text=new_text"
# Apply structured YAML patch file
gpskit bin patch "path/to/entry.bin" patch.yml
7. Extract with Structured Binary Decoding (--decode-bin)
When unpacking, automatically decode all non-texture .bin entries (nodes, groups, attachments, meshes) into editable .yml alongside their binary files:
# Extract with both PNG images and decoded YAML for all 3D nodes/groups/attachments
gpskit unpack "path/to/target.gp" --decode-bin
# When repacking, any edited .yml files are automatically recompiled into .gp
gpskit pack "path/to/target.unpacked"
8. Batch Extract in Place ("Extract all .gp's in place")
Recursively scans a directory tree for .gp files and extracts each one right next to itself into a corresponding <name>.unpacked/ folder:
# Extract all .gp files in current directory or a specific game folder
gpskit batch extract "path/to/game_data"
# Extract with structured YAML decoding for all non-texture entries
gpskit batch extract "path/to/game_data" --decode-bin
# Or use the unpack alias
gpskit batch unpack "path/to/game_data"
# Extract raw binary without decoding textures
gpskit batch extract "path/to/game_data" --raw
# Overwrite existing unpacked directories
gpskit batch extract "path/to/game_data" --overwrite
9. Batch Build in Place ("Build all unpacked's in place")
Recursively scans a directory tree for unpacked folders containing index.yml and repacks each one back into its .gp container in place:
# Repack all unpacked directories back into their .gp files
gpskit batch build "path/to/game_data"
# Or use the pack alias
gpskit batch pack "path/to/game_data"
# Skip overwriting existing .gp files
gpskit batch build "path/to/game_data" --no-overwrite
10. Automated Batch Verification Test
Run automated roundtrip verification against all .gp files in a game directory:
gpskit batch test "E:\Epic\Geo_Political_Simulator_5"
Verified 100% Bit-For-Bit Fidelity Across All 932 Production Game Packs:
- Total Tested: 932 files (7.87 GB of game assets across root and
gp_perso/)- Passed: 932 / 932 (100.000% bit-for-bit identical)
- Covers: Standard 32-bit packs, 64-bit packs (
g5mapf.gp334 MB,g5cover8.gp256 MB), custom capacities (fg_gps_base.gp), sparse/null entries, deflate streams, JPEGs, and raw buffers.
License
MIT License. Designed for reverse-engineering and modding Geo-Political Simulator 5.