Jump to content

DarkMultiPlayer 0.3.8.0 [KSP 1.12.0]


godarklight

Recommended Posts

I've been lurking on around this thread for a few months now, and I want to ask a few questions.

How capable is this mod?

I don't think I want to look through 486 posts in this thread, so I'll ask a question.

Specifically in a few questions.

1. How does this mod work with Science/Career mode?

I did some minor testing, and funds, rep, and science counts didn't synchronize between games.

2. How does this mod work with data that other mods transfer? Like, say one player attached something in KAS, how would the server and the other player handle that?

Well okay, the minor testing asked most of my questions.

Link to comment
Share on other sites

@Preliator: To appear on the server list, the HTTP status port must be enabled and reachable (if you're behind a router, you need to port forward).

By default it is off, you can enable it by opening DMPServerSettings.txt and changing: "httpport,0" to "httpport,8081"

Thanks. It work!

Other question :P

It can be usable the RSS? I searched a bit but I don't find anything.

Link to comment
Share on other sites

@KerbinUser: IRC is basically old-school chatroom technology (It's actually one year older than I am!), but it's convenient.

I've had a look through those log files - DMP is installed in the correct location and that was the first install (It backed up the player token and servers.xml under saves/DarkMultiPlayer/), but you didn't actually start a DMP session :P. Also, it looks like 'protractor' mod chucked a hissy fit and then the UI started bugging out in that case.

You're pretty much spot on with the actual errors, Protocol mismatch means version mismatch (I've been tempted to rename that for a while although that's not exactly true, it would make more sense), Unhandled error while syncing is a general error that could be caused by anything (Eg, using 0.1.4.2 on 0.24.x). Failed to connect / Remote host rejected connection are server portforward/firewall problems, and Aborted by software in your host machine means there's a crazy client-side firewall that has incorrectly terminated the connection.

@Woutch: You need to enable the HTTP server in DMPServerSettings.txt - I've changed the entry to 8081 in the database. The DMPServer list gets all the info it needs from the http status port, including the game port :)

That error is the scraper failing to contact your server, which is why it's not showing as online.

@Vanguard-01: This is actually an easy one, On linux you can have pretty much any character you like in a file name, but on windows there are certain restrictions - For example, a ':' in the playername would cause that error (Hinted at by: System.ArgumentException: Illegal characters in path) :)

@Cooly568: It works with science/career - Although there's been reports of missing science again, and KAS is definitely bugged, but most other part adding mods or gameplay mods should work fine (Kethane, MJ, B9, FAR, DE all should work fine). KAS has troubles with the way it connects vessels together - I haven't played with KAS personally yet though.

@aftokinito: KerbTown shouldn't really be affecting DMP, DMP is only concerned with vessels/kerbals/scenario modules (science/kethane/other mod data etc).

Link to comment
Share on other sites

@godarklight

I chenged the port to 8081 and it looks that your scraper is polling the server, but its failing to answer the request with the following error.

[16:13:37][ERROR] : Exception while listening to HTTP server!, Exception:

System.NullReferenceException: Object reference not set to an instance of an object

at DarkMultiPlayerServer.DMPPluginHandler.CurrentDomain_AssemblyResolve (System.Object sender, System.ResolveEventArgs args) [0x00000] in <filename unknown>:0

at System.AppDomain.DoAssemblyResolve (System.String name, Boolean refonly) [0x00000] in <filename unknown>:0

at DarkMultiPlayerServer.Server.asyncHTTPCallback (IAsyncResult result) [0x00000] in <filename unknown>:0

[16:14:34][ERROR] : Exception while listening to HTTP server!, Exception:

System.NullReferenceException: Object reference not set to an instance of an object

at DarkMultiPlayerServer.DMPPluginHandler.CurrentDomain_AssemblyResolve (System.Object sender, System.ResolveEventArgs args) [0x00000] in <filename unknown>:0

at System.AppDomain.DoAssemblyResolve (System.String name, Boolean refonly) [0x00000] in <filename unknown>:0

at DarkMultiPlayerServer.Server.asyncHTTPCallback (IAsyncResult result) [0x00000] in <filename unknown>:0

Any Idea? :-)

