Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Castlevania LoS Mirror of Fate HD Font Edit

Featured Replies

  • Author
  • Localization

Gamer, posted Thu Mar 21, 2019 5:18 am (45924)


Are there any tools for that this files editing? I want change or add some characters.
I hope there are that anyone can help me?
  • Author
  • Localization

akintos, posted Thu Mar 21, 2019 1:05 pm (45929)


You can extract texture(*.bctex) files with script below:

Code:
import struct
import os

from PIL import Image


MTXT_MAGIC = b'MTXT'


inpath = 'bradley27.bctex'
outpath = os.path.splitext(inpath)[0] '_d.png'

with open(inpath, 'rb') as f:
    magic, unk1, unk2, unk3, unk4, width, height, mips, totalsize, headersize = struct.unpack('<4s4H5I', f.read(0x20))

    if magic != MTXT_MAGIC:
        raise IOError("Invalid file magic : %s" % magic)
   
    print("width=%d height=%d" % (width, height))
    print("mips:%d" % mips)

    imagesizes = struct.unpack('<%dI' % mips, f.read(4 * mips))

    if f.tell() != headersize:
        raise IOError("Failed to fully parse header.")

    for i in range(mips):
        imgdata = f.read(imagesizes[i])
        img = Image.frombytes('LA', (width, height), imgdata, 'raw', 'LA')
        img.save(outpath % i)

        width //= 2
        height //= 2
   
    print("Extracted %d images from %s" % (mips, inpath))


I didn't fully analyzed font files but it seems to be not possible to add characters.

There are only character coordinates in font files, not character numbers.
  • Author
  • Localization

Gamer, posted Thu Mar 21, 2019 3:28 pm (45931)


akintos wrote:
You can extract texture(*.bctex) files with script below:
Code:
...

I didn't fully analyzed font files but it seems to be not possible to add characters.

There are only character coordinates in font files, not character numbers.


it enough that only I edit some characters.

Script is worked. I extracted as .png file.

But How I reimport ".png" file as ".bctex" file?
  • Author
  • Localization

Gamer, posted Sat Mar 23, 2019 6:07 pm (45982)


Hi! @akintos
Is it possible to convert this file to ".bctex" file?
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.