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.

help with unknown texture format [eastward]

Featured Replies

  • Author
  • Localization

swat, posted Wed Oct 20, 2021 11:25 am (67097)


canboy wrote:
swat wrote:
which file in font.g is responsible for in-game font
and
how to add additional characters? (sS?IgG)

usebmfont to create image and fnt file
dialog font is pixel operator


I have used bmfont to create fnt and tga files.
what is the next?
In which file do I import these two files?
and how?
  • Author
  • Localization

canboy, posted Wed Oct 27, 2021 2:57 pm (67183)


swat wrote:
canboy wrote:
swat wrote:
which file in font.g is responsible for in-game font
and
how to add additional characters? (sS?IgG)

usebmfont to create image and fnt file
dialog font is pixel operator


I have used bmfont to create fnt and tga files.
what is the next?
In which file do I import these two files?
and how?

Export it with bmfont to exact canvas size of original image then replace it in crystaltile2
And replace source fnt file with new fnt file
  • Author
  • Localization

JokerDKha, posted Fri Oct 29, 2021 2:35 pm (67233)


Are anyone know where this 8bit fonts is location???
Image
  • Author
  • Localization

canboy, posted Sun Oct 31, 2021 1:34 am (67270)


JokerDKha wrote:
Are anyone know where this 8bit fonts is location???
Image

it's pixel operator font
you can edit it to use an ttf font in the index, but the ttf render have some weird problem so still prefer the bitmap one
Image
  • Author
  • Localization

canboy, posted Mon Nov 01, 2021 5:30 am (67288)


Allen wrote:
The data is compressed, and I scanned it with quickbms to show that it uses the "LZ77EA_970" compression algorithm.

Format:
Code:
char    magic[3];//PGF
byte    unkLen;
DWORD   fileSize;
byte    unkData[unkLen];
DWORD   dataSize;
DWORD   width;
DWORD   height;
byte    bpp;
byte    unk2;
byte    unkLen2;
byte    unk3;
byte    unkData2[unkLen2];
byte    datas[dataSize];

Image


If change comtype to LZ4, it Also Worked.
It should be used LZ4 compression algorithm, but they have the same algorithm for decompressing data.

when i view the file, it show up an transparent bg like this
Image
but when i'm just export it then reimport, it became black bg like this
Image
is that a color format error?
  • Author
  • Localization

Allen, posted Mon Nov 01, 2021 3:22 pm (67298)


canboy wrote:
when i view the file, it show up an transparent bg like this
Image
but when i'm just export it then reimport, it became black bg like this
Image
is that a color format error?


It looks like the alpha channel is broken. No transparency value is set.

I have provided a simple recompression script here. The target is RAW RGBA32 format data extracted from my first script.

1. Extract RAW RGBA32 data from the PGF file, and modify or add characters to the image
2. Recompress to lz4 data
3. Use the 010 editor template to modify and replace related data.

char magic[3];//PGF Pixpil Graphic Format
byte unkLen;
DWORD fileSize; // You need change this value.
byte unkData[unkLen];
DWORD dataSize;//compress data size. You need change this value.
DWORD width;
DWORD height;
byte bpp;
byte unk2;
byte unkLen2;
byte unk3;
byte unkData2[unkLen2];
byte datas[dataSize];//comtype LZ4. You need change this datas.


I tested that if you do not make any changes, it will not look like your picture after recompressing it.
The result is normal, so if you change the ALPHA channel correctly, there will be no errors when you compress it back.



I also provided a Noesis viewing script, you need to change the file name to a .pgf suffix.

I wrote a function to export RAW RGBA32, which can replace the first step of the BMS script.
When you use Noesis to view the image, export the editable image format (such as PNG), and then modify it. When you are done modify, use Noesis again to open the modified image, export to .pgf format (The pgf here is only the original RGBA32 data, which cannot be viewed directly by Noesis), and then start from the second step (bms recompression). Can avoid the alpha channel setting error.

eastward pgf.zip

fmt_eastward_tex.zip

  • Author
  • Localization

jonastraducoes, posted Mon Jan 24, 2022 3:45 pm (69341)


Allen wrote:
canboy wrote:
when i view the file, it show up an transparent bg like this
Image
but when i'm just export it then reimport, it became black bg like this
Image
is that a color format error?


It looks like the alpha channel is broken. No transparency value is set.

I have provided a simple recompression script here. The target is RAW RGBA32 format data extracted from my first script.
eastward pgf.zip
1. Extract RAW RGBA32 data from the PGF file, and modify or add characters to the image
2. Recompress to lz4 data
3. Use the 010 editor template to modify and replace related data.

