Shenmue I DC - Is it possible to swap Ryo's FREE battle grunts with Guizhang's? [.SND files editing]

Joined
Mar 13, 2020
Location
Naples, Italy
Favourite title
Shenmue
Currently playing
A Hat in Time
Hello there Dojo community, long time no see. Haven’t made a post here in quite some time, but I have never stopped lurking on the discussions every while and then! I hope you’re all doing well! 🙏

I’ve been working on a small little mod for Shenmue I on Dreamcast, but hit a roadblock and cannot progress any further. Figured I would ask here, hoping someone would at least have a clue how I should go about it.

Basically, I’m trying to create a “playable Guizhang in 70 Man Battle” kind of mod. I got the model swap and moveset working perfectly, it was just a matter of swapping and renaming files.

For those curious, I’ve made a what if story video on Ryo using Guizhang’s moveset about a year ago, showcasing the Swallow Diving Style in all its glory! 🤩


Back on the topic - However, forcing the game to use Guizhang’s voice in battle has proven to be quite a challenge.

According to MAP.INFO in MFBT, the map folder for the 70 Man Battle, the game loads “BATTLE_1.SND” for most of the sound effects used in FREE battle mode, including Ryo’s voice grunts, and “E1BATBAT.SND” for other misc sound effects, which also contains Guizhang’s, likely used by the CPU in the story fight.

I tried the good old “renaming/swapping files” method, but that only resulted in the game playing as normal or with no sound effects at all.

I thought to myself: “If I could extract the sounds, maybe I could swap Ryo’s sounds with Guizhang’s, then find a way to somehow rebuild BATTLE_1.SND?” Well, the first part was easy enough, and I was able to extract all sound effects in “minidsf” format, but for the second part, I couldn’t find any prior research on rebuilding an .snd file with “custom” files. I suppose it’s not as easy as I make it out to be? 😬

Having just hit a roadblock, I decided to take a shot at the swap with a hex editor, and boy, are these .snd files impossible to navigate. Luckily, in the “Sound” folder there’s another .snd file called “E1KISHOU.SND”, which conveniently only contains Guizhang’s FREE voice grunts. The unfortunate thing is… I still can’t exactly locate Ryo’s voice lines in “battle_1.snd”, so performing a perfect data swap seems out of the question.

At this point, I kinda didn’t know what to do anymore and started overwriting random parts of battle_1.snd, hoping I would get lucky and succeed. Of course, this never could have worked and I only ended up breaking the sound effects even further. Despite that though, in one build I’ve made, I did get one of Guizhang’s grunts to play exactly like it does in his FREE battle appearances, but I also broke other sound effects in the process, so I can’t say it was a success... 😵

Here’s a proof of concept of what I’m trying to achieve (edited footage):


Right now, I’ve run out of ideas and I’m starting to think it just can’t be done without having a decent enough understanding on what’s going on behind the scenes, which I clearly lack. 😓

So that’s the gist of it. Does anyone in the Dojo community have any idea how I could get Guizhang’s FREE battle voice grunts to play in place of Ryo’s? Any suggestions are much appreciated!

Thank you for showing interest, have a great day! 🖐🙂
 
Hey guys, I hope you’re all having a great holiday! I felt like updating this thread with what came of my little project. In the end, I decided not to bother Team Wulinshu as I didn’t want to waste their time with my nonsense. While searching online for any info or hints, I found an incredibly handy tool written by Sappharad called “DTPKUtil”, which extracts samples from DTPK.SND files and generates new decompressed SND files.

As you know, I’d already got some results just by editing BATTLE_1.SND's data with an hex editor, but I would always get inconsistent results since I couldn’t exactly locate where each of Ryo’s voice lines start and end in the file. However, everything changed thanks to Sappharad’s DTPKUtil, which not only details where each audio file is located but also in what order! This was a game changer as it allowed me to carefully and accurately swap Ryo's data with Guizhang's.

I wanted to recreate exactly how Guizhang sounds when used by the CPU, so it took me a while to get the edit right, dealing with some hilarious audio glitches and other side effects along the way, but eventually, I got the swap right and sure enough, it works! 😄


The “Guizhang in 70 Man Battle” mod is now almost perfect; I say almost, because for instance I still can’t figure out a way to block, but to be honest that’s a problem that afflicts all NPC movesets in general. As far as I can tell, the game seems to handle blocking differently for the CPUs (they don’t crouch when guarding and block without warning; they can’t duck too), which would explain why there’s no button assigned to blocking. Despite that, I’m overall content with how the hack turned out.

I’m tempted to share it on the forums for anyone interested in the idea, but I’m not sure if it goes against the rules, considering I would be sharing a disc image. 😵
 
Hi Richard, @Richard Payne
probably you forgot or overlooked xdelta3 patching tool? Its a simple GUI for targeting your modified disc image along the modified one for generating a totally practical and legal patch with your mod. The file doesn't contain any game data but just references to the hex changes you made and once the patch its applied anyone can look into the new modded files to hopefuly add the things you pointed like blocking or whatelse (turning it from "Your Mod v0.9" to 1.0 final release;) For sure Team Wulinshu discord happily points you some directions for that.

