A Kiss for the Petals: Maidens of Michael – Programmer’s Corner

Greetings. This is Craig Donson. I am excited to finally have the opportunity to bring you an official English version of A Kiss For The Petals – Maidens of Michael, an endeavor that has been five years in the making. After nearly a decade of official and unofficial work as a fan, this has been my most challenging project to date, and thanks to your support of our previous English releases, it is now a matter of days before you will be able to experience it for yourself.

Since its release on 30 November 2012, Maidens of Michael has been one of the most anticipated titles in the A Kiss For The Petals series for an English localization. In May 2013, five months after its release, series translator Ralen and I began a community translation project of our own after it became clear that no other fan translation groups at the time were willing or able to work on such a large project. Though it was a community effort, it was largely led by Ralen’s ambition. In the intervening years, we worked on it as our schedules permitted, even as we were forced to discontinue the community’s participation in 2015 when MangaGamer acquired the rights to A Kiss For The Petals. By the end of 2016, we finished it and presented it to MangaGamer for consideration to the license owners. In February 2017, MangaGamer revealed the existence of six “secret projects” to be revealed throughout the year at convention panels. Maidens of Michael was Secret Project #1, described as 100% translated and edited, and at Otakon 2017 on 11 August 2017, was the last to be revealed. As with The New Generation the year prior, I had the privilege of introducing the final Secret Project before a live audience, this time with ample preparation and a platform to release the tension of many months of anticipation of that moment. I would like to thank the audience once again for their reception of my portion of the event.

Though MangaGamer was instrumental in allowing us to bring the fruit of five years of translation work into an officially licensed product, what we did not expect was a Steam version, which will greatly increase the number of people who can experience this pivotal work. A number of edits were necessary to make the visual novel suitable for Steam, but all of them are reversible with an adult content patch. This was a novel challenge for me, as this was the first time I created a program designed with multiple modes of operation dependent on the presence of patch files. I was all too happy to undertake this additional work alone to spread the influence of this unique brand of yuri to such a vast audience.

Most of the technical details of the Ren’Py port have been discussed in my previous articles for Remembering How We Met and The New Generation, which discuss the history of the Ren’Py ports and challenges in targeting a resolution of 1600 x 1200. This post will focus on the process of creating an adult content patch for a visual novel not originally designed for one, and the techniques I used to minimize the amount of graphic data, which is a major consideration for a version of a visual novel that is four times the original resolution and much larger than either of our prior releases.

Patchwork

In late 2017, an all-ages version was released for Japanese Android and iOS devices. The edits for these versions include a number of CGs cropped to obscure female anatomy, lines of dialogue altered to remove references to sexual activity, and sexual scenes omitted. There is no means to reinstate the deleted content in these versions. For our Steam version, we were able to use these edits as a guide, though with fewer alterations as Steam regulations for sexual content are more lax than the mobile device marketplaces. The edits for the Steam version were made at a high level: the explicit scenes were still deleted, but none of the remaining CGs were cropped and no individual lines of dialogue were changed. Some CGs showing partial nudity remain in the Steam version, similar to the level of detail in the Steam release of Kindred Spirits on the Roof. However, some dialogue exchanges alluding to sexual activity in otherwise non-explicit scenes were deleted, rather than modifying the language of specific lines. I have taken care to minimize the impact on narrative flow caused by the removal of these lines.

In designing the Ren’Py port for Maidens of Michael, I used the framework for The New Generation as we were able to use the unscaled artwork from the beginning. After the process of inserting the translation into the Ren’Py project was completed, I defined scenes and chapters that would not be suitable for Steam and moved them into separate scripts. These scripts and their associated assets were moved into archive files separate from the base package, which are not required for the program to run. These archives constitute the adult content patch. When these files are present, the result is the equivalent of the full, uncut release.