char magic[3];//PGF Pixpil Graphic Format
byte unkLen;
DWORD fileSize; // You need change this value.
byte unkData[unkLen];
DWORD dataSize;//compress data size. You need change this value.
DWORD width;
DWORD height;
byte bpp;
byte unk2;
byte unkLen2;
byte unk3;
byte unkData2[unkLen2];
byte datas[dataSize];//comtype LZ4. You need change this datas.


I tested that if you do not make any changes, it will not look like your picture after recompressing it.
The result is normal, so if you change the ALPHA channel correctly, there will be no errors when you compress it back.
recompress sample.zip


I also provided a Noesis viewing script, you need to change the file name to a .pgf suffix.
fmt_eastward_tex.zip
I wrote a function to export RAW RGBA32, which can replace the first step of the BMS script.
When you use Noesis to view the image, export the editable image format (such as PNG), and then modify it. When you are done modify, use Noesis again to open the modified image, export to .pgf format (The pgf here is only the original RGBA32 data, which cannot be viewed directly by Noesis), and then start from the second step (bms recompression). Can avoid the alpha channel setting error.


Thanks for the scripts!
But I follow all the steps I can insert the edited images, but it is black and white and in color where it is written tribogamer and PKG!
Can you tell me where I'm wrong!

file edit
https://cdn.discordapp.com/attachments/ ... 6032400d97

Image color white
Image

Image all color
Image
  • Author
  • Localization

cic, posted Mon Jan 24, 2022 10:19 pm (69344)


Thanks
  • Author
  • Localization

Allen, posted Tue Jan 25, 2022 2:20 am (69352)


jonastraducoes wrote:
Thanks for the scripts!
But I follow all the steps I can insert the edited images, but it is black and white and in color where it is written tribogamer and PKG!
Can you tell me where I'm wrong!

file edit
https://cdn.discordapp.com/attachments/ ... 6032400d97

Image color white
Image

Image all color
Image


I decompressed the data and the colors are colored.
Have you tried modifying other images? Are they black and white?
I guess that the LOGO image only reads the ALPHA channel, and the RGB channel does not work. This should be a special setting of the game.
  • Author
  • Localization

canboy, posted Sun May 08, 2022 7:23 am (71456)


Allen wrote:
canboy wrote:
when i view the file, it show up an transparent bg like this
Image
but when i'm just export it then reimport, it became black bg like this
Image
is that a color format error?


It looks like the alpha channel is broken. No transparency value is set.

I have provided a simple recompression script here. The target is RAW RGBA32 format data extracted from my first script.
eastward pgf.zip
1. Extract RAW RGBA32 data from the PGF file, and modify or add characters to the image
2. Recompress to lz4 data
3. Use the 010 editor template to modify and replace related data.

char magic[3];//PGF Pixpil Graphic Format
byte unkLen;
DWORD fileSize; // You need change this value.
byte unkData[unkLen];
DWORD dataSize;//compress data size. You need change this value.
DWORD width;
DWORD height;
byte bpp;
byte unk2;
byte unkLen2;
byte unk3;
byte unkData2[unkLen2];
byte datas[dataSize];//comtype LZ4. You need change this datas.


I tested that if you do not make any changes, it will not look like your picture after recompressing it.
The result is normal, so if you change the ALPHA channel correctly, there will be no errors when you compress it back.
recompress sample.zip


I also provided a Noesis viewing script, you need to change the file name to a .pgf suffix.
fmt_eastward_tex.zip
I wrote a function to export RAW RGBA32, which can replace the first step of the BMS script.
When you use Noesis to view the image, export the editable image format (such as PNG), and then modify it. When you are done modify, use Noesis again to open the modified image, export to .pgf format (The pgf here is only the original RGBA32 data, which cannot be viewed directly by Noesis), and then start from the second step (bms recompression). Can avoid the alpha channel setting error.

Could you explain a little bit about the step?
I'm currently export the first step with noesis, recompress to lz4 by the second bms, but the last one make me confuse
I'm trying to load the original file with the template, then replace the datas section with the whole compressed file, and seem that still not correct.
Hope you could explain a little bit more 'bout the third step, thx for help
  • Author
  • Localization

Allen, posted Sun May 08, 2022 8:28 am (71457)


The third step decomposition:
1) Load the original file with 010editor and load the .bt template.
Select "datas" (compressed data), then delete. Record the current file size, we denote it as A.
2) Open the recompressed file with 010editor, and then record the recompressed file size, which we record as B, copy all data to the end of the source file, and then modify "dataSize" to the recorded recompressed file size B.
3) Record the current modified file size and modify the entire file size (A B), which is "fileSize".
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.