[RELEASE] wudecon - File/Model Converter for SM1/SM2

Hello everyone,

I'm having issues unpacking tac files.
My goal is to extract textures and resize them with something like NNEDI3.
I use the following command :

D:\wudecon>wudecon.exe --tc "D:\Games\Shenmue\sm1\archives\dx11\data\disk_5b7d8ad1.tac" "D:\EXT" wudecon v1.0.7023.39908 Oops! D:\Games\Shenmue\sm1\archives\dx11\data\disk_5b7d8ad1.tac failed! Exception: System.IO.EndOfStreamException: Unable to read beyond the end of the stream. at System.IO.BinaryReader.FillBuffer(Int32 numBytes) at System.IO.BinaryReader.ReadUInt32() at ShenmueDKSharp.Files.Containers.TADEntry.Read(BinaryReader reader) in H:\wudecon\ShenmueDKSharp\Files\Containers\TAD.cs:line 226 at ShenmueDKSharp.Files.Containers.TAD._Read(BinaryReader reader) in H:\wudecon\ShenmueDKSharp\Files\Containers\TAD.cs:line 98 at ShenmueDKSharp.Files.BaseFile.Read(BinaryReader reader) in H:\wudecon\ShenmueDKSharp\Files\BaseFile.cs:line 87 at ShenmueDKSharp.Files.BaseFile.Read(Stream stream) in H:\wudecon\ShenmueDKSharp\Files\BaseFile.cs:line 77 at ShenmueDKSharp.Files.BaseFile.Read(String filepath) in H:\wudecon\ShenmueDKSharp\Files\BaseFile.cs:line 66 at ShenmueDKSharp.Files.Containers.TAD..ctor(String filepath) in H:\wudecon\ShenmueDKSharp\Files\Containers\TAD.cs:line 60 at wudecon.Program.ExtractTAC(String tadFilepath, String folder) in H:\wudecon\wudecon\Program.cs:line 651 Completed 0/0 operations.

