Overview
The Data Packer (grpgpack) is a command-line tool that converts game asset manifests into optimized binary formats used by the GRPG engine. It supports packing textures, tiles, objects, NPCs, and items.
Installation
Build the data packer from source:Commands
The data packer provides five subcommands for packing different asset types:tex - Pack Textures
Packs texture assets from a manifest file into a.grpgtex binary file.
Usage:
-m, --manifest(required): Path to the texture manifest file-o, --output(optional): Output file path (default:textures.grpgtex)
tile - Pack Tiles
Packs tile definitions from a manifest file into a.grpgtile binary file. Tiles reference textures from a .grpgtex file.
Usage:
-m, --manifest(required): Path to the tile manifest file-t, --textures(required): Path to the.grpgtexfile-o, --output(optional): Output file path (default:tiles.grpgtile)
obj - Pack Objects
Packs object definitions from a manifest file into a.grpgobj binary file. Objects can have multiple textures, flags, and interaction properties.
Usage:
-m, --manifest(required): Path to the object manifest file-t, --textures(required): Path to the.grpgtexfile-o, --output(optional): Output file path (default:objs.grpgobj)
STATE: Object has multiple statesINTERACT: Object can be interacted with
npc - Pack NPCs
Packs NPC definitions from a manifest file into a.grpgnpc binary file.
Usage:
-m, --manifest(required): Path to the NPC manifest file-t, --textures(required): Path to the.grpgtexfile-o, --output(optional): Output file path (default:items.grpgitem)
item - Pack Items
Packs item definitions from a manifest file into a.grpgitem binary file.
Usage:
-m, --manifest(required): Path to the item manifest file-t, --textures(required): Path to the.grpgtexfile-o, --output(optional): Output file path (default:items.grpgitem)
Workflow
Create Texture Manifest
Define all textures in a
.gcfg manifest file with unique IDs and paths to PNG files.Create Asset Manifests
Define tiles, objects, NPCs, or items in separate manifest files, referencing texture names from the texture manifest.
Common Errors
Source Code
The data packer source code is located at:main.go:20- CLI command definitionstextures/cmd.go:18- Texture packing implementationtiles/cmd.go:13- Tile packing implementationobjs/cmd.go:13- Object packing implementationnpcs/cmd.go:13- NPC packing implementationitems/cmd.go:13- Item packing implementation