Jump to content

KMP v0.1.5.1 [0.23] [alpha] [inactive]


TehGimp666

Recommended Posts

@fridgeofcanada: That currently gets written off a KSP bug but I think there may be some way to prevent it from happening. If anyone knows how to reproduce it exactly, 100% of the time or explain the fix the persistent.sfs file it might be worth jumping on IRC. You can't edit the persistent.sfs file with KMP, but we might be able to detect and fix it before sending it to the server.

I remember something about how decouplers could come into play, but I don't think that was a 100% reliable fix. I've also seen that the broken docking port can actually switch vessels depending on how you docked, and it's only when both are unable to undock that the real problem occurs.

Thanks for the reply. I've read around a fair bit about this and the general consensus is that the docking bug has been fixed in 0.23 and I would tend to agree since there is no problem when I do it in a single player sandbox. It seems that KMP somewhow "brings it back" though. As I mentioned in the post I linked I have tried editing the persistent.sfs file that I have on my computer, but the problem seems different. By different I mean the lines in the file that were supposed to be messed up seem okay. And also I see what you mean, by editing it I wouldn't change anything because the server would still have it messed up, but what I tried to do was play the "local" KMP save file after editing without connecting to the server to see if it was any different, but it wasn't.

Link to comment
Share on other sites

Hi guys,

Newly registered here, but love the community, love the game, and love the mod here. Excellent all around, I hope to become more active and learn a few things from everyone.

What prompted me to finally register was a question about the mod in particular. Is there any way to edit the .db files reliably? I have done some quick attempts with Notepad++ and SQLite browser to change some names around (a flag name was misspelled, and though I could just remove it and place a new one, I figured I'd go the geeky route) and found that the GUIDs of everything are all sorts of messed up. The tables and schema are visible in plaintext, but try to alter the data and you have a lot of uh... non-ASCII characters, so to speak. :) Any attempt to modify anything resulted in a failure to start up the server, asking me to make the DB was valid or just start a new one.

So hopefully the question isn't considered too off-topic, but how do you go in and modify values in the KMP db? Thanks in advance!

Link to comment
Share on other sites

@kidSwift: Unfortunately, not really. Vessels are stored as serialized objects, which can most likely only be modified by a program that both depends on kerbal multiplayer and the 3 KSP files (Assembly[-firstpass] and UnityEngine). Vessels in the database have both a server ID, and the normal in-game ID, they don't match up...

The most requested change is probably the ability to delete vessels by name matching, but gimp is working on a database change that affects that too, so that may not happen for 0.1.6. If you have any other suggestions, they are worth mentioning :)

@Everyone:

I've added my custom branch to the dev server while gimp is away. The modcontrol thing is kind of an important change, and the next installment of Jo's rover testing should be quite interesting with this version.

Link to comment
Share on other sites

I'd personally like to see a tool that can take a single player save and convert it into a server db. Useful for when you want to build a 'scenario' and then make it public for people to play.

Also, I'd some optimisation of the '/' server commands would be nice. At the moment they are quite awkward to use (/listships could be /ls) and there isn't any autocomplete or shortcuts (i.e. you could type /lists, /listsh, /listshi etc for /listships, but not /list because it's ambiguous due to /listclients).

I have quite a few more ideas but I guess if I start thinking about it too much I should rather do a clone and start coding :-)

Link to comment
Share on other sites

Just just tried this out on a fresh separate install of KSP :) I was mostly impressed with KMP, it seems to hold a lot of promise, but is it being worked on anymore? It seems quite buggy still, granted I understand this is a buggy mod to start with lol. I was building away just fine and went to launch and it locked up. I did read the disclaimer, Im just wondering if its going to be improved ever. :)

Link to comment
Share on other sites

Just just tried this out on a fresh separate install of KSP :) I was mostly impressed with KMP, it seems to hold a lot of promise, but is it being worked on anymore? It seems quite buggy still, granted I understand this is a buggy mod to start with lol. I was building away just fine and went to launch and it locked up. I did read the disclaimer, Im just wondering if its going to be improved ever. :)

KMP is in constant development, and your post sounds to me like you're thinking your experience is the norm. It isn't. I've used KMP for a couple of weeks without experiencing anything like that.

Link to comment
Share on other sites

@Rassa Farlander: KMP may be held together with thumbtacks and elmers glue, but it's always improving. The current git log is a little quiet because gimp's going to be away for a week, but that hasn't stopped me from working on it. :)