I am running an up-to-date Windows 10.
Default .NET package shipped with Windows 10 (I didn't install Visual Studio)

You might want to update the Shenmue install you have to v1.07, because I believe that the latest disk filename is disk_5be2c578.tad.

Secondly, as the usage of the program states:

wudecon --tc **<tad file>** <output dir>

You simply need to run:

wudecon.exe --tc "D:\Games\Shenmue\sm1\archives\dx11\data\disk_5b7d8ad1.tad" "D:\EXT"

Or optionally, to see the filenames being extracted:

wudecon.exe --tcv "D:\Games\Shenmue\sm1\archives\dx11\data\disk_5b7d8ad1.tad" "D:\EXT"
 
Thanks LemonHaze !
I updated to v1.07 and still no luck :

D:\wudecon>wudecon.exe --tcv "D:\Games\Shenmue\sm1\archives\dx11\data\disk_5be2c578.tad" "D:\EXT"
wudecon v1.0.7023.39908

Filename database initialized: 68679 entries.
Oops! D:\Games\Shenmue\sm1\archives\dx11\data\disk_5be2c578.tad failed!
Exception: System.NullReferenceException: Object reference not set to an instance of an object.
at ShenmueDKSharp.Files.Containers.TAC.Unpack(Boolean verbose, Boolean raymonf, String folder) in H:\wudecon\ShenmueDKSharp\Files\Containers\TAC.cs:line 66
at wudecon.Program.ExtractTAC(String tadFilepath, String folder) in H:\wudecon\wudecon\Program.cs:line 654
Completed 0/0 operations.


EDIT : oh ok now it's working, I needed to use your latest build in post #14
 
Last edited:
Any idea how to open image files ?
Are these dds files ?
I downloaded a DDS viewer and it says "unsupported format"...

untitled0lkeb.png


I want to find things like jacket textures or face textures.
No idea where they can be stored...
 
Last edited:
Converted Textures are in the 'Models' folder (EXT is just the base tad/tac Extraction) They are in the Disk.tad/tac

Those dds should open too , I suggest downloading 'paint.net' its a free image tool

siKwpe7.png
 
Last edited:
Thanks a lot guys !

The following command allowed to me extract every texture :
wudecon.exe --tacfullv "D:\Games\Shenmue\sm1\archives\dx11\data\disk_5be2c578.tad" "D:\EXT" "D:\MODELS" mt5

And yes, textures are to be found in the resulting D:\MODELS folder (just scan the folder searching for *.png files).
Now I am trying to figure out how to edit textures and load then back into the game with Forklift
 
Is it supposed to work with the Dreamcast version of Shenmue 2? I can't covert any MT7 files with it, Shenmue 1 MT5 works fine, but I don't think all maps are in .mt5, since I didn't found all of them, where are the others maps?

Code:
wudecon --mt7 MAP.MT7 01_1000_MAP
wudecon v1.0.7061.27731

Oops! MAP.MT7 failed!
Exception: System.IO.EndOfStreamException: Não é possível ler depois do fim do fluxo.
   em System.IO.BinaryReader.FillBuffer(Int32 numBytes)
   em System.IO.BinaryReader.ReadUInt32()
   em ShenmueDKSharp.Files.Models._MT7.XB01.Read(BinaryReader reader, MT7Node node) na E:\_repo\wudecon\ShenmueDKSharp\Files\Models\_MT7\XB01.cs:linha 87
   em ShenmueDKSharp.Files.Models._MT7.XB01..ctor(BinaryReader reader, MT7Node node) na E:\_repo\wudecon\ShenmueDKSharp\Files\Models\_MT7\XB01.cs:linha 62
   em ShenmueDKSharp.Files.Models.MT7Node..ctor(BinaryReader reader, MT7Node parent) na E:\_repo\wudecon\ShenmueDKSharp\Files\Models\MT7.cs:linha 303
   em ShenmueDKSharp.Files.Models.MT7._Read(BinaryReader reader) na E:\_repo\wudecon\ShenmueDKSharp\Files\Models\MT7.cs:linha 128
   em ShenmueDKSharp.Files.BaseFile.Read(BinaryReader reader) na E:\_repo\wudecon\ShenmueDKSharp\Files\BaseFile.cs:linha 87
   em ShenmueDKSharp.Files.BaseFile.Read(Stream stream) na E:\_repo\wudecon\ShenmueDKSharp\Files\BaseFile.cs:linha 77
   em ShenmueDKSharp.Files.BaseFile.Read(String filepath) na E:\_repo\wudecon\ShenmueDKSharp\Files\BaseFile.cs:linha 66
   em ShenmueDKSharp.Files.Models.MT7..ctor(String filename) na E:\_repo\wudecon\ShenmueDKSharp\Files\Models\MT7.cs:linha 84
   em wudecon.Program.ExportMT7(String path, String objFilepath) na E:\_repo\wudecon\wudecon\Program.cs:linha 209
Completed 1/2 operations.
 
Is it supposed to work with the Dreamcast version of Shenmue 2? I can't covert any MT7 files with it, Shenmue 1 MT5 works fine, but I don't think all maps are in .mt5, since I didn't found all of them, where are the others maps?

Code:
wudecon --mt7 MAP.MT7 01_1000_MAP
wudecon v1.0.7061.27731

Oops! MAP.MT7 failed!
Exception: System.IO.EndOfStreamException: Não é possível ler depois do fim do fluxo.
   em System.IO.BinaryReader.FillBuffer(Int32 numBytes)
   em System.IO.BinaryReader.ReadUInt32()
   em ShenmueDKSharp.Files.Models._MT7.XB01.Read(BinaryReader reader, MT7Node node) na E:\_repo\wudecon\ShenmueDKSharp\Files\Models\_MT7\XB01.cs:linha 87
   em ShenmueDKSharp.Files.Models._MT7.XB01..ctor(BinaryReader reader, MT7Node node) na E:\_repo\wudecon\ShenmueDKSharp\Files\Models\_MT7\XB01.cs:linha 62
   em ShenmueDKSharp.Files.Models.MT7Node..ctor(BinaryReader reader, MT7Node parent) na E:\_repo\wudecon\ShenmueDKSharp\Files\Models\MT7.cs:linha 303
   em ShenmueDKSharp.Files.Models.MT7._Read(BinaryReader reader) na E:\_repo\wudecon\ShenmueDKSharp\Files\Models\MT7.cs:linha 128
   em ShenmueDKSharp.Files.BaseFile.Read(BinaryReader reader) na E:\_repo\wudecon\ShenmueDKSharp\Files\BaseFile.cs:linha 87
   em ShenmueDKSharp.Files.BaseFile.Read(Stream stream) na E:\_repo\wudecon\ShenmueDKSharp\Files\BaseFile.cs:linha 77
   em ShenmueDKSharp.Files.BaseFile.Read(String filepath) na E:\_repo\wudecon\ShenmueDKSharp\Files\BaseFile.cs:linha 66
   em ShenmueDKSharp.Files.Models.MT7..ctor(String filename) na E:\_repo\wudecon\ShenmueDKSharp\Files\Models\MT7.cs:linha 84
   em wudecon.Program.ExportMT7(String path, String objFilepath) na E:\_repo\wudecon\wudecon\Program.cs:linha 209
Completed 1/2 operations.

Exception: System.IO.EndOfStreamException: Não é possível ler depois do fim do fluxo.

You're missing the .OBJ from your command, do this:

wudecon --mt7 MAP.MT7 01_1000_MAP.OBJ

Some maps are contained in either MT5 or MT7 while the rest are inside the mpk00.pkf/pks files within the scene folder for the given area with extensions like MAPM for the main map segments, CHRM and PROPM. You can convert MAPM, CHRM and PROPM using wudecon --mt7 or wudecon --mt5. Try using wudecon --tacfullv to extract and convert everything from within the TAD, there you will find all of the maps converted.
 
Exception: System.IO.EndOfStreamException: Não é possível ler depois do fim do fluxo.

You're missing the .OBJ from your command, do this:

wudecon --mt7 MAP.MT7 01_1000_MAP.OBJ

Some maps are contained in either MT5 or MT7 while the rest are inside the mpk00.pkf/pks files within the scene folder for the given area with extensions like MAPM for the main map segments, CHRM and PROPM. You can convert MAPM, CHRM and PROPM using wudecon --mt7 or wudecon --mt5. Try using wudecon --tacfullv to extract and convert everything from within the TAD, there you will find all of the maps converted.

No luck.

Code:
wudecon --mt7 MAP.MT7 01_1000_MAP.OBJ
wudecon v1.0.7061.27731

Oops! MAP.MT7 failed!
Exception: System.IO.EndOfStreamException: Não é possível ler depois do fim do fluxo.
   em System.IO.BinaryReader.FillBuffer(Int32 numBytes)
   em System.IO.BinaryReader.ReadUInt32()
   em ShenmueDKSharp.Files.Models._MT7.XB01.Read(BinaryReader reader, MT7Node node) na E:\_repo\wudecon\ShenmueDKSharp\Files\Models\_MT7\XB01.cs:linha 87
   em ShenmueDKSharp.Files.Models._MT7.XB01..ctor(BinaryReader reader, MT7Node node) na E:\_repo\wudecon\ShenmueDKSharp\Files\Models\_MT7\XB01.cs:linha 62
   em ShenmueDKSharp.Files.Models.MT7Node..ctor(BinaryReader reader, MT7Node parent) na E:\_repo\wudecon\ShenmueDKSharp\Files\Models\MT7.cs:linha 303
   em ShenmueDKSharp.Files.Models.MT7._Read(BinaryReader reader) na E:\_repo\wudecon\ShenmueDKSharp\Files\Models\MT7.cs:linha 128
   em ShenmueDKSharp.Files.BaseFile.Read(BinaryReader reader) na E:\_repo\wudecon\ShenmueDKSharp\Files\BaseFile.cs:linha 87
   em ShenmueDKSharp.Files.BaseFile.Read(Stream stream) na E:\_repo\wudecon\ShenmueDKSharp\Files\BaseFile.cs:linha 77
   em ShenmueDKSharp.Files.BaseFile.Read(String filepath) na E:\_repo\wudecon\ShenmueDKSharp\Files\BaseFile.cs:linha 66
   em ShenmueDKSharp.Files.Models.MT7..ctor(String filename) na E:\_repo\wudecon\ShenmueDKSharp\Files\Models\MT7.cs:linha 84
   em wudecon.Program.ExportMT7(String path, String objFilepath) na E:\_repo\wudecon\wudecon\Program.cs:linha 209
Completed 1/2 operations.
 
Well, I've made a lot of tests, this tool doesn't work for the Dreamcast version of Shenmue 2 and I don't know why. Fortunately, the pc version works great with the tacfull command!
 
Well, I've made a lot of tests, this tool doesn't work for the Dreamcast version of Shenmue 2 and I don't know why. Fortunately, the pc version works great with the tacfull command!

Sorry you're right, at first I didn't realise you were trying to convert a Dreamcast model, I don't think there's going to be support for these models implemented in the SDK just yet, but maybe at some point.
 
How can I extract maps from pks/pkf and convert them to obj or any format i can use in blender, when i used --allv it did extract all files and converted only the mt5 to obj. I dont know how to convert the scene maps if there not mt5
 
So i'm pretty dumb when it comes to command prompt or anything that requires that side of my brain but whenever i try to extract any data it says access is denied and "This App can't run on your PC"
 
So i'm pretty dumb when it comes to command prompt or anything that requires that side of my brain but whenever i try to extract any data it says access is denied and "This App can't run on your PC"
Do you have the latest updates etc? And do you know if you have the latest .NET runtimes etc?
 
this is awesome how you guys are able to do this kinda stuff.
 
Last edited:
@LemonHaze Thanks for this converter, but I'm having a little trouble. In fact, it looks to be the same issue that @ReeceKun was having, only the solution offered then isn't working for me. I've been using the latest version from Github (v1.0.7061.27731), but also tried that version you mentioned to him back in 2019, but experienced the same issue.


C:\shenmod>wudecon v--tacfull "C:\shenmod\data\common_5be2c4e2.tad" "C:\shenmod\ext2" "C:\shenmod\models2" mt5
wudecon v1.0.7061.27731

Filename database initialized: 68679 entries.
[TAC/TAD] Offset: 0, Size: 5484 -> Filepath: /tex/assets/ui/platformicons.ui.eacd7769

Lots more of these kind of lines, until...

[TAC/TAD] Offset: 2936135242, Size: 32368 -> Filepath: /tex/assets/snapshots/thumbnail/charthumb52.png.e4d01291
Processing GZ..
C:\shenmod\ext2 does not exist as a file, falling back to batch mode.
Finished processing GZ!
Processing AFS..
C:\shenmod\ext2 does not exist as a file, falling back to batch mode.
Finished processing AFS!
Processing IPAC..
C:\shenmod\ext2 does not exist as a file, falling back to batch mode.
Finished processing IPAC!
Processing SPR..
C:\shenmod\ext2 does not exist as a file, falling back to batch mode.
Finished processing SPR!
Processing PKF..
C:\shenmod\ext2 does not exist as a file, falling back to batch mode.
Finished processing PKF!
Processing PKS..
C:\shenmod\ext2 does not exist as a file, falling back to batch mode.
Finished processing PKS!
Processing MT5..
C:\shenmod\ext2 does not exist as a file, falling back to batch mode.
Finished Processing MT5!
Completed 0/0 operations.



C:\shenmod>wudecon.exe --allv "C:\shenmod\ext2" "C:\shenmod\converted""
wudecon v1.0.7061.27731

Processing all formats (except TAC):
Processing PKF..
C:\shenmod\ext2 does not exist as a file, falling back to batch mode.
Finished processing PKF!
Processing PKS..
C:\shenmod\ext2 does not exist as a file, falling back to batch mode.
Finished processing PKS!
Processing SPR..
C:\shenmod\ext2 does not exist as a file, falling back to batch mode.
Finished processing SPR!
Processing IPAC..
C:\shenmod\ext2 does not exist as a file, falling back to batch mode.
Finished processing IPAC!
Processing GZ..
C:\shenmod\ext2 does not exist as a file, falling back to batch mode.
Finished processing GZ!
Processing AFS..
C:\shenmod\ext2 does not exist as a file, falling back to batch mode.
Finished processing AFS!
Processing MT5..
C:\shenmod\ext2 does not exist as a file, falling back to batch mode.
Finished Processing MT5!
Processing MT7..
C:\shenmod\ext2 does not exist as a file, falling back to batch mode.
Finished processing MT7!
Operations completed in 0 minutes (124ms)
Completed 0/0 operations.

ext2 certainly exists as a folder, is it expecting a file?

As you can see, I tried the "wudecon.exe --allv C:\some\dir C:\output\dir" command after, as a lot of files did appear in my "ext2" folder after that first command (although the "model2" is empty), but that failed too.

Below is what ext2 currently looks like (please note that I named the files ext2 and models2 as this was my second attempt, I'm actually trying to rip Shenmue 1 stuff):


Screenshot 2022-01-28 203611.png

Screenshot 2022-01-28 203547.png



It's all a little confusing, as stuff was obviously extracted to ex2 during that first command, but I'm not sure that it's in the right format. What I want to do is be able to open up the various textures (buildings, floors etc) and items in Asperite (or any other graphical software).

I'd be grateful for any help, if anyone has a solution (maybe I'm doing something obviously wrong that I can't see right now :LOL: ). Thanks
 
Last edited:
@LemonHaze Thanks for this converter, but I'm having a little trouble. In fact, it looks to be the same issue that @ReeceKun was having, only the solution offered then isn't working for me. I've been using the latest version from Github (v1.0.7061.27731), but also tried that version you mentioned to him back in 2019, but experienced the same issue.




ext2 certainly exists as a folder, is it expecting a file?

As you can see, I tried the "wudecon.exe --allv C:\some\dir C:\output\dir" command after, as a lot of files did appear in my "ext2" folder after that first command (although the "model2" is empty), but that failed too.

Below is what ext2 currently looks like (please note that I named the files ext2 and models2 as this was my second attempt, I'm actually trying to rip Shenmue 1 stuff):


View attachment 13910

View attachment 13911



It's all a little confusing, as stuff was obviously extracted to ex2 during that first command, but I'm not sure that it's in the right format. What I want to do is be able to open up the various textures (buildings, floors etc) and items in Asperite (or any other graphical software).

I'd be grateful for any help, if anyone has a solution (maybe I'm doing something obviously wrong that I can't see right now :LOL: ). Thanks

Actually this is all working perfectly fine - if there was an error you'd know about it.

The main thing is that the tool only extracts files as they are within the archives (so those hexadecimal values you see at the end of the filenames are exactly how they're stored in the archives).

The common TAD archive only stores some UI assets that d3t use for the menu system and some other bits and pieces. You can see those in the tex folder. If you remove the hexadecimal values from the filename, you'll be able to open them up normally via Windows Explorer. For example, renaming qf00_0.png.2d84b034 to qf00_0.png.

As stated in the help messages of the tool, the --all mode will attempt to extract and convert every known asset type that could possibly be found within TAD archives. It is recommended to use this if you just want to look at every asset within a TAD archive.

If it's game assets you're interested in, for example models and textures etc, you'll want to run --tacfull on the disk TAD (which is an archive that stores all of the original game data as it was on DC/Xbox).
 
Last edited:
Just for reference, here is the test runner I use during development for testing purposes:

Code:
TITLE Wudecon Test Runner
SET wudecon_debug="E:\_repo\wudecon\wudecon\bin\Debug\wudecon.exe"
SET wudecon_release="E:\_repo\wudecon\wudecon\bin\Release\wudecon.exe"
ECHO Starting SM1 process..
%wudecon_release% --tacfullv "E:\Games\Shenmue I and II\sm1\archives\dx11\data\disk_5be2c578.tad" "E:\output\sm1\archive" "E:\output\sm1\models" mt5
ECHO Finished SM1 process..
ECHO Starting SM2 process..
%wudecon_release% --tacfullv "E:\Games\Shenmue I and II\sm2\archives\dx11\data\disk_5be2c4e2.tad" "E:\output\sm2\archive" "E:\output\sm2\models" mt7
ECHO Finished SM2 process..
 
@LemonHaze Thanks a lot for the quick response. I actually started manually removing the ends to some of those png and dds files (needed to download an app to view the later) and, as you've just said, they were mostly just menu scraps.

I think it was the "Completed 0/0 operations" message that made it sound like it had failed to me.

I just did...
wudecon --tacfull "C:\shenmod\data1\disk_5be2c578.tad" "C:\shenmod\disk" "C:\shenmod\modeld" mt5

...and a lot happened in the CMD window! It's finally finished with these words, so I think it worked:

Finished Processing MT5!
Completed 19791/19811 operations.

There are so many files in those two folders I created, finding what you want really is like trying to find a needle in a haystack! Would you happen to have any idea where I could find the Hazuki Residence texture maps (for both outside and inside). At least that would be a start for me. Would they just be png files, or are they stored in a different format?
 
I think I've found some harbour stuff. But there's some real nightmare fuel mixed in there (not the kind of things I should be looking at before bed):

tex_2.png


tex_2.png
 
Back
Top