-
Posts
779 -
Joined
-
Last visited
Content Type
Profiles
Forums
Developer Articles
KSP2 Release Notes
Everything posted by Snjo
-
That's a very useful list! I used one of them before, the onGamePause. Be warned that if you assign these events a function in a part module, and that part is destroyed, it will mess up all other actions that are supposed to happen on game pause, like stopping physics. So remember to assign a remove of the event action on the part's OnDestroy() edit: example: public void OnStart() { GameEvents.onGamePause.Add(new EventVoid.OnEvent(this.OnPause)); } void OnPause() { Debug.Log("Game Paused"); } OnDestroy() { GameEvents.onGamePause.Remove(new EventVoid.OnEvent(this.OnPause)); }
-
Firespitter propeller plane and helicopter parts v7.1 (May 5th) for KSP 1.0
Snjo replied to Snjo's topic in KSP1 Mod Releases
There are 63 parts, 18 internal props and 5 internal spaces. About 10 parts will have name changes, which will trigger edits of my example craft files. Maybe 10 of my 32 plugin classes will change names, which means any part that uses it needs to be checked. I know people are writing scripts to just insert PART { } around the cfg file, but since I'm taking this opportunity to do some spring cleaning, I'll have to do it manually. I'll try no to delay the release by adding new features and parts in this version. -
Firespitter propeller plane and helicopter parts v7.1 (May 5th) for KSP 1.0
Snjo replied to Snjo's topic in KSP1 Mod Releases
The main stumbling block has been the fact that custom engine sounds no longer work. I'v found a way to handle engine sounds with a custom part module I'm writing. This has the benefit of probably working on mac for once, and having the engine produce sound even when the throttle is set to the lowest level. It has the drawback of being an untested source of potential bugs. So it might act differently in terms of shutting down sounds properly, or other game crashing things if there are edge cases I haven't found. I think I've found most of them, but you never know. (It adds events to the game's onPause and OnUnpause events, which I haven't tried before, and is scary) The remaining work to be done before I can throw you a zip is just checking about 100 cfg files. When did I make all these!?! -
Found out some stuff. This module will let you type in a sound name and test to see if it exist, and play it via a GUI button. It loads the sound from the game database, so no messing around with the file structure, just doing it how it's intended to be done. In my case i type in "Firespitter/Sounds/sound_fspropidle" in the field, hit play, and hear my pretty sound. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using UnityEngine; public class FSsoundLoader : PartModule { [KSPField] public string soundName; public string doesExist = "..."; public FXGroup powerGroup; public override void OnStart(PartModule.StartState state) { base.OnStart(state); powerGroup.audio = gameObject.AddComponent<AudioSource>(); powerGroup.audio.volume = 1; powerGroup.audio.Stop(); } public void OnGUI() { Rect menuItemRect = new Rect(250f, 200f, 300f, 150f); Vector2 buttonSize = new Vector2(30f, 30f); Vector2 menuItemSize = new Vector2(200f, 35f); if (GUI.Button(new Rect(menuItemRect.x, menuItemRect.y, buttonSize.x, buttonSize.y), "OK")) { doesExist = "" + GameDatabase.Instance.ExistsAudioClip(soundName); } if (GUI.Button(new Rect(menuItemRect.x + buttonSize.x + 10f, menuItemRect.y, buttonSize.x, buttonSize.y), "C")) { doesExist = "clear"; } if (GUI.Button(new Rect(menuItemRect.x + ((buttonSize.x + 10f)*2), menuItemRect.y, buttonSize.x, buttonSize.y), ">")) { powerGroup.audio.clip = GameDatabase.Instance.GetAudioClip(soundName); powerGroup.audio.Play(); } GUI.Label(new Rect(menuItemRect.x + ((buttonSize.x + 10f) * 3), menuItemRect.y, menuItemSize.x - buttonSize.x - 10f, buttonSize.y), "exists: " + doesExist); menuItemRect.y += 30; soundName = GUI.TextField(new Rect(menuItemRect.x + buttonSize.x + 10f, menuItemRect.y, menuItemSize.x - buttonSize.x - 10f, buttonSize.y), soundName); } }
-
Since custom engine sounds don't seem to work in 0.20, I thought I'd just get started writing my own sound handling code, but I'm not sure what's the correct way to acces the sound files that have already been loaded in KSP. The sound files in my mods Sounds folder show up in the sound list in KSPs debug menu along side the KSP "bleep and bloop" sounds (but the stock jet engine sounds are elsewhere it seems). I see the sounds are called for instance "Firespitter/Sounds/sound_propidle". This is good, as it means I don't have to handle loading the files from disk yourself. What do you do to play these effects in this new system?
-
Custom engine sounds don't play in the new system. What is the proper syntax now? It used to work with the lines: // --- Sound FX definition --- sound_fspropstart.wav = engage sound_fspropidle.wav = power sound_explosion_low = flameout Where the two first ones are now in the GameData\Firespitter\Sounds folder, and the last one is a stock sound. (The last one still works, obviously)
-
Firespitter propeller plane and helicopter parts v7.1 (May 5th) for KSP 1.0
Snjo replied to Snjo's topic in KSP1 Mod Releases
Important heads up! Now that 0.20 is out I'm starting the conversion process to the new mod folder and config structure. As part of that, I will finally correct some inconsistencies in the part and plugin module names. What does this mean for you? Hold on to you hats, cause this is gonna get scary: Most pre-made craft files will no longer be compatible in the coming version of the firespitter mod, if you have used some of the very oldest part, like the landing gears, the helicopter engine, tail rotors and the large propeller engines. This is pretty dramatic stuff, but there really is no other time to get this done. I've been putting it off until this new systems arrival. I will be posting a guide to how you can resurrect you old crafts if they should break once I release the update, and I think will include a folder with legacy cfg files you can drop in to keep the old part names if you want. Also any custom parts you have made that uses an FS module that does NOT start with with the letters FS, will need to add those two letters to the module name. Changing this prevents conflicts with other mods modules, so I think it's important to do. -
Firespitter propeller plane and helicopter parts v7.1 (May 5th) for KSP 1.0
Snjo replied to Snjo's topic in KSP1 Mod Releases
Oh, right, forgot about those He's working hard on his stuff. I have a branch of the rocket pod I'm messing around with. I'll throw together a new mesh that looks like a WWII wing mounted rocket array and do some coding tweaks. Kind of like this: -
Firespitter propeller plane and helicopter parts v7.1 (May 5th) for KSP 1.0
Snjo replied to Snjo's topic in KSP1 Mod Releases
Some good points. It sounds like you are missing the resources file if the electric engines don't work and disappear. Make sure you put Firespitter.cfg in the Resources folder. Now for the whole weight to thrust thing. The weight values grew out of the impression that most fuel tanks had a good wight value in the stock part set but the empty fuselage section was way too heavy. So the empty section are skewed towards the weights of dry fuel tanks. The lift values on the stock wings are very odd. I based the fighter wings directly off the swept wings, which were the ones I'd use for monoplanes. And then, a big problem was that the smaller winglets have way too much lift to get a balanced craft with the main wings in a good position. The bomber wings were simply made to lift the bomber sections, which were in turn designed around a partially full orange tank (although I can see the dry mass of the bomber sections is a bit low). It's hard to argue that my stuff is right, and the stock stuff is wrong, when after all , I am adding parts to that original set, and not in a vacuum. But in my experiences mixing and matching parts, these values are what worked for my designs. I'll have to think of how to tweak this stuff to be more consistent while not breaking everything Oh, and I agree that the cockpits can have a reduction in impact resistance. -
Firespitter propeller plane and helicopter parts v7.1 (May 5th) for KSP 1.0
Snjo replied to Snjo's topic in KSP1 Mod Releases
Hey, I actually learned some new stuff myself. Like, did you know the VTOL has hover mode? I didn't remember that! -
Firespitter propeller plane and helicopter parts v7.1 (May 5th) for KSP 1.0
Snjo replied to Snjo's topic in KSP1 Mod Releases
Confused? Check the Firespitter parts guide edit: pretty much filled out now. Let me know if you miss something. -
Firespitter propeller plane and helicopter parts v7.1 (May 5th) for KSP 1.0
Snjo replied to Snjo's topic in KSP1 Mod Releases
The new version, 4.2, is now on spaceport Download v4.2 - Electric 0.5m propeller - Windmilling propellers, with constant spin rate while active. - An empty bomber fuselage section for reduced weight. (Take off with the included K-17 mk5 to see how much easier that is to get off the ground and land) - f-86 style tail jet - Info window popup part for explaining action groups etc. Good for shared craft files or hard to remember setups. - 0.5m engine can now reverse for push prop setups, or taxiing (using a new module that can be used on any engine) - Tail rotor max thrust is now 0.25-32 instead of 0.25-infinity - Increased propeller engine isp from 1200 to 2000 - Increased old propeller response speed - Increased node strength on the bomber parts. and landing gears. You can now land a heavy plane without breaking apart. - Toggle engine ignition, landing gear brakes and retraction from EVA - Air brake deployment state is now persistent - Uncommented wing FAR values - Performance tweaks (caching values), and made classes public - crew fuselage IVA (not too pretty, but eliminates an IVA cam switch bug) - hover switch now works in the original copter cockpit - Apache monitors will display info window text -
Firespitter propeller plane and helicopter parts v7.1 (May 5th) for KSP 1.0
Snjo replied to Snjo's topic in KSP1 Mod Releases
A small bump in ISP makes a great difference in the amount of solar energy you need to collect, so I'll try raising it from 3000 to 3500 ISP, with a max thrust of 40. Remember, if you need a physically smaller engine, add a line in the config with for instance: rescaleFactor = 0.625 This will halve the size (default rescaleFactor is 1.25) -
Firespitter propeller plane and helicopter parts v7.1 (May 5th) for KSP 1.0
Snjo replied to Snjo's topic in KSP1 Mod Releases
The new 0.5m electric propeller has almost the same thrust as the old bigger one, but you can turn on "Hover Throttle" (silly name) in the action group setup to get 50% max thrust for finer control. -
Firespitter propeller plane and helicopter parts v7.1 (May 5th) for KSP 1.0
Snjo replied to Snjo's topic in KSP1 Mod Releases
v4.2 pre-release 2 I think this is the version I'll upload to spaceport tomorrow, but there's always a chance of bugs. Download - Electric 0.5m propeller - Windmilling propellers, with constant spin rate while active. - An empty bomber fuselage section for reduced weight. (Take off with the included K-17 mk5 to see how much easier that is to get off the ground) - f-86 style tail jet - Info window popup part for explaining action groups etc. Good for shared craft files or hard to remember setups. - 0.5m engine can now reverse for push prop setups, or taxiing (using a new module that can be used on any engine) - Tail rotor max thrust is now 0.25-32 instead of 0.25-infinity - Increased propeller engine isp from 1200 to 2000 - Increased old propeller response speed - Increased node strength on the bomber parts. and landing gears. You can now land a heavy plane without breaking apart. - Toggle engine ignition, landing gear brakes and retraction from EVA - Air brake deployment state is now persistent - Uncommented wing FAR values - Performance tweaks (caching values), and made classes public - crew fuselage IVA (not too pretty, but eliminates an IVA cam switch bug) - hover switch now works in the original copter cockpit -
Firespitter propeller plane and helicopter parts v7.1 (May 5th) for KSP 1.0
Snjo replied to Snjo's topic in KSP1 Mod Releases
You can now put info on your craft. Very useful for shared craft files, and for my example craft. But really for any hard to remember control setup. -
Firespitter propeller plane and helicopter parts v7.1 (May 5th) for KSP 1.0
Snjo replied to Snjo's topic in KSP1 Mod Releases
Pre-release 4.2 I've been pretty lazy lately, but I figured it was time I got the push prop function out there at least Download Changes: - Windmilling propellers, with constant spin rate while active. (Only on the 0.5m engine for now. Updating the older propeller meshes before I apply it there) - Performance tweaks (caching values), and made classes public - Tail rotor max thrust is now 0.25-32 instead of 0.25-infinity - 0.5m engine can now reverse for push prop setups, or taxiing (using a new module that can be used on any engine) - Uncommented FAR values Still to be done for 4.2: Better propellers f-86 tail jet Propeller EVA hand crank electric 0.5m propeller Update the old cockpits with switches Gyrocopter blades / autorotate (if I can get to it) engine idle sound -
Firespitter propeller plane and helicopter parts v7.1 (May 5th) for KSP 1.0
Snjo replied to Snjo's topic in KSP1 Mod Releases
Useful stuff, but I can't imagine that would be a more sure bet than the vessel transform direction, which would in (almost) all cases be based on controlling pod. I think I'll accept some edge case bugs rather than massive uncertainty. -
Firespitter propeller plane and helicopter parts v7.1 (May 5th) for KSP 1.0
Snjo replied to Snjo's topic in KSP1 Mod Releases
I saw he became a Made Man too, pretty awesome -
Firespitter propeller plane and helicopter parts v7.1 (May 5th) for KSP 1.0
Snjo replied to Snjo's topic in KSP1 Mod Releases
it's this stuff: [KSPField(guiActive = false, guiName = "invertMotion", isPersistant = true)] private bool invertMotion = false; [KSPField(guiActive = false, guiName = "invertSet", isPersistant = true)] private bool invertSet = false; so you would just find the line in the persistence, or possibly the craft file (not sure), with invertMotion, and set it the way you want. If you then set invertSet to true, it won't check again. -
Firespitter propeller plane and helicopter parts v7.1 (May 5th) for KSP 1.0
Snjo replied to Snjo's topic in KSP1 Mod Releases
I guess you are referring to the fact that at the lowest few percent of the throttle, there is no sound at all. That's because there should be an idle sound playing at that level, but I've only made an Power sound, which starts just above that, and is altered by thrust percentage. I don't want to make two conflicting engine sounds, so I need to find a good idle sound that can play along the normal engine sound. -
Firespitter propeller plane and helicopter parts v7.1 (May 5th) for KSP 1.0
Snjo replied to Snjo's topic in KSP1 Mod Releases
The check happens the very first time the vessel is launched, then the left/right value is written to a persistent value. (otherwise you'll get weird behavior when loading a nearby vessel before the one with the wheels) -
Firespitter propeller plane and helicopter parts v7.1 (May 5th) for KSP 1.0
Snjo replied to Snjo's topic in KSP1 Mod Releases
The wheels check which side of the vessel they are on, so if things aren't aligned as expected, or there is an extra command module in there messing up the expected vessel center line and direction when it is first launched, you might get some problems. (If they are on the left side, they use a set of transforms pointing left to rotate, and on the right side they use an opposite set of transforms to rotate to. This is done by using a Vector3 dot comparison to the vessel.transfrom.right at first launch) -
Firespitter propeller plane and helicopter parts v7.1 (May 5th) for KSP 1.0
Snjo replied to Snjo's topic in KSP1 Mod Releases
I fully admit they are crazy and confusing