Repository navigation
A Crash Course in Sprite Editing
Welcome, and thank you for your interest in editing sprites for Kohan: Ahriman's Gift! The process and tooling are both still in infancy, so pardon the clunkiness of the user interface and arcane nature of the documentation, and please submit any issues or suggestions through the GitHub issue tracker and I'll address them as time allows.
Firstly, let's get some terminology and background knowledge out of the way.
In the context of Kohan, a sprite refers not only to "traditional" game sprites like units, but to just about every graphical asset in the game. A sprite can be either animated or a still image, or even the terrain tiles and in-game fonts. These assets are all stored in a proprietary file format called TGR, which likely stands for "TimeGate Resource". The TGR file format is built on top of the IFF framework and at this point has been mostly reverse-engineered. Please see the readme and tgr.bt for the details of the format.
There are a few tools that you'll need in order to edit or create new TGR files. The first is tgxpack, a command-line tool for unpacking the .TGW game archives. You'll want to use it to unpack Kohan_AG.TGW (located in your game installation directory), since that's the archive that contains all of the .TGR assets.
Next, download the most recent release of tgrtool here. This is what you will use to unpack existing .TGRs into individual .PNG frames or a sprite sheet, or reverse the process by packing a series of frames or a sprite sheet back into a game-readable .TGR
Finally, you'll need whatever tools you prefer for actually doing the image editing. For recoloring aspects of existing sprites, GIMP or any other full-featured photo editor will allow selecting pixels based on mask criteria. With a bit of fiddling, this can be used to change the color of a cloak, shield, etc.
The simplest edit is a whole-sprite recolor, so let's start there. I recently recolored the Wash of Pain status effect animation for a new spell in Kohan Gold, so I'll use that as an example.
- Launch tgrtool.exe by double-clicking it. Once it loads, it should already be in Unpack mode, so click on the "Select TGR File" button. In the file dialog that opens, navigate to wherever you unpacked
Kohan_AG.TGWto and selectART/EFFECTS/WASH_PAIN_LOOP.TGR