Jump to content

TT NeverUnload - Vessel Unloading Preventer


TouhouTorpedo

Recommended Posts

So I've been playing with kOS and wondered, just how far could I take this if the vessels didn't unload? Then I figured it can't be that hard to stop unloading.

And so here we are - TT NeverUnload.

s8MfDps.png

Allowing you with suitable mods to fly two vessels at massive distances appart!

contrary to its name it doesn't NEVER unload, but it is definable in the CFG what distance unload will occur, and the default is massive (300km). Its fairly unlikely you'll need more but you can get more with a simple tweak if you ever need it.

To use, just place it on whatever you don't want to disappear and right click in flight, then press Enable. on vessels with multiple neverunload modules, activate BOTH before seperation, else parts may unload anyway.

You want pictures? Here have some of the included vessel (with kOS code, but obviously not kOS itself, included!)

LdH7mLT.png

Detaching at 15km, the payload continues ascent alone.

mlQrgxE.jpg

Giving you just enough fuel to reach the pad for spaceX manpatrick landing.

EDIT: forgot I should probably make this clear:

laEi0ZR.png

The payload DOES continue on and not unload of course! (if you followed the start procedure right that is) so heres looking back down on the KSC at the launch rocket. The payload flies almost all the way up by itself but the kOS computer does for some reason fail when coasting to apoapsis, perhaps a range issue for them. There is plenty of time to switch to and circularize however after landing.

This is a first release of a game stretching mod, so it is pretty buggy but usable. For now don't use it on your main save, but its good fun.

Download here!

http://kerbalspaceprogram.com/tt-neverunload/

License for the mod is available in the readme.txt file included in the download.

Edited by TouhouTorpedo
Link to comment
Share on other sites

My god.

I hadn't realised this.

Someone with Kethane get this, and edit the CFG to a rediculous range (1500km should do it for a 150km orbit), new save, enable on all vessels, sweep the planet.

Edit : oh, so a nearby inactive vessel won't? well, worth a go anyway. Normally other non player vessels are too close to make a difference. You can now be pretty far from another.

Link to comment
Share on other sites

As far as I remember (can't try it out currently), Kethane and NavSAT both depend on the ship being actively controlled to be able to collect data.

Of course, that COULD be due to other ships/probes usually being out of that loading range.

Would someone please test that? This would be... ohmygod!

Link to comment
Share on other sites

Well, so far not so good.....got 2 Kethane scaning sats up, about 1200km apart. Turn on the Unloader part and right away get massive drop in framerate and lots of lag. Trying to change to another vessle does not seem to work...it acts like I change over but when I try to leave map view there is no ship there, nor can I revert flight or go back to space center. Gonna fire it up and keep trying.

edit: same results trying to go back to em, got a dumplog for ya, no way to post it really though.

Edited by KhaosCorp
Link to comment
Share on other sites

I'm not sure it works exactly as you would expect it works. I.e. when I attempted to simultaneously launch two probes, I could switch between them, but I also ended up switching to a station that was orbiting 300km away.

Highly useful nevertheless. Could we have it triggerable by action keys? kOS could probably turn it on itself then.

Edited by Mihara
hash table collision
Link to comment
Share on other sites

is it or would it be possible to change the max active range on a per craft basis? Failing that, how about on a per craft type basis? So One could leave all craft at normal unloading behavior except those tagged as satellites for example?

and I'd probably want to do it for something that I'd designate for miners, maybe tag them as landers.

Link to comment
Share on other sites

is it or would it be possible to change the max active range on a per craft basis? Failing that, how about on a per craft type basis? So One could leave all craft at normal unloading behavior except those tagged as satellites for example?

and I'd probably want to do it for something that I'd designate for miners, maybe tag them as landers.

I think this fellow below is right:

I'm not sure it works exactly as you would expect it works. I.e. when I attempted to simultaneously launch two probes, I could switch between them, but I also ended up switching to a station that was orbiting 300km away.

Highly useful nevertheless. Could we have it triggerable by action keys? kOS could probably turn it on itself then.

After some thought I beleive the issue is that "Vessel.Load" when set, even when set from a "vessel", sets the value for all objects of the "Vessel" type. Probably due to the value being a static, though I'm not entirely up on that part of programming. So change one, change them all.

The only exception being that distancePackThreshold IS variable on a vessel to vessel basis.

The best fix I can think of, is set Vessel.Load to the upper value (300km) in the OnStart variable, and distancePackThreshold be set on the specfic vessels constantly as is currently done.

I'll give this a try sometime later, maybe tomorrow and see how it works out. Could be a thing for version 2. The maximum distance will always be whatever the module with the lowest defined Vessel.Load is. This seems to be why all of the units have to be ON when you do a flight - a nearby landed vessel with the module off can cause unloading.

So in simple terms I have some ideas. Its still all a bit hacky but may do the trick on solving current issues.

Who's going to do the first true plane refueling video? :)

I love this idea. Not planning to record, but I think I definitely would like to give this a go now you mention it.

Link to comment
Share on other sites

The Lazor System did this as well. ( though not as far ) With the hull camera mod I could control a rocket all the way into orbit from the launch pad. REALLY cool stuff. Now we just need squad to up the apparent magnitude after a certain distance. You should be able to see spacecraft in orbit from the ground for a few hours after sundown/before sunrise. Especially if the engines are firing ( which would be seen at anytime of the night )

I need a camera mod that can zoom and track a craft and at the same time be able to control the craft. I can do it all, but zoom and track...Hm. Anyway this is a nice mod I'm going to check out. kOs too..

Link to comment
Share on other sites

I wrote some months ago a script that does the same, but dynamically (so random vessels aren't loaded pointlessly) and only with vessels in atmosphere. Sadly I didn't release it, as it would have saved TouhouTorpedo from duplicating this.

There's some issues with increasing the load distance though, when you get too far away, you're tempting the kraken, I have tested launching several rovers with chutes and they most of the time can land safely if you aren't more than 10km away from them, if you are like 13km away then they blow up for some reason, probably due to clipping against the ground or something.

Edit:

@TouhouTorpedo

This is the plugin I wrote zip, github, sometime I'll do a proper release but I just don't feel like it. Is LGPL licensed and I'm uploading it with the hope that you might find the code useful.

I wrote this plugin for prevent parachuted vessels from going into rails, so is strictly for vessels in atmosphere, vessels that land or go suborbital will be unloaded if they aren't on focus. I toyed with vessels in orbit but I found it to be unreliable as sometimes the kraken would rip them apart so I thought it would be most wise to not tempt it, and as I wrote above, vessels that aren't on focus and touch the ground tend to blow up if you're more than 10km away.

This plugin is partless, it will prevent unloading of any vessel that meets this criteria: is currently loaded, is controllable or has parachutes, and is in atmosphere. As they spread the plugin increases the distances in order to keep them loaded, and as they land, go suborbital or are destroyed the distances shrink and they are unloaded.

@to everybody

Don't use both plugins are the same time! Since both touch the same values they will clobber each other and stuff will break.

Edited by m4v
Link to comment
Share on other sites

  • 2 weeks later...

Now lets say I want two separate craft to not unload. A camera mounted on a rover near the launch pad that can zoom in and watch rockets go all the way past the horizon. ( This works amazingly with the Lazor mod, but the camera rover unloads at 100km. And the Lazor mod is not editable. Also.. I was hoping that this module would load only the vessel/s its attached to. Because I have a 1k part station that orbits at 80km and if it loads in while near the pad the game locks up.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...