IgorZ

[1.3.1] Easy Vessel Switch (EVS) - v1.4

Recommended Posts

Last updated September 17th, 2017 - v1.4 for KSP 1.3

The stock game doesn't offer a consistent model of the camera positioning when the active vessel is switched. EVS does. Now, your camera won't jump randomly as you switch between the vessels. Additionally to that you get some more features.

Download

  • From CurseForge.
  • From CKAN: search for "Easy Vessel Switch" or just "EVS".
  • The sources can be found on GitHub.

Features

  • Highlights currently selected vessel with a colored border. It helps navigating using keyboard.
  • Allows selecting target vessel with a mouse click (by default: Alt+Left Mouse).
  • Prevents random camera orientation on the new vessel:
    • For close vessels there are three different modes that allow keeping the context. The modes can be switched from the keyboard (F7 by default).
      • None: Enable the KSP default behavior.
      • KeepPosition: Preserve the old camera position and only rotate the camera to keep the newly selected vessel in focus.
      • KeepDistanceAndRotation: Preserve the same relative camera rotation and distance between the switches.
    • For the vessels that are too far away from each other the camera is adjusted so what the new field of view has both the new and the old vessels in the focus.
  • Allows defining an arbitrary part as a camera target. To set a part as a target:
    • Hold the part focus key (O by default).
    • Hover mouse over a part you want to be a new target, and click Left mouse button (same as for the vessel selection).
    • To reset to the default focus either select a new vessel or hold O and click anywhere in space (follow the hints displayed when you hold the key).
  • Shows brief info on the vessel being hovered when in switch mode (Alt is pressed).
    • Detects KIS items that are attached to the ground and reports it.
  • Almost anything can be configured via the settings file that's located at: EasyVesselSwitch\Plugins\PluginData\settings.cfg.

Known issues

  • On *Nix operation systems Alt+Left click may not work. You can workaround it by changing either the modifier key or the mouse button in the settings file.

Tutorial video

Other videos

Change log

Spoiler

1.4 (September 17th, 2017)

  • Add localization support.
  • Add RU localization.

1.3.0 (May 25th, 2017)

  • KSP 1.3 support.

1.2.0 (December 13th, 2016)

  • [Enhancement #3] Allow more modifier keys assigned.
  • [Enhancement #6] Allow setting focus on a specific part. By default it's key O.

1.1.1 (October 12th, 2016)

  • [Enhancement] KSP 1.2 support

1.0.3 (September 20th, 2016)

  • [Enhancement] Don't act if UI or vessel switch input is locked.

1.0.2 (June 13th, 2016):

  • [Fix] #2: Docking camera fix mode activates on KIS attach actions.

1.0.1 (June 13th, 2016):

  • [Enhancement] #1: Prevent camera jumping on vessels docking.

1.0.0 (June 4, 2016):

  • Initial version

License

Public domain.

For more information, please refer to: http://unlicense.org

Edited by IgorZ

Share this post


Link to post
Share on other sites

Wow, this is awesome!

Share this post


Link to post
Share on other sites
7 hours ago, ZobrAA said:

Cool! :)

Is this compatible with Camera Focus Changer?

I haven't tested but it should work. Btw, setting focus on an arbitrary part on the vessel is in the list of future features of EVS.

Share this post


Link to post
Share on other sites

I was going to mention Camera Focus Changer; but looks like I got beat to the punch.

Looks really solid.

Now I have Camera Focus Changer, Haystacks Continued, Targetron, and now this...:lol:

By the way, can the hotkeys be rebound?

Share this post


Link to post
Share on other sites
3 hours ago, Deimos Rast said:

By the way, can the hotkeys be rebound?

Yes. Take a look at:

EasyVesselSwitch\Plugins\PluginData\settings.cfg

The comments inside should be enough to figure out what settings affects what.

Share this post


Link to post
Share on other sites
2 hours ago, IgorZ said:

Yes. Take a look at:


EasyVesselSwitch\Plugins\PluginData\settings.cfg

The comments inside should be enough to figure out what settings affects what.

Yes, those are most excellent, very detailed - thanks!

---

I had a chance to play around with it:

  • Am I supposed to be able to actually Switch vessels with Alt+LMB? Because currently I cannot. If this is not working as intended, I can post a log (I checked it, and there is nothing in it about from EVS, but there is some stuff that might be related from KER regarding target switching occurring at the time).
    • Does it matter if the vessels are considered controllable? Judging from the video, it does not. I was testing on an occupied pod, a fuel tank, and a flag.
  • I get the overlay just fine on holding alt and it will say "Switch To" but nothing happens when I click.
  • F7 works fine (the camera settings I mean), but I have to use alternative means to switch targets (Targetron).

Cheers.

Edit:

Here is the log anyway if you need it. The part I thought was relevant is listed below. It mentions KER, but it happens whenever I try to switch, and it's not the typical error KER throws regarding targeting. I should mention this is on Linux 64bit.

ArgumentException: Getting control 2's position in a group with only 2 controls when doing Repaint
Aborting

 

Edited by Deimos Rast

Share this post


Link to post
Share on other sites
27 minutes ago, Deimos Rast said:

Am I supposed to be able to actually Switch vessels with Alt+LMB? Because currently I cannot. If this is not working as intended, I can post a log (I checked it, and there is nothing in it about from EVS, but there is some stuff that might be related from KER regarding target switching occurring at the time).

That's right. Alt+Click should work, and it works for me just fine (I'm on Windows). The errors in logs unlikely can block the switch. KER's errors are in UI handler so, worst thing that can happen is broken KER UI. It looks like the switch action has never happen. Try changing modifier from Alt to Ctrl or Shift. May be it's something special about Alt on Unix?