As I've said a few times, I'm maintaining a custom branch with the builds (and changelog) being hosted on my build server because of the rather important fixes to ChronicSilence's mod control change, among other things.

But while KMP has it's share of bugs (The docking one is quite annoying), it still should be relatively playable.

There might be more to that lock up then you think though, If you go into the single player KMP save and do the same thing and it's taking a different amount of time, then I'd say that's a bug. If that's the case, I'll dig into it after I tackle some more important ones.

@Coda: You'll definitely hit a bug while playing KMP, there are currently 45 bugs open on the tracker, some are big, some are small...

Link to comment
Share on other sites


My Previous KMP Tests:


Godarklight has been hard at work fixing various issues and while gimp is away is maintaining his own Dev branch (which can be found as always on his build server).

This Test was run using the latest Dev Build, and godarklight's dark-feb-21 branch.

Setup

  • Server was configured Similar to previous attempts (default except 1750m bubble).
  • Everything is running on the same machine, two clients, the top-left is called 'Johannes_1', bottom-right 'Johannes_2'. I will be refering to them as client_1 and client_2.

Video (please watch in full 1080p)

Note: Unfortunately I did not have time to edit this video, but a detailed analysis with timestamps can be found below

Quick Summary

  1. [FIXED] Issue 692, which caused clients to not be able to see one another when coming out of the bubble seems to be fixed! vessels now appear instantly.
  2. [NEW] However when a vehicle is first synced to a client, for the first 3 seconds or so the client will only see the vessel at its original spawn point, and every few frames will see the vessel flicker to where it should actually be, like the server's updates are only applied for a single frame and then reverted. This tends to fix itself after 3-4 seconds.
  3. [FIXED] Issue 646, where structural changes on a ship would not sync every 45 seconds as they are supposed to. This seems to be fixed, as changes such as the parachutes activating and solar panels opening seemed to take at most 45 seconds to sync to the other client. This long wait is still far from ideal, but it's a good first step.
  4. [NEW-ish] Kerbals seem to take very long to sync, or at least take upwards of 15 seconds to appear on the ladder after EVA-ing. Kerbals appear as new vessels on the server list a second or so after they EVA, so it seems to be a problem with the other clients receiving/displaying them.
  5. [Known] While vehicles movement appears much smoother thanks to their velocity being applied between the 1/3 second ticks, Kerbals still only have their position/rotation synced, and so will appear much more jittery than their vehicles.
  6. [New(?)] This may have been a one-off, but in one case, where kerbal sync delay was also involved, It took way more than 45 seconds for something to sync: when client_2 saw Jeb_1 appear he flipped Rover_1, which remained flipped for over a minute, and only synced when client_1 made Jeb_1 enter Rover_1 again.
  7. [New] On seemingly random occasions the client's camera will reset. When this happens it seems that every aspect of the client's vessel is overwritten with what the server has saved. so for example, a moving rover with its breaks off will have its velocity set to 0 and breaks re-enabled when this camera reset happens.
  8. [New] Both times I tried testing this build, one of my clients ended up hard-crashing right around when I was getting in/out of EVA. Maybe just coincidence, but the log in the download below is for the client that crashed which had -kmpdebug enabled, so there might be some info there.

Video Analysis (bold timestamps indicate a possible issue)

00:43 - both clients spawn in their rovers

01:01 - Rover_1 leaves the bubble and instantly appears on client_2's screen. nice!

01:02
- For the next ~4 seconds, client_1's sees Rover_1 stationary at the point where it originally synced in (at the edge of the bubble), and Rover_1 appears to flicker to its true location for one frame at a time (probably whenever client_1 receives an update from the server)

01:06 - the flickering stops and client_2 correctly sees Rover_1's position.

01:25 - client_2 proceeds to drive Rover_2 to the bubble's edge.

01:37
- the exact moment Rover_2 is synced two things happen:

  1. client_1's camera is reset. Notice how before this happened, Rover_1's breaks were on. After the camera change they turned off, almost as if the update reset everything.

  2. client_2 sees Rover_2 rocket off at high velocity, resetting several times until coming to rest at it's actual location (with some broken wheels)

01:42
- client_2 suddenly also has their camera reset. Some things to note:

  1. The split second before the camera reset, client_2 sees another copy of itself intersect it

  2. Right when the camera resets, client_2 sees its position switch from "Rover_2 Prelaunch at Kerbin" to "Preparing/launching from KSC" and then to "Rover_2 Landed at Kerbin".

  3. Before the reset Rover_2 was moving at ~10m/s. During the split second after the camera switch its speed says 174m/s and then 0m/s, so the velocity got reset to 0.

