Repository navigation
Replacing a sprite with a HD version
In this tutorial we will replace the default combat sprite of Pleinair with a HD version.
Use the File Manager to extract the *.SH file you want to edit. The main *.SH files are located at SUBDATA.DAT\START.DAT\ANM.DAT.
NOTE: START.DAT is compressed you can uncompress it using the right click drop down menu. You don't need to compress it back the game can handle the file being uncompressed.
To better understand the following steps, here is a short explanation on how colors work in the game. Instead of every pixel being an RGBA value, they are instead simple ID's, a index number with maximum being the sheet's color capacity. This index together with the "color table Id" references a color inside a big color table. Thus for one pixel to find its true color, first the "color table Id" (offset) of the sprite is taken multiplied by the size of the set (16), plus the index of the pixel.
Usually all of the existing sheets have either no space left or have a wrong color format for our HD sprite. While there are other ways you could approach this problem, the easiest is to just create a new sheet with a size of 512x512 and using 32 or more colors:
Next navigate to the new empty sprite sheet, using the arrows and create a new sprite (
) at 0,0 and select it.
Now we will need to set the color table offset (
), which also defines the starting offset where the 32 colors will be inserted, when we import the new sprite image. If you open the color table view you will notice that the colors 32+ are empty, so set the color table offset to 2 (2*16 = 32!) and press enter to lock it in. If there are not enough space in the color table, then just set the offset to the last offset. The colors should insert automatically. After this right click the sprite and select 'import as color' and select your sprite you want to import. Press 'Yes' in both message boxes and you should see the sprite:
If you found the previous method a bit cumbersome, here's an alternative approach that should be way faster:
- Start by resizing all the existing sprite sheets you intend to modify using the gear icon. Higher resolution and more colors.
- Export the entire sheets as images and then edit them using your preferred image editor. Ensure that you position your HD character approximately in the same locations as the original sprites.
- Maintain consistency in your color choices and avoid exceeding the sheet's color capacity!
- If your new image incorporates more colors than the old one, you'll need to adjust the color table to accommodate the additional colors. For example, if the old sheet supported 16 colors, but you now require 32, you can easily expand the color table in between each set by right-clicking a color set and selecting "Add set". The other sets should be shifted to the right, and all sprites will have their "color table ID" automatically incremented as needed.
- Once your color table is correctly set up, you can import your modified image overriding the colors. Preserving the old sprite layout and thus also the animations.
In this example we will modify the combat idle animation Nr. 16/38.
At first create a new layer above or below the old layer and add a new keyframe. Make it start at 0 and end it, where the old layer ends. You can do it via drag&drop or just set it in the toolbar.
Set the sprite ID (
) to the ID of the sprite that we insert in the last step and the color table offset (
) to 2. Or you can just select the cutout and press 'Replace' in the keyframe context menu.
You will notice that it is too big and will be located at the wrong position. To quickly fix this, select one of the original keyframes and then press 'Copy from selected > Fit to selected' in the context menu of the added keyframe. This will fit the size and position as best as it can to match the selected keyframe settings. This way you have some base settings that you can adjust manually.
Now you are done! Before exporting the .SH file you can hide the old layer by clicking the eye icon (
) , hidden layers will not be exported. Also don't forget to save.
Use the File Manager to import your new .SH back to enjoy your work ingame.
The game doesn't allocate its memory dynamically, instead it has a fixed buffer size into witch all game data is loaded. If its exceeded then the game will simply crash. To fix that you can use the Increase memory allocation function inside of the File Manager to modify the used memory size. Try to keep it as low as possible as this memory will always be used even if your file size is below it.