IgorZ

[1.7+] Easy Vessel Switch (EVS) - v1.11

Recommended Posts

>>> Support me at Patreon if you like the mod!

Easy Vessel Switch (EVS)

The stock game doesn't care much about the camera stabilization when you switch between the vessels. You can walk in EVA, enter a pod, and end up with a camera looking in the sky. Or you may want to take a closer look at some part of your big station, but the camera focus is bound to the station's center of mass, and the part of the interest is far away form it.

This mod can help you solving these troubles! With EVS:

  • ...the camera will stop jumping around randomly. There are two modes of stabilization that allow preserving the view in the scene (switch with F7)...
  • ...you're able to focus the view on any part of any vessel with a simple mouse click (with O hold, it's configurable)...
  • ...a new active vessel can be selected by simply holding ALT (configurable) and clicking on the vessel you like...
  • ...the basic info of a vessel can be quickly seen by simply hovering over it (with ALT hold)...

And this mod speaks 4 major languages in case of some of your kerbals are picky in this sense.

Demo media

Languages supported

Русский Русский

Italiano Italiano

Español Español

Support

You can support this and the other of my mods on Patreon. This is where I post my ideas, prototypes and the features development progress.

Other useful mods for EVA

If you want doing EVA comfortably, you really should consider adding these mods as well:

How to install

  • Recommended:
    • Install and run CKAN.
    • Search for "Easy Vessel Switch" or just "EVS", then install the mod.
    • Occasionally run CKAN client to update EVS (and other mods) to the latest version.
    • If you follow this path, then all the EVS dependencies will be updated automatically. It may save you a lot of time during the update.
  • Manual:
    • Download the ZIP archive:
    • Unzip release archive into the game's GameData folder.
    • Verify the installation: the mod's README.md file must be located at <game root>/GameData/EasyVesselSwitch/README.md.
    • Note, that all the names must be exactly like in the archive or it won't work.

Sources are available on GitHub. License: Public Domain.

Edited by IgorZ

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

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

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.