Jump to content

"floating" crafts?


zeropositivo

Recommended Posts

I have no idea if this is even possible, but is there any mod that adds a way to have vessels left "floating" through unloading?

I'll be more specific. One thing I've been thinking ever since I've been to Jool is to create some sort of permanent structure in its atmosphere. However, due to how the game does not allow switching out of a vessel moving in atmosphere, this has so far been impossible to accomplish. Another example would be some sort of aircraft aircraft carrier, ready to refuel VTOL high in the sky. Or some sort of blimp

Does anyone know? I don't care if the method is not realistic and cheaty, for all I care even if it simply freezes them in the air and puts their surface speed to 0, or consumes fuel through usage, or whatever. Is there anything that accomplishes this, or is it just impossible?

Link to comment
Share on other sites

Afaik there's nothing which allows that.

KSP deletes every non-active craft which is in an atmosphere and below 20 km altitude because it assumes it'll crash. In theory you should be fine if you stay >20 km. You'll probably also need a satellite orbiting Jool to which you can switch before leaving the flight scene. Otherwise KSP might not allow you to switch to the space center if you are deep in an atmosphere.

Link to comment
Share on other sites

You can use the anchor from KAS to be "landed" while floating up to 2 km above the ground (can't go higher due to physics range).

This won't work on Jool, because Jool doesn't have a ground, but you could anchor yourself to the top of a really tall mountain on Eve/Laythe/Duna/Kerbin.

Link to comment
Share on other sites

I had actually discussed this with someone in the past, for the purpose of creating flying cities/platforms/balloon things, and I think it'd be possible, just weird. You'd have to manually save the vessel when it gets unloaded into another place, then load it when you get within range of where it *should* be. Switching to it from the tracking station wouldn't be possible unfortunately, so we'd have to come up with some kind of GUI to let you switch to them.

It might cause bugs, for sure, but I definitely think it's doable. My plate is a little full at the moment, but I might be able to try to come up with a proof of concept in the next day or two if you really want.

Link to comment
Share on other sites

I had actually discussed this with someone in the past, for the purpose of creating flying cities/platforms/balloon things, and I think it'd be possible, just weird. You'd have to manually save the vessel when it gets unloaded into another place, then load it when you get within range of where it *should* be. Switching to it from the tracking station wouldn't be possible unfortunately, so we'd have to come up with some kind of GUI to let you switch to them.

It might cause bugs, for sure, but I definitely think it's doable. My plate is a little full at the moment, but I might be able to try to come up with a proof of concept in the next day or two if you really want.

Just when I though you couldn't get more awesome, here comes the proof I was wrong

That'd be beyond spectacular. I'm tempted to pick up some real modding skills just so I can aid you (alas, all I've been able to do is a few clouds..)

Link to comment
Share on other sites

I'm not 100% sure it would work. And there's a decent chance it would be buggy. And you'd have to have some sort of autopilot or something that keeps it in the air when it gets loaded, otherwise it'd start falling. But I know I can get all the Vessel information before the vessel gets deleted, and I know you can spawn new vessels while in flight, so I don't see why it shouldn't be possible.

I might be able to come up with a proof of concept, then I can pass it off to you if you'd like to do more with it. I don't really have the time to take on another mod at the moment, since I recently just took over one and am in the process of rewriting it and have several other projects I'm working on. But I sometimes enjoy coming up with smaller proof of concept things that I don't need to dedicate too much time to :P

Link to comment
Share on other sites

I've started tackling this. Made a really simple proof of concept where you can press a button to save a craft and then press a second button to make a copy spawn 100 meters up. Mostly working. Now I'm going to see if I can tweak that so that you can get vessels to automatically save and load when coming into/out of range. Need to find a mod that will let me have flying ships that don't require an autopilot to stay fixed in one place.

Edit: Less success with automatically loading the vessel. It's getting destroyed as soon as it loads :(

Edit2: Minor success with setting the vessel to be landed. It'll load, but I am having trouble then moving it to the right altitude. Plus that won't work for things that are supposed to be pretty high up. This is only for loading floating things when the active vessel comes into range. I might have better success if I just try to let you load ships that are floating as the active vessel, so I might switch to trying that.

Different uses, but it'd still be beneficial to have (imagine a blimp that harvests Karbonite out of Jool's atmosphere).

Edit3: Initial tests of that resulted in me being sent to an asteroid instead of the ship. I'm taking a break for the night because this is frustrating me.

You can load a quicksave when a vessel is flying, so at the very least you should be able to "reload" a vessel and then switch to it. Making them appear when you get close to where they unloaded at is likely going to be troublesome no matter what, unfortunately.

Edit4: I HAD A REVELATION! So it kinda worked (in that the vessel wouldn't get destroyed) when I set the vessel to be landed, but then couldn't adjust the altitude to the correct height. And then I started thinking about how an anchor still counts, despite the fact that the vessel is so far away from the ground still. The only difference is the relative height of all the parts. So what if I just told the vessel to be landed but with a really large "height" equal to the altitude, and then flipped it to flying once it fully loads physics. And guess what. That worked! :D

I still have a bit more testing with that just to make sure things are working as I'd expect them to. I still need to come up with a way to load up one of these stored vessels as the active vessel, but that might be a task for tomorrow. Absolutely none of this is in any useful configuration yet.

Edited by magico13
Link to comment
Share on other sites

I was thinking about this a bit more and since I have to set it to landed anyway (but with a gigantic height value), it likely won't delete the craft when you switch away from it, meaning you'll be able to load it from the tracking station and I won't have to manually reload the craft when you get within range. Which makes things easier. All the plugin will have to do is provide a way to force that landed state on the active vessel so you can switch scenes safely, and make sure any flying vessels get set to landed when the active craft flies out of range. It will probably also have to do some stuff when the vessels are loaded (switching from landed to flying, possibly artificially increasing the unload range).

Basically, I'm hoping this is going to be less work than I originally thought it would be, now that I've figured out how to make it work.

Link to comment
Share on other sites

Sorry, yeah I got distracted by some other projects. My attempt to set the ship to landed prior to unloading so as to not require as much work didn't end up working, so I'm going to have to do it "the hard way" and keep track of the vessels manually. I can maybe take a look at this again tonight :)

Link to comment
Share on other sites

  • 3 weeks later...
Have you thought about incorporating the Quantum Strut "glitch" into your mod, it could be useful for parking a ship in flight.

I haven't heard of that before. Can you briefly explain it to me, if possible? I need to come back to this and at least get something working, but haven't touched KSP in about two weeks...

Link to comment
Share on other sites

I haven't heard of that before. Can you briefly explain it to me, if possible? I need to come back to this and at least get something working, but haven't touched KSP in about two weeks...

Isn't that the old 0.25 QS bug where a vessel with active quantum struts pointing towards the ground would basically be anchored to the spot and break physics (i.e- you can have it thrusting at infinite velocity and still not move)?

In any case, this is a really neat idea!

Link to comment
Share on other sites

Maybe a remake of that mod and use the quantum strut as an "anchor" or "parking brake"

That's still not a solution to the problem. The problem is that you can't switch away from, or return to, vessels that are in the atmosphere. Stopping motion is relatively easy (Hooligan Labs balloons, MechJeb/kOS autopilot to hover, disable gravity, etc) but once you do that there's no way to leave the craft without landing. The quantum struts thing might set the ship as landed, which is one thing I tried without success, which might let you switch away/load the craft, but there are other ways of making the craft float.

I've got code that loads a ship that's hovering as soon as you get within range of where it should be, but once you switch to it you can't switch away (without the game reverting the state for some annoying reason), and you also can't see the ship in the tracking station. My attempts at manually setting the ship to be landed but with a large offset only works in loading the ship at the right altitude, but doesn't seem to be functioning as I'd like when saving the ship. The main problem then is making it so you can switch away from the craft, which I haven't had success with, and it makes testing very very frustrating.

I was planning on coming back to KSP this past weekend but instead ended up working on the game I'm developing. I am planning on coming back to it soon, since it's been about 3 weeks since I touched it, and this is still on my agenda for things to take a look at. If I can find what Quantum Struts was doing to halt all movement, and if it's useful in letting you switch away from the craft (I'm expecting that it still doesn't let you switch away), then it might make things easier. But I've still got some other things I can try as well.

Link to comment
Share on other sites

As so far as I'm aware, the quantum struts physically attach your ship to the ground like normal struts attach one part to another, only with quantum struts its invisible and the maximum length is infinite. Also, I haven't coded anything for awhile so this probably won't help, but is there a way to modify what altitude is considered a safe orbit. I know as long as I can get past that height i can transfer away from the ship even if it will crash back into kerbin in a few hours. Maybe it could done on a ship by ship basis so as not to cause any issues with non-floating craft. I don't know if any of this is helpful, I'm just throwing ideas out.

Link to comment
Share on other sites

It's an issue of status == flying as opposed to status==landed or status==orbiting, along with atmospheric pressure > 0.01. What I've been trying to do is set the status to landed, the altitude to zero, but the height to the altitude. Works absolutely wonderfully to get around the issues when loading a craft, but there's no way to lock that in when trying to switch away from the craft (KSP applies physics, sees the craft is actually flying, switches state to flying, and hopefully doesn't delete the craft from existence for being in atmosphere). I expect more success with tricking it into thinking it's landed rather than tricking it to think it's in orbit, but I'll consider that as well.

The quantum struts thing might be a ticket to getting the landed status to stick, which would make things much simpler. If I can't get that status to stick then I'll have to roll my own solution for loading the craft (a separate GUI in the tracking station to switch to them). Loading the craft when you get within physics range worked fairly well last time I tested, but I got frustrated after a few hours of trying to figure things out and then had other projects to attend to. I might take a look at this tonight further, since it seems to be attracting some attention.

Link to comment
Share on other sites

It definitely has my attention, hacking gravity causes everything to float which causes problems, I've been trying to combine mods to get the effect I want. The Repulsors in Kerbal Foundries are awesome for low flying craft but come with a height limit, the Throttle Controlled Avionics can give me a ship that kind of behaves how I want but at a high cost of fuel (I would love to find a high powered pure electric engine, but they all seem to need at least one other fuel type :/), I haven't used quantum struts yet, but I'm excited to see if I can park my ship above the surface. Actually, if possible, an omni-directional thrust engine could give you similar behavior, of course it would need supporting thusters to keep the ship facing the direction you desire. But I'm getting off track, perhaps I'll post that as a request. Anyways, I appreciate you're hard work and I don't mean to tell you how to do what you're doing, just trying to help brainstorm.

Link to comment
Share on other sites

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...