Jump to content

Ogg Files Not Being Loaded Into Override File


Guest Guest_Gregor_*

Recommended Posts

Guest Guest_Gregor_*

Getting this error message during install:

 

Oggdec 1.0.1

Error: Failed to open input file: invalid argument

 

My oggdec.exc file is in my Audio folder. My gregaraudio.bat file is in my Gregar folder. My gregaraudiouninstall.bat file is in the main SOA directory. My tp2 file reads like this:

 

 

COPY ~Gregar/Audio~ ~override~

 

COPY ~Gregar/gregaraudio.bat~ ~gregaraudio.bat~

AT_INTERACTIVE_EXIT ~gregaraudio.bat~

AT_UNINSTALL ~gregaraudiouninstall.bat~

 

Can anyone tell me what I'm doing wrong? :p

Link to comment

(safer to do all the manipulation, and leave the oggdec and .ogg files in lace in your mod, extract them there, and then move the resulting .wav files to the override, too... when you look at the .bat, you might see if you can do that. Examples: bg1npc project music, and several of the newer NPC mods)

Link to comment
(safer to do all the manipulation, and leave the oggdec and .ogg files in lace in your mod, extract them there, and then move the resulting .wav files to the override, too... when you look at the .bat, you might see if you can do that. Examples: bg1npc project music, and several of the newer NPC mods)

 

I should perhaps mention that I'm a total noob at modding, and don't REALLY understand yet exactly what all the code is doing. I swiped all my sound coding from SConrad's adding voicing tutorial. My gregaraudio.bat file looks like this:

 

 

@echo off

cd override

oggdec G#GREG*.ogg

del G#GREG*.ogg

del oggdec.exe

cd ..

 

And my gregaraudiouininstall looks like this:

 

del override\G#GREG*.wav

@ECHO

@ECHO Gregar Audio Uninstalled

@ECHO

 

I did check out a few NPC mods (Keto, Kelsey, Nathaniel) but I couldn't see any basic differences between what I was doing and what they were doing. :p

Link to comment

If you wanted to go about it like cmorgan says (which sounds like a good idea to me), I'd try something like...

 

AT_NOW ~Gregar/Audio/gregaraudio.bat~

ACTION_BASH_FOR ~Gregar/Audio~ ~^.+\.wav$~ BEGIN
 COPY ~%BASH_FOR_FILESPEC%~ ~override~
END

 

Gregar\Audio\oggdec.exe Gregar\Audio\*.ogg

 

With your file system looking something like:

Baldur's Gate II - SoA
-->Setup-Gregar.exe
-->Gregar
---->Setup-Gregar.tp2
---->Audio
------>G#GREG01.ogg
------>G#GREG02.ogg
------>etc.
------>gregaraudio.bat
------>oggdec.exe

With your oggdec and .bat file being inside the Audio subfolder (you could easily change this if you wanted, but this way would keep all the audio-related stuff in one spot).

Link to comment

Thanks...I will try this when I get home tonight, but what would the uninstall.bat file look like?

 

And as much as I'd like to just resolve the problem, I'd also like to understand what went wrong in the first place, so that I can learn. Can anyone tell me why my initial setup didn't work?

 

Also: how does one look at a .bat file? Do you change the file extension to .txt, or is there some way to read it as is? (told you I was a noob!)

Link to comment

I know there is a post or something around here with all this, but I have aminute or two, amd I remember going crazy over this stuff myself :p

 

Keeping as many files out of override as possible, ad avoiding deleting/manipulating stuff there is always a good idea. Some older mods used the "move the .ogg files into the overide, decompress them, and delete them" via wildcard or specific call - but some deleted the oggdec from the override, others left it there until uninstall, things can accidentally capture other files without careful wildcard usage. Basically, the idea the bigg and Kulyok discussed over at PPG was to leave well enough alone and decompress resources inside of mod folders, ad then move just what was needed to the override - deleting it on uninstall. Cautious folks do it by specifying each file, because if k#*.wav covers both k#auren.wav and k#sarah.wav, uninstalling Sarah might rip out Auren's sound files as well. More free-thinking folks use wildcards, figuring that if a modder is not being careful with their file naming system, then they get what they deserve!

 

