Jump to content

[WIP] KSPCustomSounds Plugin v0.2 - Custom Engine, Landing Gear, IVA Sounds


Raptor831

Recommended Posts

KSPCustomSounds

This is a plugin designed to let you choose custom sounds for certain elements in-game. First, there is a module that can define custom engine sounds for new engine parts. It can also replace stock parts with the ModuleManager mod and an appropriate .cfg file.

Second is a module that adds a sound to landing gear when they are toggled. With the included ModuleManager and MM Extension, any part using the ModuleLandingGear module will have this automatically added. The file can be defined per part or as a global default in the sound.cfg file included.

Third, an option for IVA pod sounds is included. The sounds are defined in the sound.cfg file, and will play whenever you are in IVA mode. One background sound will loop (like a fan or background hum) and up to three defined sounds will play at random intervals (i.e. switches, motors, beeps, computer noises, etc.).

This mod does not provide any custom audio at this time, although it may in the future. (And yes, the temporary sounds are silly, but they are already in Squad's folder. It's only a test at the moment.)

Download Link (source included)

ENGINES

KSPCustomSounds creates a new module, CustomEngineSounds, that can be added to an engine part. This module has options for each of the four sounds normally attached to an engine.

running -> for the normal engine sound while running

engage -> sound when turned on

disengage -> sound when turned off

flameout -> sound when a flameout occurs

So, for example, in your part.cfg you would have:

MODULE
{
name = CustomEngineSounds
engage = KSPCustomSounds/Sounds/sound_file1
running = KSPCustomSounds/Sounds/sound_file2
disengage = KSPCustomSounds/Sounds/sound_file3
flameout = KSPCustomSounds/Sounds/sound_file4
}

This way, all custom engine sounds can be placed in a single folder and loaded once into memory. Also, it makes replacing sounds much quicker.

To replace a stock sound with ModuleManager, say for the LV-909, you would need to have a .cfg file with the following:

@PART[liquidEngine3]
{
!sound_vent_medium = DELETE
!sound_rocket_hard = DELETE
!sound_vent_soft = DELETE
!sound_explosion_low = DELETE

MODULE
{
name = CustomEngineSounds
running = KSPCustomSounds/Sounds/sound_file1
engage = KSPCustomSounds/Sounds/sound_file2
disengage = KSPCustomSounds/Sounds/sound_file3
flameout = KSPCustomSounds/Sounds/sound_file4
}
}

This will probably be different for every single part, so pay attention to the items you delete. Anything in the Sound FX Definition section needs to be "removed" via ModuleManager.

You also don’t have to switch them all. You can use both stock sounds and custom sounds on the same part. You just need to be sure that you delete the comparable stock sound if you use a custom sound, otherwise both sounds will run at the same time.

LANDING GEAR

The included ModuleManager/MMExtension file will add the appropriate module automatically. To change the sound referenced, go to <KSP>/GameData/KSPCustomSounds/PluginData/KSPCustomSound/sound.cfg and replace the sound currently there for “gearSoundDefaultâ€Â.

You can also add a custom sounds per part if you like. Both the deploy and the retract actions have specific sounds, so you can reference them from anywhere inside /GameData/.

Example:

MODULE
{
name = ModuleLandingGearSounds
gearDeploy = KSPCustomSounds/Sound/sound_file1
gearRetract = KSPCustomSounds/Sound/sound_file2
}

INTERNAL IVA SOUND

This option will be enabled automatically. Once you go into IVA view, the pod noises will commence. You can define these files in the <KSP>/GameData/KSPCustomSounds/PluginData/KSPCustomSound/sound.cfg file. The options are explained as follows:

enableIVA = turn the sounds on and off. true is on, false is off.

backgroundIVA = looping background sound that will constantly play while in IVA.

switchIVA = first random sound, intended to be the sound of switches.

beepIVA = second random sound, intended to be any beeping or computer noises.

servoIVA = third random sound, intended to be any mechanical items moving that could be heard (i.e. solar panels, intermittent fans, snack drawers).

minIVACooldown = minimum time between two sound FX of the same type (i.e. two switch sounds).

maxIVACooldown = maximum time between two sound FX of the same type.

License

CC BY-NC-SA 3.0

http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_US

Short version: You can use this code for any non-commercial project as long as you give me credit for this plugin.

Also, a short note saying you are using it wouldn’t hurt, but is not required. :)

Special thanks to Snjo and pizzaoverhead. Was able to learn a lot by their code so I had a good starting point. Would have been lost otherwise.

Installation

To install, place the KSPCustomSounds folder in your <KSP>/GameData/ folder.

