From 4785d8ae633a3a9f925768157db3fb43bd70bdfd Mon Sep 17 00:00:00 2001 From: Margen67 Date: Tue, 20 Apr 2021 12:24:59 -1000 Subject: [PATCH] Updated Sprite compiler (markdown) --- Sprite-compiler.md | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/Sprite-compiler.md b/Sprite-compiler.md index 5402468..39946ea 100644 --- a/Sprite-compiler.md +++ b/Sprite-compiler.md @@ -1,24 +1,24 @@ This page documents OpenRCT2's built-in tool for importing and exporting of sprites in the game. - -* **openrct2 sprite details \ [sprite index]** Displays basic information about the supplied sprite file, like the number of sprite and the total size of the file. If the index of a sprite has been supplied, the width, height, x and y offset and data offset of that sprite will be shown. - -* **openrct2 sprite create \** Creates a new empty sprite file. For the newly added graphics the file g2.dat is used. - -* **openrct2 sprite append \ \ [x offset] [y offset]** Adds the specified image to the end of the sprite file. If supplied, the x and y offset will be used. Since OpenRCT2 has a limited colour palette, the image has to be converted. Currently, there are three modes of conversion, which can be specified by the option `-m`: +* `openrct2 sprite details \ [sprite index]` + * Displays basic information about the supplied sprite file, like the number of sprite and the total size of the file. If the index of a sprite has been supplied, the width, height, x and y offset and data offset of that sprite will be shown. +* `openrct2 sprite create \` + * Creates a new empty sprite file. For the newly added graphics the file g2.dat is used. +* `openrct2 sprite append \ \ [x offset] [y offset]` + * Adds the specified image to the end of the sprite file. If supplied, the x and y offset will be used. Since OpenRCT2 has a limited colour palette, the image has to be converted. Currently, there are three modes of conversion, which can be specified by the option `-m`: * `-m default`: This mode behaves the same as the importer did before. Any pixels not present in the colour scheme will be ignored. * `-m closest`: This mode will change all pixels to the closest pixel in the palette. Already converted images will be unaffected. - ![Converted using closest mode](https://i.imgur.com/tG3YFON.png) - + ![Converted using closest mode](https://i.imgur.com/tG3YFON.png) * `-m dithering`: This mode will use Floyd-Steinberg dithering to make the image look close to the original while converting to the colour palette. Already converted images will be unaffected. - ![Converted using dithering mode](https://i.imgur.com/EB0DmuI.png) - -* **openrct2 sprite build \ \ [silent]** Creates a new sprite file and uses the supplied JSON file to add sprites. This also accepts the modes as described in **append**. Every time the game is compiled, the images in \resources\g2\ will get added in this way automatically. It should be noted that if an image already uses the OpenRCT2 colour palette, none of the modes will change the output. Therefore, if the result of dithering is not to your liking, you can add your own custom image and still use dithering with this command for the other images. To learn how to do dithering yourself, see [dithering images](../wiki/Dithering-Images). If *silent* is not used, the added sprites will be displayed. - -* **openrct2 sprite export \ \ \** Exports the sprite at the specified location in the sprite file to the image location. - -* **openrct2 sprite exportall \ \** Exports all the sprites in the specified sprite location to the image directory. This is useful when creating open replacements for the sprites in the original game. - -* **openrct2 sprite exportalldat \ \** Exports all the sprites in the specified DAT to the image directory. This will also output JSON which includes the x and y offsets of the images. This feature is useful for converting legacy custom objects to JSON objects. + ![Converted using dithering mode](https://i.imgur.com/EB0DmuI.png) +* `openrct2 sprite build \ \ [silent]` + * Creates a new sprite file and uses the supplied JSON file to add sprites. This also accepts the modes as described in **append**. + Every time the game is compiled, the images in \resources\g2\ will get added in this way automatically. It should be noted that if an image already uses the OpenRCT2 colour palette, none of the modes will change the output. Therefore, if the result of dithering is not to your liking, you can add your own custom image and still use dithering with this command for the other images. To learn how to do dithering yourself, see [dithering images](../wiki/Dithering-Images). If *silent* is not used, the added sprites will be displayed. +* `openrct2 sprite export \ \ \` + * Exports the sprite at the specified location in the sprite file to the image location. +* `openrct2 sprite exportall \ \` + * Exports all the sprites in the specified sprite location to the image directory. This is useful when creating open replacements for the sprites in the original game. +* `openrct2 sprite exportalldat \ \` + * Exports all the sprites in the specified DAT to the image directory. This will also output JSON which includes the x and y offsets of the images. This feature is useful for converting legacy custom objects to JSON objects.