Idobek Posted June 30, 2004 Share Posted June 30, 2004 (edited) This tutorial is designed to help people play their romance love songs using a WAV file without the game music playing over the top of it. NOTE: If you are planning to use an ACM for your music none of this applies. There have been problems in the past with adding music to mods. While the game's ACM music format is smaller than WAV, it is much larger than MP3 or OGG files, leading to longer downloads. The main problem is that game music will play over the love song if it is not switched off somehow. The current method of switching off the game music for the duration is to add a blank entry to the songlist, using WeiDU's ADD_MUSIC, facility to make use of the blank music file that BioWare kindly provided. Unfortunately there is a problem with this method in that the songlist has limited space, (a total of 100 song slots of which 84 are already filled by the game) and several mods adding blank music entries is not a good thing. Help is at hand, there is an entry is the songlist that is not currently used by the game or other mods. If you look at row 0 of songlist.2da you will see **** listed as the resource, if we replace this with a mus file that plays blank.acm we can have a universal entry for a blank song. Here's what you need to do. First you need a mus file that plays blank.acm here is an example: Blank1 A @TAG END It doesn't have to be called j#blank.mus, this is just an example. Second we need to copy it to the music folder and then add it to the songlist, here it the tp2 code to do this: COPY ~mymod/j#blank.mus~ ~music~COPY_EXISTING ~songlist.2da~ ~override~ SET_2DA_ENTRY 0 2 3 ~J#BLANK.MUS~ Now to play your love song without the game music running over it simply use PlaySong(0) before using PlaySound("LOVESONG"). Here is an example I lifted (and then altered) from Kelsey: IF PartyRested() Global("J#KelseyMatch","GLOBAL",1) See(Player1) CombatCounter(0) Global("J#LoveTalk","LOCALS",25) !Global("Chapter","GLOBAL",5) THEN RESPONSE #100 PlaySong(0) MoveViewObject("J#Kelsey",INSTANT) IncrementGlobal("J#LoveTalk","LOCALS",1) PlaySound("FWKSong") RealSetGlobalTimer("J#KelseyRomance","GLOBAL",1) Interact(Player1) END To finish, a bit of basic sound file stuff. The best way to package your sounds is as 22 Khz mono OGG files, quality level 4 is usually sufficient for both voice and music. To install them use oggdec to covert them to WAV files. This is quite simple, here is a quick overview: COPY ~mymod/audio~ ~override~AT_INTERACTIVE_EXIT ~mymod/install-audio.bat~ AT_INTERACTIVE_UNINSTALL ~mymod/uninstall-audio.bat~ @echo offmymod\oggdec override\mymod*.ogg del mymod*.ogg @echo offdel override\mymod*.wav In this example oggdec is kept in the MyMod folder and the ogg files are held in the MyMod/audio folder. Useful Links For encoding: http://winlame.sourceforge.net/ For oggdec: http://www.rarewares.org/ogg.html Edited June 30, 2004 by Idobek Quote Link to comment
Awachi Posted April 6, 2022 Share Posted April 6, 2022 (edited) Just making a wild guess, but I imagine this is profoundly out of date. Any current mod that adds area audio (not just NPC dialog accompaniment)? Edited April 6, 2022 by Awachi Quote Link to comment
jmerry Posted April 7, 2022 Share Posted April 7, 2022 Yes. For one thing, the 100-song limit is definitely not in effect; there are either 106 or 107 entries in BG2EE's songlist, depending on whether you look at the 2DA or the IDS. I don't know what the actual limit is now, but you can assume it's plenty. Quote Link to comment
argent77 Posted April 7, 2022 Share Posted April 7, 2022 The tutorial still largely apply. The EE engine allows you a bit more freedom though. The 100 songs limit has definitely been lifted, and you can use Ogg files for the soundtracks directly. Just rename their file extension to .acm, so that the game can detect them. As for mod examples, Trials of the Luremaster for BG2EE and Test Your Mettle! install their own soundtracks. Quote Link to comment
Awachi Posted April 7, 2022 Share Posted April 7, 2022 I'm more wary about entry 0 getting used, that's why I asked how to find row numbers in a 2da (and then use that in a script). Quote Link to comment
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.