If you wish to use the engine sounds on stock parts, or wish to use the landing gear module, add the ModuleManager.dll and the MMSarbianExt.dll into <KSP>/GameData/. If you have later versions of these, do not overwrite them.

ModuleManager found here: http://forum.kerbalspaceprogram.com/threads/31342-0-20-ModuleManager-1-3-for-all-your-stock-modding-needs

MMSarbianExt.dll found here: http://forum.kerbalspaceprogram.com/threads/41616-Extension-for-ModuleManager-with-wildcard-and-conditional-v0-2-24-july-2013

Release Notes

v0.2 (Nov 2 2013)

ADDED: Module for landing gear sounds.

ADDED: IVA background sounds.

ADDED: sound.cfg file for control of the landing gear and IVA modules.

v0.1

Initial dev release. Basic features completed, works with KSP 0.22. Probably works down to KSP 0.20, but untested.

For Future Development

I want to add some user-editable (via .cfgs) variables in there for volume or pitch for these engine sounds for more control. Wouldn't mind some suggestions about what you'd like to see.

Also, I want to add options for other custom sounds. Don't know if/when I'll get there, but we'll start with the engines for now.

Last, it's kind of lame to release a sound mod with no sounds. Sorry about that. If I had some cool sounds, I'd use them. If someone has some awesome engine sounds and would like to donate them, or work with me on this, I'd be happy to give that a go.

Any questions, just ask. I'll try to answer what I can. :)

Edited by Raptor831
Updated Version 0.2
Link to comment
Share on other sites

Hey Raptor, ill give it a test drive to see if i can integrate it to my SoundMod, i guess you already know im working on new sounds but i need a plugin to ease up the installation. so your plugin might just be what i need :) ll lett you know how it works! thanks and keep up the sweet work mate! until next time

http://forum.kerbalspaceprogram.com/threads/53800-WIP-BMAD-Acoustic-Replacement-Mod

tested and working! this certainly will make my life alot easier for testing the sounds and replacing them!

:D

Edited by bullettMAGNETT
Link to comment
Share on other sites

Hey Raptor, ill give it a test drive to see if i can integrate it to my SoundMod, i guess you already know im working on new sounds but i need a plugin to ease up the installation. so your plugin might just be what i need :) ll lett you know how it works! thanks and keep up the sweet work mate! until next time

http://forum.kerbalspaceprogram.com/threads/53800-WIP-BMAD-Acoustic-Replacement-Mod

tested and working! this certainly will make my life alot easier for testing the sounds and replacing them!

:D

Sweet! Let me know if you find oddities or have suggestions.

Link to comment
Share on other sites

New version is up, download link is updated in the first post.

Added IVA sounds and landing gear sounds. I've just used existing sounds in the /GameData/Squad/Sounds/ folder, so don't expect anything amazing with the actual audio yet. As in, the gear sound is the decoupler explosion, and the IVA sound is one of the engine sounds. But it works! :)

Let me know if you find oddities.

Link to comment
Share on other sites

  • 3 weeks later...

Looking to get into contributing to the sound improvement but i lack an understanding of how the sounds are handled in KSP.

Its apparent that some sounds are looped. So after I've crafted my desired sound, would i need to write my own module to handle that sound and its looping? Is it handled internally? Could i choose to write my own module to handle the looping? I'd like to be able to control the rate of looping to reduce some of the phasing issues that comes along with that.

Link to comment
Share on other sites

Looking to get into contributing to the sound improvement but i lack an understanding of how the sounds are handled in KSP.

Its apparent that some sounds are looped. So after I've crafted my desired sound, would i need to write my own module to handle that sound and its looping? Is it handled internally? Could i choose to write my own module to handle the looping? I'd like to be able to control the rate of looping to reduce some of the phasing issues that comes along with that.

If you want a custom sound to play, you'll probably need to write up a plugin to do it. Most of the sounds in KSP are "hardwired" into the code, so to do anything fancy you'll need to make something custom. You'll probably want to set the sound to loop, but the only way you can control the looping rate (that I know of) is to drop the pitch on the sound.

Very nice, hope to work with this sometime soon. Suggestions: rover wheel sounds (wheels going over gravel etc) and a way to link traditional engine sounds with rover wheels if it is possible.

If you follow the Sound Overhaul Project link in my sig, there is a rover wheel sound plugin out now that's linked there. It only works on the small wheels, but it's something. Basically any sound can be attached to a part module, it's just a matter of figuring out what triggers you can use to play and stop sounds. Something I've thought about, so we'll see if I can get the coding motivation to dig around! :)

Link to comment
Share on other sites

  • 11 months later...
  • 2 months later...
  • 9 months later...
This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. 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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...