Thanks and keep up the good work!

Link to comment
Share on other sites

Hey! Brilliant mod! I am absolutely stunned by the quality for this multiplayer, it's amazing! Me and several friends have jointly built a very considerable space station and we're heading to the Mun next! However, I was wondering about a couple sync issues. When, for example, we try and group a couple landers near each other, on occasion one client (even while time synced) will be missing some landers. So I was wondering if there is some way or some plan to add the feature, to have the connected worlds sync up world data with the host, probably by means of some save editing script or something (not that I understand anything to do with code)?

Again, thanks for the amazing mod!

Link to comment
Share on other sites

@godarklight will you link me to a place to get IRC? Also yes, they didn't try to start a DMP session because they seen their saves were corrupted and wanted to remove DMP right away to be able to play their saved games(again its my friends that have this issue not me, my DPM works just fine).

Should I have him start a DMP session to see if his saved games work after that?

Should I have him remove the "protractor" mod to see if that fixes the issue?

Link to comment
Share on other sites

Regardless of the plugins and how I set "DMPModControl", I always get the following error:

[09:05:10][FATAL] : Error in main server thread, Exception: System.IO.FileLoadException: Could not load file or assembly 'UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Invalid pointer (Exception from HRESULT: 0x80004003 (E_POINTER))

File name: 'UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' ---> System.NullReferenceException: Object reference not set to an instance of an object.

at DarkMultiPlayerServer.DMPPluginHandler.CurrentDomain_AssemblyResolve(Object sender, ResolveEventArgs args)

at System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName)

at System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly assembly, ObjectHandleOnStack retTypes)

at System.Reflection.RuntimeAssembly.GetExportedTypes()

at DarkMultiPlayerServer.DMPPluginHandler.LoadPlugins()

at DarkMultiPlayerServer.Server.Main()

If I have no plugins at all, everything works fine.

Am I screwing something simple up?

Thanks~

Link to comment
Share on other sites

Strange error when i do the command

[23:01:40]/opt/mono/bin/mono /root/DMPServer/DMPServer.exe
[23:01:39][DEBUG] : Loading plugins!
[23:01:39][DEBUG] : Done!
[23:01:39][INFO] : Starting DMPServer v0.1.5.0, protocol 25
[23:01:39][INFO] : Loading universe...
[23:01:39][INFO] : Done!
[23:01:39][INFO] : Loading settings...
[23:01:40][DEBUG] : address: 0.0.0.0
[23:01:40][DEBUG] : port: 6702
[23:01:40][DEBUG] : warpMode: 4
[23:01:40][DEBUG] : gameMode: 0
[23:01:40][DEBUG] : whitelisted: 0
[23:01:40][DEBUG] : modControl: 2
[23:01:40][DEBUG] : keepTickingWhileOffline: 1
[23:01:40][DEBUG] : sendPlayerToLatestSubspace: 1
[23:01:40][DEBUG] : useUTCTimeInLog: 0
[23:01:40][FATAL] : Error in main server thread, Exception: System.Net.Sockets.SocketException: Address already in use
at System.Net.Sockets.Socket.Bind (System.Net.EndPoint local_end) [0x00000] in <filename unknown>:0
at System.Net.EndPointListener..ctor (System.Net.IPAddress addr, Int32 port, Boolean secure) [0x00000] in <filename unknown>:0
at System.Net.EndPointManager.GetEPListener (System.Net.IPAddress addr, Int32 port, System.Net.HttpListener listener, Boolean secure) [0x00000] in <filename unknown>:0
at System.Net.EndPointManager.AddPrefixInternal (System.String p, System.Net.HttpListener listener) [0x00000] in <filename unknown>:0
at System.Net.EndPointManager.AddListener (System.Net.HttpListener listener) [0x00000] in <filename unknown>:0

