Jump to content

Stand Alone Map View Revived - Multi monitor KSP [1.12.3+]


linuxgurugamer

Recommended Posts

Forum user @Unit327 write this amazing mod back  in 2014. Original thread is here:https://forum.kerbalspaceprogram.com/index.php?/topic/69089-stand-alone-map-view-multi-monitor-ksp-14xplugin/

 

He's been gone for 4 years, I got a request about it, and have been able to get it working again in 1.12

 

A Kerbal Space Program mod that opens the map view in another window/monitor.

It works by launching a separate instance of the game, and syncing the time

 

6vtSy89l.png

lsqAft9.jpeg

and ship information via networking (udp/tcp).

Installation Instructions (CKAN install)

  1. Make a copy of the install you want to use this in.  This will be the client which will show the map view
  2. (Optional) Delete all the parts from the GameData directories EXCEPT for the following:
    GameData\Squad\Parts\Command\Mk1-3Pod\*
    GameData\Squad\Parts\Prebuilt\*
  3.  Set up CKAN to control both installs
  4. install via CKAN the Stand Alone Map View client into the mapview client
  5. Install via CKAN the Stand Alone Map View server into your main install

Current Features

  • Syncing of all vessels
  • Syncing of maneuver nodes (bidrectionally)
  • Syncing of time and time warp

Availability

Edited by linuxgurugamer
Link to comment
Share on other sites

Post reserved for misc notes

  1. This has been tested on Windows.  While I think it will work on Linux and Mac, I can't say if it will or not, waiting for someone to confirm
  2. A note from 2014, made by @Pokpok can be useful
Quote

My only problem with this one was simply getting two full-screen KSP instances to display at the same time. So if anyone else struggles with that, here's my suggestion: I created two shortcuts of KSP (one of the server KSP and one the client KSP) with the " -popupwindow" target added. I use these shortcuts to fire up the server KSP and then the client copy, then I use the Windows + shift + left/right arrow hotkey once the client KSP has fully loaded. Dual monitor fullscreen KSP!
 

3. All visual mods need to be installed on both installs, as well as any planet packs.  Beyond that, it probably isn't necessary to have any of the non-visual mods installed

4.  I'd strongly recommend that you disable the music on the client, otherwise you will hear two different soundtracks

LGG

Edited by linuxgurugamer
Link to comment
Share on other sites

Ran into this issue testing it out. No rush to resolve over the holidays. If you need more information gathered let me know.   

I installed the Server code on my dev instance and created a new client instance both KSP 1.12.4.

  • The client is pure stock with only the squad parts listed installed and no DLC packages. It loads directly to the tracking station. Client code installed via CKAN 
  • The server has limited mods and DLC installed. Server code installed via CKAN. On start up I receive the following error pop up. All DLLs under client and server are in the Plugins folder of their respective folders under GameData  

qIRxqLm.png 

  • I proceeded to the load a saved game with no active vessels. 
    • The time functions between the client and server are syncing
    • If I enter warp on the server the client also goes into warp
    • If I launch a vessel, no tracking functions take place. 
    • Running Windows 11 Home  Version 22H2 Build 22621.963
      • .NET runtime 5.0.17 and 6.0.12 installed as well. 
    • Full Server and Client logs: https://drive.google.com/file/d/1_E7H3Db_l76D458dCZPFHquDi3FsJtVh/view?usp=sharing 
      • Windows firewall rules allow unrestricted TCP access inbound and outbound from the two ksp_x64.exe processes of client and server instances
      • Sample Logs errors from both instances
        • [LOG 12:51:41.067] samv server SocketWorker exception: An existing connection was forcibly closed by the remote host.
             at System.Net.Sockets.Socket.ReceiveFrom (System.Byte[] buffer, System.Int32 offset, System.Int32 size, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint& remoteEP) [0x0003e] in <ef151b6abb5d474cb2c1cb8906a8b5a4>:0 
            at System.Net.Sockets.Socket.ReceiveFrom (System.Byte[] buffer, System.Int32 size, System.Net.Sockets.SocketFlags socketFlags, System.Net.EndPoint& remoteEP) [0x00000] in <ef151b6abb5d474cb2c1cb8906a8b5a4>:0 
            at System.Net.Sockets.UdpClient.Receive (System.Net.IPEndPoint& remoteEP) [0x00036] in <ef151b6abb5d474cb2c1cb8906a8b5a4>:0 
            at StandAloneMapView.server.SocketWorker.Worker () [0x00017] in <db33393688134af2910a13bb38bdbc09>:0 
        • [WRN 12:51:41.084] samv client exception incoming, trace   at ProtoVessel..ctor (ConfigNode node, Game st) [0x00f49] in <0435390348b6470d8166bd1c53b4b100>:0 
           \n   at StandAloneMapView.client.VesselChecker.CreateVessel (StandAloneMapView.comms.VesselList+VesselInfo vesselInfo) [0x000c6] in <e1645ff9d69a4273bd11e765b5c0e303>:0 
           \n   at StandAloneMapView.client.VesselChecker.Check () [0x0013e] in <e1645ff9d69a4273bd11e765b5c0e303>:0 
           \n   at StandAloneMapView.client.TrackingStation.CheckVessels () [0x00000] in <e1645ff9d69a4273bd11e765b5c0e303>:0 
           \n   at StandAloneMapView.client.TrackingStation.UpdateVessel () [0x00013] in <e1645ff9d69a4273bd11e765b5c0e303>:0 
           \n   at StandAloneMapView.client.TrackingStation.UnityWorker () [0x00034] in <e1645ff9d69a4273bd11e765b5c0e303>:0 
          [EXC 12:51:41.084] NullReferenceException: Object reference not set to an instance of an object
          	ProtoVessel..ctor (ConfigNode node, Game st) (at <0435390348b6470d8166bd1c53b4b100>:0)
          	StandAloneMapView.client.VesselChecker.CreateVessel (StandAloneMapView.comms.VesselList+VesselInfo vesselInfo) (at <e1645ff9d69a4273bd11e765b5c0e303>:0)
          	StandAloneMapView.client.VesselChecker.Check () (at <e1645ff9d69a4273bd11e765b5c0e303>:0)
          	StandAloneMapView.client.TrackingStation.CheckVessels () (at <e1645ff9d69a4273bd11e765b5c0e303>:0)
          	StandAloneMapView.client.TrackingStation.UpdateVessel () (at <e1645ff9d69a4273bd11e765b5c0e303>:0)
          	StandAloneMapView.client.TrackingStation.UnityWorker () (at <e1645ff9d69a4273bd11e765b5c0e303>:0)
          	UnityEngine.Debug:LogException(Exception)
          	StandAloneMapView.utils.MonoBehaviourExtended:LogException(Exception)
          	StandAloneMapView.client.TrackingStation:UnityWorker()