Do you see any errors in the logs right after the click? I.e. so what you could say for sure the error log matches the click.

And, btw, Unix logs is a nightmare. Really hard to analyze.

55 minutes ago, Deimos Rast said:
  • Does it matter if the vessels are considered controllable? Judging from the video, it does not. I was testing on an occupied pod, a fuel tank, and a flag.

You won't be able to invoke context menu on a non-controllable vessel but for EVS it's not a blocker. It should be able to switch just fine.

Share this post


Link to post
Share on other sites
44 minutes ago, IgorZ said:

That's right. Alt+Click should work, and it works for me just fine (I'm on Windows). The errors in logs unlikely can block the switch. KER's errors are in UI handler so, worst thing that can happen is broken KER UI. It looks like the switch action has never happen. Try changing modifier from Alt to Ctrl or Shift. May be it's something special about Alt on Unix?

Do you see any errors in the logs right after the click? I.e. so what you could say for sure the error log matches the click.

And, btw, Unix logs is a nightmare. Really hard to analyze.

Actually come to think of it, I remember Linux using ALT+LMB for some stuff and things. I tried rebinding a key to ALT in a previous game and I kept having conflicts and it led to a round about discovery that the OS (at least Linux Mint) uses it as the hotkey for moving/grabbing the active window or something of that nature. It's quasi-hardcoded (as in it's a real PITA to try to get around, but I think doable, but it's probably the reason MOD on Linux is RSHIFT). Anyway, the important thing is switching the key to "AnyControl" makes it work just fine. "AnyShift" probably would work too.

Thanks.

p.s. And do you mean my Unix log is a nightmare or all Unix logs are a nightmare?

Share this post


Link to post
Share on other sites
35 minutes ago, Deimos Rast said:

p.s. And do you mean my Unix log is a nightmare or all Unix logs are a nightmare?

All Unity logs under Unix. It looks Unity developers don't spend much time on this OS. Every log record takes 3 (!!!) lines, and still doesn't have as much useful info as on windows.

Btw, you if ever thought about getting logs in a more human readable way try using this mod (pre-release for now). Log console can be opened by pressing key `~`. This mod also saves logs on disk, and format is the same on any OS.