Unhandled Exception: System.Net.Sockets.SocketException: Address already in use
at System.Net.Sockets.Socket.Bind (System.Net.EndPoint local_end) [0x00000] in <filename unknown>:0
at System.Net.EndPointListener..ctor (System.Net.IPAddress addr, Int32 port, Boolean secure) [0x00000] in <filename unknown>:0
at System.Net.EndPointManager.GetEPListener (System.Net.IPAddress addr, Int32 port, System.Net.HttpListener listener, Boolean secure) [0x00000] in <filename unknown>:0
at System.Net.EndPointManager.AddPrefixInternal (System.String p, System.Net.HttpListener listener) [0x00000] in <filename unknown>:0
at System.Net.EndPointManager.AddListener (System.Net.HttpListener listener) [0x00000] in <filename unknown>:0


Edit: the whitelist for allowed nickname is a bit useless (a stranger can see the nickname in serverlist and use it). It is possible to change it to IP?

Edited by Preliator
Link to comment
Share on other sites

@Cooly568: It works with science/career - Although there's been reports of missing science again, and KAS is definitely bugged, but most other part adding mods or gameplay mods should work fine (Kethane, MJ, B9, FAR, DE all should work fine). KAS has troubles with the way it connects vessels together - I haven't played with KAS personally yet though.

From my little experimentation, funds, rep, and science didn't transfer between games, like if a person launched a pod and took up 600 funds, the other person would still have 10000 funds in their game, even after reloading the entire game.

Same thing with the tech tree, say one player researched the first node, the seconds player wouldn't have the node unlocked even after a reload.

Link to comment
Share on other sites

@Woutch - If you're using linux or mac, Is it possible mono-complete (or equivalent) isn't installed?, The only other thing I can think of is an ancient version of mono is installed (DMPServer requires some .NET 4 features). "mono --version" should tell you which version you have installed, That's certainly an odd error though...

@Rovertoo: Glad you're enjoying it, but DMP certainly has some weirdness around :P. The first thing that comes to mind is one of those unsolveable timey-whimey issues - DMP uses lat/long/alt positioning below 10km, which can show them in an incorrect spot for your timeframe, but a correct spot in their time frame because that's where they actually are.

Over 10km, DMP uses the orbital parameters to do positioning, which show them in the correct spot in your timeframe (wound back or forwards long the orbital rails), but the incorrect spot in their timeframe. This is the situation where you will see people fastly spinning around their rails while doing burns from the past, or when they appear to crash into a planet and spawn back.

If you're both synced up, you shouldn't get these issues, but KSP still likes to kill things as they get close to the surface, so it could also be that. They should spawn back as soon as they touch the ground.

The other thing I can think of is sometimes DMP (or a different mod) will do something KSP doesn't like, and make KSPthrow a heap of errors in the log, which stops DMP from syncing. This generally happens with an absolutely horrible framerate, you can check in alt+f12 if there are a whole heap of red NullReferenceExceptions :)

Think of DMP as a remote persistent.sfs save that syncs vessels & kerbal data in real time, saves your science peroidically, and makes KSP's universe clock match up with a subspace (it really does drift like crazy) - So it's not really possible to join 2 worlds together, but there is a singleplayer to multiplayer save converter in the options menu :).

@KerbinUser/Everyone who wants to visit - we don't bite :): You can jump on the IRC channel by going to my build server in my forum sig below, or you can click on the IRC link and hope it opens in something (Firefox tries to open it online with mibbit, most people I know on windows use something like xchat).

@KerbinUser: The thing is that log showed they started KSP and (I think) loaded or started a singleplayer game. They definitely didn't connect to a DMP server. I'm just curious exactly how DMP was capable of this - It doesn't even look at other saves unless you touch the SP->MP universe creator, and even then should only read it into a game object without actually starting it. Do the persistent.sfs files get damaged, or does the load game menu just not work?