Link to comment
Share on other sites

38 minutes ago, Caerfinon said:

The client is pure stock with only the squad parts listed installed and no DLC packages. It loads directly to the tracking station. Client code installed via CKAN 

Client should have the same mods installed as the server

38 minutes ago, Caerfinon said:

The server has limited mods and DLC installed. Server code installed via CKAN. On start up I receive the following error pop up. All DLLs under client and server are in the Plugins folder of their respective folders under GameData  

I'll take a look, for now you can ignore it.  This is probably due to the utils.dll being in both mods, I'll have to review that code.  I assume (based on a quick test) that the message only showed up on the server, not the client?

Regarding those logs, did the errors keep happening, or only when it was starting up?  I did notice that there would be a bunch of errors until it started syncing, as long as it wasn't continuous,  that should be ok

38 minutes ago, Caerfinon said:

If I launch a vessel, no tracking functions take place. 

I found the problem, will try to get an update out later on, I want to fix the popup as well

I also want to add a bit more error checking and diagnostics

Edited by linuxgurugamer
Link to comment
Share on other sites

New release, 1.0.0.1

  • Fixed path to protovessel
  • Fixed InstallChecker reporting incorrect error on server when starting

There were issues on both the client and server, you will need to reinstall both.

Note that CKAN may take a bit to get updated, you can grab the updated files directly from Github:

https://github.com/linuxgurugamer/stand-alone-map-view/releases/tag/1.0.0.1

Link to comment
Share on other sites

11 minutes ago, linuxgurugamer said:

Client should have the same mods installed as the server

OK will make the adjustment. 

12 minutes ago, linuxgurugamer said:

I found the problem, will try to get an update out later on, I want to fix the popup as well

I also want to add a bit more error checking and diagnostics

I'll wait for the new drop and then test it out and pay more attention to the sequence of sync messages. 

Have a Happy Christmas. 

Link to comment
Share on other sites

9 hours ago, linuxgurugamer said:

Already done, by now a good chance CKAN has picked it up

New code works very well. Overall I like having the extra screen as a reference. 

  • Good things
    • I can now see active and inactive vessel orbits.
    • Client and server instances have exact same mod load and run reasonably well in 16GB or RAM (51 installed mods) 
    • UT time sync is pretty constant between client and server. 
    • Maneuver nodes planned in the client can be executed in the server instance. 
    • Warning message on server no longer appears
  • Odd things
    • MET time can drift a little between the two.  sometimes a difference of 2-5 minutes, however the vessel positions are synced
    • After several maneuvers the maneuver node markers are not being removed, but are attached to or follow the active vessel. If no vessel is active then they attach to the planet in focus 
      • v3j9bcH.png  
    • Unknown Asteroids and Comets from the server are revealed as discovered  in the client
      • kRRBhGF.png

I just did a quick test. Will do more detailed test tomorrow and provide logs. 

