Kyshakk Koan Kennedy Posted April 3, 2004 Share Posted April 3, 2004 I managed to add custom sounds to a scenerio I made. To do so open the scenerio's .CMG file with Resedit and add the SND resource you want for your scenerio into it. Next select the SND and choose "get info" from the "resource" pull down menu, and change the ID number to 20000+X where X is the number you want to assign the sound. I suggest having X be 174 or greater as anything less then that is allready taken. After that you can then play your custom sound with the play_sound(X) where X is the value you chose earlier. So if your sound resource has an ID of 20187, then you would type play_sound(187) to play it. Link to comment Share on other sites More sharing options...
Garrulous Glaahk Daravon Posted April 3, 2004 Share Posted April 3, 2004 Quite clever of you. And how did you manage to discover this? Link to comment Share on other sites More sharing options...
Garrulous Glaahk Newtfeet Posted April 3, 2004 Share Posted April 3, 2004 I bet I can answer that; he looked at the numbers of the 'SND 's in the sound data file. As I did just a second ago. Well done, Kennedy! Link to comment Share on other sites More sharing options...
Easygoing Eyebeast Imban Posted April 3, 2004 Share Posted April 3, 2004 This is unsupported, for the record. Link to comment Share on other sites More sharing options...
Magnificent Ornk Donald Hebb Posted April 3, 2004 Share Posted April 3, 2004 What file format would one have to use in order to make the sound function, or are all sounds fine? If so, I have some that I would like to try! Many thanks. Link to comment Share on other sites More sharing options...
Garrulous Glaahk Newtfeet Posted April 3, 2004 Share Posted April 3, 2004 Standard Mac sound. If you use a resource editor, it'll probably come out right. Link to comment Share on other sites More sharing options...
Magnificent Ornk Drakefyre Posted April 3, 2004 Share Posted April 3, 2004 Remember that Windows users will not be able to utilize this. Link to comment Share on other sites More sharing options...
Unflappable Drayk Chivlan Posted April 3, 2004 Share Posted April 3, 2004 Damn. Link to comment Share on other sites More sharing options...
Garrulous Glaahk Timber-Wolf Posted April 3, 2004 Share Posted April 3, 2004 Windows users can use a program called reshack to change the sound files, I have already done this to Avernum 3 and other games and is a lot eaiser then the Mac method Link to comment Share on other sites More sharing options...
Easygoing Eyebeast Imban Posted April 4, 2004 Share Posted April 4, 2004 It's still a Bad Idea™, really, unless it turns out to be just as easy for Windows users to do this, somehow. Link to comment Share on other sites More sharing options...
Kyshakk Koan ef Posted April 4, 2004 Share Posted April 4, 2004 That reshack is a nice program, thanks. Easy to use. Link to comment Share on other sites More sharing options...
Magnificent Ornk Drakefyre Posted April 4, 2004 Share Posted April 4, 2004 Changing the sound file is different from creating a file that can be included with scenarios that merely augments the existing sound file. Link to comment Share on other sites More sharing options...
Garrulous Glaahk Frobozz Posted April 5, 2004 Share Posted April 5, 2004 What you should do is write a program that puts adds the custom sounds when ran and when ran again removes them. Them we wouldn't have to go in and fiddle with the thing by hand which is kinda slow. Or you could spam Jeff with email until he agrees to add support. Link to comment Share on other sites More sharing options...
Kyshakk Koan Kennedy Posted April 5, 2004 Author Share Posted April 5, 2004 Quote: Originally written by Imban:This is unsupported, for the record. Yeah, I did experience a slight bug where the automap in the bottom left corner of the screen ceased to function after playing the sound, but I prssed the 'A' key to turn it back on and it went back to normal. Link to comment Share on other sites More sharing options...
Garrulous Glaahk Newtfeet Posted April 5, 2004 Share Posted April 5, 2004 Quote: Originally written by Frobozz:What you should do is write a program that puts adds the custom sounds when ran and when ran again removes them. Them we wouldn't have to go in and fiddle with the thing by hand which is kinda slow. If there's enough interest, I could write one. Link to comment Share on other sites More sharing options...
Garrulous Glaahk Newtfeet Posted April 5, 2004 Share Posted April 5, 2004 Quote: Originally written by Frobozz:What you should do is write a program that puts adds the custom sounds when ran and when ran again removes them. Them we wouldn't have to go in and fiddle with the thing by hand which is kinda slow. If there's enough interest, I could write one. Link to comment Share on other sites More sharing options...
Kyshakk Koan ef Posted April 7, 2004 Share Posted April 7, 2004 Quote: If there's enough interest, I could write one. I'd be grateful and happy, if such a program existed. Link to comment Share on other sites More sharing options...
Garrulous Glaahk Newtfeet Posted April 7, 2004 Share Posted April 7, 2004 Quote: Originally written by ef:I'd be grateful and happy, if such a program existed. I would also be if I stopped double-posting. (sigh) Let me review... This program would switch out data files in the Blades of Avernum Data folder and then start BoA. When BoA quits, the files would go back to their original positions. Hmm... I could also make it entirely self-contained. That is, it also stores the scenario and puts it in the folder when it starts. So you can't run it if the data files aren't correct. Sound good?Edit: Actually, the only files we need to switch are sounds, art and character graphics. All the rest can be modified per scenario, right? I can also have it temporality remove other scenarios from the scenario folder, so you can't run them with messed up art and sounds. I could also let this add more then one scenario, in case you wanted to make a series with the same data files.Edit 2: I need to know how the Windows version of BoA stores its files. I can't do anything without that... I also need someone to actually compile this program for Windows (REALbasic again). Link to comment Share on other sites More sharing options...
Garrulous Glaahk Eldiran Posted April 7, 2004 Share Posted April 7, 2004 That sounds freakin' awesome. I'd pay slightly more than 12 cents for that. Of course, then it would be out of my budget range... Link to comment Share on other sites More sharing options...
Garrulous Glaahk Newtfeet Posted April 7, 2004 Share Posted April 7, 2004 Quote: Originally written by Eldiran:That sounds freakin' awesome. I'd pay slightly more than 12 cents for that. Of course, then it would be out of my budget range... That's why I'm planning for it to be free. There's no reason to pay anything for it. Of course, that requires that I actually can finish it. And for me to finish it, I need people to respond to what I said eariler (about what data format the Windows version of BoA uses). Link to comment Share on other sites More sharing options...
Rotghroth Rhapsody wz. As Posted April 7, 2004 Share Posted April 7, 2004 Before you start working on this program, make sure it is actually necessary. For the mac, the custom sounds go in the same file as the graphics: the resource file. We obviously don't know the Windows format yet, but we can extrapolate from what we know of the graphics format from the BoA Editor Docs. The graphics have the format G[number].bmp, so I assume the sounds will be S[number].dat, or some other extension. Therefore it might be possible to include your own sounds in the scenario folder, using a number scheme similar to the mac numbers described above by Kennedy. Link to comment Share on other sites More sharing options...
Garrulous Glaahk Newtfeet Posted April 7, 2004 Share Posted April 7, 2004 True, it might be possible on the Windows side. However, I may want to make this for other reasons; custom PC graphics, altered art in the game, and to avoid using unsupported "features". Link to comment Share on other sites More sharing options...
Kyshakk Koan ef Posted April 7, 2004 Share Posted April 7, 2004 Easily accessible sound files would be a new feature for Windows users. So far, they've always been stored within the .exe. It is possible to add sound files to the .exe, not just replace them. get_sdf, pc_heard_sound and play_sound are the calls used in the Geneforge scripts, and as the Geneforge scripts look much like Avernumscript I assume it is the same in BoA? Link to comment Share on other sites More sharing options...
Garrulous Glaahk Newtfeet Posted April 7, 2004 Share Posted April 7, 2004 There's no pc_heard_sound (what does that do?), but the rest are there. The PC version doesn't keep sounds in a seperate file? Hmm... that might throw a wrench into the works. Link to comment Share on other sites More sharing options...
Kyshakk Koan ef Posted April 7, 2004 Share Posted April 7, 2004 I don't know how it will be in BoA, but if the previous game structure is habitually kept, the .exe will contain a folder named '100'. Inside that folder are subfolders, numbered 1 - whatever, each holding one soundfile and the resource language number '1033'. That is completely different from what you describe as the Mac structure. The pc_heard_sound seems to do the same as play_sound, as far as I can see. Link to comment Share on other sites More sharing options...
Garrulous Glaahk Newtfeet Posted April 7, 2004 Share Posted April 7, 2004 "... the .exe will contain a folder..." Contain a folder? Or is a folder in the same directory as the .exe? "... resource language number '1033'." What? Link to comment Share on other sites More sharing options...
Kyshakk Koan ef Posted April 8, 2004 Share Posted April 8, 2004 Sorry, I'm not used to do this kind of thing in english. I'll try again. Yes, the same directory. resource language: I borrowed that word from the program I used to open the sound files, as I've absolutely no idea what the correct english expression might be. All subfolders in the directory are identified by their numbers (1 - whatever). When you open a subfolder you see an icon, followed by the number '1033'; cursor files, icon files, sound files, they look alike - same icon, same number; a numerical key shared by all the files in that directory. Link to comment Share on other sites More sharing options...
Garrulous Glaahk Newtfeet Posted April 8, 2004 Share Posted April 8, 2004 So the directory structure looks like: BoA.exe (what's the name, any idea)? 100 [directory] --1 [directory] ----1033.bmp [the graphic #1] ----1033.dat [the sound #1] --2 [directory] ----1033.bmp [the graphic #2] ----1033.dat [the sound #2] --3 [directory] ----Similar to 1 and 2 --And so on... Or am I understanding it wrong? Link to comment Share on other sites More sharing options...
Kyshakk Koan ef Posted April 8, 2004 Share Posted April 8, 2004 Geneforge2.exe for example looks like this: Geneforge2.exe (the .exe is the directory) + Icon + Dialog + String Table + Icon Group + 100 Now you open some folders: Geneforge2.exe - Icon ----1 -----* 1033 + Dialog - String Table ----19 -----* 1033 ---+20 (etc) + Icon Group - 100 ---+1 ----2 -----* 1033 ---+3 (etc) and so on A custom sound file that comes with the scenario should work when you add the appropriate subfolder numbers to the '100'-folder, each subfolder then containing the '* 1033' key. You cannot play the sounds without that key, I tried it. What I am looking for is a program that adds these new subfolders to the .exe when the scenario is started and deletes them when the player leaves the scenario. Is something like this possible? Link to comment Share on other sites More sharing options...
Garrulous Glaahk Timber-Wolf Posted April 8, 2004 Share Posted April 8, 2004 Quote: What I am looking for is a program that adds these new subfolders to the .exe when the scenario is started and deletes them when the player leaves the scenario. Is something like this possible? Well the Reshack program can do the adding and removing sound part so it must be possible to do that, you just got to learn how it does it then you can make your program change the sound files when you open and close the senario (I think im confusing myself ) Link to comment Share on other sites More sharing options...
Kyshakk Koan ef Posted April 8, 2004 Share Posted April 8, 2004 The reshack program has shown me how to do that, and not only change, but add sound files. But that is just for me individually. If scenarios could come with custom sound files and play them as naturally as they show custom graphics (and without the player having to adjust the settings), that would be great. Imagine cutscenes, where motion and sound are perfectly timed and matched. Link to comment Share on other sites More sharing options...
Garrulous Glaahk Newtfeet Posted April 8, 2004 Share Posted April 8, 2004 Let's see here... In the 1, 2, 3 subfolders, the file inside is named "1033"? Or "* 1033"? Other then that, I think I get it... What formats are the various files in? Link to comment Share on other sites More sharing options...
Kyshakk Koan ef Posted April 8, 2004 Share Posted April 8, 2004 This is how it looks: The sounds seem to be wav-files. At least that's what the program says and their bytesize confirms. The wav-file I added worked, while MP3s did not. Link to comment Share on other sites More sharing options...
Garrulous Glaahk Frobozz Posted April 8, 2004 Share Posted April 8, 2004 I just checked Avernum.exe with a program called Resource Hunter and it doesn't show the sound files being in subdirectories of their own. It shows something like this: /100 ...1.wav ...2.wav ...3.wav Link to comment Share on other sites More sharing options...
Garrulous Glaahk Newtfeet Posted April 8, 2004 Share Posted April 8, 2004 I think it get it. So, the "100" folder is not in the .exe? What resource does it contain? Sounds? Bah.. I don't get it. Link to comment Share on other sites More sharing options...
Kyshakk Koan ef Posted April 8, 2004 Share Posted April 8, 2004 It's alright. The Resource Hunter shows you either the tree structure, like this: or alternatively the icon/cursor/wav files etc, like for instance: 100-1 100-2 etc. It's a better program than the Reshack, but not free, I downloaded a trialversion. So I have to find out what this '1003' refers to *sigh*. edit: did find out. The socalled resource language, refered to by number 1003 is simply the language used, english in this case. Oh dear. I don't think it is important, if the wav files are shown in subfolders or not, as refering to them by their numbers works. Link to comment Share on other sites More sharing options...
Garrulous Glaahk Newtfeet Posted April 8, 2004 Share Posted April 8, 2004 Arrgh! I'm still confused. Could you relate to me what resources are outside of the .exe and what are in it? Link to comment Share on other sites More sharing options...
Kyshakk Koan ef Posted April 9, 2004 Share Posted April 9, 2004 That varies a bit from game to game. In Geneforge 2 this is the .exe: Geneforge2.exe (the .exe is the directory) + Icon + Dialog + String Table + Icon Group + 100 (wav files) Then there's the data folder, containing graphics, .dat files, scripts and save files. I'm on a PC, so I don't know the BoA particulars. Link to comment Share on other sites More sharing options...
Recommended Posts