You could try with just DMP installed, or test them one by one, but as you said it worked after removing DMP let them play their saved games, something weird is going on...

@Krubert: This is probably my fault with a lack of documentation, TL;DR, Don't put client side mods in the server's plugin folder, it's for server plugins only.

Longer answer:

DMPServer (or KMPServer for that matter) have never, ever loaded client side mods like mechjeb or kethane (etc). The mods are completely set up by DMPModControl.txt, which can be generated from Options -> Generate Blacklist/Whitelist DMPModControl.txt.

As the project went on, I had some requests or features that I don't think exactly belong in DMP (The idea of DMP is to basically do what stock does, but with your normal expectations of a KSP multiplayer game), like JohannesMP's "Single kerbal mode" idea (which I do find interesting), or some type of capture the planet / battle setup that require server mods.

At first I directly copied the idea of KSP/GameData to DMPServer/Plugins as it would be familiar to modders, as time went on we decided to drop the KSP way of loading mods (Look for an attribute, save any events it finds) to something that made more sense and was cleaner (Inherit a plugin class and overload the events you need to).

@Preliator: You're running something else on port 6702, likely another DMPServer :P

Also as soon as you connect to the server, the nickname is protected with a player token and nobody else can connect as you. I do admit the whitelist is vulnerable until the player connects though.

@Everyone: The player token is very important - If you lose it you can't access any server you have connected to with that name ever again, which is why DMP backs it up in the saves/DarkMultiPlayer folder as well :). When you reinstall KSP, make sure you copy either saves, or place the token back in GameData/DarkMultiPlayer/Plugins/Data/

Link to comment
Share on other sites

@Krubert: This is probably my fault with a lack of documentation, TL;DR, Don't put client side mods in the server's plugin folder, it's for server plugins only.

Hah, yeah, I thought this may exactly be the problem when I was thinking about it at work today.

Thank you, the mod works great :)

Link to comment
Share on other sites

So my friend is still having problems connecting, same error:

Error handling HANDSHAKE_REQUEST from Unknown, exception: System.ArgumentException: Illegal characters in path.

at System.IO.Path.Combine(String path1, String path2, String path3)

at DarkMultiPlayerServer.ClientHandler.HandleHandshakeRequest(ClientObject client, Byte[] messageData)

at DarkMultiPlayerServer.ClientHandler.HandleMessage(ClientObject client, ClientMessage message)

[21:43:09][iNFO] : Disconnecting client Unknown, sent CONNECTION_END (Server failed to process HANDSHAKE_REQUEST message)

I had him set his player name to something really stupid (z) and the server name was server (does server name even matter?) still same issue.

Link to comment
Share on other sites

@Preliator: You're running something else on port 6702, likely another DMPServer :P

Also as soon as you connect to the server, the nickname is protected with a player token and nobody else can connect as you. I do admit the whitelist is vulnerable until the player connects though.

@Everyone: The player token is very important - If you lose it you can't access any server you have connected to with that name ever again, which is why DMP backs it up in the saves/DarkMultiPlayer folder as well :). When you reinstall KSP, make sure you copy either saves, or place the token back in GameData/DarkMultiPlayer/Plugins/Data/

Oh, my fault. I was trying to starting the server... when the server is already start:confused: So, how can I open the console when the server is already start?

For nickname protection I didn't know about the token.txt. This is exactly what I meant. Thank you!

Edit: what is the file DMPAdmins.txt? how to compile it? and what do you mean with Guid?

Edited by Preliator
Link to comment
Share on other sites

@Vanguard-01: Does your friend have any weird characters in the name? - It could also be caused by an enter inside the text box.

If you're on windows, it should be in the foreground on the startbar somewhere, if you're on linux and you have screen'ed it, 'screen -rS screenname'. I'm unsure if it's possible for DMPServer to partially shutdown on windows, but it's always safe to kill with alt+ctrl+delete.

DMPAdmins.txt does absolutely nothing at the moment, but it will eventually - I intend to basically hook the server console up to one of the chat gui's for admins.

