ROM Hack UnityFS editing (such as Doom)

Nazosan

Well-Known Member
OP
Member
Joined
May 12, 2009
Messages
576
Trophies
1
XP
1,089
Country
United States
So I've been trying my hand at really simple modding on a lot of things lately and one thing that has really been a problem for me for a long time are those UnityFS files -- eg "assets." For example, in Doom I thought it would be nice if I could edit the soundtrack. (It's not a popular thing among most -- most prefer the original MIDI from Reznor and I can understand why, but I have always felt that the PS1's soundtrack had a very interesting dark atmospheric feel that suited the game well. On some PC Doom engine implementations I can use a custom WAD I made with it and I thought it would be nice if I could get its soundtrack into this too.) Unfortunately, it seems I can't even find tools to extract the files properly. (UnityAssetsBundleExtractor for instance is able to open it and decompress it to a new file, but the actual physical audio data is inaccessible in a separate "tree" or whatever you call it.)

I've seen a lot of mods of this sort out there for various games, so I know it's possible, but apparently none of my searching in all this time has yielded the right tools.
 

Falo

Well-Known Member
Member
Joined
Jul 22, 2012
Messages
680
Trophies
2
XP
2,627
Country
Germany
Use UnityAssetsBundleExtractor to extract "CAB-d5ae2b5aa3edc0f73b4bb6b1ae125a53" and "CAB-d5ae2b5aa3edc0f73b4bb6b1ae125a53.resource"

The first file is the index, it tells the game where the audio data is, the second file contains the audio, format is encrypted FSB5.
You can unpack it with quickbms and this script: https://pastebin.com/4LbFA7Ar

You can then play these with in_vgmstream and xmplay.

About modding the audio, never tried it, but unity is not mod friendly, especially on consoles, most unity mods require to hook the .NET code, which is not possible on Switch (il2cpp makes it impossible).
 

masagrator

The patches guy
Developer
Joined
Oct 14, 2018
Messages
6,278
Trophies
3
XP
12,044
Country
Poland
For extracting playable audio better to use AssetStudio or find audio file with UABE, then click on "Plugins" and "Extract audio". You get then playable wav file.

With replacing will be a little issue. I've tried already by packing new asset pack with Unity 2018.3 (DOOM is using 2018.3.12f1 when for PC the closest one is 2018.3.14f1), Hex editing Information files to have the same Informations about pack and replaced resources blob in audio UnityFS archive. And game stucks.
 
Last edited by masagrator,

Nazosan

Well-Known Member
OP
Member
Joined
May 12, 2009
Messages
576
Trophies
1
XP
1,089
Country
United States
To be clear, I don't really want to extract or play the original audio, just replace it. I already have a XG synthesizer which handles the original MIDI about as well as anything is going to.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: https://www.ebay.com/itm/386617469929?mkcid=16&mkevt=1&mkrid=711-127632-2357-0&ssspo=2T8UwYf_Qse&...