[P5R] Editing .gnf Bustups?

Describe your problem in as much detail as you can. Other users might help.
Post Reply
User avatar
wudabed
Posts: 5
Joined: Thu Sep 23, 2021 4:18 pm

I'm currently working on a mod that involves the replacement of a bustup, however upon extracting the .bin for the bustup I saw that the files were in .gnf rather than .dds
I attempted referencing the wiki for any information on the format but the page for Persona 5 Royal simply listed it as one of the filetypes used in the game with no corresponding article existing
I did some further digging on the internet about the format and found that Noesis was capable of viewing .gnf files and exporting them to standard image formats however it's not capable of repacking images back into .gnf which is necessary for making the mod

Is there any tool that can both unpack and repack the .gnf files?
User avatar
DniweTamp
Posts: 197
Joined: Sun Dec 22, 2019 7:50 am
Location: Russia
Has liked: 42 posts
Been liked: 90 posts
Contact:

The only tools for generating new GNF images are PS4 SDK tools

The game should still be able to read dds bustups though, if that doesn't work try tga (yes, it can read tga)
User avatar
wudabed
Posts: 5
Joined: Thu Sep 23, 2021 4:18 pm

I exported the files in the bustup archive to .dds via Noesis, removed the .gnf s, did my edits, repacked the folder into into a bin and attempted to load the mod but the game crashed when the bustup was loaded
Not sure if it's an issue with the way I'm saving the edited files in photoshop

For reference I'm using DDS2Tool to pack/unpack the bin (PS4 Bustup Repacker can unpack the bin but won't pack the folder if there's .dds files inside)
User avatar
Century_
Posts: 39
Joined: Tue Mar 31, 2020 9:39 pm
Has liked: 38 posts
Been liked: 34 posts
Contact:

As long as you save your bustups as dds with BC3 (DXT5) compression, the game should be able to read them. You do have to make sure they don't have any mipmaps though.

Apart from this, you should try editing the bustup .bins using amicitia or building them again from folders using PAKPack.
User avatar
wudabed
Posts: 5
Joined: Thu Sep 23, 2021 4:18 pm

So I
-Saved the edited main bustup image (b210_000_00) as a .dds with BC3 (DXT5) compression
-Opened the .bin for the bustup in amicitia, deleted b210_000_00.gnf, and added the .dds file (using the replace function just renamed the file extension to .gnf that when exported wasn't viewable in noesis unlike the normal .gnf)
-Saved the bin
-Built the mod.cpk and loaded it into the game

And when the bustup was called in game surprisingly the game didn't immediately crash this time but but there was nothing there except for these small squares in the top-left of the area where the sprite would normally be
Upon exiting the shop menu which should cause the sprite to disappear the game did crash however

Alternatively I repeated the same process in the bullets except replacing every file in the bin with a .dds verson (b210_000_00_e1, b210_000_00_m1 etc.) but the game just crashed upon trying to draw the sprite like in my previous post

Image
This is how the folder with the .dds files looks like (the edited bustup isn't my actual mod just a quick edit for testing purposes)
User avatar
Century_
Posts: 39
Joined: Tue Mar 31, 2020 9:39 pm
Has liked: 38 posts
Been liked: 34 posts
Contact:

You have to make sure the texture has no mipmaps, because P5R doesn't support them. The Nvidia texture tool tends to save dds with a mipmap count of 1, even when you don't select the "generate mipmaps" option.
I'd recommend you take a look inside each .dds file using the DDS binary template for 010, once you're in, change the mipmap count from 1 to 0 and save it.

DDS Binary Template Here:
User avatar
wudabed
Posts: 5
Joined: Thu Sep 23, 2021 4:18 pm

Image
Image
I changed the mipmap count to 0 for each dds and saved it for each, repacked them into the bin through Amicitia like before but the game still crashes at the same spot
User avatar
Century_
Posts: 39
Joined: Tue Mar 31, 2020 9:39 pm
Has liked: 38 posts
Been liked: 34 posts
Contact:

Did you make sure to edit the flags section of the header and the dwCaps section? Those might be causing the crash.

Image
User avatar
wudabed
Posts: 5
Joined: Thu Sep 23, 2021 4:18 pm

Also edited the mipmap count in the flags and and dwCaps section to 0 for each of the .dds files and packed the bin through the same process as before, still crashes at the same spot
Image
User avatar
Century_
Posts: 39
Joined: Tue Mar 31, 2020 9:39 pm
Has liked: 38 posts
Been liked: 34 posts
Contact:

I have no idea why your texture keeps crashing the game, the way your header looks isn't very far off from what a normal P5R texture's looks like. Maybe you could try editing the depth field in the header? That seems to be put on 0 for Royal textures.
Image
Post Reply

ShrineFox 2020 - 2023
Support | Progress | Labs | Privacy | Terms
This site is NOT affiliated, associated, authorized, endorsed by, or in any way officially connected with Atlus Co., Ltd, Atlus U.S.A., Inc. or Sega Games Co., Ltd, or any of its subsidiaries or its affiliates.