GUID is the global unique identifier, it's just a random character string that looks like the file names in the Universe/Vessels/ folder. They are used to both authenticate players (their token), or reference vessels.

As for compiling DMP (if you really want to), clone my github, copy KSP_Folder/KSP_Data/Managed/UnityEngine.dll, Assembly-CSharp.dll, and Assembly-CSharp-firstpass.dll into the git folder you cloned, then open the DarkMultiPlayer.sln file with monodevelop or visual studio and hit compile. The files should end up in (Client|Server)/bin/Debug/ :)

Edited by godarklight
Link to comment
Share on other sites

I apologize for asking so much about Science and funds etc, but how often does the science funds etc/tech tree update?

I messed around for about 20 minutes by launching three flights and collecting some science/doing some contracts, and the other game didn't update in terms of science/funds/tech tree etc, even after a few purposeful/crash reloads.

wBm51GC.jpg

In fact, the second KSP's rep went what I think is below zero with no flights, which I didn't even know was possible.

The inflight vessel syncing was excellent though, honestly it works, unlike KMP.

Edited by Cooly568
Link to comment
Share on other sites

@godarklight I tried to click the link for IRC chat under your name "DMP IRC Channel" but it took me to a link then did nothing. I clicked on the link "(Webchat)" and it allowed me to sign in there so I will be checking back from time to time to see if you are there chatting.

Link to comment
Share on other sites

Hey I was just wondering how would I host a private server of this on a hosting site?

I ran minecraft servers before but I have no idea how to run the .exe file on file hosters...

So any advice guys or links to where I could find some hosted to pay some money for them to host me and my friends a private server?

Link to comment
Share on other sites

@Cooly568: DMP syncs the scenario module data (most mods like kethane use scenario modules, science and career data are also scenario modules) every 30 seconds if they have changed. They are player-local though.

The reason why the reputation went negative is likely a result of DMP replacing the vessel for part updates, it does this by killing the vessel and putting a new copy down. So that's another career bug I'll have to fix :P

@KerbinUser: As I live in australia, timezones can be a bit of a problem :P.

@Talavar: There was a very rare race-condition bug that was easy to fix, so I thought I might tackle that bug - It was possible to crash the server. I'm also calling the garbage collector periodically (something I don't have to do), but DMPServer doesn't need to keep 2gb of useless messages around. New ram usage should be in the 5mb - 15mb range, not the 5mb - (insert system ram limit here) range.

@thedogs: DMPServer runs on the .NET framework, and it will run under linux/mac with mono installed. The CPU/Ram requirements should be next to nothing (z0n's servers run on a raspberry pi), but the bandwidth is nearly an exponential scaling thing as more players join. I'd first recommend running it locally before you commit to a remote server, there's a fair share of hickups that need to be addressed before I call DMP 'release' quality :P

Link to comment
Share on other sites

Hey I was just wondering how would I host a private server of this on a hosting site?

I ran minecraft servers before but I have no idea how to run the .exe file on file hosters...

So any advice guys or links to where I could find some hosted to pay some money for them to host me and my friends a private server?

Hi thedogs.

I was running the DMP Server on a VPS hosted by Digital Ocean.

Mminimal Ubuntu 14.04 server install, 1 core, 512 Mb of Ram, 20 Gb SSD & 1 Tb bandwidth for $5 a month. The performance was fine and I had no major issues. I will say we didn't have loads of peeps on there, but for a few friends it's more than adequate and the resources are scalable. It would cost me more in electricity than the monthly bill were I to run the server localy.

If you are not familiar with Linux it might be a steep learning curve, but I've outlined the basics of running the .exe here. Digital Ocean also have tons of easy to follow guides regarding setting up your server. You'll need to create a user, configure ssh access & set up a firewall.

Feel free to PM me if you have any questions.

Edited by comatosed
Added a bit more detail
Link to comment
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.

×
×
  • Create New...