@echo off md Music\mxm#am copy Amber\Music\*.ogg Music\mxm#am copy Amber\Music\snd2acm.exe Music\mxm#am copy Amber\sounds\oggdec.exe Music\mxm#am cd Music\mxm#am oggdec mxm#*.ogg del mxm#*.ogg del oggdec.exe snd2acm.exe -wav mxm#amA.wav mxm#amA.acm snd2acm.exe -wav mxm#amB1.wav mxm#amB1.acm snd2acm.exe -wav mxm#amB2.wav mxm#amB2.acm snd2acm.exe -wav mxm#amC.wav mxm#amC.acm snd2acm.exe -wav mxm#amD.wav mxm#amD.acm snd2acm.exe -wav mxm#amE1.wav mxm#amE1.acm snd2acm.exe -wav mxm#amZ.wav mxm#amZ.acm snd2acm.exe -wav mxm#amZC.wav mxm#amZC.acm snd2acm.exe -wav mxm#amZD.wav mxm#amZD.acm snd2acm.exe -wav mxm#amZE.wav mxm#amZE.acm del mxm#*.wav del snd2acm.exe cd.. cd.. cd override oggdec m#*.ogg del m#*.ogg del oggdec.exe tisunpack m#ar*.tiz del m#ar*.tiz del tisunpack.exe pause
Yet for some users the unpacking fails over and over again (re-installing does not help). What makes this more annoying is that since the unpacking is not carried by WeiDU the installation will not stop to the errors and the player will not notice anything before entering the new areas and the game crashes. (Okay, missing soundfiles can be a good hint that everything isn't okay.)
Documenting the error is also a challenge because the unpacking batch does not print a log of itself. Luckily, I managed to get a user to document these errors from the command prompt window:
oggdec is not recognized as and external or internal command could not find g:\bgII-soa\override\m#*.ogg could not find g:\bgII-soa\override\oggdec.exe tisunpack is not recognized as and external or internal command could not find g:\bgII-soa\override\m#ar*.tiz could not find g:\bgII-soa\override\tisunpack.exe
According to the debug file the tisunpack and ogg dec are copied to the override along with the tiz and ogg files:
[...] Copied [amber/areas/m#ar06.tiz] to [override/m#ar06.tiz] [amber/areas/m#ar06.wed] loaded, 14678 bytes Copied [amber/areas/m#ar06.wed] to [override/m#ar06.wed] [amber/areas/tisunpack.exe] loaded, 94208 bytes Copied [amber/areas/tisunpack.exe] to [override/tisunpack.exe] Copying 1 file ... [...] Copied [amber/sounds/m#ymm014.ogg] to [override/m#ymm014.ogg] [amber/sounds/m#ymm015.ogg] loaded, 106606 bytes Copied [amber/sounds/m#ymm015.ogg] to [override/m#ymm015.ogg] [amber/sounds/m#ymm016.ogg] loaded, 89629 bytes Copied [amber/sounds/m#ymm016.ogg] to [override/m#ymm016.ogg] [amber/sounds/m#ymm017.ogg] loaded, 95529 bytes Copied [amber/sounds/m#ymm017.ogg] to [override/m#ymm017.ogg] [amber/sounds/oggdec.exe] loaded, 155648 bytes Copied [amber/sounds/oggdec.exe] to [override/oggdec.exe] [...]
Any ideas what's going on and/or what I'm doing wrong in my batch file?
(There was a similar issue in the Mac version caused by using sub-optimal command to prompt the decoding program. Due that the unpacking failed unless the Mac user had the unpacking programs in the system directories.)