The improvement mod update for Valdana v2.0 is done! Although initially only suppose to be an enhancement of the new images and videos, grew in scope to fixing much more, including many errors in the v2.0 patch.
1.3 changes
Images and videos
- Remove unused images and videos.
- Enhance new images and videos from v2.0, including some manual clean up of sprites.
Audio
- Remove unused sound files.
- Convert sounds to more efficient opus codec at 128k bitrate, to reduce file size at no perceived quality loss.
- Change the background sounds to a separate channel for more granular sound control.
Did you know that Valdana have sex sounds during the scenes? I didn't, because I played with the music volume down, and those sounds are in the music channel, getting drowned out by the rock music. If you've played visual novels before, you'd know that those sounds are normally in the
sounds channel. Instead I mapped those background sounds (which are mostly sex sounds but also includes a couple of other things) to the unused voice channel, for more granular control.
Script and bugs
- Fix incorrect sprites when playing scenes from the gallery.
- Fix bad performance when playing video during scenes, causing stuttering.
- Fix grammar and spelling errors.
- Fix some script errors (e.g. showing unavailable sprite).
A gallery was added in v2.0, which used the method from my
improvement mod of the prequel, detailed
here. Which is great, it's a better way of handling a gallery the way Tjord scripts his games compared to previously. Except... he set up the sprites incorrectly on several scenes. The reason stems from the system Tjord use for sprites.
A sprite in this game has four parts: Character, stage (corruption), style, pose (number). The current stage and style is set globally, which means you only need to set it once and it's remembered in the future until you change it. This makes it convenient when scripting, but hard to keep track because it could've been set way back in another part of the script.
This becomes a problem when setting up the gallery, because you "arrive" to the scene from the main menu, not from earlier in the script, so your stage and style is empty. You therefore need to explicitly set up the correct versions before the scene, which is what Tjord forgot to do for several scenes.
—
Valdana have a problem with videos. As detailed in my linked post above, the game plays videos on top of previous videos, resulting in multiple playing simultaneously, causing heavy stuttering during playback. While Tjord implemented my fix for v2.0, it was done inconsistently, missing several scenes. In short, the problem of heavy playback wasn't solved. To fix this I manually went through the entire script and corrected everything.
I also changed the way I display video. After extensive testing, I've revised my method for video playback. Instead of using
You must be registered to see the links
like in my mod for the prequel, I'll instead be using
You must be registered to see the links
and
You must be registered to see the links
. A hypothetical best way to display videos would probably be to use the first frame of a movie as the
start_image when declaring it using the
You must be registered to see the links
, then displaying using
scene, but barring that I believe this way is the best way to display video in Renpy.
show display a displayable (image/video). Notably, it does so on top of anything else on the layer.
hide remove a displayable.
scene will remove all displayables, then show it. So basically
scene =
hide (all) +
show. Because of this, the only thing "under" something displayed with
scene is a chequered/black Renpy base image.
The problem was that previously, Tjord only used
show without
hide, stacking videos on top of each other, so the simple fix was just to use
scene instead. But this wasn't problem free. Because Renpy takes a while to load the video, the background image is visible before loading it, resulting in flickering. This is most noticeable when fast forwarding or going backwards during game play. This is only partially solved by using a dissolve transition when displaying the video.
In the end, the best method was to use
show with
dissolve (or some other transition) for movies. If what follows is an image displayed with
scene, do nothing. If what follows is another movie,
hide the previous movie directly after. Doing it this way means the movies overlap during the transition, resulting in no flickering. If there's an image before or between the movies, that image will be "under" the movies, which if they're similar to the movies, will also possibly help during the transition.
—
I have fixed a couple of hundreds of grammar and typo errors in the script. This is far from the comprehensive editing of thousands of lines in my mod of the prequel, but one of the reasons is that Tjord is basically
You must be registered to see the links
. In other words, Tjord has much improved in writing Valdana compared to Isis that there's much less need to fix it. Fixing the script in Isis was an enormous undertaking and doing the same for the much longer Valdana for less reward is not something I plan to do (at least for the forseeable future).
Miscellaneous
- Add a stripped down version of the transparent text box mod by Penfold Mole.
- Change return from v2.0 gallery to return to previous gallery instead of main menu.
- Add separate download of 60fps videos for 60hz monitors and really weak CPUs.
- Make small change at the end of the second scene from the v2.0 scenes.
- Swapped position of Yoona and Audrey in a Victorica scene so they don't get flipped.
- Probably other things I forgot.
All-in-one / Compression
Note: while the typical compression posts has a smaller size due to sacrificing quality, the compression I've done has no perceived quality loss. In fact, due to the enhancements done on images and videos, most of them have better quality at smaller sizes!
There are many superfluous files in the v2.0 release that I removed. These include: base Renpy files, notes, compiled python and Renpy files, unused sprites and movies, fonts, two script drafts for other projects (Valdana sequel?
), the entire Isis script!
The movies were upscaled/interpolated to 4k/120fps, then encoded to 1080p with best efficient VP9 at crf31. While that may seem high, I've done testing at different levels and couldn't tell any noticable difference between 25-31. The source movies are pretty low quality, so this still results in better visual quality, smaller sized movies. I've attached a comparison to this post. Flip between the images to see the clear reduction in visual artifacts, with higher fps and lower size to boot!
All images were upscaled then downscaled from png to 95 quality jpg (except for sprites). The result is better quality images at smaller sizes! But the best size reduction is removing something completely. Tjord creates every combination of sprites for easier development, but a ton of sprites remain unused. The clean way to do this would be to parse the script and record every sprite used, but with the sprite system Tjord uses this would be tedious. Instead I did it like this:
Code:
Identify used sprites:
Use ProcessMonitor with filter on .exe, path to sprite folder, readfile. Play entire game.
Tool -> file summary -> save as csv
Extract files from csv:
$ cut -d\" -f24 valdana_sprite_usage.CSV | cut -d\\ -f7 | sort | xargs -0 printf "%b" > valdana_sprite_usage.txt
Copy used files to folder:
$ <valdana_sprite_usage.txt xargs -d'\n' cp -t used_sprites
The result is an image size reduction from 1.19GB to 363MB! Remember, this is while having
better visually looking images, far different from the regular compression versions which destroys quality.
The audio also had a bunch of unused files, which I tediously removed by searching the script files and manually checking. Then I reencoded all of them with the following. There should be no perceived quality loss of the sounds.
Code:
> for /r %i in (*) do ffmpeg -i %i -c:a libopus -b:a 128k "%~pni.opus"
Summary
The v2.0 release is 1.51GB.
The all-in-one version, Valdana + improvement mod, is 587MB.
The stand alone mod is 559MB.
As such, I strongly encourage you to just download the aio version, which is a much cleaner version, and easier than downloading v2.0 then applying my mod.