01:44
- after its reset, client_2 now no longer sees Rover_1, and client_1 no longer sees Rover 2.

01:54
- both clients see the other's Rover again, but for a split second client_1 sees Rover 2 on the ramp, on the edge of the bubble where it first initially appeared.

01:58
- client_2's camera is reset yet again, and a fraction of a second later client_1 sees Rover_2 flicker several times

02:18 - client_2 raises Rover_2's solar panel to test if the 45 second sync is working now.

02:22
- client_1 sees Rover_2 flicker from it's stationary position to its 'true' position several times before it syncs correctly

02:36 - Testing if client_2 can see when client_1 turns Rover_1's wheels. It can, and the sync is basically instant!

02:50 - client_1 opens Rover_1's solar panel and parachute (I forget that after activating parachutes appear closed until you move a little to trigger them, my bad)

03:06 - client_1 sees Rover_2's solar panel sync, so the 45 second resync seems to be working.

03:17 - client_2 sees Rover_1's solar panel sync

03:28 - And I finally remember that to appear open a parachute needs to trigger, so I start moving Rover_2 and behold, the parachutes weren't stuck.

04:08 - I decide to EVA client_2's Jebediah (we'll call him Jeb_2).

04:12
- we see a new vessel was added to the universe, so Jeb_2 should sync and appear to client_1. however it takes another 13 seconds (04:25) for him to sync

04:25
- having now appeared for client_1, Jeb_2 seems to go through the same 'syncing' process as Rover_1 did at 01:02 - he remains stationary and flickers to his actual location several times before starting to sync correctly a few seconds later.

04:29
- as Jeb_2 walks it becomes clear that the kerbal's velocity is not being synced, and he only jumps to his current position every 1/3 of a second when the server sends an update. This looks pretty bad compared to how nice and relatively smooth the Rover movement looks now.

04:44 - Jeb_2 tries to grab Rover_1's ladder (with the hopes of testing if he can enter) right as we experience a huge lag spike, which seems to be because the server backed up the Universe Database right at that second

04:53
- After Jeb_2 gets stuck under Rover_1, client_1's camera resets yet again.

05:35 - Jeb_2 tries to climb the ladder again, and fails. He blames bad Rover design for forcing him to have to use his jetpack to jump.

05:40 - Success! Jeb_2 manages to hold onto Rover_1's ladder. Attempting to board shows us that the module is full, which is as it should be since Jeb_1 is still inside it.

05:51 - Satisfied, we attempt to EVA Jeb_1

5:53
- Similar to Jeb_2 at 04:25, Jeb_1 stands on the ladder and does not appear on client_2's screen for several seconds

06:07
- When Jeb_1 appears on client_2 he is lying under the rover, causing the physics solver to throw Rover_1 into the air and onto its side

06:32 - Jeb_1 and Jeb_2 stand in awe for a few seconds, surprised that actually nothing broke, but client_1 is still seeing an upright Rover_1, while client_2 sees Rover_1 on its side.

06:38
- Jeb_2 decides to investigate the capsized Rover. client_2 sees Jeb_1 colliding with the still-standing Rover, causing it to jump once and break a wheel

06:57 - Jeb_1 goes to fix his Rover's Wheel. He then jumps on the ladder and boards it.

07:11 - over a minute after the rover flipped at 06:07, Rover_1 suddenly appears upright again on client_2's screen.

07:20
- we EVA Jeb_1 again, and a moment later client_2 shows a completely black screen, and hard-crashes a few seconds later.

Downloads

  • Rover Craft Files: link
  • Log Files: link (Player.log as well as crash.txt correspond to the left client that crashes at the end of the video)

Edited by JohannesMP
Link to comment
Share on other sites

This may have been asked, I did not find it with the search function. What is the syntax of the mysqlconnstring?

The standard MySQL connection string syntax should work: https://www.connectionstrings.com/mysql/

As an example, here is the string that I use to connect the KMP server to mysql running locally on the same machine:

mySQLConnString=Server=127.0.0.1;Port=8889;Database=KMP;Uid=kmp_admin;Pwd=kmp123;Pooling=true;

The only thing I did was add a new KMP Database, and create a new mysql user account - kmp_admin - which for extra security has local access privileges to that Database alone. In general I would strongly advise against setting this up with your root user.

Edited by JohannesMP
Link to comment
Share on other sites

@Tux-box1: That's actually a really good question and an issue we should address, seeing as how connection strings are in a pretty horrible format.

