Page 1 of 3

Engine sounds and weapon sounds

Posted: Sat Jun 24, 2017 3:00 pm
by JeremyaFr
Hello,

As you might know, editing engine sounds was limited to the first 65 crafts. I've created a hook to break this limit. Now you can edit engine sounds for any craft.

Suppose that the craft is "FlightModels\[Model].opt".

To define which sound is played, create a file named "FlightModels\[Model]Sound.txt";
The format is:
EngineSoundInterior = interior sound type
EngineSoundFlyBy = flyby sound type
Use a value of 0 to not select a sound.

Add a line whith "EngineSoundInterior = value". The value is between 0 and 7:
- 0 means no sound
- 1 means EngineIntXW
- 2 means EngineIntYW
- 3 means EngineIntAW
- 4 means EngineIntTI
- 5 means EngineIntAG
- 6 means EngineIntCort
- 7 means EngineIntFalc

Add a line with "EngineSoundFlyBy = value". The value is between 0 and 7:
- 0 means no sound
- 1 means FlyByXW or FlyByXW3D
- 2 means FlyByYW or FlyByYW3D
- 3 means FlyByAW or FlyByAW3D
- 4 means FlyByTI or FlyByTI3D
- 5 means FlyByAG or FlyByAG3D
- 6 means FlyByCort or FlyByCort3D
- 7 means FlyByCort or FlyByCort3D

If the file does not exist, default values are used:

Interior sound:
type 1:
- ModelIndex_001_0_0_Xwing
- ModelIndex_004_0_3_Bwing
- ModelIndex_014_0_13_Z_95
- ModelIndex_015_0_14_R41
- ModelIndex_031_0_30_SlaveOne
type 2:
- ModelIndex_002_0_1_Ywing
- ModelIndex_011_0_10_ToscanFighter
- ModelIndex_023_0_22_CloakshapeFighter
type 3:
- ModelIndex_003_0_2_Awing
- ModelIndex_010_0_9_IrdFighter
- ModelIndex_013_0_12_Twing
- ModelIndex_027_0_26_Piggyback
type 4:
- ModelIndex_005_0_4_TieFighter
- ModelIndex_006_0_5_TieInterceptor
- ModelIndex_007_0_6_TieBomber
- ModelIndex_008_0_7_TieAdvanced
- ModelIndex_009_0_8_TieDefender
type 5:
- ModelIndex_012_0_11_MissileBoat
- ModelIndex_016_0_15_AssaultGunboat
- ModelIndex_024_0_23_RazorFighter
- ModelIndex_025_0_24_PlanetaryFighter
- ModelIndex_029_0_28_PreybirdFighter
type 6:
- ModelIndex_017_0_16_SkiprayBlastBoat
- ModelIndex_058_0_45_CorellianTransport2
- ModelIndex_065_0_52_FamilyTransport
type 7:
- ModelIndex_026_0_25_SupaFighter
- ModelIndex_032_0_31_SlaveTwo
- ModelIndex_059_0_46_MilleniumFalcon2