The nature of the edits for the Steam version allows for the adult content to be toggled on and off at any time while it is running. By default, the adult content is enabled when the patch is installed. When it is disabled, the story will proceed as if the patch is absent. Immediately before a scene in the adult content patch begins, the program will check for both the presence of the patch files and whether the adult content is enabled. If both are true, the scene will play. Otherwise, a conspicuously long fade to black replaces these scenes. For blocks of dialogue in normal scenes, disabling adult content will cause them to be skipped transparently.

One concern is that save files can be made during scenes and dialogue that only exist within the patch. If such a save file were to be loaded and the patch is not installed, an error would occur. For this case, I added a flag that is set when an explicit scene or dialogue begins, and is unset when it ends. When the menu to load save files finds a flagged file, it will check if the patch is either not installed or disabled. In either case, the file will not be loadable and its preview thumbnail will not be displayed.

Another minor change is the nude sprites for each character. Though they are used sparingly, they appear in some scenes that are otherwise not explicit and therefore included in the base package. Rather than delete these portions as well, I used Ren’Py’s Dynamic Displayable functionality to allow different images to be displayed when the adult content is not available. The ConditionSwitch evaluates a Python expression and selects an image to show based on its result. The nude sprites are defined as ConditionSwitches that determine if the adult content patch is present and enabled. If both are true, the nude sprites are displayed. Otherwise, an equivalent panel image showing only the character’s face is used instead. These square panels are used more frequently throughout the story, even in places where the nude sprites may have been used in their place, so I gave them another usage here.

Picture Perfect

As I become more familiar with Ren’Py development, I strive to take advantage of its flexibility to improve the user experience to the fullest possible extent. I will describe the techniques I used to minimize the amount of graphic data for the benefit of other visual novel developers. These are already in place for Remembering How We Met and The New Generation since versions 2.1 and 1.3 respectively, but I have not described them in detail. Because Maidens of Michael has the largest number of images to date among the MangaGamer releases, I deemed it necessary to refine these methods to minimize the download size.

Three images of Kaede, selected as a small sample of character images to illustrate the amount of data that can be saved by eliminating identical pixels from character images.

Characters in visual novels typically exist as a collection of images. Each character has a number of possible facial expressions, outfits, and poses, all of which must be defined individually. The standard method is to produce one image file for each combination. Images of a particular outfit and pose that differ in facial expression have small visual differences from each other, making this a rather inefficient method of forming the character’s sprites. To counteract this, some Ren’Py titles use a feature known as LiveComposite to define individual character sprites as a combination of at least two images: One or more of the body with no facial features, and one or more containing only a facial expression. Liberal use of LiveComposites can significantly reduce the total size of graphic data with negligible performance impact—these composited images are created and stored in memory as the program starts. This process is finished in less than a second.

A simplified illustration of the LiveComposite process.

In Maidens of Michael, characters have up to ten body images and eleven expressions. Rather than as many as 110 individual files per character (as was the case in the original Japanese releases), they now have a maximum of 21 image files defined in up to 110 LiveComposites as needed. As we had access to the source files for each character’s sprites, preparing the images for composition was a simple matter of outputting base images of each outfit and pose with all facial features hidden, then outputting images with one expression each. After the images are composited, the results are indistinguishable from full images with the same data.

For full-screen CGs, the process is not so straightforward, as though they also consist of a number of images with variations that contain a large amount of shared pixel data, effect layers prevented me from using the above method without causing noticeable color inconsistencies in the changed areas. As the CGs comprise the majority of graphic data, I determined that a brute-force approach was the best way to optimize them. This process is similar to the above: I would use the first version of each CG as a base image, then manually remove the portions of each variant that match the base image.

A quick way to optimize the variant CGs is to simply create a mask containing the areas where the image changes, with some margin to prevent abrupt edges within subtle gradients and other very small changes that are difficult to notice with the naked eye. This masked portion can then be composited over the base image to create the variants in code while still saving a substantial amount of data. This method was used in The New Generation version 1.3, where it reduced the package size from 807 MB to 726 MB.