The problem with using MySQL at the moment is that it's too slow, unless you convert your tables to MyISAM after they get created using "ALTER TABLE". 0.1.5.1 had some fairly bad SQL queries too which have been fixed in the development version or my custom version, dark-feb-21).

dark-feb-21 doesn't contain the mysql change as gimp wants to automatically convert the databases, and he has a few database format changes coming. (KMP auto-upgrades the database, so you wont lose your universe).

@Everyone: After some confusion, I've recently discovered it's february still.

Also, I've updated KMPModClient (the program that syncs GameData for you so you can connect to modded servers) to handle dark-feb-21.

It's very important to understand how it works, so please read the short readme before using it. This is important.

It's a very good idea to try this with a seperate KSP install first, to make sure it works for you, and for the following 2 reasons:

KMPModClient is highly experimental. It also deletes things from GameData.

Link to comment
Share on other sites

It's actually a standard thing for mysql, not KMP-specific, so a quick google search finds you the syntax: https://www.connectionstrings.com/mysql/

As an example, here is the string that I use to connect the KMP server to mysql running locally on the same machine:

mySQLConnString=Server=127.0.0.1;Port=8889;Database=KMP;Uid=kmp_admin;Pwd=kmp123;Pooling=true;

The only thing I did was add a new KMP Database, and create a new mysql user account - kmp_admin - which for extra security has local access privileges to that Database alone. In general I would strongly advise against setting this up with your root user.

Thank you for your reply, but that is exactly what I tried; with different details.

I typed the following into the KMP server console.

/set mySQLConnString=Server=127.0.0.1;Port=3306;Database=KSP;Uid=KSP;Pwd=KSP;Pooling=true;

I got the following

[Info] : Command Input: /set mySQLConnString=Server=127.0.0.1;Port=3306;Database=KSP;Uid=KSP;Pwd=KSP;Pooling=true;
[Info] : Invalid usage. Usage is /set [key] [value]

So naturally I thought I had the syntax wrong, or had things in the wrong order.

Link to comment
Share on other sites

@Tux-box1, Jo copied that line out of KMPServerConfig.txt, which is actually where I entered in mine as well (no history in the KMPServer command line is slightly annoying too).