FlyBy sound:
type 1:
- ModelIndex_001_0_0_Xwing
- ModelIndex_004_0_3_Bwing
- ModelIndex_014_0_13_Z_95
- ModelIndex_015_0_14_R41
- ModelIndex_031_0_30_SlaveOne
type 2:
- ModelIndex_002_0_1_Ywing
- ModelIndex_011_0_10_ToscanFighter
- ModelIndex_023_0_22_CloakshapeFighter
type 3:
- ModelIndex_003_0_2_Awing
- ModelIndex_010_0_9_IrdFighter
- ModelIndex_013_0_12_Twing
- ModelIndex_027_0_26_Piggyback
type 4:
- ModelIndex_005_0_4_TieFighter
- ModelIndex_006_0_5_TieInterceptor
- ModelIndex_007_0_6_TieBomber
- ModelIndex_008_0_7_TieAdvanced
- ModelIndex_009_0_8_TieDefender
type 5:
- ModelIndex_012_0_11_MissileBoat
- ModelIndex_016_0_15_AssaultGunboat
- ModelIndex_024_0_23_RazorFighter
- ModelIndex_025_0_24_PlanetaryFighter
- ModelIndex_029_0_28_PreybirdFighter
- ModelIndex_043_0_32_Tug
- ModelIndex_044_0_33_CombatUtilityVehicle
- ModelIndex_045_0_34_HeavyLifter
- ModelIndex_050_0_37_Shuttle
- ModelIndex_051_0_38_EscortShuttle
- ModelIndex_052_0_39_StormtrooperTransport
- ModelIndex_053_0_40_AssaultTransport
- ModelIndex_054_0_41_EscortTransport
- ModelIndex_055_0_42_SystemPatrolCraft
- ModelIndex_056_0_43_ScoutCraft
type 6:
- ModelIndex_017_0_16_SkiprayBlastBoat
- ModelIndex_058_0_45_CorellianTransport2
- ModelIndex_065_0_52_FamilyTransport
type 7:
- ModelIndex_026_0_25_SupaFighter
- ModelIndex_032_0_31_SlaveTwo
- ModelIndex_059_0_46_MilleniumFalcon2

Download link:
xwa_hook_engine_sound.zip

Re: Engine sounds

Posted: Sun Jun 25, 2017 12:22 am
by Darksaber
This is fantastic Jeremy, and so quick, really well done and thank you so much :D

Posted: Sun Jun 25, 2017 5:49 am
by Bman
.

Re: Engine sounds

Posted: Mon Jun 26, 2017 1:20 am
by Marcos_Edson
WOW, well done, Jeremy!!!

Re: Engine sounds

Posted: Mon Jun 26, 2017 12:15 pm
by JeremyaFr
Bman wrote: * Could this list be expanded into additional unlimited values i.e. 8 - FlyByNewCraftA.wav, 9 FlyByNewCraftB.wav, 10, .... etc. ?
Or could those values be forked in your .dll and pointed to play any specific custom-made *.wav files defined in a text file ?
* Can new additional and unique flyby sounds be added to different starships and other non-flyable craft ?
No, we can't have unlimited values.
But there are 2 slots marked as "unused" in 'SFXBLASTNEW.LST".

Posted: Thu Jun 29, 2017 2:44 am
by Bman
.

Re: Engine sounds

Posted: Wed Jul 05, 2017 3:14 pm
by JeremyaFr
Hello,

I've updated the hook.
Please redownload it.

You can now use the 2 unused slots (in SFXBLASTNEW.LST) to add a custom sound.

I've added "EngineSoundFlyBy = 8":
- 8 means custom (first unused) or custom3D (second unused)

Re: Engine sounds

Posted: Wed Jul 05, 2017 9:10 pm
by Darksaber
Thanks Jeremy :)

Posted: Thu Jul 06, 2017 4:03 am
by Bman
.

Re: Engine sounds

Posted: Thu Jul 06, 2017 8:01 am
by JeremyaFr
No, it's not possible.

Re: Engine sounds

Posted: Thu Jul 06, 2017 11:57 am
by Rookie_One1
hmm

I'm guessing that DS will include it in DSUCP :p

BTW, now that I think about it, any chances of doing the same for laser sound ? As it's not possible to have the empire laser sound with the "tch" sound on new craft added (such as the TIE Phantom on DSUCP website), instead we get without the tch :(

Re: Engine sounds

Posted: Thu Jul 06, 2017 8:19 pm
by JeremyaFr
Hello,

Laser sound is replaced with "EmpireLaserChChChhh.wav" for the tie fighters (TieFighter, TieInterceptor, TieBomber, TieAdvanced, TieDefender, TieBizarro, TieBigGun, TieWarheads, TieBomb, TieBooster).
For the Corellian transports (CorellianTransport2, FamilyTransport, MilleniumFalcon2), "LaserRebel" is
replaced with "FalconLaser.wav" and "LaserRebelTurbo" is replaced with "FalconLaserTurbo.wav".

