Jump to content

Stand Alone Map View - Multi monitor KSP [1.4.x][Plugin]


Unit327

Recommended Posts

Awesome. Words are not enough. This feature has been almost every KSP player's wish since KSP is KSP.

Apart from samv_server and samv_client folders, do the GameData of each instance need to be the same? I know I can choose to put or not to put visual enhancement mods in the client instance (and I chose to do it), but what about parts and gameplay plugins like Deadly Reentry and FAR? It's 6 AM here so my brain cannot really test anything correctly anymore, but I have had some error messages shown in the client when controlling ships with non-stock parts. As I want to use visual enhancement mods on the client for a beautiful map view, I'm trying to determine whether I can save some RAM on other mods.

Link to comment
Share on other sites

Speaking in my "official support" voice, yes, the folders have to be the same. There's so many mods out there it's hard to keep track and say what would and wouldn't cause problems.

That said, here's the skinny:

  • Any mods with parts are required, because the ships actually get loaded on the client.
  • If you want reduce the RAM usage of the client, feel free to replace the textures of those parts to nothing, because you won't see them anyway.
  • Some plugin only mods are necessary, some aren't.

Most plugin only mods won't be using a lot of RAM anyway. But if you really need to, plugin only mods should only be necessary on the client in the following circumstances:

  • The plugin adds stuff to the save file
  • The plugin changes the planets (e.g. Real solar system)

Stuff like FAR/KJR should be fine to leave out, as no physics happens in the stand alone map view. But just to reiterate, I'll only provide support and fix bugs that happen when both instances are exactly the same.

Link to comment
Share on other sites

Yes. This had no effect on the client. Also, I used fresh installs to make sure there were no conflicts with mods.

Hmmm. What OS are you using? Did you change the mod's connection settings from default? Can you post the logs of both the client and server to pastebin? Info on the location of log files here.

Link to comment
Share on other sites

I got it working, but there seems to be a bug you might want to look at.

I use Linux and the settings were default. The was a line in the server log

samv server Starting udp server, sending to ::0.0.0.1:26719

I changed the hostname to 127.0.0.1 on both instances, and it worked correctly. It was apparently resolving "localhost" to 0.0.0.1 instead of 127.0.0.1.

Link to comment
Share on other sites

That is odd. The mod just uses a standard nslookup, which on my machine (I run linux too) resolves to the ipv4 address. On yours it appears to resolve to the ipv6 address for localhost (::1). Theoretically that shouldn't cause any problems, unless the version of mono that ships with ksp doesn't like ipv6. I'll do some testing, but glad you got it working.

Link to comment
Share on other sites

Yes. Theoretically with a bit of port forwarding magic there's nothing stopping it from working over the internet too, but I haven't tested that.

The advantage to having it on the same computer is you can just move the mouse cursor to the other monitor, rather than juggling two mice and two keyboards.

Link to comment
Share on other sites

  • 3 weeks later...

Hey,

Can anyone direct me to instructions on how to get this working on two computers over a LAN network?

I have no problem getting it going when I run the server and client on the same computer. But I cannot get it to work over a LAN connection.

Both computers are running the same version of KSP, one with the client and one with the server data files. To make certain they were identical installs, I even copied all the files from one computer to the other.

I have the most recent version of KSP and this mod.

I even tried disabling both computer firewalls and that didn't work.

All I have done, is made sure both computers have installs of KSP that are the same, and one has the server files and the other has the client files. Is there something else I have to do to get it to work over the LAN?

I have run out of things to try. Are there any alterations I need to make to files to get the server to run over the network? Do I need to tell the client what IP and port to connect to? And where would I be able to input those changes?

Are there options I need to change in my router?

Any help would be greatly appreciated.

Link to comment
Share on other sites

Do I need to tell the client what IP and port to connect to? And where would I be able to input those changes?

Yes. You set can set the hostname/ip and port on the main menu screen of KSP. Click the icon in the "samv" window.

Link to comment
Share on other sites

Yes. You set can set the hostname/ip and port on the main menu screen of KSP. Click the icon in the "samv" window.

Okay, thank you I was pretty sure I had to do something like that. But this still leaves me with a problem.

I don't see any icon or a samv window. On the client KSP main screen, play game is replaced by "server synch" and I see a little grey box in the upper left corner of both KSP installs but cannot click it. Is the little grey box supposed to be a menu I can interact with?

Where is the window supposed to appear. Or do I have to do something to bring the window up?

And also thank you so much for your quick response.

Link to comment
Share on other sites

