Home   Help Search Login Register  

Author Topic: Custom soundHit  (Read 1672 times)

0 Members and 1 Guest are viewing this topic.

Offline goki

  • Members
  • *
Custom soundHit
« on: 05 Aug 2005, 14:19:28 »
Hi,

We're making an addon with a weapon which fires explosive bullets like M2A2's 25 mm Cannon HE. The problem is that we want to put a custom "soundHit" sound. You know, when explosive bullets hit ground/ man etc, game executes an explosion sound. As default it executes the line below, even if you don't type this line in your config.cpp.

"soundHit[]={Explosions\explosivebullet,db20,1};"

We also tried this line,

"soundHit[]={"\Our_addon\Sound\soundHit.wav",db20,1};"  

in our config.cpp file but it didn't work either. The game sent an error message like "the entry couldn't found in config.bin file". I think the game checks its own config.bin file under directory of "C:\Program Files\Codemasters\OperationFlashpoint\Res\Bin"
and couldn't find the entry.

Please correct me but;
Suppose, we must convert our config.cpp file into config.bin file and then state the place of our custom hit-sound in this file, right? I guess, afterwards we need to convert our sound sample into .wss format and put it in our pbo, ain't it? If so,

1) Should we convert our config.cpp into config.bin by Binviewer?
2) How is this custom hit-sound defined in config.bin file?
3) Should we use WSS File Decoding/Encoding Utils to convert ogg/ wav samples into .wss and vice versa?

Your answer will help us provide ofp community with a fabulous addon! :)

Offline remcen

  • Contributing Member
  • **
  • a.k.a. hottentotten_mike
    • IM:UC
Re:Custom soundHit
« Reply #1 on: 05 Aug 2005, 14:42:19 »
errr... no
i neither think your error message has something to do with your hitsound nor do you have to convert it into a .bin.

as for the error: post the exact error message here and your config and we'll find the error (btw. are you 100% sure your adonn is causing the error message?)

as for the sound: converting it into a wss or ogg is not a bad idea IMO.
here's a tutorial on allowed sound formats/bitrates/lenght/etc. in ofp.
i'm sure you're doing something wrong in this field cos if the sound file has the wrong bitrate ofp simply doesn't play it. but it would never show an error message when starting the game simply because everthing concerning sounds is loaded when the addon itself is loaded (=at mission start), not when the game is started. all configs are read then, that's all ;)
« Last Edit: 05 Aug 2005, 14:45:41 by remcen »
we're looking for members: IM:UC MOD

Offline goki

  • Members
  • *
Re:Custom soundHit
« Reply #2 on: 05 Aug 2005, 16:12:53 »
Hey, thanks for trying,

I found a very good exemplary config.cpp which defines lots of custom SoundHit. I will use this config to solve my problem and then get back here to inform you. Btw: In this exemplary config.cpp all sounds are .wss



bye for now,

Offline remcen

  • Contributing Member
  • **
  • a.k.a. hottentotten_mike
    • IM:UC
Re:Custom soundHit
« Reply #3 on: 06 Aug 2005, 02:25:51 »
hope you understood me right:
as long as you have no typo in the 'hitsound' bit of the config you most probably have two errors:
one in the config which proably hasn't anything to do with the hitsound, hence the error message and
a second one concerning the sound format - that's the reason for your sound not playing ingame
we're looking for members: IM:UC MOD

Offline goki

  • Members
  • *
Re:Custom soundHit
« Reply #4 on: 06 Aug 2005, 14:50:44 »
I solved the problem;

First I thought, it was only about .wav format. I converted my .wav audio into .wss by ofp_sound_lab_1.1 without changing its frequency, bit, channel state. and voila! It became smooth like a baby's back!  8)

But afterwards, I changed the extension of the audio in my config from .wss into .wav - changed the audio itself as well. and it worked either!  :o

So obviously It wasn't audio format... I must had changed some config parameter as well. Both .wav and .wss worked folks...

Thanks for trying man,

so long.
« Last Edit: 08 Aug 2005, 15:11:49 by goki »

Offline goki

  • Members
  • *
Re:Custom soundHit
« Reply #5 on: 08 Aug 2005, 15:09:25 »
I've modified my previous message. To keep this site a handy, comprehensive resource centre...