I think I will write a hook to define which sound is played when a laser is fired, for any craft.

Re: Engine sounds

Posted: Fri Jul 07, 2017 2:07 am
by Rookie_One1
To be fair, you don't have to do it (although it would be nice :D )

In any case, here is a nice cake as a thank you :
http://www.garnishandglaze.com/wp-conte ... .com-9.jpg

Re: Engine sounds

Posted: Fri Jul 07, 2017 4:39 pm
by JeremyaFr
Hello,
Here's the hook.

This hook enables setting weapon sound behavior for any craft.

Suppose that the craft is "FlightModels\[Model].opt".

To define which sound is played, create a file named "FlightModels\[Model]Sound.txt";
The format is:
WeaponSoundBehavior = value
Use CorellianTransport or TieFighter to defines the behavior.
Use a value of 0 to not select a sound.

If the file does not exist, default values are used:
For the tie fighters (TieFighter, TieInterceptor, TieBomber, TieAdvanced, TieDefender, TieBizarro, TieBigGun, TieWarheads, TieBomb, TieBooster), laser sounds are replaced with "EmpireLaserChChChhh.wav".
For the Corellian transports (CorellianTransport2, FamilyTransport, MilleniumFalcon2), "LaserRebel" is replaced with "FalconLaser.wav" and "LaserRebelTurbo" is replaced with "FalconLaserTurbo.wav".

Download link:
EDIT: this hook is included in xwa_hook_engine_sound.

Re: Engine sounds and weapon sounds

Posted: Fri Jul 07, 2017 6:09 pm
by Darksaber
Hold on a minute, the Engine Sound text file are called "[Model]Sound.txt

How can the Weapon Sound text files be called the same "[Model]Sound.txt" should they be called [Model]WeaponSound.txt or something??

Re: Engine sounds and weapon sounds

Posted: Fri Jul 07, 2017 6:19 pm
by JeremyaFr
For engine and weapon sounds, it's the same file ([Model]Sound.txt).
In this file, there are 2 entries for engine sounds (EngineSoundInterior and EngineSoundFlyBy) and 1 entry for weapon sound (WeaponSoundBehavior).

So a file that defines both engine and weapon sounds looks like this:

Code: Select all

; [Model]Sound.txt
EngineSoundInterior = 0
EngineSoundFlyBy = 0

WeaponSoundBehavior = 0
If this looks too confusing, I can separate the entries in 2 distinct files.

Re: Engine sounds and weapon sounds

Posted: Fri Jul 07, 2017 6:26 pm
by Darksaber
No don't separate them, I understand now, It just didn't explain that in the readme

Wouldn't it just be easier if you combined the Hooks so you didn't have two separate dll files or isn't this possible?

Just wondering as your using the same [Model]Sound.txt file

Re: Engine sounds and weapon sounds

Posted: Fri Jul 07, 2017 7:02 pm
by JeremyaFr
Hello,
I've included the weapon sounds hook to the engine sounds hook.
Please redownload xwa_hook_engine_sound.zip.

I've also merged the examples files to include both engine and weapon entries in the same [Model]Sound.txt.

Re: Engine sounds and weapon sounds

Posted: Fri Jul 07, 2017 7:08 pm
by Darksaber
Thanks Jeremy :D :applaus: :gold: :party:

Re: Engine sounds and weapon sounds

Posted: Fri Jul 07, 2017 9:32 pm
by Rookie_One1
I guess DS gonna have a field day with that hook for DSUCP :lachtot:

Re: Engine sounds and weapon sounds

Posted: Fri Jul 07, 2017 11:02 pm
by Darksaber
Jeremy is there any chance you could add the RebelLaser.wav, RebelLaserTurbo.wav and EmpireLaser.wav, EmpireLaserTurbo.wav