That little grey box is the window, but there should be an icon in it. If it is empty it could be an installation problem. Does "icon.png" exist in the samv_client and samv_server directories? If it is missing then that is the problem. If not, then I'll probably need the logged output from the game to see what is going on.

As a work around until we figure it out you could manually create the configuration files. The server one goes under the "saves" directory and is called "samv_server.cfg". Set its contents to:

{
Enabled = True
Client = localhost
ClientPort = 26719
ListenPort = 26718
}

Change the client to the hostname/ip of the other machine if necessary. The client one is pretty similar, it also lives under the "saves" directory and is called "samv_client.cfg". Set its contents to:

samv_client
{
Server = localhost
ServerPort = 26718
RecievePort = 26719
StartAutomatically = False
}

Again change the server to the hostname/ip of the other machine.

Link to comment
Share on other sites

Ah, thank you.

Turns out, I copied the files directly into the game data folder, rather than copying the "server" and "client" folders. I have no idea why I did that. I have fixed it, and now I can access the window. Thanks.

It is now working, almost. It syncs the game, and the vessels. But only as inactive vessels though. I seem to have a second problem. The client does not seem to want to leave the tracking station view and go into the active vessel map view. Flying a ship on my server game, the client is still in tracking station view. And it only updates the ship I'm flying occasionally and as an inactive vessel. Is it supposed to switch automatically? Or do I have to click something in the client? I've tried clicking the fly button and double clicking on the vessel, but that just loads the client back into the tracking station view.

Again, any help you can give will be appreciated.

Link to comment
Share on other sites

Stand alone map view uses two connections:

  1. A tcp connection for transferring the save file
  2. A udp connection for updating the state of the current vessel

It appears as if #1 is working but #2 is not (log files would be informative here). When the udp connection is working, the map view switches into flight mode automatically. At a first guess the settings for the udp connection to the other machine aren't correct, what do you have them set to?

Link to comment
Share on other sites

These are the settings I used.

Server computer;

Client ip/hostname: My client computer's IPv4 address

Client udp port: 26719

Tcp listen port: 26718

Client computer;

Server ip/hostname: My server computer's IPv4 address

Server tcp port: 26718

Udp receiving port: 26719

I left everything except the IP address as the default. Now, my client computer is using one of those cheap Usb wireless adapters, in case that could be the problem.

Okay, I have log files from both computers. The file from the "KSP_Data" folder called "output_log" right?

Now, it appears I am not allowed to post attachments yet. So, what is the easiest way for me to get them to you?

Sorry, I am pretty hopeless with computers. I can just about manage to play KSP and download mods. That's about all I know. Also, I'm brand new to this site.

Thanks for taking the time to help me.

Link to comment
Share on other sites

Server

http://pastebin.com/rVmJj0Ec

Client

http://pastebin.com/v2BBZWCt

I had to trim the server file. It was filled with 500 kb of this;

HandleD3DDeviceLost

HandleD3DDeviceLost: still lost

Skipped frame because GfxDevice is in invalid state (device lost)

(Filename: Line: 1650)

That wouldn't be the problem, would it? Anyway, I had to cut it to make the log fit into pastebin. Hopefully I didn't also cut anything useful by accident.

Link to comment
Share on other sites

There was nothing obvious in the logs and I haven't been able to replicate the problem on my machines/network. Perhaps it is a firewall blocking things? You could also try without other mods installed just in case there is an incompatibility (I noticed telemachus in the logs). That's probably unlikely though.

In the next release I'll put more logging messages in there which should help diagnose these kinds of problems, but there's not a lot else I can do right now, sorry.

Link to comment
Share on other sites

Well, thanks for trying. Don't worry about it. I'll tinker around with it and see if I can't fix the problem. I've tried it without firewalls. It could probably be my router that's the issue. I had a hell of a time trying to get it to work with multicast and things like that. I'll see if I can't try connecting the computers in a different way.

I'm pretty sure telemachus is the only thing I've got installed.

Link to comment
Share on other sites

Hey, good news. I figured out the problem. (Sort of)

I took my wireless router out of the equation with an 80' crossover cable. That I have for some reason. Then it worked. So my router was the problem, somehow.

Thanks again for helping me with the first problem I had.

Link to comment
Share on other sites

Does anyone how to properly run two copies of KSP on a Mac? I've got one 1440p display, and two 1080p displays. I run KSP on the 1440p. Only problem is that I have issues with running two instances in full screen. The problem is, I can't get the second copy of KSP to run correctly in full screen on either of my 1080p displays. When I go into fullscreen mode on another monitor, it scales up to the size of 1440p regardless of my set resolution.

Additionally - I really wish KSP didn't use the mac native fullscreen. It would be better if it just made itself fullscreen on its own.

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