However, as the goal is to eliminate pixels from one image that exactly match those in another, this method can be improved. For maximum savings, a graphic editor that supports the Difference layer mode is necessary. This can be done in Photoshop or GIMP.

A Difference layer will compare the pixels of the layers below and render pixels that differ in inverted color, and pixels that do not differ in black. The greater the difference, the brighter the pixels will be. Pixels that are 100% black in this mode are to be discarded, leaving behind only pixels that differ even by the smallest amount.

The variant CG is placed in a layer over the base CG. Its mode is changed to Difference, which changes most of the picture to black. The Magic Wand is used to select only 100% black pixels (tolerance 0, with anti-aliasing disabled), which are then deleted. After changing the layer mode to Normal, what remain are the changed pixels with no identical pixels from the base CG remaining. Using this method, there is no possibility of accidentally cutting through a gradient with a mask or missing any changed areas. These difference images are, in most cases, approximately 10-60 KB each, compared to a full 1600 x 1200 CG that is typically larger than 1 MB. With the rough mask method, these difference images could be as much as four times larger.

These figures for this example may appear to show only a minor difference between each method, but across dozens of variants, the more thorough deletions allow for several additional megabytes to be saved. I was able to use the LiveComposite function to its fullest in order to save over 200 MB of image data. Further savings were made possible with support for the WebP format for image data, which was added in Ren’Py version 6.99.12 and produces files 23% smaller on average than PNG, the format used by the original releases (both MScripter and Ren’Py). In total, the download package size is 1.86 GB, an increase of only 0.76 GB over the original 2012 release despite the much higher resolution through the use of these techniques and more efficient compression formats.

A Word of Caution

As with The New Generation, our version of Maidens of Michael allows players to quickly select a new route after finishing the main story. By starting a new game after seeing the credits for the first time, a menu will appear to jump to the end of the common route, where the player can choose one of the five original couples and see their individual stories.

I must make several recommendations regarding the order in which the storylines should be played. The order of the couples presented is a deliberate arrangement, not the order in which the couples debuted in Fuguriya’s visual novels—though Shizuku and Eris debuted later than Takako and Runa, the former pair are ordered first. There are some events that are common to multiple couples’ story lines, but they are presented in very different fashion dependent on their relevance to each couple. The storylines cover the same period of time, but some interpretations of common events are mutually exclusive. For these reasons, I suggest that you play through each couple’s storyline in the order presented, though if you have a preferred couple, please feel free to play through their story earlier.

However, unless you have a compelling reason to do otherwise, I must strongly recommend that the Takako/Runa storyline is played last. You may have noticed that their presence in the storyline is downplayed in promotional materials compared to those of the Best Couples—this has the effect of grouping the couples in the St. Michael’s main campus together, and Takako and Runa at the end. Without sharing spoilers, it resolves plot points not covered in any other storyline, particularly those concerning Houraisen Rena, the new teacher at St. Michael’s and Runa’s older sister. In light of these points and later releases, it is my belief that the ending of this route is intended to be the last chapter in this visual novel. If you choose to play through their story before completing all other routes, please keep these considerations in mind.

Conclusion

When I began working on the fan translations of the visual novels in 2010, A Kiss For The Petals was still a doujin series created solely by Fuguriya. Two years later, it unexpectedly entered the professional space with a new commercial entity, Yurin Yurin. Being such a large release, those who worked on the fan translations of A Kiss For The Petals viewed Maidens of Michael as a holy grail—large in scope and only for the most dedicated fans to attempt to localize. It has taken us five years, but with uncensored artwork, the increased resolution from The New Generation, and the adult content patch affording us an audience on Steam, I believe we have created the definitive version of one of the most popular and important titles in A Kiss For The Petals. This is a summary of all of the enhancements the Ren’Py port brings over the original Maidens of Michael, including those from previous releases:

Support for Windows, macOS, and Linux

Text box with adjustable opacity and text shadow options

1600 x 1200 resolution, increased from 800 x 600

Uncensored artwork

A download package size of 1.86 GB, an increase of only 0.76 GB over the original release despite the much higher resolution

Fast access to secondary routes

Lyrics for opening and ending themes

Climax timer for love scenes

Steam version with achievements and optional adult content patch that can be toggled at any time

Readers of my previous posts for the MangaGamer staff blog may have taken note of the several teases for future releases that would be made possible with sufficient fan support, and this is what they were referring to. Indeed, even The New Generation calls back to the Best Couples of this title, and such a reference only heightened our anticipation of this opportunity. This English release is a milestone for all fans of lovey-dovey, extremely dirty, romantic comedy yuri goodness. It is the result of both your faithful support of our previous A Kiss For The Petals releases and MangaGamer’s unceasing efforts to overcome the obstacles to this title’s English license behind the scenes. Even now, before release, I am in awe at the existence of a Steam store page for Maidens of Michael, and perhaps one day we can reach for even greater heights.

I thank you all once again for the grand opportunity to bring this visual novel to you, and ask that you now join me in looking toward the many other visual novels yet to be licensed. I am sure everyone who enjoys this title will want to see more of what St. Michael’s has to offer, as well as the meanings of the several references Maidens of Michael makes to Fuguriya’s early works. It will only be with your continued support that we can have the honor of bringing the complete library of A Kiss For The Petals to the world.

In our past articles for A Kiss For The Petals, we mention a sort of tagline for the series, “Yuri will save the world.” This was a quote from Kitajima Sara, and we hope you enjoy the debut of her and the rest of the Best Couples.

A Kiss For the Petals: Maidens of Michael is now available for pre-order! On sale February 22nd on MangaGamer.com and Steam!

4 Comments

It’s always great to read one of your Programmer’s Corners and see all the work that has gone into bringing this series to us.

And those greater heights are certainly a nice dream as well – the Switch is really an excellent platform for visual novels with the ability to both read them on a big screen or take them with you, which may not always work the best for bigger games (I vastly prefer Breath of the Wild on the big screen, for example), and it being a bit less powerful than the other big consoles isn’t a real concern for this usually less demanding software either. Still, the PC will probably remain my preferred platform for these, especially with consoles being less friendly towards adult content.

I hesitate to answer questions on my personal preferences regarding characters or couples as I do not wish to influence fan opinions on them. However, in this instance, I feel that it would be appropriate to provide a tentative answer in the context of my personal history with the series.

My first encounter with A Kiss For The Petals was the fourth visual novel, A Kiss For The Petals – Photograph of Affection, which features Kaede and Sara. As a result, I am most familiar with this couple. Of all couples in the series, Kaede and Sara have the longest-running relationship, starting from their early childhood and resuming after many years of separation when Sara enrolls in St. Michael’s at the start of Kaede’s second year in the senior high school. I would be interested in seeing Sara’s development in the intervening years, and the means she used to retain her memories of Kaede.

Kaede experiences the most visible growth as a character within the original Fuguriya visual novel series. At the start of the second visual novel, A Kiss For The Petals – My Prince Charming, Kaede serves the role of dependable class representative, but suffers from issues with self-esteem and forming relationships with others. Her reunion with Sara allowed her to begin to overcome them, primarily through her attraction to Sara’s gregarious demeanor and model-quality glamour, which contrasted with her gentle, reserved personality and attire. She also wears eyeglasses, and outside of the surface effect it has on her aesthetic appeal, the comfort she found in wearing them was a significant component in her character arc. Sara helped Kaede to transform, internally and externally, into a girl with a newfound confidence in her stride. By the end of My Prince Charming, her glasses became a symbolic link between these two personas. Relative to other characters at the time I began exploring the series, these points made Kaede more attractive for in-depth study.