JoePatrick1
Members-
Posts
400 -
Joined
-
Last visited
Content Type
Profiles
Forums
Developer Articles
KSP2 Release Notes
Everything posted by JoePatrick1
-
[1.3] KerBalloons v0.4.2 - Balloons for KSP!
JoePatrick1 replied to JoePatrick1's topic in KSP1 Mod Development
As for the rope, I will probably make it so it is always straight but always points upwards - probably the best I can model it in KSP - sort of like how parachutes work. The expanding and bursting was something I thought was necessary for a balloon mod. Wind is something I am considering modelling for the balloons but I don't know if it would really fit with KSP. -
[1.3] KerBalloons v0.4.2 - Balloons for KSP!
JoePatrick1 replied to JoePatrick1's topic in KSP1 Mod Development
I will be working on doing this in the next update - this was just a 'proof of concept' kind of release. -
[1.3] KerBalloons v0.4.2 - Balloons for KSP!
JoePatrick1 replied to JoePatrick1's topic in KSP1 Mod Development
Not really tested it but should do -
[1.3] KerBalloons v0.4.2 - Balloons for KSP!
JoePatrick1 replied to JoePatrick1's topic in KSP1 Mod Development
Release 1 - Now available Download here -
Stock modules source code?
JoePatrick1 posted a topic in KSP1 C# Plugin Development Help and Support
How do you get the source code for the stock modules? <snip> -
[1.3] KerBalloons v0.4.2 - Balloons for KSP!
JoePatrick1 replied to JoePatrick1's topic in KSP1 Mod Development
The plan is to have balloons specifically designed for each planet with an atmosphere - as all of their atmospheres are at different pressures - but all balloons technically work on any planet with an atmosphere. The balloons can be deflated but they are deflated in ~2 seconds. You could use them as parachutes though as they have very little lift, so not enough to lift a rover, but very large surface area so create a lot of drag - basically is a parachute -
[1.3] KerBalloons v0.4.2 - Balloons for KSP!
JoePatrick1 replied to JoePatrick1's topic in KSP1 Mod Development
This is what it looks like before being inflated, with a barometer for scale - - - Updated - - - I don't know, it's not been tested - should do though. -
[1.3] KerBalloons v0.4.2 - Balloons for KSP!
JoePatrick1 replied to JoePatrick1's topic in KSP1 Mod Development
No, this is not possible with the way KSP works with vessels in the atmosphere. Tethered balloons are planned though which will allow this. - - - Updated - - - I am not really planing on making those kind of balloons - just weather balloons and science ballons -
[1.3] KerBalloons v0.4.2 - Balloons for KSP!
JoePatrick1 replied to JoePatrick1's topic in KSP1 Mod Development
The pictured balloon currently bursts when the pressure is below 4kPa (which is at about 17km) - Balloons don't really reach heights as high as 70km! - - - Updated - - - Well, yes -
How to make new part functions
JoePatrick1 replied to Kerso1991's topic in KSP1 C# Plugin Development Help and Support
I only started writing plugins a few days ago but have been making parts for almost a year now. I am not entirely sure what you want to do but if you just want to add a new fuel type to use in the config you can do that without a plugin. Take a look at this. If you want to add more functionality, requiring a plugin then I would recommend checking out the links on this thread - scroll to the bottom where it says "Plugin Development" -
THIS MOD HAS MOVED - PLEASE GO HERE v0.4.2 Released Returning soon to CKAN Ever wanted Balloons in KSP? Now they're here! I am working on this mod KerBalloons which will bring balloons that can be sent up to collect science. There will be special science parts dedicated for this as well as balloon based contracts (hopefully). The balloons will come in various sizes with different lift capabilities allowing simple science balloons or the ability to lift small rockets. The Plan v0.1: This release will have 3 balloons; 1 standard balloon, 1 higher altitude balloon and 1 heavier payload balloon. In this release all 3 balloons will be 0.625m size and will be designed for use in Kerbin's atmosphere. The balloon will expand as air pressure decreases (as altitude increases) as well as lose lift. When the air pressure it too low, the balloon will burst - no parachute on these balloons. v0.3: This release will bring all new balloons, they will have varying lift capabilities and minimum pressures. Balloon sizes will range from 0.625m up to 3.75m, for each size there will be the same 3 variants as in v0.1. v0.4 Even more balloons coming in this release! Some will be designed for use in different planet atmospheres and higher tech balloons will come with a parachute as well to protect your glorious science. v0.5: This release will include some new specialised science experiments for use with the balloons such as an atmospheric analyser. A service bay will be included as well for 0.625m and 3.75m balloons as they are not included in stock KSP. v0.7: The big one! I hope to get contracts included into the mod at this point. Such as take an atmospheric reading at 5km, 10km and 15km with a KerBalloon. v0.9: If I can find a way to get it to work, I will add the ability to tether balloons to the ground in this release. A use for this could be for RemoteTech ground relays. v1.0: For 1.0, I will add any last features and fix any remaining bugs. After 1.0, I will still update KerBalloons to work with the latests versions of KSP as best I can. Media http://imgur.com/a/uPnxb http://imgur.com/a/bOIRr Download Returning soon to CKAN Donate Source Code The MIT License Copyright (c) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. You can also create your own balloons with KerBalloons, click here for a tutorial Known Bugs None at the moment - Please report any you find Old version available here Source Code All Rights Reserved
- 286 replies
-
- 11
-
Accidental duplicate, pending deletion - go here for the dev thread
-
You want 4.2.1
-
So I have a model of a balloon for my plugin and I would like to remove the 'balloon' component and add the same particle effect as when kerbals die when they hit the ground (it's like an explosion but no fire) - .Is this possible and how do I do it? edit: also is there a way to add the particle effect that happens when decouplers are activated
-
So I have a model of a balloon for my plugin and I would like to remove the 'balloon' component and add the same particle effect as when kerbals die when they hit the ground (it's like an explosion but no fire) - .Is this possible and how do I do it? edit: also is there a way to add the particle effect that happens when decouplers are activated
-
I am very new to writing plugins and I am trying to make it so that I can control an animation linked to my part. I have spent ages searching through old posts and such but still cant find an answer. Below is my code and I have highlighted the parts where I am trying to control the animation to hopefully make it easier to understand. Thanks using System; using System.Collections.Generic; using System.Linq; using System.Text; using UnityEngine; namespace BalloonModule { public class BalloonModule : PartModule { [B][COLOR="#000080"][KSPField(isPersistant = false)] public string inflateAnimation = "inflate"; public Animation anim;[/COLOR][/B] [KSPField(isPersistant = false)] public float burstAtmoPressure = 0; [KSPField(isPersistant = false)] public float maxBalloonLift = 0; public float balloonLift = 0; public bool isInflated = false; public override void OnStart(StartState state) { Debug.Log("Weather Balloons Mod Loaded!"); [B]anim = this.vessel.GetComponent(inflateAnimation);[/B] } public override void OnUpdate() { Debug.Log("Balloon Lift: " + balloonLift); if(isInflated) { if (balloonLift < maxBalloonLift) { balloonLift += 0.01f * maxBalloonLift; if (balloonLift > maxBalloonLift - 0.01) balloonLift = maxBalloonLift; [B][COLOR="#000080"]anim.normalizedTime = (balloonLift/maxBalloonLift)/2;[/COLOR][/B] } float pressureCountdown = (float)FlightGlobals.getStaticPressure() - burstAtmoPressure; [B][COLOR="#000080"]float animTime = 0.5f -(0.005f*pressureCountdown); anim.normalizedTime = animTime;[/COLOR][/B] this.rigidbody.AddForce(vessel.upAxis * balloonLift); if (FlightGlobals.getStaticPressure() <= burstAtmoPressure) { Debug.Log("Balloon has Burst!"); balloonLift = balloonLift * 0.2f; deflateBalloon(); } } else if (!isInflated && balloonLift > 0) { balloonLift -= 0.01f * maxBalloonLift; if (balloonLift < 0.01) balloonLift = 0; } } [KSPEvent(active = true, guiActive = true, guiActiveEditor = false, guiActiveUnfocused = false, guiName = "Inflate Balloon")] public void inflateBalloon() { if (FlightGlobals.getStaticPressure() > 0) { Debug.Log("Inflating Balloon!"); isInflated = true; Events["inflateBalloon"].active = false; Events["deflateBalloon"].active = true; } else { ScreenMessages.PostScreenMessage("Cannot inflate balloon in vacuum", 3, ScreenMessageStyle.UPPER_CENTER); } } [KSPEvent(active = false, guiActive = true, guiActiveEditor = false, guiActiveUnfocused = false, guiName = "Deflate Balloon")] public void deflateBalloon() { Debug.Log("Deflating Balloon!"); Events["deflateBalloon"].active = false; isInflated = false; } } }
-
I am very new to writing plugins and I am trying to make it so that I can control an animation linked to my part. I have spent ages searching through old posts and such but still cant find an answer. Below is my code and I have highlighted the parts where I am trying to control the animation to hopefully make it easier to understand. Thanks using System; using System.Collections.Generic; using System.Linq; using System.Text; using UnityEngine; namespace BalloonModule { public class BalloonModule : PartModule { [B][COLOR="#000080"][KSPField(isPersistant = false)] public string inflateAnimation = "inflate"; public Animation anim;[/COLOR][/B] [KSPField(isPersistant = false)] public float burstAtmoPressure = 0; [KSPField(isPersistant = false)] public float maxBalloonLift = 0; public float balloonLift = 0; public bool isInflated = false; public override void OnStart(StartState state) { Debug.Log("Weather Balloons Mod Loaded!"); [B]anim = this.vessel.GetComponent(inflateAnimation);[/B] } public override void OnUpdate() { Debug.Log("Balloon Lift: " + balloonLift); if(isInflated) { if (balloonLift < maxBalloonLift) { balloonLift += 0.01f * maxBalloonLift; if (balloonLift > maxBalloonLift - 0.01) balloonLift = maxBalloonLift; [B][COLOR="#000080"]anim.normalizedTime = (balloonLift/maxBalloonLift)/2;[/COLOR][/B] } float pressureCountdown = (float)FlightGlobals.getStaticPressure() - burstAtmoPressure; [B][COLOR="#000080"]float animTime = 0.5f -(0.005f*pressureCountdown); anim.normalizedTime = animTime;[/COLOR][/B] this.rigidbody.AddForce(vessel.upAxis * balloonLift); if (FlightGlobals.getStaticPressure() <= burstAtmoPressure) { Debug.Log("Balloon has Burst!"); balloonLift = balloonLift * 0.2f; deflateBalloon(); } } else if (!isInflated && balloonLift > 0) { balloonLift -= 0.01f * maxBalloonLift; if (balloonLift < 0.01) balloonLift = 0; } } [KSPEvent(active = true, guiActive = true, guiActiveEditor = false, guiActiveUnfocused = false, guiName = "Inflate Balloon")] public void inflateBalloon() { if (FlightGlobals.getStaticPressure() > 0) { Debug.Log("Inflating Balloon!"); isInflated = true; Events["inflateBalloon"].active = false; Events["deflateBalloon"].active = true; } else { ScreenMessages.PostScreenMessage("Cannot inflate balloon in vacuum", 3, ScreenMessageStyle.UPPER_CENTER); } } [KSPEvent(active = false, guiActive = true, guiActiveEditor = false, guiActiveUnfocused = false, guiName = "Deflate Balloon")] public void deflateBalloon() { Debug.Log("Deflating Balloon!"); Events["deflateBalloon"].active = false; isInflated = false; } } }
-
Nevermind - I figured it out. You have to have the two flags where you want them but when you export from your modelling software, join them into one object.
-
So I know how to add a flag to a part, but how do you add two like with the mk2 inline cockpit?
-
Vector for straight up?
JoePatrick1 replied to JoePatrick1's topic in KSP1 C# Plugin Development Help and Support
Thanks so much, this seems to do just what I want it to -
So I am using this.rigidbody.AddForce() I would like to have a force applied directly up (regardless of ship orientation) but the problem is I can't seem to get the right vector. I tried Vector3.up but that just created a force north rather than up. Like this So naturally I tried the others, eg. .down, .left, .right etc. but they did not seem to be in 90 deg rotations. for example Vector3(0,0,1) was at a 45 deg angle. The only vector that seems to point straight up is (-1.46,0,1) but I don't want to use a combination of value I just want 2 zero values and then a positive value (eg. 0,0,1) as using a combination creates oscillations. This has probably been quite difficult to follow and I can give more info if needed but hopefully someone can help.
-
ModuleSurfaceFX?
JoePatrick1 replied to Angelo Kerman's topic in KSP1 C# Plugin Development Help and Support
I believe the surfaceFX are the fx such as the dust clouds