Custom sounds! I did it!

Error message

Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /var/www/pied-piper.ermarian.net/includes/common.inc).

Pages

AuthorTopic: Custom sounds! I did it!
Warrior
Member # 1016
Profile #0
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.
Posts: 141 | Registered: Saturday, April 20 2002 07:00
Warrior
Member # 720
Profile #1
Quite clever of you. And how did you manage to discover this?

--------------------
-Daravon
Posts: 104 | Registered: Friday, March 8 2002 08:00
Warrior
Member # 1505
Profile #2
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!

--------------------
-Newtfeet
Posts: 151 | Registered: Saturday, July 13 2002 07:00
Shake Before Using
Member # 75
Profile #3
This is unsupported, for the record.
Posts: 3234 | Registered: Thursday, October 4 2001 07:00
BANNED
Member # 4
Profile Homepage #4
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.

--------------------
*
Posts: 6936 | Registered: Tuesday, September 18 2001 07:00
Warrior
Member # 1505
Profile #5
Standard Mac sound. If you use a resource editor, it'll probably come out right.

--------------------
-Newtfeet
Posts: 151 | Registered: Saturday, July 13 2002 07:00
Triad Mage
Member # 7
Profile Homepage #6
Remember that Windows users will not be able to utilize this.

--------------------
"At times discretion should be thrown aside, and with the foolish we should play the fool." - Menander
====
Drakefyre's Demesne - Happy Happy Joy Joy
Encyclopedia Ermariana - Trapped in the Closet
====
You can take my Mac when you pry my cold, dead fingers off the mouse!
Posts: 9436 | Registered: Wednesday, September 19 2001 07:00
Lifecrafter
Member # 3608
Profile Homepage #7
Damn.

--------------------
The Great Mister

kommari@gmail.com[/url]
Posts: 972 | Registered: Tuesday, October 28 2003 08:00
Warrior
Member # 3480
Profile Homepage #8
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
Posts: 169 | Registered: Wednesday, September 24 2003 07:00
Shake Before Using
Member # 75
Profile #9
It's still a Bad Idea™, really, unless it turns out to be just as easy for Windows users to do this, somehow.
Posts: 3234 | Registered: Thursday, October 4 2001 07:00
Guardian
Member # 2476
Profile #10
That reshack is a nice program, thanks. Easy to use.

--------------------
Polaris
Rache's A3 Site reformatted 2/3 done
Rache's A3 Site, original version
Posts: 1828 | Registered: Saturday, January 11 2003 08:00
Triad Mage
Member # 7
Profile Homepage #11
Changing the sound file is different from creating a file that can be included with scenarios that merely augments the existing sound file.

--------------------
"At times discretion should be thrown aside, and with the foolish we should play the fool." - Menander
====
Drakefyre's Demesne - Happy Happy Joy Joy
Encyclopedia Ermariana - Trapped in the Closet
====
You can take my Mac when you pry my cold, dead fingers off the mouse!
Posts: 9436 | Registered: Wednesday, September 19 2001 07:00
Warrior
Member # 246
Profile #12
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. :D
Posts: 117 | Registered: Friday, November 2 2001 08:00
Warrior
Member # 1016
Profile #13
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.
Posts: 141 | Registered: Saturday, April 20 2002 07:00
Warrior
Member # 1505
Profile #14
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.

--------------------
-Newtfeet
Posts: 151 | Registered: Saturday, July 13 2002 07:00
Warrior
Member # 1505
Profile #15
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.

--------------------
-Newtfeet
Posts: 151 | Registered: Saturday, July 13 2002 07:00
Guardian
Member # 2476
Profile #16
quote:
If there's enough interest, I could write one.
I'd be grateful and happy, if such a program existed.

--------------------
Polaris
Rache's A3 Site reformatted 2/3 done
Rache's A3 Site, original version
Posts: 1828 | Registered: Saturday, January 11 2003 08:00
Warrior
Member # 1505
Profile #17
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).

[ Wednesday, April 07, 2004 07:15: Message edited by: Newtfeet ]

--------------------
-Newtfeet
Posts: 151 | Registered: Saturday, July 13 2002 07:00
Shock Trooper
Member # 4154
Profile #18
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...

--------------------
You're a moron if you think I'm not.
Posts: 213 | Registered: Friday, March 26 2004 08:00
Warrior
Member # 1505
Profile #19
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).

--------------------
-Newtfeet
Posts: 151 | Registered: Saturday, July 13 2002 07:00
Infiltrator
Member # 3040
Profile #20
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.

--------------------
5.0.1.0.0.0.0.1.0...
Posts: 508 | Registered: Thursday, May 29 2003 07:00
Warrior
Member # 1505
Profile #21
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".

--------------------
-Newtfeet
Posts: 151 | Registered: Saturday, July 13 2002 07:00
Guardian
Member # 2476
Profile #22
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?

--------------------
Polaris
Rache's A3 Site reformatted 2/3 done
Rache's A3 Site, original version
Posts: 1828 | Registered: Saturday, January 11 2003 08:00
Warrior
Member # 1505
Profile #23
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.

--------------------
-Newtfeet
Posts: 151 | Registered: Saturday, July 13 2002 07:00
Guardian
Member # 2476
Profile #24
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.

--------------------
Polaris
Rache's A3 Site reformatted 2/3 done
Rache's A3 Site, original version
Posts: 1828 | Registered: Saturday, January 11 2003 08:00

Pages