35 minutes ago, Deimos Rast said:

switching the key to "AnyControl" makes it work just fine

Note, that Control and Shift by default are used for throttle control. If you haven't changed the binding you may face unpleasant behavior when in control of a vessel with engines. It was the main reason for me to choose Alt for EVS.

Edited by IgorZ

Share this post


Link to post
Share on other sites

Thanks @IgorZ

I was looking for this functionality for so long :) Now building a base is no longer an annoying random switching

Share this post


Link to post
Share on other sites

The reason for the KER problem is because (I assume, you've not posted a link to your source as per the addon posting guidelines, so I can't tell) you are changing the active vessel from a GUI function.  The GUI functions in a mod are called multiple times per frame and if they happen to create a different number of GUI objects in these different calls then you get the error seen.  It may work better if you set a flag and then do the actual vessel switch somewhere else in the code (e.g. directly from Update or LateUpdate)...

I would expect the KER UI to sort itself out on the next frame so, unless this doesn't happen, this isn't exactly a critical issue...

Edited by Padishar

Share this post


Link to post
Share on other sites

This is a good idea, and will come in very useful! Is there a way to implement something similar into when the craft dock? The camera jump with docking can be very disorientating and can ruin critical operations at times.  A more seamless jump there would also be very welcome :) 

Share this post


Link to post
Share on other sites
12 hours ago, Padishar said:

The reason for the KER problem is because (I assume, you've not posted a link to your source as per the addon posting guidelines, so I can't tell) you are changing the active vessel from a GUI function.

Nope. I only do it once from Update() method. I see KER and KAC UI errors sometimes, it looks like an UI handling issue in these mods.

12 hours ago, MrMeeb said:

This is a good idea, and will come in very useful! Is there a way to implement something similar into when the craft dock? The camera jump with docking can be very disorientating and can ruin critical operations at times.  A more seamless jump there would also be very welcome :) 

Yeah, docking needs camera stabilization for sure. I've created a FR.

Edited by IgorZ

Share this post


Link to post
Share on other sites

A definite hit on my 'I didn't know I needed this' list.

Share this post


Link to post
Share on other sites

This would really make the operation of my kerbal coach parties much easier to handle.

And of course base creation would also benefit.

Are there any known problems or conflicts using this on a linux build?

Share this post


Link to post
Share on other sites

This mod and eva follower is a must for base building with KIS

Edited by brusura

Share this post


Link to post
Share on other sites
7 hours ago, Daveroski said:

This would really make the operation of my kerbal coach parties much easier to handle.

And of course base creation would also benefit.

Are there any known problems or conflicts using this on a linux build?

There is just one for now (it's in the first post).

Share this post


Link to post
Share on other sites

Wowowowowowow a million times wow, this is incredible!!! Excellent work Igor!

Share this post


Link to post
Share on other sites

Amazing work! Love the Alt + Click vessel change especially! Simply Godsent for building and maintaining bases.

Share this post


Link to post
Share on other sites

congrats !

great work !!  simple and efficient control

Share this post


Link to post
Share on other sites

I "discovered" that this allows you to switch vessels within the atmosphere. Not sure if that's intentional, but please leave it in, because I've been looking for that feature forever. It's pretty niche, but it's fun to switch to a booster dropping away then back again to the rocket. Also makes FMRS style deployments easier, I'd imagine.

Share this post


Link to post
Share on other sites
6 hours ago, Deimos Rast said:

I "discovered" that this allows you to switch vessels within the atmosphere. Not sure if that's intentional, but please leave it in, because I've been looking for that feature forever. It's pretty niche, but it's fun to switch to a booster dropping away then back again to the rocket. Also makes FMRS style deployments easier, I'd imagine.

Does it have any side effects? In the process of development I noticed game restricts switching from vessels that are not landed and in atmosphere (i.e. "flying" in terms of the game engine). I had to overrule this behavior, though. Otherwise, there were awkward situations with KIS parts when you could switch to the part and get locked on it.

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