The linux folks around here led us through a pretty fool-proof way of dealing with sound installation on multiple paltforms (windows, osx, linux). In your .tp2, you can modify the following:

// scripts to compress/decompress sounds
ACTION_IF (~%WEIDU_OS%~ STRING_EQUAL_CASE ~win32~) THEN BEGIN
 AT_NOW				   ~myMod/audio/audio-install.bat~
 AT_INTERACTIVE_UNINSTALL ~myMod/batchfiles/audio-uninstall.bat~
END ELSE BEGIN
 ACTION_IF (~%WEIDU_OS%~ STRING_EQUAL_CASE ~osx~) THEN BEGIN
AT_NOW				   ~sh myMod/audio/audio-install-osx.sh~
AT_INTERACTIVE_UNINSTALL ~sh myMod/batchfiles/audio-uninstall-osx.sh~
 END ELSE BEGIN
AT_NOW				   ~bash myMod/audio/audio-install-lin.sh~
AT_INTERACTIVE_UNINSTALL ~bash myMod/batchfiles/audio-uninstall-lin.sh~
 END
END

This means that there are six small .bat files. Each one is called using what the operating system would like to see - they all do the same thing.

 

{you can open these by right-clicking on them, and specifying notepad or another text editing program, or temporarily rename them with the .txt extension, and you will be fine - just don't use MS Word or Works or such, use the simple editors.}

 

Wor the windows, one, the audio install looks like Mike1072's stuff above:

 

audio-install.bat

@echo off

cd mymod\audio

oggdec *.ogg

move *.wav ..\..\override

@echo finished installing audio.

Which basically says

"Hey, don't watch me."

"go to the audio directory."

"run oggdec, found in the same directory (as a modder you put a copy in there with the .oggs), to extract .wav files from everything with the extension .ogg"

"Move all of the files with the extension .wav into the override directory."

"Say to the user 'Hey, yo, I'm done"

 

On the uninstall, it gets a bit more sticky, because if you do a "del override\*.wav" you tear out everything in override with .wav - and mess up a whole raft of mods rendering them silent. Not a good idea.

 

So, more specificity on the deletion. For example, Theaceface uses this in SarahToB:

 

audio-uninstall.bat

@echo off
@echo uninstalling audio...

cd override

del k#sar*.wav

@echo finished uninstalling audio.

 

Basically, change to the override file and delete any .wav files starting with 'k#sar'.

 

I like to do something more specific, because I am silly. I would do something like

 

@echo off
@echo uninstalling audio...

del override\k#sar01.wav
del override\k#sar02.wav
del override\k#sar03.wav
del override\k#sar04.wav

@echo finished uninstalling audio.

 

and I would probably specify the files on the install, too - but it isn't necessary.

 

Great advanced examples; the bigg's coding of audio files for Amber, SarahToB, Gavin, Crossmod v8, and that BG1NPC music pack v5. The most "conservative" is the music pack, and i has some of the oddities like batch processing files on OSX and linux.

 

I'll toss the other OS versions here for completeness, but you may not need them unless you are planning on setting up OSX and linux distributions. These ae ripped out of SarahToB:

 

 

audio-install-osx.sh

#!/bin/sh

ogg_files="k#saram1.ogg k#saram2.ogg k#saram3.ogg k#sarag1.ogg k#sarag2.ogg k#sarag3.ogg k#sarag4.ogg k#sarag5.ogg k#sarag6.ogg k#sarag7.ogg k#sarag8.ogg k#sarag9.ogg k#saraga.ogg k#saragb.ogg k#saragc.ogg k#saragd.ogg k#sarage.ogg k#saragf.ogg k#saragg.ogg k#saragh.ogg k#saragi.ogg k#saragj.ogg k#saragk.ogg k#saragl.ogg k#saraa%.ogg k#saraa1.ogg k#saraa2.ogg k#saraa3.ogg k#saraa4.ogg k#saraa5.ogg k#saraa6.ogg k#saraa7.ogg k#saraa8.ogg k#saraa9.ogg k#saraaa.ogg k#saraab.ogg k#saraac.ogg k#saraad.ogg k#saraae.ogg k#saraaf.ogg k#saraag.ogg k#saraah.ogg k#saraai.ogg k#saraaj.ogg k#saraak.ogg k#saraal.ogg k#saraam.ogg k#saraan.ogg k#saraao.ogg k#saraap.ogg k#sara00.ogg k#sara01.ogg k#sara02.ogg k#sara03.ogg k#sara04.ogg k#sara05.ogg k#sara06.ogg k#sara07.ogg k#sara08.ogg k#sara09.ogg k#sara10.ogg k#sara11.ogg k#sara12.ogg k#sara13.ogg k#sara14.ogg k#sara15.ogg k#sara16.ogg k#sara17.ogg k#sara18.ogg k#sara19.ogg k#sara20.ogg k#sara21.ogg k#sara22.ogg k#sara23.ogg k#sara24.ogg k#sara25.ogg k#sara26.ogg k#sara27.ogg k#sara28.ogg k#sara29.ogg k#sara30.ogg k#sara31.ogg k#sara32.ogg k#sara33.ogg k#sara34.ogg k#sara35.ogg k#sara36.ogg k#sara37.ogg k#sara38.ogg k#sara39.ogg k#sara40.ogg k#sara41.ogg k#sara42.ogg k#sara43.ogg k#sara44.ogg k#sara45.ogg k#sara46.ogg k#sara47.ogg k#sara48.ogg k#sara49.ogg k#sara50.ogg k#sara51.ogg k#sara52.ogg k#sara53.ogg k#sara54.ogg k#sara55.ogg k#sara5^.ogg k#sara5%.ogg k#sara56.ogg k#sara57.ogg k#sara58.ogg k#sara59.ogg k#sara60.ogg k#sara61.ogg k#sara62.ogg k#sara6#.ogg k#sara6$.ogg k#sara6%.ogg k#sara6^.ogg k#sara63.ogg k#sara64.ogg k#sara65.ogg k#sara66.ogg k#sara67.ogg k#sara68.ogg k#sara69.ogg k#sara70.ogg k#sara71.ogg k#sara72.ogg k#sara73.ogg k#sara74.ogg k#sara75.ogg k#sara76.ogg k#sara77.ogg k#sara78.ogg k#sara79.ogg k#sara80.ogg k#sara81.ogg k#sara82.ogg k#sara83.ogg k#sara84.ogg k#sara85.ogg k#sara86.ogg k#sara87.ogg k#sara88.ogg k#sara89.ogg k#sara90.ogg k#sara91.ogg k#sara92.ogg k#sara93.ogg k#sara94.ogg k#sara95.ogg k#sara96.ogg k#sara97.ogg k#sara98.ogg k#sara99.ogg k#sara1a.ogg k#sara2a.ogg k#sara3a.ogg k#sara4a.ogg k#sara5a.ogg k#sara6a.ogg k#sara7a.ogg k#sara8a.ogg k#sara9a.ogg k#sara1b.ogg k#sara2b.ogg k#sara3b.ogg k#sara4b.ogg k#sara5b.ogg k#sara6b.ogg k#sara7b.ogg k#sara8b.ogg k#sara9b.ogg k#sara1c.ogg k#sara2c.ogg k#sara3c.ogg k#sara4c.ogg k#sara5c.ogg k#sara6c.ogg k#sara7c.ogg k#sara8c.ogg k#sara9c.ogg k#sara0c.ogg k#sara1d.ogg k#sara2d.ogg k#sara3d.ogg k#sara4d.ogg k#sara5d.ogg k#sara6d.ogg k#sara1e.ogg k#sara2e.ogg k#sara3e.ogg k#sar001.ogg k#sar002.ogg k#sarm4.ogg k#sarm5.ogg k#sarm6.ogg k#sarm7.ogg"

for file in $ogg_files; do
 echo converting $file
 sarahtob/audio/sox sarahtob/audio/$file override/${file%.ogg}.wav
done

audio-uninstall-osx.sh

#!/bin/sh

wav_files="k#saram1.wav k#saram2.wav k#saram3.wav k#sarag1.wav k#sarag2.wav k#sarag3.wav k#sarag4.wav k#sarag5.wav k#sarag6.wav k#sarag7.wav k#sarag8.wav k#sarag9.wav k#saraga.wav k#saragb.wav k#saragc.wav k#saragd.wav k#sarage.wav k#saragf.wav k#saragg.wav k#saragh.wav k#saragi.wav k#saragj.wav k#saragk.wav k#saragl.wav k#saraa%.wav k#saraa1.wav k#saraa2.wav k#saraa3.wav k#saraa4.wav k#saraa5.wav k#saraa6.wav k#saraa7.wav k#saraa8.wav k#saraa9.wav k#saraaa.wav k#saraab.wav k#saraac.wav k#saraad.wav k#saraae.wav k#saraaf.wav k#saraag.wav k#saraah.wav k#saraai.wav k#saraaj.wav k#saraak.wav k#saraal.wav k#saraam.wav k#saraan.wav k#saraao.wav k#saraap.wav k#sara00.wav k#sara01.wav k#sara02.wav k#sara03.wav k#sara04.wav k#sara05.wav k#sara06.wav k#sara07.wav k#sara08.wav k#sara09.wav k#sara10.wav k#sara11.wav k#sara12.wav k#sara13.wav k#sara14.wav k#sara15.wav k#sara16.wav k#sara17.wav k#sara18.wav k#sara19.wav k#sara20.wav k#sara21.wav k#sara22.wav k#sara23.wav k#sara24.wav k#sara25.wav k#sara26.wav k#sara27.wav k#sara28.wav k#sara29.wav k#sara30.wav k#sara31.wav k#sara32.wav k#sara33.wav k#sara34.wav k#sara35.wav k#sara36.wav k#sara37.wav k#sara38.wav k#sara39.wav k#sara40.wav k#sara41.wav k#sara42.wav k#sara43.wav k#sara44.wav k#sara45.wav k#sara46.wav k#sara47.wav k#sara48.wav k#sara49.wav k#sara50.wav k#sara51.wav k#sara52.wav k#sara53.wav k#sara54.wav k#sara55.wav k#sara5^.wav k#sara5%.wav k#sara56.wav k#sara57.wav k#sara58.wav k#sara59.wav k#sara60.wav k#sara61.wav k#sara62.wav k#sara6#.wav k#sara6$.wav k#sara6%.wav k#sara6^.wav k#sara63.wav k#sara64.wav k#sara65.wav k#sara66.wav k#sara67.wav k#sara68.wav k#sara69.wav k#sara70.wav k#sara71.wav k#sara72.wav k#sara73.wav k#sara74.wav k#sara75.wav k#sara76.wav k#sara77.wav k#sara78.wav k#sara79.wav k#sara80.wav k#sara81.wav k#sara82.wav k#sara83.wav k#sara84.wav k#sara85.wav k#sara86.wav k#sara87.wav k#sara88.wav k#sara89.wav k#sara90.wav k#sara91.wav k#sara92.wav k#sara93.wav k#sara94.wav k#sara95.wav k#sara96.wav k#sara97.wav k#sara98.wav k#sara99.wav k#sara1a.wav k#sara2a.wav k#sara3a.wav k#sara4a.wav k#sara5a.wav k#sara6a.wav k#sara7a.wav k#sara8a.wav k#sara9a.wav k#sara1b.wav k#sara2b.wav k#sara3b.wav k#sara4b.wav k#sara5b.wav k#sara6b.wav k#sara7b.wav k#sara8b.wav k#sara9b.wav k#sara1c.wav k#sara2c.wav k#sara3c.wav k#sara4c.wav k#sara5c.wav k#sara6c.wav k#sara7c.wav k#sara8c.wav k#sara9c.wav k#sara0c.wav k#sara1d.wav k#sara2d.wav k#sara3d.wav k#sara4d.wav k#sara5d.wav k#sara6d.wav k#sara1e.wav k#sara2e.wav k#sara3e.wav k#sar001.wav k#sar002.wav k#sarm4.wav k#sarm5.wav k#sarm6.wav k#sarm7.wav"

for file in $wav_files; do
rm override/$file
done

audio-install-lin.sh

#!/bin/sh

oggdec sarahtob/audio/*.ogg
mv -f sarahtob/audio/*.wav override

audio-uninstall-lin.sh

#!/bin/sh

rm -f override/k#saram1.wav
rm -f override/k#saram2.wav
rm -f override/k#saram3.wav
rm -f override/k#sarag1.wav
rm -f override/k#sarag2.wav
rm -f override/k#sarag3.wav
rm -f override/k#sarag4.wav
rm -f override/k#sarag5.wav
rm -f override/k#sarag6.wav
rm -f override/k#sarag7.wav
rm -f override/k#sarag8.wav
rm -f override/k#sarag9.wav
rm -f override/k#saraga.wav
rm -f override/k#saragb.wav
rm -f override/k#saragc.wav
rm -f override/k#saragd.wav
rm -f override/k#sarage.wav
rm -f override/k#saragf.wav
rm -f override/k#saragg.wav
rm -f override/k#saragh.wav
rm -f override/k#saragi.wav
rm -f override/k#saragj.wav
rm -f override/k#saragk.wav
rm -f override/k#saragl.wav
rm -f override/k#saraa%.wav
rm -f override/k#saraa1.wav
rm -f override/k#saraa2.wav
rm -f override/k#saraa3.wav
rm -f override/k#saraa4.wav
rm -f override/k#saraa5.wav
rm -f override/k#saraa6.wav
rm -f override/k#saraa7.wav
rm -f override/k#saraa8.wav
rm -f override/k#saraa9.wav
rm -f override/k#saraaa.wav
rm -f override/k#saraab.wav
rm -f override/k#saraac.wav
rm -f override/k#saraad.wav
rm -f override/k#saraae.wav
rm -f override/k#saraaf.wav
rm -f override/k#saraag.wav
rm -f override/k#saraah.wav
rm -f override/k#saraai.wav
rm -f override/k#saraaj.wav
rm -f override/k#saraak.wav
rm -f override/k#saraal.wav
rm -f override/k#saraam.wav
rm -f override/k#saraan.wav
rm -f override/k#saraao.wav
rm -f override/k#saraap.wav
rm -f override/k#sara00.wav
rm -f override/k#sara01.wav
rm -f override/k#sara02.wav
rm -f override/k#sara03.wav
rm -f override/k#sara04.wav
rm -f override/k#sara05.wav
rm -f override/k#sara06.wav
rm -f override/k#sara07.wav
rm -f override/k#sara08.wav
rm -f override/k#sara09.wav
rm -f override/k#sara10.wav
rm -f override/k#sara11.wav
rm -f override/k#sara12.wav
rm -f override/k#sara13.wav
rm -f override/k#sara14.wav
rm -f override/k#sara15.wav
rm -f override/k#sara16.wav
rm -f override/k#sara17.wav
rm -f override/k#sara18.wav
rm -f override/k#sara19.wav
rm -f override/k#sara20.wav
rm -f override/k#sara21.wav
rm -f override/k#sara22.wav
rm -f override/k#sara23.wav
rm -f override/k#sara24.wav
rm -f override/k#sara25.wav
rm -f override/k#sara26.wav
rm -f override/k#sara27.wav
rm -f override/k#sara28.wav
rm -f override/k#sara29.wav
rm -f override/k#sara30.wav
rm -f override/k#sara31.wav
rm -f override/k#sara32.wav
rm -f override/k#sara33.wav
rm -f override/k#sara34.wav
rm -f override/k#sara35.wav
rm -f override/k#sara36.wav
rm -f override/k#sara37.wav
rm -f override/k#sara38.wav
rm -f override/k#sara39.wav
rm -f override/k#sara40.wav
rm -f override/k#sara41.wav
rm -f override/k#sara42.wav
rm -f override/k#sara43.wav
rm -f override/k#sara44.wav
rm -f override/k#sara45.wav
rm -f override/k#sara46.wav
rm -f override/k#sara47.wav
rm -f override/k#sara48.wav
rm -f override/k#sara49.wav
rm -f override/k#sara50.wav
rm -f override/k#sara51.wav
rm -f override/k#sara52.wav
rm -f override/k#sara53.wav
rm -f override/k#sara54.wav
rm -f override/k#sara55.wav
rm -f override/k#sara5^.wav
rm -f override/k#sara5%.wav
rm -f override/k#sara56.wav
rm -f override/k#sara57.wav
rm -f override/k#sara58.wav
rm -f override/k#sara59.wav
rm -f override/k#sara60.wav
rm -f override/k#sara61.wav
rm -f override/k#sara62.wav
rm -f override/k#sara6#.wav
rm -f override/k#sara6$.wav
rm -f override/k#sara6%.wav
rm -f override/k#sara6^.wav
rm -f override/k#sara63.wav
rm -f override/k#sara64.wav
rm -f override/k#sara65.wav
rm -f override/k#sara66.wav
rm -f override/k#sara67.wav
rm -f override/k#sara68.wav
rm -f override/k#sara69.wav
rm -f override/k#sara70.wav
rm -f override/k#sara71.wav
rm -f override/k#sara72.wav
rm -f override/k#sara73.wav
rm -f override/k#sara74.wav
rm -f override/k#sara75.wav
rm -f override/k#sara76.wav
rm -f override/k#sara77.wav
rm -f override/k#sara78.wav
rm -f override/k#sara79.wav
rm -f override/k#sara80.wav
rm -f override/k#sara81.wav
rm -f override/k#sara82.wav
rm -f override/k#sara83.wav
rm -f override/k#sara84.wav
rm -f override/k#sara85.wav
rm -f override/k#sara86.wav
rm -f override/k#sara87.wav
rm -f override/k#sara88.wav
rm -f override/k#sara89.wav
rm -f override/k#sara90.wav
rm -f override/k#sara91.wav
rm -f override/k#sara92.wav
rm -f override/k#sara93.wav
rm -f override/k#sara94.wav
rm -f override/k#sara95.wav
rm -f override/k#sara96.wav
rm -f override/k#sara97.wav
rm -f override/k#sara98.wav
rm -f override/k#sara99.wav
rm -f override/k#sara1a.wav
rm -f override/k#sara2a.wav
rm -f override/k#sara3a.wav
rm -f override/k#sara4a.wav
rm -f override/k#sara5a.wav
rm -f override/k#sara6a.wav
rm -f override/k#sara7a.wav
rm -f override/k#sara8a.wav
rm -f override/k#sara9a.wav
rm -f override/k#sara1b.wav
rm -f override/k#sara2b.wav
rm -f override/k#sara3b.wav
rm -f override/k#sara4b.wav
rm -f override/k#sara5b.wav
rm -f override/k#sara6b.wav
rm -f override/k#sara7b.wav
rm -f override/k#sara8b.wav
rm -f override/k#sara9b.wav
rm -f override/k#sara1c.wav
rm -f override/k#sara2c.wav
rm -f override/k#sara3c.wav
rm -f override/k#sara4c.wav
rm -f override/k#sara5c.wav
rm -f override/k#sara6c.wav
rm -f override/k#sara7c.wav
rm -f override/k#sara8c.wav
rm -f override/k#sara9c.wav
rm -f override/k#sara0c.wav
rm -f override/k#sara1d.wav
rm -f override/k#sara2d.wav
rm -f override/k#sara3d.wav
rm -f override/k#sara4d.wav
rm -f override/k#sara5d.wav
rm -f override/k#sara6d.wav
rm -f override/k#sara1e.wav
rm -f override/k#sara2e.wav
rm -f override/k#sara3e.wav
rm -f override/k#sar001.wav
rm -f override/k#sar002.wav
rm -f override/k#sarm4.wav
rm -f override/k#sarm5.wav
rm -f override/k#sarm6.wav
rm -f override/k#sarm7.wav

 

The good news is that if you create a folder like myMod\audio

 

and put both oggdec and sox in it along with your .ogg files,

 

and follow this format,

 

you can be pretty sure your sound files are gong to make it into pretty much any install.

Link to comment

Thanks, CM! I very much appreciate the detailed explanation; if nothing else, I now at least understand WHY things should be done the way you're recommending.

 

The instructions look very clear...I can't wait to get home and give it a try. Hopefully, I won't have to bug you again...about this :p

Link to comment

No problem!

 

(Error: Failed to open input file: invalid argument means that for whatever reason, oggdec tried to read a file and was confused. Oggdec ran, an encountered something it didn't understand - though what that was, nased on what you have posted, I'm not sure).

Link to comment
Thanks...I will try this when I get home tonight, but what would the uninstall.bat file look like?

My version shouldn't need an uninstall script. My install script simply decodes the .ogg files into .wav files, and then WeiDU takes care of copying the .wav files to the override folder. This means that WeiDU will automatically remove them when uninstalling.

 

@cmorgan and other experienced mod packagers:

When only installing, I assume there wouldn't be any worries about wildcards picking up too many files from your mod folders. So, maybe the days of having to list all your sound files are over? Maybe?

Link to comment

Well, crap. I tried it both ways, and I'm still getting the same error message:

 

OggDec 1.0.1

ERROR: failed to open input file: Invalid argument

A duplicate file name exists, or the file cannot be found.

 

That last line is new, and I only got it following cmorgan's code; it didn't appear using Mike's. I take it to mean that Weidu can't find the oggdec.exe file in my audio folder. However, it is definitely in there.

 

Could something be wrong with oggdec.exe itself? I got it from the download link in SConrad's tutorial:

 

http://www.vorbis.com/files/1.0.1/windows/...1.0.1-win32.zip

 

I unzipped it, copied the oggdec.exe file (leaving the other files alone), and pasted it into my audio file.

 

Anyone have any further advice? :p

Link to comment

@Mike1072 - wow - I should have looked at that longer, and thought through...

 

Gregar\Audio\oggdec.exe Gregar\Audio\*.ogg // will this work for all OS?

 

that means that a single entry using weidu takes the place of shell files, and eliminates lists (except in strange cases like BG1NPC Music Pack where you can install sets of music that can't easily be grepped for...)

 

dude, you rock. Any time we can reduce a ton of code to three lines is a big, big win.

 

@Gregor, can you recheck the names of you .ogg files? If it says OggDec 1.0.1, I think that it is running oggdec, and that the error message is not finding the expected *name* of the ogg.

 

Here is what I get when I run the command prompt in an audio subdirectory with a name that does not exist in the directory:

 

 

e:\ie_modding\BG2_NPC\sarahtob-beta2\sarahtob\audio>oggdec j#mysnd.ogg

Could not find 'j#mysnd.ogg': The system cannot find the file specified.

 

But I am using a version of oggdec pulled from a different source, I think. Try it with this one:

 

Link to comment
@Gregor, can you recheck the names of you .ogg files? If it says OggDec 1.0.1, I think that it is running oggdec, and that the error message is not finding the expected *name* of the ogg.

 

Here is what I get when I run the command prompt in an audio subdirectory with a name that does not exist in the directory:

 

 

e:\ie_modding\BG2_NPC\sarahtob-beta2\sarahtob\audio>oggdec j#mysnd.ogg

Could not find 'j#mysnd.ogg': The system cannot find the file specified.

 

But I am using a version of oggdec pulled from a different source, I think. Try it with this one:

 

Success! Looks like the culprit was a bad ogg.exe. My guy talks now!

 

Thanks - both of you - for your timely assistance! Hopefully, things will go smoother from here on out!

Link to comment
Success! Looks like the culprit was a bad ogg.exe. My guy talks now!

 

Thanks - both of you - for your timely assistance! Hopefully, things will go smoother from here on out!

Good news!

 

Gregar\Audio\oggdec.exe Gregar\Audio\*.ogg // will this work for all OS?

Well, no. You'd need equivalent Mac/Linux scripts, both containing just the commands needed to decode the .ogg files. I think the Linux script would be quite similar to the Windows one. I'll check in Cygwin. Also in the common workroom thread, I think erik suggested a way to modify the current Mac code in a way that would remove the need for file lists.

 

that means that a single entry using weidu takes the place of shell files, and eliminates lists (except in strange cases like BG1NPC Music Pack where you can install sets of music that can't easily be grepped for...)

I was trying to reduce the need for shell scripts as much as possible and to make it easier to re-use code, with only a small number of changes required. I'm not a big fan of extra work, or shell scripts.

 

Regarding things like the BG1NPC Music Pack, I'm thinking that shipping the mod with .ogg files is done to reduce download size. Once you've got it downloaded, though, having .wav versions of these files isn't such a big deal, so you could decode all of them. If you only wanted to install certain files, you could use different ACTION_BASH_FOR commands (and if they really don't match a naming scheme, maybe put them in subfolders). Even if you only wanted to decode the ones you'd be using, you could do it without listing files by using subfolders (but you would need additional scripts).

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...