Edited by Caerfinon
Link to comment
Share on other sites

6 hours ago, Caerfinon said:

Will do more detailed test tomorrow and provide logs. 

Here are the logs from this morning's test. They are annotated with Notes2log. https://drive.google.com/file/d/1aLKSm71665ukk7rHjgbM5r4-K7Kdf3L1/view?usp=sharing 

  • When the test vessel landed on Kerbin in the server instance. The client instance started switching between the flight scene and the map until the vessel was recovered on the server instance and the client switched to the tracking station. 
Link to comment
Share on other sites

12 hours ago, Caerfinon said:

After several maneuvers the maneuver node markers are not being removed, but are attached to or follow the active vessel. If no vessel is active then they attach to the planet in focus

Working on this.  Have it fixed, testing now

12 hours ago, Caerfinon said:

Unknown Asteroids and Comets from the server are revealed as discovered  in the client

Not much can be done about this.  Going to see if I can just hide the asteroids, but given the way this works, that's about the best that can be done

Link to comment
Share on other sites

New release, 1.0.0.2

  • Fixed maneuver node gizmos not being deleted on the client when maneuver is deleted 
  • Now hides all spaceobjects when in tracking station view
  • Disabled socket exceptions in server, thrown when client hasn't started yet.  This removes a lot of log spam
     
Edited by linuxgurugamer
Link to comment
Share on other sites

7 hours ago, linuxgurugamer said:

New release, 1.0.0.2

A most excellent improvement.  Well done sir. 

  • Log spam significantly reduced. 
  • Nice feature hiding the asteroids and comets
  • Maneuver nodes disappear when finished
  • MET times are much more in sync. 
  • Performance seems much smoother. 

 

Edited by Caerfinon
Link to comment
Share on other sites

1 hour ago, akyyy said:

Hello, thank you this mod. I've been waiting for this for a long time. :D

A question: What mean "you can delete all the parts EXCEPT for the following"

Delete all gamedata? Or only  GameData\Squad\Parts\*\ ?  

No, not all of GameData/  Talking about Squad parts, then Gameta\Squad\Parts\*   EXCEPT for those two directories specified in the OP:

  • GameData\Squad\Parts\Command\Mk1-3Pod\*
  • GameData\Squad\Parts\Prebuilt\*
Link to comment
Share on other sites

12 hours ago, akyyy said:

I may have found it:

If I delete the EnvironmentalVisualEnhancements folder, this mod works.

I think the problem is caused by two DLL files with the same name. (utils.dll)

That's very interesting, thanks.

and I'll change the name of the dlls later today

Link to comment
Share on other sites

New release, 1.0.0.3

  • Renamed all DLLs with the prefix "samv_" to avoid collisions with DLLs from other mods. (EVE had a dll called "utils.dll")
  • Updated build instructions
     

Thanks to user @akyyy for identifying the issue with the DLL names

 

CKAN should automatically delete the old DLLs and install the new ones.

If you are doing manual install, you MUST delete the entire samv_* directory in both the client and the server before installing the new one, otherwise you will get conflicting DLLs installed

Link to comment
Share on other sites

  • 1 month later...

Hey, this seems pretty useful for what I'm hoping to accomplish... I'm curious of the second screen has to be the map view? I assume it's just a fully usable KSP so it could be any view? I'm looking for a mod that would let me have views out different windows of the cockpit open on different monitors.

Also hoping for support for this in KSP2!

Link to comment
Share on other sites

  • 5 months later...

I really love the idea of this mod, but I've never been able to get it to work quite right. I tried adding this to my (1.12.5) RP-1 install (all mods installed on both instances, save the server/client versions of this mod) , and while it looked like it was working great at the space center, everything broke down any time I actually tried to pilot a vehicle. Never had any problems with the "server", but as soon as I took control of a vehicle the client jumped into a loading screen. The loading screen would never go away unless I pressed escape. For some reason that would make it actually go to the vessel's map screen. But it was terribly laggy: single digit fps and any clicking or moving the camera was on a multi-second delay. And I have a pretty beefy computer, I tested having two regular KSP instances (not using this mod) at once and didn't have a problem, so I know it's not just a matter of running out of ram or something. Despite the lag, the mission time for both instances always stayed in sync. Also, it never updated the orbit correctly: the little vessel icon was always at sea level. It would move around the surface to be under where the vessel really was, so that was kind of working, but it always said the vessel was landed and never showed an orbital line.

So, I tried with a fresh install, no other mods at all. New save, launch a vessel, and get an infinite loading screen in the client. Press escape, and it goes to the map view correctly, and with no lag! And I launched a vessel, and it actually showed the orbit lines and moved the icon up from sea level correctly. However, the orbital lines are always grey, so the client can't see/make/edit maneuver nodes at all. And that, unfortunately, is the most important part of the map view, IMO.

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