Page 1 of 3

MOUL Sound Decompressor Tool

PostPosted: Fri Mar 05, 2010 1:51 am
by Deledrius
SoundDecompress
Release Version 1.11 (2010-03-08)
Written by Joseph Davies

These scripts are aimed at MOUL players on Linux and OSX, where the automatic decompression for the streamingCache files fails, leaving the player with no sound, or worse.


Note: This utility is not needed for current versions of the engine used by the Guild of Writers and other fan-run servers.


Requirements

Additionally, the GUI tool requires:

Installation
The script should work with Python 2.6 and Python 3.x

Ubuntu:
    sudo apt-get update && sudo apt-get install sox python-wxgtk2.8

OS X:
    Install Python 2.6 if you have not already done so:
  • Python 2.6.4


Windows:
    MOUL does this fine on its own under Windows. Why are you here?

Usage

GUI Tool:
  • 1. Either double-click the script SoundDecompress.py, or run it from the commandline.
  • 2. Enter your base MOUL folder "Uru Live" or browse to it using the dialog. The default value should be the default for your system.
  • 3. Press Go!

CLI Tool:
./sounddecompress.py -u /path/to/uru

This will start running the tool with the standard directory layout. If you have another layout, you can override the default directories:

  • -d /path/to/uru/data
  • -s /path/to/uru/sfx
  • -c /path/to/uru/streamingCache
Use -h or --help at any time for a full list of commands.
  • --xml
    * Will dump audio file listing after audio conversion (defaults to ./wavlist.xml)
  • --xmlonly
    * Skips audio conversion; only dumps audio file listing after reading Age files.
  • --xmlof=/path/to/outfile
    * Allows override for xml output (implies --xml)
  • --xmlin=/path/to/infile
    * Allows use of xml file instead of reading Age files.
    Use this option if you have an xml listing for your game version/build and do not have libHSPlasma/PyHSPlasma.


Download Locations

Changelog
  • 1.00 (2010-04-04) - Initial Version
  • 1.01 (2010-04-05) - Added platform-specific default directories to enhance usability.
  • 1.02 (2010-04-05) - Added game-switch.
  • 1.10 (2010-04-08) - Added XML import and export. Enhanced GUI to use XML Import. Fixed GUI Dialog on OSX. Removed game-switch.
  • 1.11 (2010-04-08) - Fix for user home directories not properly expanded (using expanduser(), not abspath()!).

Re: MOUL Sound Decompressor Tool

PostPosted: Fri Mar 05, 2010 2:51 am
by diafero
I'm not at home currently so I can't test - does this tool fix the strange clicking noise sounds I get all the time? That would be absolutely awesome, I already tried various things (like using older wine versions, other sound systems, whatever) with no success. The strange thing is that it used to work fine with the GameTap MOUL.

On another note, does this also work with POTS and/or MagiQuest? Are there plans to add support for these? MagiQuest would be nice because it has the same problems, and POTS because SoundDecompress does not work with wine's winmm.dll, but seems to work if I use the native winmm.dll.

Re: MOUL Sound Decompressor Tool

PostPosted: Fri Mar 05, 2010 3:22 am
by Deledrius
diafero wrote:I'm not at home currently so I can't test - does this tool fix the strange clicking noise sounds I get all the time? That would be absolutely awesome, I already tried various things (like using older wine versions, other sound systems, whatever) with no success. The strange thing is that it used to work fine with the GameTap MOUL.

That depends on what the cause of your trouble is. This tool helps the reported no-sound or static-sound from non-existent WAV files in the streamingCache folder.

On another note, does this also work with POTS and/or MagiQuest? Are there plans to add support for these? MagiQuest would be nice because it has the same problems, and POTS because SoundDecompress does not work with wine's winmm.dll, but seems to work if I use the native winmm.dll.

It doesn't work with them as-is, but PotS should be easily doable. MQO I'll have to look into (It's in active development and might be a moving target). I'd like to get some feedback and bug reports for a day or two before I start adding new features though.

Re: MOUL Sound Decompressor Tool

PostPosted: Fri Mar 05, 2010 12:07 pm
by diafero
Wow, indeed this seems to have fixed the sound issues in MOUL - thank you very much :)

I'd also like to help testing support for other games. but libHSPlasma currently chokes on some of the ages in my offline installation. I will write bugreports.

Re: MOUL Sound Decompressor Tool

PostPosted: Fri Mar 05, 2010 4:47 pm
by Ferin
Edit: Removed my post b/c my shell script really is redundant to Deledrius' work. Carry on. :D

Re: MOUL Sound Decompressor Tool

PostPosted: Sat Mar 06, 2010 10:22 am
by diafero
Ok, I can now actually confirm that this amazing script makes sound working perfectly in MOUL for me, using Kubuntu 9.10 32bit :)

On another note, for the libHSPlasma-based Python scripts I wrote, I simply passed no argument at all to the plResManager, and they work fine with all versions of the engine. So maybe you don't even need that "-game" switch?

Re: MOUL Sound Decompressor Tool

PostPosted: Sun Mar 07, 2010 9:27 pm
by Deledrius
Glad to know it's working well for everyone! I've made some more changes and fixes and will be updating soon once I polish them up a bit.

diafero wrote:On another note, for the libHSPlasma-based Python scripts I wrote, I simply passed no argument at all to the plResManager, and they work fine with all versions of the engine. So maybe you don't even need that "-game" switch?

That's strange. When I first started writing the script, it would throw an exception reading the Ages until I added that, but I see now that it works fine without it. I was just learning the PyHSPlasma interface to the ResManager at the time though, so it was probably something I was doing wrong. I'll remove that bit for the next release.

Re: MOUL Sound Decompressor Tool

PostPosted: Sun Feb 06, 2011 12:38 pm
by Pavitra
As HSPlasma has changed somewhat, the following change is necessary: Change line 92 of sounddecompress.py, and/or line 417 of wxSoundDecompress.py, (whichever you're going to use) from
Code: Select all
soundBuffer = PyHSPlasma.plSoundBuffer.Convert(key.object)
to
Code: Select all
soundBuffer = key.object

Re: MOUL Sound Decompressor Tool

PostPosted: Sun Feb 06, 2011 12:40 pm
by Deledrius
Thanks for that! I'll update the code tonight. :)

Re: MOUL Sound Decompressor Tool

PostPosted: Sun Feb 06, 2011 12:55 pm
by diafero
EDIT: Oops, I first replied and then read new posts... sorry for that.
So, maybe it is a better idea not to attach a version here statically, but tell people where to get it from in the libHSPlasma source, where it is maintained?