Mod Tool Request: PKF Texture Editor (IPAC Browser Update?)

Joined
Aug 21, 2018
Location
UK
Favourite title
Shenmue
Currently playing
UE5 Game Dev
PKS (MAP/HCM (MT5) Model & Level Data) Archive
&
PKF (Chara.CHT & PVR Textures) Archive

Most PKS+PKF containers are compressed in a Gzip container (Gzip only works with a single file)
Shenmue IPAC Browser bypasses the GZ compression and can Import & Export data from PKS

ipac.jpg

When opening a PKF it only shows a Chara.CHT

Currently PKFs can be modified by Hex Editing and swapping PVR data (but the size and attribuites must be the same)
I'm not sure why PKF modifiation has been ignored, being able to use IPAC Browser (or a tool like it) to swap PVRs would be Epic

The sources for IPAC browser are here
http://svn.code.sf.net/p/shenmuesubs/code/Packages/IPAC Browser/src/

MT5 Texture Editor works in the same way

mteeditor.jpg

Whatever the future of Shenmue PC modding will be, I personally prefer a direct 'bare-bones' approach rather than workarounds or injectors. Creating one of these for PKFs mean It would also remain a tool for Dreamcast modding
 
Last edited:
I had some success reimporting PVRs using QuickBMS reimport function & @derplayer ShenmueHDTools.v1.1
cool.jpg
:D
It's better than Hex editing a PKF, but still not as user friendly as a PKF editor
The current limitation of this method is that the file size of the PVR image must be equal to or less than the original file, so it means you cant just swap PVRs for HD textures.
This limitation doesnt apply with IPAC Editor when swapping model files.
I'm not 100% sure but i think that the texture name IS its' 'offset/hex/value' location, so by expanding the PKF file you shift all the offsets, if thats the case it would mean that the map.map/hcm files within a PKS would also need hex editing to reflect the new texture offset location.

Texture Editing is the staple of any game modding community but ultimately if new Models can't be imported then 'Shenmue Modding' has no interest for me (perhaps not untill Shenmue 3 appears)
 
Last edited:
thanks for details about issue. do you think shop signs stored in PKF as well? we need to translate some of them, but can't find textures anywhere.
I have configured delphi compiler to make some changes in subtitles editor script, so I can try to fix IPAC browser as well, or at least get a clue about issue.
 
do you think shop signs stored in PKF as well? we need to translate some of them, but can't find textures anywhere.
D000.jpg

The Main Dobuita textures are in 485.gz / 1872.gz / 3353
All the Dreamcast Data is present which is why there are 3 duplicates for each Disc, I assume 485 is Disc 1 so you will have to change them all if you want to stay the same after Ryo gets back from the Docks

Some signs change at night, MAP0-3 should contain Day Windows & Night Windows (with a few Neon Bar Signs)
 
can you share QuickBMS script? after looking into PKF binary I think that PAKF section has different structure compare to IPAC. even if I add "PAKF" header in the code, it doesn't show TEXN or PVRT files, so I need to add another logic for this type of package.
 
The Quick BMS script just extracts same type files if they are laid end to end , it works for any file, I originally used it for extracting MT5s from PKS files
Here it is anyway:


# example for dumping concatenated files

findloc OFFSET string "PVRT"
do
goto OFFSET
get DUMMY long
findloc NEXT_OFFSET string "PVRT" 0 ""
if NEXT_OFFSET == ""
get SIZE asize
else
math SIZE = NEXT_OFFSET
endif
math SIZE -= OFFSET
log "" OFFSET SIZE
math OFFSET = NEXT_OFFSET
while NEXT_OFFSET != ""
 
Last edited:
I uploaded some scripts for PVRs export/import/convert on nexusmods, if someone interested:
https://www.nexusmods.com/shenmue/mods/22
Universal PVR Extractor/Patcher + QuickBMS + pvr2png + 7zip (GZ unpack) + scripts for batch processing.
Not as user friendly as a PKF editor, of cause. Same as QuickBMS here, just alternative.
 
Last edited:
PVR Dissector and WinPVR already extract and convert textures, pvr2png is ancient

Import doesnt appear anywhere on that page
 
pvr2png is ancient
Yus. But it works, isn't it?
It's not something new! It's just EXAMPLES how you can use old tools with Shenmue (2018) instead reinvent the wheel. Thinking about it as a tutorial or "preconfigured" tools, Okay?
Actually, it's answer to thealx question: "we need to translate some of them (shop signs), but can't find textures anywhere".
With that scripts you can extract ALL textures and convert them just in two clicks. Easy to find "shop signs" among pngs then, I think.

Not everyone even know how to use that pvr2png.exe with subfolders, so there are some scripts in that pack, like that:
for /f %%a in ('Dir /b /s "data" ^| Find /i ".pvr"') do Pvr2Png.exe "%%a" "%%a.png", etc.
It too simple for some ppls, but can be useful if you don't understand how this code works. See?
PVR Dissector
Is that a "not ancient" tool that "was never meant for public release" and with
"ERROR: unable to read MRU values from registry" on Win10 x64?
Why does this program even need a registry?

Thx for the info, bro, but it's very inconvenient to use, MHO. QuickBMS and PVR Extractor is much better, is it not? (a rhetorical question). No gimmicks or that fancy GUI with registry errors, you know..
Just one click and you have all textures extracted (in individual folders). Not a bad alternative, if you know how to use it.
You can easily combine these scripts into one and get something like this:
https://yadi.sk/d/bnv63jjkC4qDbA (<- download)

Usage:

0. etract tools to directory near root (ex: "D:\shextrct")
1. put any files from Shenmue's disc*.tac (GZ supported) in "input".
2. run shextrct.cmd
3. profit! PNGs you can find in "output".

If you know QuickBMS good enough, batch/bash/pyton - this pack have not much sense for you, maybe.
Scripts, like: quickbms -d -F "*.*" ".\scripts\pvr.bms" "./data" "./output" only for that folks who don't know how to use cli.. so they can just put their files in folder and doubleclick.

Import doesnt appear anywhere on that page
Use QuickBMS for reimport, as usual (you already know how to use it, I believe).

Or pvrext\patch-all.cmd, if you used Universal PVR Extractor.
If you want to import only one folder you can use command line like this: pvrext.exe -p filename.mt5 folder
I forgot to say that in readme.

Anyway, it's just an alternative! Use any software that you like. The alternative is always good, isn't it? (a rhetorical question, again).
WinPVR already extract and convert textures
No, it can't! (if we are speaking about official one, from KatanaSDK). It can convert PNG to PVR, extraction not available in any form. You can't convert PVR to PNG with it too. It is just a image viewer for PVR, mostly. MHO.
 
Last edited:
PVR Dissector is great for Batch conversion of folders and sub folders, I used it alot in the early days to identify objects and maps. With WinPVR you can copy the image or image layer and paste it into another image program

PVR2PNG was first and im sure both of those programs are based on it or use it. I never bothered with it because it was command line and prefer to use GUI

However its all irrelevant right now, I explained above at the problem of reimporting a diffently sized PVRs, The PKS models need to be edited to work in conjunction with a modified / larger PKF... which I believe is in the works.. If I cared enough about texture modding the shenmue game I would have figured it out by now, but untill we can import new models I have alternative projects to work on (mainly100% model export)
 
Back
Top