Krita Ren’Py Scripter is a development tool for using images in Ren’Py projects. It writes the text to display images for compositions in Ren’Py as they positionally appear in Krita, using Krita’s layer stack to write the directories of those images. It also comes with a Scale Calculator to help decide what sizes of images to use for the project. This plugin was designed to work in tandem with GDQuest’s Batch Exporter, which is officially included in Krita. The Batch Exporter uses a tag system, and KRS extends it for its own features.
Example
This is a shot from my Ren’Py motion graphics comic. While this image is a GIF recording, Ren’Py needed each component (two characters, a background, a foreground, a midground, and fog effects) as a separate PNG in order to build it.
- Each component has its own folder labeled with the
e=png
tag from the batch exporter. Thes=37.59
tag was used to batch export these images at size 37.59%, which I had used the Scale Calculator to determine as the right size for my target Ren’Py project height of 1080px. - The Scripter outputs the
pos()
coordinates, which refer to the top-left corners of the individual components, adjusted from the original canvas size to the 37.59% scale. This text is ready to copy and paste into the Ren’Py project file! - Note that the output text is in the reverse order as the layer stack. That is because Ren’Py reads the image declarations in the script from top to bottom, so the backmost images should be at the top.
- The scrolling fog effects aren’t here because I made them in a separate file. KRS gets you started with basic positional scripting, but any sort of motion must still be written manually.
KRS’s Image Definition section provides the text to allow Ren’Py to find the image files. With a layer stack this shallow, the effect isn’t apparent beyond the file format tag, so here’s a more complicated application.
Suppose the project calls for different groups of images (characters in this example), and maybe different modes for each character. KRS can handle that.
Suppose the project utilizes Ren’Py’s image attribute system. KRS can handle that, and even allow you to exclude layer names from the image name, the directory declaration, or both.
(Notice that, in this output,
expression
is in the directory but not in the image name; see the README for how attribute chains work.)
Link
Installation
Krita’s Import Python Plugin from Web script works with that link.