Jump to content

Raptor831

Members
  • Posts

    1,083
  • Joined

  • Last visited

Everything posted by Raptor831

  1. Another question from the beginner :sigh:. Is there a way to attach a sound/FXGroup/whatever to a part without subclassing PartModule? I'm working on getting landing gear to make a sound when toggled, but I can't get past setting up the audio. I'm grabbing the active vessel, checking to see if it has landing gear, grabbing all gear, then trying to add an FXGroup to each gear. Sounds easy typing it out, but I've been beating my head against this all afternoon and my Code-Fu is failing at this point. It's probably simple and I'm just not familiar enough with KSP and/or C# to know any better. If you've got any ideas, or a better way to do this, let me know.
  2. How would I check to see if the user is in IVA or not? Did some searching and checked the wiki but didn't find anything. I'm sure there's a simple check (i.e. isIVA) or something, but I'm missing it so far.
  3. Another "Thank you" from me. Learning both C# and the KSP "API" (as it were) is challenging, so having some starter code is amazing.
  4. Got a release put together for my engine sounds module. New thread here. If anyone tries it, let me know how it works for you. I don't have any audio for it yet, so you'll need to find your own cool audio. And if bullettMAGNETT wants to "lend" some of those sounds, I'd be ok with that!
  5. 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.
  6. I've got a plugin working that can replace the stock engine sounds in-game with an arbitrary filepath. It's simply a new part module that you can define custom sound clips with. You can replace stock/mod sounds via this plugin and a cfg edit/ModuleManager edit, or you can use this on any new mod in place of the stock engine sounds. I'm still testing it a bit, and I'd want to expand on this. Firespitter can do most of this, but it's sound module is aimed at prop aircraft. Not to mention I had a long look at Snjo's code to see how I could manipulate the sounds. So, lots of inspiration goes that way. This is more aimed at rocket engines, at the moment, though it could be adapted for jets and props. Unfortunately I have no video of this. Don't have a video capture program at the moment. I'll put together a test release with some instructions and put it up soon.
  7. If I'm reading the above posts and referenced threads correctly, KSP's sounds are now all hardcoded in the game. None of those audio files in the GameData/Squad/ folder do anything but take up space. The game still looks at certain spots for additional sounds though, which is why this mod works. If you figure out if you can get sounds linked to animations via .cfg edits and/or files in the right spot, let everyone know.
  8. I knew it was something simple. I pointed to the Assembly-CSharp.dll and the errors went taken care of. Well, at least the ones my coding didn't induce! Thanks for the tip.
  9. Ok, so I'll get straight to it: do you need to load up Unity and then PartTools if you're only going to be coding a plugin (i.e. without any parts added)? I set up Xamarin (formerly MonoDevelop, it says) on my machine, installed the Mono frameworks, and pointed my project to pull the UnityEngine.dll inside the KSP app. But, the code I'm using (from another plugin at the moment, I'm still learning C#) references KSP.IO, and the compile failed saying KSP.IO couldn't be found. More errors were there, but I think they're all related to this anyway. So I came to two possible conclusions: 1) I need Unity and PartTools to have that namespace, 2) I just have no idea where the file that creates that namespace is. And maybe I'm just too new at this to know any better! Either way, any help would be greatly appreciated!
  10. Saw this and was inspired to try and contribute. Of course, I have to learn C# as I go for this, as I like doing things the hard way. Was trying to see if it was possible to do the "Changing a Part's Sound" idea without having to drop a bunch of audio files all over your GameData folder. So, create a module that allows you to choose different engine sounds in the .cfg file. Sounds simple in theory, but I have a feeling it's not as simple as I'd like. Since you've offered the code above, I'm using that to start with. Hopefully, I'll figure something out that works!
  11. I'd stick with the version you've got. Last time you updated it sounded like it was a real pain in the backside. There's really nothing to add to the story by making that jump, and some of your parts are from even older versions which could completely stop working. I guess I'm selfish, I want to finish reading the story!
  12. I can confirm that this is working for me at the moment. I've added MechJeb to all command pods/probe cores using the wildcard and the HAS function. Works as advertised for that. I only have 1 or 2 .cfgs in one folder that this is working on, so nothing too complicated.
  13. Damned Robotics was transformed into Infernal Robotics (link). It works in .22 Sandbox, but isn't set up for the Career tech tree yet. Lots of parts to fix, so I'm sure there's an update coming but don't know when.
  14. That looks like an "out of memory" glitch. Happens to me when KSP hits it's memory allocation limit (somewhere around 3.5 GB RAM). Doesn't matter how much you have in your machine, either, it's a Unity engine problem (it doesn't handle textures the best) and due to 32-bit application limits. Solution: turn your textures to half-res in your settings or delete some mods. Or, get the reduced texture versions of mods if they exist. PS - I'm on a Mac too, and I've seen that in the VAB. That's when I know it's time to restart the game!
  15. Nope, that's Advanced SRB. Fairly sure that still works in .22, but I haven't tested it yet.
  16. Made my own Ares I/Orion setup: On the pad. CSM separating from second stage. Mods: Advanced SRB, KW Rocketry, KSPX (escape tower), and the Service Module System (of course!). Great mod, sumghai! Thanks for your work.
  17. I'm pretty sure that multiplier is based on how "valuable" the data is. At least the one displayed when you recover a ship. If you've already checked the goo 12 times in orbit, we already know that data. But if you check it on Duna and you've never been there, that's more valuable. My 2 cents.
  18. So Bob knows what's up with the whole mission, er, well, he did know. That's convenient. So nobody knows what's going on?!? Also, I sense another problem arising. "As long as we don't need to do an EVA we should be fine." Given the way mishaps crop up on this mission, someone's gonna get irradiated on EVA. I'm calling it now! (And is it bad I hope it's Rozer???)
  19. Czo, you really have a way with this. I know when I'm reading a good story because I get involved emotionally with the characters. Jeb's making me angry, Rozer feels evil, and I totally understand why the others are mad. I'm totally involved! :-) Thanks for a great read! Also, congrats on 100k views! You deserve it.
  20. Set up some tests on a particular body. I had to test a Duna mission a ton "in simulation" before launching officially. Got it down to where I knew from a particular orbit with a particular delta-V whereabouts I would end up. MechJeb isn't all that accurate with atmospheres, and adding FAR into the mix will only complicate things. I'd just place your trajectory a bit long and try to use MechJeb's landing feature for a baseline.
  21. There's always the "Terminate Flight" in the tracking station. Not quite the most realistic method, but it definitely can remove the trash. Just make sure you are terminating the right items or you'll be kicking yourself! Quicksaves!!!
  22. "...for my purpose holds To sail beyond the sunset, and the baths Of all the western stars, until I die." One of my favorite poems. And perfect for this video. Well done, Nassault!
×
×
  • Create New...