Adding voice to your mod., And decoding .ogg into .wav at install. |
The Black Wyrm's Lair Terms of Use | Help Search Members Calendar |
Adding voice to your mod., And decoding .ogg into .wav at install. |
Oct 9 2004, 12:28 AM
Post
#1
|
|
Forum Member Posts: 22 Joined: 29-July 04 From: Adelaide, Australia |
Programs needed.
WeiDU Ogg Vorbis decoder Text editor How to record a voiceclip? See here. Attaching the voiceclip to the mod. For this we need to get into the .d-file (or the .tra, in case you use it) and add a few things. After every string you wish to have voiced, you need to add the appropriate soundfile within []-tags, but without the .wav-extension. Example: CODE ~This is the string~ [clip] [clip] refers to the file clip.wav, a file which must be located in the override-directory. For a little longer example of a .d-structure, watch this example from the Hubelpot-mod: CODE IF ~NumTimesTalkedTo(0)~ Hub SAY ~Excuse me mah <LADYLORD>, but Ah was wonderin’ if Ah might hae a word with ye. Ye hae the look o’ the gallowglass, an Ah could surely use yer help.~ [SC#Hub57] ++ ~Of course good merchant. How may we assist?~ + Hub_2 END Here, [SC#Hub57] refers to the file SC#Hub57.wav. A .tra-example: CODE @1 = ~Excuse me mah <LADYLORD>, but Ah was wonderin’ if Ah might hae a word with ye. Ye hae the look o’ the gallowglass, an Ah could surely use yer help.~ [SC#Hub57] @2 = ~Very well, mah <LADYLORD>. Ah am sore in need, and shall wait an’ hope ye’ll change yer mind.~ [SC#Hub59] Here, [SC#Hub57] refers to the file SC#Hub57.wav and[SC#Hub59] refers to the file SC#Hub59.wav. As I mentioned before, these files needs to be in the override directory How to get them there? Well, follow the next step: The .tp2. Most mods have a single folder where all of the soundfiles are stored in. If this is the case, it is easy to implent a single: CODE COPY ~mymodfolder\Audio~ ~override~ into the .tp2. This will copy all files from the Audio-folder into the override. Simple as that. .ogg or .wav? Most mods today come with .ogg-files, to keep the overall size of the mod down. The game, however, can't play .ogg-files, which mean that we need to decode the .ogg-files into .wav-files. This is the tricky part, since it involves several steps. First, we must add a file named oggdec.exe. It is located in the Ogg Vorbis-decoder at the top of this tutorial. Secondly, we need to place this oggdec.exe in the same folder as the soundclips, the Audio-folder. Secondly, we need to create two .bat-files (one install and one uninstall), which you can edit with any text-editor. The install.bat will look like this: CODE @echo off cd override oggdec SC#Hub*.ogg del SC#Hub*.ogg del oggdec.exe cd .. This short .bat-file will tell oggdec.exe to decode all .ogg files that begin with SC#Hub, which means SC#Hub57.ogg and SC#Hub14.ogg, etc. After that, the .bat-file will delete all .ogg-files it has decoded, and the oggdec.exe. The uninstall.bat is even shorter: CODE del override\SC#Hub*.wav @ECHO @ECHO Hubelpot Audio Uninstalled @ECHO This .bat-file will delete all .wav files that begin with SC#Hub, the same files as it decoded previously. We do this since WeiDU won't delete these files, like the other files in the mod. Why? Well, WeiDU has no memory of these files, since it copied over .ogg-files at install, and not .wav. After that, it will show the string "Hubelpot Audio Uninstalled" in the DOS-prompt-screen at uninstall. But things isn't over yet, we need to add a few lines to the .tp2: CODE COPY ~SC#Hub\Install.bat~ ~Install.bat~ AT_INTERACTIVE_EXIT ~Install.bat~ AT_UNINSTALL ~Uninstall.bat~ The first line instructs WeiDU to copy the Install.bat-file to the main BGII-directory, where it needs to be. The second lines instructs WeiDU to execute the Install.bat at interactive exit, when the user presses the [ENTER] button at install. The third line instructs WeiDU to execute the Uninstall.bat at uninstall of the mod. Now, this requires two things. The Install.bat must be in the folder where you have specified it to be. This isn't difficult, since you can change that to any folder you want, as long as the line in the .tp2 matches. The other thing is more crucial, though. The Uninstall.bat must be in the same directory as the setup.exe and the .tp2, i.e. the main BGII-directory. We can't copy it over with WeiDU as we do with the Install.bat, since WeiDU would reverse that action at uninstall, before it would even be executed to remove the files. Good luck modding! Copyright Sebastian Conrad 2004. -------------------- Spellhold Studios
sconrad.NET Khadion NPC-mod - Team leader, head designer Hubelpot NPC-mod - Team leader, coder NPC Damage - Coder PC Soundsets - Coder, voice actor Brythe NPC-mod - Designer DragonLance TC - Glory of Istar - Designer The NPC Interaction Expansion Project - Writer for Cernd, Sarevok The Jerry Zinger Show - Producer Iron Modder 5 - Winner |
|
|
Nov 8 2007, 05:56 AM
Post
#2
|
|
Forum Member Posts: 5 Joined: 5-November 07 |
great!! I've looking for this for quite sometime...
this helped me a lot!!! -------------------- Busy blogging this time:
Catalytic Converters News Saab Latest News | Toyota Updates |
|
|
Lo-Fi Version | Time is now: 17th November 2024 - 12:45 AM |