Sound files for Ultima IV

Ask for help with ScummVM problems

Moderator: ScummVM Team

Post Reply
bliznik
Posts: 18
Joined: Tue Jan 26, 2021 5:55 pm

Sound files for Ultima IV

Post by bliznik »

Question, I understand that xu4 was folded into ScummVM a while back. In xu4, there was a sound directory that contained sound files, like magic.ogg and enemy_magic_proj.ogg.

I want to switch around some of the sound files that Ultima IV uses, because the magic sound is too harsh on my ears, but I can't find where they are saved in ScummVM. Does ScummVM use *.ogg files from xu4? If so, is there any way I can alter them?
User avatar
dreammaster
ScummVM Developer
Posts: 559
Joined: Fri Nov 04, 2005 2:16 am
Location: San Jose, California, USA

Re: Sound files for Ultima IV

Post by dreammaster »

bliznik wrote: Mon Mar 15, 2021 4:02 pm Question, I understand that xu4 was folded into ScummVM a while back. In xu4, there was a sound directory that contained sound files, like magic.ogg and enemy_magic_proj.ogg.

I want to switch around some of the sound files that Ultima IV uses, because the magic sound is too harsh on my ears, but I can't find where they are saved in ScummVM. Does ScummVM use *.ogg files from xu4? If so, is there any way I can alter them?
Yes you can. You have two options:
1) Download a copy of ultima.dat from here and put it in your game directory.. I think it should supersede the version embedded in the executable. Despite it's extension, it's actually just a .zip file. So if you temporarily rename the extension to .zip, you can then explore it, and fiddle around with all the sound files for Ultima IV, replacing them or flipping them around. Just remember to rename it back to ultima.dat when you're done.

2) You can download a copy of the ScummVM source code. If you then go to the Edit Game dialog for the Ultima IV entry within the ScummVM launcher, and point the Extra Path to the devtools/create_ultima subfolder of the source, it'll then use the already uncompressed files in the devtools/create_ultima/files/ultima4 subfolder. So you can likewise play around with the files as you desire.
bliznik
Posts: 18
Joined: Tue Jan 26, 2021 5:55 pm

Re: Sound files for Ultima IV

Post by bliznik »

dreammaster wrote: Tue Mar 16, 2021 2:50 am Yes you can. You have two options:
1) Download a copy of ultima.dat from here and put it in your game directory.. I think it should supersede the version embedded in the executable. Despite it's extension, it's actually just a .zip file. So if you temporarily rename the extension to .zip, you can then explore it, and fiddle around with all the sound files for Ultima IV, replacing them or flipping them around. Just remember to rename it back to ultima.dat when you're done.
Oh, I didn't get a notification that you responded to this!

So I tried doing this in the ScummVM folder, but it didn't seem to make a difference. I even completely removed the ultima.dat file from the ScummVM folder, and ScummVM and Ultima IV ran fine.

I then copied ultima.dat into the actual game directory for Ultima IV, and I got an error message "Could not located engine data ultima.dat" Is there something else I need to do in order to force ScummVM to use my new ultima.dat file?
User avatar
dreammaster
ScummVM Developer
Posts: 559
Joined: Fri Nov 04, 2005 2:16 am
Location: San Jose, California, USA

Re: Sound files for Ultima IV

Post by dreammaster »

bliznik wrote: Wed Apr 21, 2021 8:42 pm I then copied ultima.dat into the actual game directory for Ultima IV, and I got an error message "Could not located engine data ultima.dat" Is there something else I need to do in order to force ScummVM to use my new ultima.dat file?
Your best bet, then, would be to grab a copy of the ScummVM source code project, and then use the Edit Game button, and Paths tab to set the Extra path to the /dev_tools/create_ultima folder. As I've previously mentioned, all the uncompressed files for Ultima 4 are in a files/ultima4 subfolder, and by correctly pointing the extra path to create_ultima, it'll definitely use the uncompressed files rather than those in ultima.dat
bliznik
Posts: 18
Joined: Tue Jan 26, 2021 5:55 pm

Re: Sound files for Ultima IV

Post by bliznik »

dreammaster wrote: Thu Apr 22, 2021 4:10 pm Your best bet, then, would be to grab a copy of the ScummVM source code project, and then use the Edit Game button, and Paths tab to set the Extra path to the /dev_tools/create_ultima folder. As I've previously mentioned, all the uncompressed files for Ultima 4 are in a files/ultima4 subfolder, and by correctly pointing the extra path to create_ultima, it'll definitely use the uncompressed files rather than those in ultima.dat
That worked! I'm going to write down the exact steps in a more detailed manner so my future self can follow these instructions:
(1) I'm running the current daily build of ScummVM
(2) I have Ultima IV - Quest of the Avatar added as a game, pointed to the GOGGames directory where Ultima 4 is installed, as seen here.
(3) I downloaded the Source code and unzipped the folder to: D:\Games\ScummVM\scummvm-master
(4) I went into Edit Game for Ultima IV in ScummVM, and I changed the "Extra Path" to: D:\Games\ScummVM\scummvm-master\devtools\create_ultima as seen here.
(5) Then I edited the sound files in: D:\Games\ScummVM\scummvm-master\devtools\create_ultima\files\ultima4\sound.
(a) Specifically, I deleted the magic.caf, magic.ogg, reaper_sleeper.caf, reaper_sleeper.ogg, spell_flash_25.caf, and spell_flash_25.ogg files, and I replaced them with other .caf and .ogg files that I liked (I used the magic.caf and magic.ogg files located in the D:\Games\ScummVM\scummvm-master\devtools\create_ultima\files\ultima4\sound\original directory, as I preferred those sounds more)
(6) I then started the game and I tried casting a spell, and the replacement sound played!

Unfortunately, the sound loops. I didn't notice that the original magic sound looped as well! Haha. It seems like the sounds in Ultima IV in ScummVM are programmed to play for a certain time period, and are programmed to infinitely loop until that time period terminates. Well, now to find a good sound file of that length...
Post Reply