To set it, you type it like this (there's a space between the setting name and the value):

/set mySQLConnString Server=127.0.0.1;Port=3306;Database=KSP;Uid=KSP;Pwd=KSP;Pooling=true;

Link to comment
Share on other sites

Edit: godarklight beat me to it :P

@Tux-box1 ah yeah, I gave you the line as it is stored in the config file. if you want to set it via the commandline you need to use the correct format for the command:

/set mySQLConnString Server=127.0.0.1;Port=3306;Database=KSP;Uid=KSP;Pwd=KSP;Pooling=true;

should do it

Link to comment
Share on other sites

I did also try the following code.

 /set mysqlconnstring server=127.0.0.1;port=3306;database=KSP;uid=KSP;pwd=KSP;pooling=true;

that resulted in the following output

[Info] : No key found for mysqlconnstring server=127.0.0.1;port=3306;database=KSP;uid=KSP;pwd=KSP;pooling=true;

So I tried again using case

mySQLConnString Server=127.0.0.1;Port=3306;Database=KSP;Uid=KSP;Pwd=KSP;Pooling=true;

This time it worked.

It would be nice to know things like "case sensitivity is required" maybe it can be added to the readme?

Link to comment
Share on other sites

Because updating KMP can be annoying when using the development versions, and not everyone wants to install cygwin to install rsync, I've created yet another KMP utility :)

KMPUpdater - A command line program that efficiently updates (and can actually install) KerbalMultiPlayer for you.

The program takes no options, you just put it right next to KSP.exe or KMPServer.exe and it will figure out wether it has to download the server files or the client files.

It also supports multiple versions.

Because command line options can be lame, and because I don't want to scatter config files all over the KSP directory, It looks at its own filename to figure out which version it should be downloading.

KMPUpdater.exe - Defaults to the release version

KMPUpdater-release.exe - Updates to gimp's last tagged release, the "release version".

KMPUpdater-development.exe - Updates to gimp's master branch, the "development version".

KMPUpdater-dark.exe - Updates to my version, which is "dark-feb-21". This version will be deleted when gimp gets back and everything is merged, but my program will warn when this happens.

Internally it uses sha256sum indexing, so it only downloads the files it needs. The updater url is currently hard-coded at the moment, but for those interested you can see how it works quite quickly.

I've also brang KMPChatClient back to life, so KMPChatClient, KMPModClient, and KMPUpdater are all available on my build server in my sig - Look at the second last blue box :).

Link to comment
Share on other sites

... It would be nice to know things like "case sensitivity is required" maybe it can be added to the readme?

Really, it should be in large friendly letters all over the place, because it's fundamental within Unity (the engine that KSP is built upon) and lack of attention to this detail is a cause of many, many problems with addons when it's forgotten by either addon programmers or users.

Link to comment
Share on other sites

Really, it should be in large friendly letters all over the place, because it's fundamental within Unity (the engine that KSP is built upon) and lack of attention to this detail is a cause of many, many problems with addons when it's forgotten by either addon programmers or users.

While I agree that it might be helpful, there's only so much info that you can put in a readme/opening post/server output before it becomes too bloated and people will ignore it all-together.

It's not even fundamental to Unity; Basically every modern computer language is case sensitive, from Java to Python, XML, C and of course C# which Unity and KSP are built on. It's a simple mistake to make, but also one that is easy to figure out when you look at how the server output capitalizes the commands when it lists them on startup. Not to mention In both mine and godarklight's example code it was capitalized as well, so chances are if someone (not picking on Tux-box1 here specifically) missed it there, after we even provided correct code that could have just been copy/pasted, then adding it to a readme probably wouldn't help much either, regardless of how big we make the letters.

Also just to be clear I'm not trying to put Tux-box1 on the spot here, goodness knows I've made many far more embarrassing mistakes before :D My point is that you can't catch every silly mistake people might make and sometimes it's better to only include the most critically important information, and then help potential issues on a case-by-case basis. That's what these forums are for after all :)

Edited by JohannesMP
Link to comment
Share on other sites

@Tux-box1: Honestly the case sensitivity is slightly annoying because some settings are PascalCase, and some are camelCase, and there are some lowercase ones.

@Roxette: I've taken the opposite approach, KMP may be built on Unity but Unity is built on C#. C# has a ToLowerInvariant function that I'm using for case insensitivity matching.

@Jo: The original post and readme are quite a read and as much as it needs to be cleaned up, I've been focusing on the rest of the vessel bugs in your video.

The next update to the dark branch will contain the case insensitive matching on the server keys (which is completed already), and the vessel flickering on load one (Which I have to figure out still).

KMPModClient had a bug where it wouldn't copy folders across on blacklist servers (the default), There's an updated version available on my build server.

I'll edit this post when I push the dark branch.

Link to comment
Share on other sites

Hi, I've just downloaded KMP and I have a problem where I keep getting timed out (sync timeout).

When I join my server it says that I've connected like I should but then instantly says "Lost connection with server" and "Synchronizing universe, please wait". Then after it has tried to synchronize for a while it says "You have been disconected. Please return to the main menu to reconect. Sync timeout". When I then return to the main menu it says "Disconected: Sync timeout" and when I try to reconect it says "Disconected".

Error Message:

[17:21:58] [Error] : Unexpected exception encountered! Crash report written to log file

[17:21:58] [Error] : System.MissingMethodException: Metoden hittades inte: ConfigNode KMP.KMPVesselUpdate.getProtoVesselNode().

vid KMPServer.Server.hostingLoop()

vid KMPServer.ServerMain.hostServer(ConfigStore settings)

[17:21:58] [Error] : Stacktrace:

[17:21:58] [Error] : vid KMPServer.Server.sendPluginUpdateToAll(Byte[] data, Boolean secondaryUpdate, Client cl)

vid KMPServer.Server.handleMessage(Client cl, ClientMessageID id, Byte[] data)

vid KMPServer.Server.handleConnections()

Metoden hittades inte = Method not found (Swedish)

Link to comment
Share on other sites

I've been trying to get a server running, and when I try, it says this:

[11:25:49] [Error] :Error starting http server: System.Net.HttpListenerException (0x80004005): Access is denied

at System.Net.HttpListener.AddAllPrefixes()

at System.Net.HttpListener.Start()

at KMPServer.Server.startHttpServer()

[11:25:49] [Error] : Please try running the server as an administrator

Link to comment
Share on other sites

I've been trying to get a server running, and when I try, it says this:

[11:25:49] [Error] :Error starting http server: System.Net.HttpListenerException (0x80004005): Access is denied

at System.Net.HttpListener.AddAllPrefixes()

at System.Net.HttpListener.Start()

at KMPServer.Server.startHttpServer()

[11:25:49] [Error] : Please try running the server as an administrator

Tried running it as an administrator? :P

That acctually got mine going, however I still got my problem.

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