Wiki

Modding


Introduction

Modding Witch Trainer Silver does not demand advanced coding skills, but it does necessitate a basic understanding of fundamental programming concepts and familiarity with the Ren’Py Engine. This resource serves as a supplementary addition to the Ren’Py Engine documentation, and we strongly recommend acquainting yourself with it. The engine documentation can be accessed at the following address:

https://www.renpy.org/doc/html/

Manifest

To create a mod, first you need to prepare a manifest file. This file is in JSON format and contains essential details about your modification. It also informs the mod loader that your mod exists and needs to be loaded into the game. This includes the mod’s name, the author’s name, the version of the mod, a brief description of what the mod does, and the game version that the mod is designed to work with.

An example manifest:

{
    "Name": "ExampleMod",
    "Author": "LoafyLemon",
    "Version": "1.0.0",
    "Description": "Adds ponytail hairstyle for Hermione",
    "GameVer": "1.45.2"
}

File Types

Script Formats

  • RPYM – The main script file recognized by the mod loader. It is the recommended format for mods, as it allows players to easily enable or disable them without having to delete specific mod directories.
  • RPYMC – This is a compiled version of the RPYM format, automatically generated during mod loading.
  • RPY – Ren’py script file. While it can be used for mods, it is not recommended because it is loaded at init and cannot be disabled by the player through the mod menu.
  • RPYC – This is a compiled version of the RPY format, generated during the program’s initialization rather than during the loading of the mod itself.
  • JSON – The JSON file serves as a comprehensive source of information about the mod. It includes essential details such as the author’s name, version number, compatibility information, a description of the mod, and other relevant data that enables the mod loader to process and handle the mod effectively.

We recommend using the RPYM format for script files. In the past, the RPYM format had limitations that prevented certain code changes. However, with recent updates, all functionalities available in the RPY format are now fully supported in RPYM. This ensures a seamless modding experience without any restrictions.

Image Formats

The game has built-in support for the following image formats:

  • PNG
  • WEBP
  • AVIF

For optimal performance and efficiency, we recommend utilizing the WEBP file format. Its advantages include smaller file sizes and a faster decoder, making it a favourable choice for the project.

Audio Formats

There are several audio formats we support:

  • OGG
  • MP3
  • WAV

We recommend the OGG format for all audio files. The reason behind this choice is that OGG works best with the Ren’py engine and is fully compatible with modern hardware and supports all Ren’py features, unlike the MP3 format. Additionally, OGG is the fastest and most lightweight option among the available formats, making it a great choice to strike a balance between quality and versatility.

While Ren’py does support other image and audio formats, our implementation has specifically been tested and optimized for the formats mentioned earlier. We cannot guarantee the proper functioning of files in formats not listed above as they have not been thoroughly tested with our system. For the best performance and compatibility, we recommend sticking to the recommended formats, which have been extensively validated to work across all platforms.

File Structure

Creating the file structure for a mod is a straightforward process. By mirroring the game’s internal file arrangement, you can guarantee that your modifications will function seamlessly and without any complications.

To avoid conflicts with other mods that might use the same identifier, it is advisable to include the mod name in the final directory.

Here’s an example of a file structure for a mod that adds a new hairstyle for Hermione:

mods
└─── ExampleMod
     ├─── manifest.json
     ├─── script.rpym
     ├─── script.rpymc
     ├─── logo.webp
     └─── characters
          └─── hermione
               └─── poses
                    └─── default
                         └─── clothes
                              └─── hair
                                   └─── examplemod_ponytail
                                        ├─── 0.webp
                                        ├─── 1.webp
                                        └─── outline.webp