Jump to content

Site Work Failed, But We Didn't Die

Ugh. Still more roadblocks. Need to get an as-yet unknown password from Nay in order to get this sucker changed. For now, please enjoy the mess of a forums we've got, and dream of the forums we will probably never one day have.

< 3 - Tay

You can dismiss this alert by clicking on the "X" button


[SOLVED] To Heart Project - Leaf Visual Novel System - LF2 files

Recommended Posts

I hope this is the right section to discuss this problem. As you could see in the preview of my translation project for To Heart sprites are not being displayed correctly. I will now explain all what I can regarding this matter. 
The LVNS has many, many ways to compress files. There's the plain LF format (used for scenario files), LF2 (used for visuals), another for GRP files used in another game, Comic Party, etc.
With this, LF2 files needs to be uncompressed in order to display images; for this, there's a tool called TH256dec (created by the Game Boy port's author) where there's the option to extract PNG images, and his mask, in case of sprites. Unfortunately, problems come with the latter, since of course these will be Game Boy size and completely unreadable by normal viewers. Under these circumstances, the sprite surrounded by zero-black background (in PNG format) can not be displayed without it, otherwise it'll not show the zero-black border of the sprite that "melts" with the background. That's why a mask is needed, so that this mask contains the info of what portion of the sprite should be displayed. To solve this, I have thought several solutions:

Using the Lfviewer tool: This tool it's supposed to display visuals from Leaf games, yet unfortunately I can't test it myself by not having a Linux enviroment (which in fact installed, but not worked).
Create a mask tool based on mask.c info: There's some file into Lfviewer's source code called mask.c, which contains some data to "create a mask". It uses some native Linux functions to work, but it seems to create exactly what it's needed.
Create a mask tool based on XLVNS info:  As this is concretely a port of the original engine to X system, there has to be some function to rip the part of the sprite to create a mask. My own research can point to one or two functions, but these point to a "transparent-color", which I can't say too much of.
Rip the sprites manually: In the worst case scenario, this would imply traveling trought the entire game (friendly reminder that we have only 5 save slots) to take screenshot of the sprite and strip away the background. This effectively can be done cleanly, yet the enormous disadvantage it's plain to view.
Rip sprites from PS1 edition: An option that doesn't seem too much of one, yet it could have a different format with readable masks inside or something like that. Maybe a couple of hacks to display every single sprite in white background to make the masks? Which leads to the last resource...
Rip sprites from the original game: The same as PS1 option, but using the original, which I think it would be really hard... or not.

And that's everything I can list for now. As you can see, there's no way to edit sprites manually, as the required "melted" pixels would be lost. I have prepared and uploaded a file with everything I could gather regarding source code and info (as I said before in the project thread) for anyone interested in helping. For any question, please PM me. Thank you very much for reading. May Maruchi bless your day (or night).


Edited by Renka
Solved issue

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.