OpenNaja / cobra-tools

A suite of GUI tools for extracting and modifying OVL and OVS archives, as well as editing the associated in-house file formats. Also includes a model plugin for Blender. For downloads, guides, and FAQs visit:
https://opennaja.github.io/cobra-tools/
GNU General Public License v3.0
94 stars 27 forks source link

Font Files? #374

Closed skalia16 closed 3 months ago

skalia16 commented 4 months ago

Hello, will there be support for importing ''ttf and ''otf'' font files? Not being able to import fonts is really a big deficiency. I would be very happy if you add this support. Also thanks for this nice tool.

hexabits commented 4 months ago

Font files are streamed in through a complicated binary .FCT file that we haven't really been able to decode. I'm actually not sure the .TTF/.OTF are used directly, they may only be parsed using information from the .FCT file.

HENDRIX-ZT2 commented 4 months ago

Actually, you should be able to replace font files by replacing those that come with an fct file and injecting again.

hexabits commented 4 months ago

Actually, you should be able to replace font files by replacing those that come with an fct file and injecting again.

I'm pretty sure we tried this? Last I remember we needed to decode the .fct to go any further.

skalia16 commented 4 months ago

Font files are streamed in through a complicated binary .FCT file that we haven't really been able to decode. I'm actually not sure the .TTF/.OTF are used directly, they may only be parsed using information from the .FCT file.

Thanks for the reply.

But .FCT files seem to be just map files of the main font files .TTF/.OTF. So, in theory, font changes are not possible without .TTF/.OTF files. .FCT files are imported, but basically it doesn't work because the fonts are in .TTF/.OTF. Since we cannot import these files, we cannot make changes.

As I have experienced in the translation of many games in the past, I think that .FCT files are only locators. So I think that only the changes we make in .TTF/.OTF files will be sufficient independently. Of course you know better.

Would it not be possible to make an import feature for these files?

HENDRIX-ZT2 commented 4 months ago

You extract the fct. Replace a ttf/otf that is extracted along with your desired font. Inject the fct again, and it should inject the ttf/otf fonts along with it.

skalia16 commented 4 months ago

You extract the fct. Replace a ttf/otf that is extracted along with your desired font. Inject the fct again, and it should inject the ttf/otf fonts along with it.

I haven't tried it yet. I'll try and let you know. Thank you for your help.

skalia16 commented 4 months ago

@HENDRIX-ZT2

To try it out, I changed a few files and repackaged them into the "Loc.ovl" file. Then when I unpacked it again, I found that the file I changed was still there. So doing it like you said works. Thanks for your help mate :)