old xdelta version which probably works for you. Couldn't find updated binaries for windows. Its also avaliable updated in few Linux software centers.
https://www.romhacking.net/utilities/598/
 
Last edited:
Hey Seaman, thanks for your help. Yeah, I did consider creating a patch at first, but had to scrap the idea after dealing with some technical issues.

As you can imagine, I’m working on the game files directly, which I extracted from a GDI image. I do know how to rebuild the files into a CDI image, and I could create a patch from that build, but obviously you wouldn’t be able to apply that patch to a GDI image, as the two formats are incompatible to one another. I also can’t expect people to first convert their GDI copy to CDI too, so I’d rather just share the CDI image directly, that way it would be much easier for anyone to download and boot from their preferred DC emulator.

Honestly, I don't have much experience into making patches and perhaps I'm missing something, but I don't think it can be done. I will definitely ask Team Wulinshu if they know anything about how blocking works for the CPU in Shenmue I. Funnily enough, this issue is not present in Shenmue II; the CPU blocks and ducks just how you'd expect, but unlike Ryo, doesn't roll all over the place! 😂
 
Last edited:
As you can imagine, I’m working on the game files directly, which I extracted from a GDI image. I do know how to rebuild the files into a CDI image, and I could create a patch from that build, but obviously you wouldn’t be able to apply that patch to a GDI image, as the two formats are incompatible to one another. I also can’t expect people to first convert their GDI copy to CDI too, so I’d rather just share the CDI image directly, that way it would be much easier for anyone to download and boot from their preferred DC emulator.
If my understood was correct, building your mod as GDI from scratch would allow the patch solution.
If thats the case, here are some useful links:
(Original thread for building GDI)
https://assemblergames.org/viewtopic.php?t=5796
(More recent tutorial modding Ecco)
https://eccothedolphin.online/2020/11/13/
The required tools are attached there.
Alternate way, building your iso as good old BIN/CUE and using this converter with compiled binaries kindly provided for once.
Hope it helps! You awakened traumas from my past with game patches :S
 
Wow man, I really appreciate you going out of your way to help me out like that! I checked your links and the Ecco modding guide looks to fit the case perfectly. If I can make a new custom GDI image, I'm confident xdelta will have no problem creating patches! Time to go to work 😅

EDIT:

After a couple of failed attempts, I did make a GDI image that boots!... too bad there’s no sounds effects.

After thinking about possible reasons, it looks like my hacked BATTLE_1.SND file may be the culprit. I’d used a decompressed file to make the hack, which was not only easier to navigate through, but also gave me the opportunity to “enhance” Guizhang’s audio with Audacity (you can barely hear his voice in game), but unfortunately, that resulted in a way bigger file than the original.

I tested if freeing up space in the GDI would make the file work, and sure enough, the game now plays sound effects correctly. Still, that’s not an ideal solution…

After thinking it over, I was left with no choice but to rehack BATTLE_1.SND from scratch without decompressing it first; that way, I would get an identical file in size. I went through the whole process again, made a new GDI image, and sound effects now work without removing other files! Guizhang’s battle grunts can barely be heard, but that’s just how the game plays them normally.

Now that I can make custom GDI images that don’t instantly crash, I'll go ahead and make those patches, then share them in a separate post.

Thanks again @Seaman for pointing me in the right direction! Now all that’s left is figuring out how to get blocking and ducking to work, but I don't think I'm up to that challenge. 😵
 
Last edited:
Your welcome @Richard Payne !
I enjoyed how you climbed and passed the sound related walls. Sadly Im not skilled for modding into game behaviour.. For that matter, I would try asking -besides the aforementioned Wulinshu team- at Sonic Adventure or Marvel vs. Capcom modding forums/discord servers (I bet some will shares a likeness for Shenmue) because their community has contributed lots of tools and tutorials.
Btw, about .snd files ballooning in size, I understood it happened after normalizing the track in Audacity? Or did I get that wrong?

Xdelta will do the patching work for sure, as you're targeting simple bin (the track03 I assume) which is exactly the tool aim.

Please @ReeceKun do you have any indication for the duck+blocking issue?
 
Last edited:
Btw, about .snd files ballooning in size, I understood it happened after normalizing the track in Audacity? Or did I get that wrong?
Nah, that was a poor choice of words on my part. The reason the .snd file came out too big was only because I decided to decompress it with DTPKUtil before editing. On the other hand, the only way to edit the audio files themselves with Audacity is to turn them into wav files first, which also makes them bigger. Amplifying the tracks by itself doesn’t increase the size. Maybe there’s a way to turn wav files back to a compressed .snd file, but I'll give it a rest for now.

In any case, everything else went smoothly, though I had to make 3 separate patches: “GDIpatch” targets the GDI disc image; “track03patch” track03.bin, and “track06patch” track06.bin.

Everything I made up to this point is available on my Google Drive for anyone who wants to give it a try.

I’ve left a read.me file with instructions on what to do, a move list with all known inputs for Guizhang moves, and a VMU save containing a clear file to unlock the 70 Man Battle time attack in case you need it.
 
Back
Top