avivey

[1.1.2] [v0.5] Switch Active Vessel

Recommended Posts

Small tool to quickly jump to the right ship:

vEYr78y.png?1

When there are many ships in a crowded area, it can get pretty annoying to select the one you want to jump to right now - this mod helps this pain by highlighting the new ship, and letting you jump there with a single click.

Only ships near-by (Up to 2.5km, depending on... something.) are listed and available to switch to.

Install with CKAN: ckan.exe install SwitchVessel

Download from GitHub: https://github.com/avivey/ksp-switch/releases/download/0.5/SwitchVessel-0.5.zip

source: https://github.com/avivey/ksp-switch

License: BSD 2-clause license

Installation: Extract the archive so that SwitchVessel directory should end up directly under GameData.

Important: The Toolbar plugin is required, and not bundled. Get it here.

Usage:

 

  • Hold mouse over ship's name, and the ship will be highlighted.
  • Click to switch to it.
  • Icon buttons filter ships by type.
  • Toolbar button toggles window.

 

 

When Can I Switch?

The details of when a switch is allowed are a bit complex. I've tried to copy the behaviour of the built-in '['/']' buttons. Roughly speaking:

 

  • If throttled down and not moving (Or in free-fall) - you can jump anywhere.
  • If throttled up, moving across the surface, or in atmosphere - you can switch to vessels up to ~200 meters away ("Packed" limit).

 

Jumping to vessels in illegal states will result in various results - Rovers just stop, powered rockets in atmosphere disappear.

These tests only test the currently active vessel. If the current vessel is parked, but a rocket close by is lifting, it's "legal" to switch to another vessel, 2km away; The rocket will disappear when you do. The rocket will also disappear if it is moving away from the active vessel. These limitations all exist when you switch with the game's built-in features as well.

Notes:

 

  • Vessels don't join and leave exactly at 2.5Km - it looks like 2.3Km to join and 2.6 to leave.
  • Kerbals don't highlight.

 

Help Wanted:

 

  • It's more than likely that I've missed some cases while testing this. If you see something that's wrong, please let me know!
  • Any help with regards to UI (And the toolbar icon) would be appreciated.

 

Changes:

 

 
0.5 (May 7, 2016):
- Update for ksp 1.1.x
- Manually eliminate recursive higlighting issue.

0.4.1 (Feb 2015):
- An attempt at fixing recursive higlighting issue.

0.4 (Dec 21, 2014):
- Update for ksp 0.90.
- Removed "experimental" buttons, keeps "eager" highlighting on.
- Changed list logic to be a little more resilient.

0.3:
- Test for sane switches before switching. Message why not.
- (Experimental) highlighting based on "Is switching allowed".

0.2: 
- Fixed bug about vessels only showing up at 200m instead of 2.5km.
- Added vessel icon to each vessel button.

 

Edited by avivey
ksp 1.1.2

Share this post


Link to post
Share on other sites

ahm... Possibly... I haven't checked out Targetron, and didn't expect it to help in the crowded-local-space use-case...

Share this post


Link to post
Share on other sites

It's always a pain to get to the right thing (ship, debris, kerbal, ...) when switching vessels, your plug-in looks very useful to address that :).

Share this post


Link to post
Share on other sites
Pretty much but, sleeker!

I won't be the first to test this (have had several saves break due to "early usage", and I am not a competent save editor), but I definitely like what I see, and like you I'm everyone agrees with, it is something that is needed to eliminate the rendezvous with the Tracking Station.

Will definitely keep an eye on this one, and hopefully it'll live good bit longer then haystack :)

Share this post


Link to post
Share on other sites

I see I didn't do very well with explaining what this mod is...

It's not meant for the same problem as Targetron / haystack, and doesn't do targeting.

Consider a space dock, with a ship being assembled, and several things floating around it - a station, a supply ship, two parts that needs to be joined, and a kerbal zipping around bolting stuff on - plus some floating debris from earlier.

Switching control from, say, the kerbal to a module, requires cycling through everything around with ']' key, which is annoying (Or, possibly search by name in Targetron. I'll see what it can do soon). So, enter this mod, where you can see what you're switching to before hand.

It only show ships you can switch to with ']', so they are too close for finding in the TS anyway.

(I'll update the first post with better description soon)

Share this post


Link to post
Share on other sites

Great but... unable to list everything in the vicinity (<2.5 km on Kerbin soil), so pretty useles for now :(.

(KSP 0.23/toolbar 1.7.1/a few mods)

Share this post


Link to post
Share on other sites

In theory and in design, the range should be 2.5Km - where ships are loaded and rendered, and you can run switch to them with ']'.

In practice, it's much more complicated:

Things seem to join only at range of 200m, and then they can stay when they move further away; The limit on how far that is seems to depend on both the type of the ship ("Ships" in space can hold almost 2.5km; Probes cut much sooner; On kerbin, everything stops after 200-500m).

I'm listening to a couple of game events that seemed to make sense, and they mostly match physics; I'll try to look at more events over the weekend, to find the ones that happen at the right time (The built-in switching mechanism doesn't use events).

Share this post


Link to post
Share on other sites
I see I didn't do very well with explaining what this mod is...

It's not meant for the same problem as Targetron / haystack, and doesn't do targeting.

Consider a space dock, with a ship being assembled, and several things floating around it - a station, a supply ship, two parts that needs to be joined, and a kerbal zipping around bolting stuff on - plus some floating debris from earlier.

Switching control from, say, the kerbal to a module, requires cycling through everything around with ']' key, which is annoying (Or, possibly search by name in Targetron. I'll see what it can do soon). So, enter this mod, where you can see what you're switching to before hand.

It only show ships you can switch to with ']', so they are too close for finding in the TS anyway.

(I'll update the first post with better description soon)

Targetron lets you sort by distance, which will give you all the craft nearby, and then the ones far away. You click control on whichever you want to control.

Share this post


Link to post
Share on other sites

Updated:

1. Fixed when vessels show up. Now should always be at 2.5km!

2. Added vessel icon to each vessel button.

Enjoy!

Share this post


Link to post
Share on other sites

Thanks for your work. You should put your mod in your signature like everyone else does. Let more people see it.

Share this post


Link to post
Share on other sites

helicopter took off, disappears after switch vessel.

distance <1.5km.

previous version don't have this problem. = (

Share this post


Link to post
Share on other sites

Why is there a mod for this?

You can just press [ or ] in the game, to switch to any nearby vessel.

Share this post


Link to post
Share on other sites
Why is there a mod for this?

You can just press [ or ] in the game, to switch to any nearby vessel.

Try with 15 kerbals/vessels/debris in the vicinity, then you'll think "why such a mod doesn't exists ?"

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now