Jump to content

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


Renka

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...