Tuesday, April 7, 2020

Tile Shopping, now with 200% more pixels!

A few days ago i saw that a new Tile Editor is currently in developement, named "Tile Shop":

https://www.romhacking.net/forum/index.php?topic=30404.0

I was able to see my broken font files using some different settings:

The developer asked in his thread for files that are unusual, and so i asked him if he wants to take a look at the font files of Growlanser.
He said sure, and so i send him the files and lo and behold, this madman actually managed to display our beautiful font in the Tile Editor!:





Look at it and be in awe of the beautiful GL5 font!
Here is what he wrote me while checking out the font files:


Hi Risae,

So I've looked at the GL5 files (GL6 looks the same) and the verdict is: "No, but kind of" regarding what I think is accurate viewing. I'm not sure how I would test accurate editing.

Here's the result so far: https://i.imgur.com/VTrS8OJ.png

I'll go through the steps necessary to get to the result for "GL5 ENG 0000002e.fnt".

The offset at 0x8 of each font file contains the location of the palette (0x220). Scroll here and see that the palette is split between two sections. TileShop cannot support scattered palettes at the moment, so I copy/pasted the second half directly after the first half. The color format is RGBA32 and not BGR15 as I would have assumed. I also changed the alpha channel values from 0x80 to 0xFF. 0x80 is probably a game/format-specific transparency value that maps onto an alpha blend mode that is not 50% transparent.

I mostly setup the included project through hand-editing the XML project files. Copy/pasting from single layout images is currently far from ideal and I've found some bugs in the process.

If you try the project, make sure the project file (and included modified font) is in the root of the TileShop folder. I introduced a bug with directory-dependency of the schema validation in the current version.

 He is using an XML file to tell the program how to properly display the font files, but after a first attempt at doing it myself i couldn't really get anything to show, so he helped me out once more:


Hi Risae,

For the GL6 font provided, please know that getting the width correct is critically important. You cannot reuse the same width (and height) from other files. Luckily, the FNT file contains the width, height, palette offset, image data offset, etc as follows:

0x8 - Palette offset (probably 4-byte)
0xC - Image offset (probably 4-byte)
0x1A - Image width (2-bytes)
0x1C - Image height (2-bytes)

I have included a revision to the GL6 project which includes one arranger at an incorrect height (768) and the other at a correct height (192). Without header information, you would need to open the font file directly in TileShop, change codecs, adjust width/height/file offset until you figure out the correct settings.

For editing via TileShop:
Importing is currently not supported, but will be supported soon. Importing has worked for quite some time in ImageMagitekConsole, but I would like to have a nicer solution for merging multi-palette images before rolling it into TileShop. I may not hold back for that though.

There is a save button in the pixel editor's toolbar that saves changes directly to the file.

I would suggest holding your editing for now, at least if you plan on using TileShop. I have an undo/redo feature for the pixel editor locally, but probably won't release a new version for another 2-3 days. You may also want to wait for importing as hand-editing a font with transparency aliasing using a very basic pixel editor is not a fun task.

- Klarth


I really should have known better... looking at his information it now all makes sense.
Thanks to him we have a really good understanding of how the font files are build up.

Since the program supports exporting but not importing of files we can't really change the GL6 font right now.
If i can somehow find the variable width font code in GL5 we might be able to just copy and paste the GL5 font into GL6 and it will magically work without doing any tile editing.
I will create another thread on the Romhacking forum about finding "Text Routines" in the games assembly code.
Lately the Romhacking Forum has been such a great help in figuring out how this game and its files work, really cool community.

But now i know why in 2019 i could just copy and paste the GL5 font into GL6 without any artifacts or broken letters (aside from the width issue).
GL5 and 6 really are a carbon copy of each other. Makes things a lot easier!

Here are the GL 5 and 6 fonts in all its high resolution glory:

GL5 ENG 0000002a.fnt

GL5 ENG 0000002e.fnt




GL6 JPN 0000002a.fnt



GL6 JPN 0000002e.fnt


Those are not all the .fnt files, but we mainly have to focus on 2e.fnt, because that is the one that affects the font ingame.

4 comments:

  1. Glad to see some progress on Growlanser VI! Good luck on your endeavor, I know translation projects can be time consuming. Hope to hear more soon, and remember to stay safe!

    ReplyDelete
  2. Every laptop manufacturer (the more well known ones at least, like Toshiba, Lenovo, Dell, Apple, etc) has a 'dead pixel policy'. For example, if you have more than 7 dead pixels in your Dell laptop, you can approach Dell to have it replaced. ป๊อกเด้ง

    ReplyDelete
  3. Floor tile lexington Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I'll be subscribing to your feed and I hope you post again soon. Big thanks for the useful info.

    ReplyDelete