Is it possible to add
WeaponSoundRebelBehavior = Rebel (sounds for RebelLaser.wav and RebelLaserTurbo.wav)
WeaponSoundEmpireBehavior = Empire (sounds for EmpireLaser.wav and EmpireLaserTurbo.wav)

or

WeaponSoundRebelBehavior = Rebel (sound for RebelLaser.wav)
WeaponSoundRebelTurboBehavior = RebelTurbo (sound RebelLaserTurbo.wav)
WeaponSoundEmpireBehavior = Empire (sound for EmpireLaser.wav)
WeaponSoundEmpireTurboBehavior = EmpireTurbo (sound EmpireLaserTurbo.wav)

I only ask as I have a slight problem concerning laser sounds, and what if a laser slot doesn't have a sound associated with it

In my DSUCP there are 3 options for the Slave one,

the 1st option uses Green lasers,
the 2nd option uses Red Lasers,
the 3rd option uses Yellow lasers,

In BHE if you look in one of the weapons option (Weapons - Power, Speed, Type and so on) right at the bottom is says Open Weapon, this is disabled by default, but it can be enabled to use the laser, but it doesn't have a laser sound associated with it.

I thought at first that the hook was associated with the laser type, for example green laser opt = empire laser sound ans the same for red laser opt and rebel laser sound, and your replacing the sound type EmpireLaser.wav with EmpireLaserChChChhh.wav and so on for the CorellianTransport sounds

But I just tested the Y-wing with the Tie fighter sound, the Y-wing fired it's red lasers and I got the chchchchhh sound of the tie fighter, I also tested with the CorellianTransport sound and I got the Falcon laser sounds so it has nothing to do with the laser colour, it looks like your hook is associated with the craft name.

Anyhow thanks in advance, and sorry for wasting your time if it's not possible :D

________________________________________________________________________________________________________________

EDIT: I don't think it will work, tested the Slave1 with the Yellow lasers and SlaveOneSound.txt with either of the TieFighter or CorellianTransport and no sound was heard for the lasers :(

Re: Engine sounds and weapon sounds

Posted: Sat Jul 08, 2017 12:23 pm
by JeremyaFr
Hello,
I've added setting which sound is played for the open weapon (307).
Please redownload xwa_hook_engine_sound.zip.

This is what is added:
Add a line with "WeaponSoundBehavior = value". The value is 0, CorellianTransport, TieFighter, Rebel, RebelTurbo, Empire or EmpireTurbo.
0 means that a default sound is played.
CorellianTransport means that Laser and LaserTurbo are replaced with FalconLaser or FalconLaserTurbo.
TieFighter means that laser sounds (RebelLaser, RebelLaserTurbo, EmpireLaser, EmpireLaserTurbo, IonCannon, IonCannonTurbo) are replaced with EmpireLaserChChChhh.
Rebel means that the open weapon (307) sound is RebelLaser.
RebelTurbo means that the open weapon (307) sound is RebelLaserTurbo.
Empire means that the open weapon (307) sound is EmpireLaser.
EmpireTurbo means that the open weapon (307) sound is EmpireLaserTurbo.
BTW, if you want to see how the hook works, the source code is here:
https://github.com/JeremyAnsel/xwa_hook ... _sound.cpp

Re: Engine sounds and weapon sounds

Posted: Sat Jul 08, 2017 12:53 pm
by Darksaber
Thanks Jeremy that's absolutely brilliant and works like a charm

Quick Question can you have both

WeaponSoundBehavior = Empire
WeaponSoundBehavior = EmpireTurbo

in the same sound text file or just the one option ?

Re: Engine sounds and weapon sounds

Posted: Sat Jul 08, 2017 1:23 pm
by JeremyaFr
If WeaponSoundBehavior is defined multiple times, the first one is used.

Re: Engine sounds and weapon sounds

Posted: Sat Jul 08, 2017 1:54 pm
by Darksaber
Ok thanks :D