Jump to content

DarkMultiPlayer 0.3.8.0 [KSP 1.12.0]


godarklight

Recommended Posts

@Godark I know it's this part right here that's catching me:


/Server/CommandHandler.cs
try
{
input = Console.ReadLine();
if (input == null)
{
DarkLog.Debug("Terminal may be not attached or broken, Exiting out of command handler");
return;
}
}

I'll upload some logs soon so you can see the point that it happens, but I'm sure that it's as soon as command handler is started, as it shows about midway through the server start messages. This might just be a permission problem on my side though.

My real current worries reside in not being able to catch the pid from a HEREDOC, for what ever reason. Any ideas?


su dmpserver <<EOF
cd $DMPDIR
mono $DMPSVR < /dev/null > /dev/null &
echo $! > $PIDTMP
EOF
touch $PIDFILE
cat $PIDTMP > $PIDFILE

Both files are coming up blank + \n. I have no idea what's going on here >.>

EDIT: Well I took the long way and made an exports file. That'll solve it for now.

Edited by dsonbill
Link to comment
Share on other sites

@tetryds:

How long would 1.5.5 take then?
Apparently right now :)

0.1.5.5 only fixes a rare-ish race condition that was crashing DMPServer - The rotational / position fix can't be done without a protocol break, so that's going to have to wait for 0.1.6.

EDIT: Realised I missed a question - I think I know what you mean by precision positioning although DMP lacks KMP's "docking/relative positioning mode".

There's 2 types of positioning systems in use with DMP, under 10km, it uses lat/long/altitude and a surface velocity vector. Above 10km, it uses the orbital parameters instead.

Orbital mode gets rewound and fast-forwarded as needed, making it accurate for all eternity. Lat/Long/Alt is time sensitive, which is why planes currently jump around a lot in flight. There is a slight fix to this: I could shift the vessel position by the velocity vector * the time delta which would remove most of the jumpiness / lag, but that requires a protocol break as I'd also like to do the same thing to velocity with acceleration.

Also, Surface updates played from the past show in their correct lat/long/alt positions, rather than getting the orbit fast-forwarded into the ground.

@dsonbill: You can sidestep this problem if you use 'screen' - but that does form a dependency on screen. I haven't looked too much into running DMPServer without an attached terminal or pseudo-terminal, screen makes things easy to run headless servers.

@Everyone: As mentioned before, 0.1.5.5 is available. I'll be pushing for 0.1.6.0 now which means a few protocol breaks will be coming, so dev will no longer be compatible with the release 0.1.5.x versions.

Edited by godarklight
Link to comment
Share on other sites

@godarklight: thanks, that explains a lot.

But then there is something strange, every time I tested, when going close to each other the movements are extremelly precise, while further than 500m or something the craft warps around a bit when moving.

The jumpiness is manageable, it's quite easy to follow a friend while flying, even at very high speeds (given enough distance), it only gets bad if you go too close.

Removing/minimizing that to a point where missiles from mods are able to seek a constantly moving target and eventually hit it would be epic.

About breaking, this is an experimental mod so we don't (shouldn't) really care if stuff gets broken or incompatible.

Link to comment
Share on other sites

@StarDrive Not sure about the gui, but for the server list:

Edit DMPServerSettings.txt and change httpport to any port number. Open this port up and put it in the server list config.

@Godark I see no reason not to require screen considering mono will still need to be manually installed at least part of the time. The install script will check for both. The command pipe is working well now :)

Link to comment
Share on other sites

@StarDrive Not sure about the gui, but for the server list:

Edit DMPServerSettings.txt and change httpport to any port number. Open this port up and put it in the server list config.

@Godark I see no reason not to require screen considering mono will still need to be manually installed at least part of the time. The install script will check for both. The command pipe is working well now :)

i tried changing it to 1582. and then usd that sam number on the HTTP port in the add server page. it was still red. and still not showing up when i turned on the server.
Link to comment
Share on other sites

@tetryds: I kind of forgot about that - Packed updates are applied slightly differently, I'll have to double check them.

@StarDrive: DMPServer is only a command line application, but masteryx wrote a GUI for it. I've included it in the original post, although I haven't checked the source / how it works.

EDIT: Ok, you do mean the server list - Make sure the HTTP port of the server is accessible by something like www.canyouseeme.org. I didn't find an entry in the database though, Servers that fail for a week are deleted from the server list check.

@dsonbill: Good to hear, most people run in screen anyway :)

@worldofstuff: DMPServer doesn't really work that way - It has nearly no idea what "KSP" or vessels and things even are, it's mostly a message relay that deals with text files :). Plugins are for server side mods which practically don't exist yet, But in order to use mods on a server, you'll need to set up DMPModControl.txt. A file can be generated from your GameData folder by opening KSP and hitting Options -> Generate DMPModControl.txt, and then moving that file from the KSP folder to your DMPServer folder.

Link to comment
Share on other sites

@Treki26: The DMP server files are mono/.NET assemblies, which means they are cross platform (I develop DMP exclusively on linux).

You'll need to install mono for mac, then you should be able to run DMPServer. And I definitely need to write a better readme :)

How do I run the server? There isn't any mac executables?

Link to comment
Share on other sites

@tetryds: I kind of forgot about that - Packed updates are applied slightly differently, I'll have to double check them.

@StarDrive: DMPServer is only a command line application, but masteryx wrote a GUI for it. I've included it in the original post, although I haven't checked the source / how it works.

EDIT: Ok, you do mean the server list - Make sure the HTTP port of the server is accessible by something like www.canyouseeme.org. I didn't find an entry in the database though, Servers that fail for a week are deleted from the server list check.

@dsonbill: Good to hear, most people run in screen anyway :)

@worldofstuff: DMPServer doesn't really work that way - It has nearly no idea what "KSP" or vessels and things even are, it's mostly a message relay that deals with text files :). Plugins are for server side mods which practically don't exist yet, But in order to use mods on a server, you'll need to set up DMPModControl.txt. A file can be generated from your GameData folder by opening KSP and hitting Options -> Generate DMPModControl.txt, and then moving that file from the KSP folder to your DMPServer folder.

can you provide a link to the GUI ?
Link to comment
Share on other sites

Hi,

i hope someone can help me, 2 friends of me have a server running, i have no problems to join or anything else but when i build a space station or anything else and bring it up to the orbit and go back to space center and have later a look on my space station or satellite, i only see the engine in the orbit which is flying with full speed, i can push all availible buttons in the game but without an effect.

Also when i stay on the launchig pad, launch the spaceship to the sky press ESC and say go back to start, i only see the engine of the ship stay on the launching pad with full speed activatet but i cant throttle them down or anything else.

Link to comment
Share on other sites

@Montaxx: I am definitely looking for a replacement to my server list, there's been a few candidates in the past but nobody has followed them up.

I do have an aversion to the 'premium' side of things though, I can understand if you were a DMP server host, but that doesn't appear to be the case here. You might want to elaborate more on that side of things before the free software community comes after you with pitchforks :P

@Treki26: Because it's a .NET assembly - That exe runs on linux and mac with mono, and runs on the .NET 4 framework on windows. It does *not* run under wine :).

.NET is basically microsoft java, and even though I'm a linux user (and develop DMP on linux exclusively), I think they've done very well with the language.

@StarDrive85: Mastereryx's DMPServer GUI thread. I haven't checked into the source and you'll need to replace DMPServer under it, but it's the only frontend I know for DMP.

@Rikkei: If possible, I'll need KSP_Folder/KSP_Data/output_log.txt and possibly a youtube video to understand the problem. Failing that, catch me on IRC and I'll join the server to check it out :)

Link to comment
Share on other sites

@Montaxx: I am definitely looking for a replacement to my server list, there's been a few candidates in the past but nobody has followed them up.

I do have an aversion to the 'premium' side of things though, I can understand if you were a DMP server host, but that doesn't appear to be the case here. You might want to elaborate more on that side of things before the free software community comes after you with pitchforks :P

+1 on the "premium"

Link to comment
Share on other sites

I've been considering hosting a public server for DMP for a project where me and a bunch of other people help build a planetary base (not giving away specifics).

What I'm wondering is, what do I do if someone crashes into the base and ruins all the progress? How do quicksaves work in DMP? Can I Alt-F5 a quicksave whenever progress is made and revert the whole server back to a point before the base was destroyed?

Thanks for any replies!

Link to comment
Share on other sites

@Andrew Hansen:

"what do I do if someone crashes into the base and ruins all the progress?" - Same thing as single player, the station would be destroyed and there would be lots of debris (although the debris would get eaten by autoDekessler unless you turn it off).

"How do quicksaves work in DMP?" - They work by killing the current active vessel, and then reloading the vessel from when you saved it. It quicksave only affects that single vessel.

You're better off backing up the DMPServer/Universe/Vessels folder if possible, just copy + paste it.

Vessel permissions will be implemented in 0.1.6, so this won't be a problem then, but that could take ~1 month depending on how much work I have ahead of me.

@Rikkei: I'm so glad I asked for a youtube video. There is no words I have to describe that bug you just experienced, it also came with a huge "WHAT ON EARTH!?" when I watched it :).


Active texture manager whacked out during the scene change:

NullReferenceException: Object reference not set to an instance of an object
at ActiveTextureManagement.ActiveTextureManagement.Awake () [0x00000] in <filename unknown>:0
UnityEngine.GameObject:Internal_AddComponentWithType(Type)
UnityEngine.GameObject:AddComponent(Type)
AddonLoader:StartAddon(LoadedAssembly, Type, KSPAddon, Startup)
AddonLoader:StartAddons(Startup)
AddonLoader:OnLevelWasLoaded(Int32)


Clouds whacked out during a scene change - It also throws a bit of a flood, so this might be a bit of a problem with FPS or other random problems.

NullReferenceException: Object reference not set to an instance of an object
at Clouds.Clouds.Update () [0x00000] in <filename unknown>:0


Bingo, Hotrockets perhaps? - This is likely the mod causing the problem.

NullReferenceException: Object reference not set to an instance of an object
at ModelMultiParticlePersistFX.OnSave (.ConfigNode node) [0x00000] in <filename unknown>:0

at EffectList.OnSave (.ConfigNode node) [0x00000] in <filename unknown>:0

at Part.SaveEffects (.ConfigNode node) [0x00000] in <filename unknown>:0

at ProtoPartSnapshot.Load (.Vessel vesselRef, Boolean loadAsRootPart) [0x00000] in <filename unknown>:0

at ProtoVessel.LoadObjects () [0x00000] in <filename unknown>:0

at Vessel.Load () [0x00000] in <filename unknown>:0

at Vessel.MakeActive () [0x00000] in <filename unknown>:0

at FlightGlobals.setActiveVessel (.Vessel v, Boolean force) [0x00000] in <filename unknown>:0

at FlightGlobals.SetActiveVessel (.Vessel v) [0x00000] in <filename unknown>:0

at FlightDriver.Start () [0x00000] in <filename unknown>:0


Or maybe it's tweakscale? - It throws a NRE (NullReferenceException) flood here, which generally kills the framerate.

NullReferenceException: Object reference not set to an instance of an object
at Part.ModulesOnStart () [0x00000] in <filename unknown>:0

at Part+.MoveNext () [0x00000] in <filename unknown>:0

(Filename: Line: -1)

ArgumentNullException: Argument cannot be null.

Parameter name: source
at System.Linq.Check.Source (System.Object source) [0x00000] in <filename unknown>:0

at System.Linq.Enumerable.OfType[IUpdateable] (IEnumerable source) [0x00000] in <filename unknown>:0

at TweakScale.TweakScale.Update () [0x00000] in <filename unknown>:0

(Filename: Line: -1)

NullReferenceException: Object reference not set to an instance of an object
at Part.ModulesOnStart () [0x00000] in <filename unknown>:0

at Part+.MoveNext () [0x00000] in <filename unknown>:0

(Filename: Line: -1)


[262.3315] DarkMultiPlayer: Skipping StepClock (standalone map viewer workaround)

The tweakscale guys are trying to do something to the vessel before the vessel has been fully initialised, I might forward this to them if I can get a hold of them.

Btw, I didn't actually think you'd upload a youtube video and the log - It lets me know exactly what the problem is, and exactly what's causing it. I should ask for youtube video bug reports more often, thanks! :)

Edited by godarklight
Link to comment
Share on other sites

When i try to connect to BCSpazers server it won't work but when i connect to other servers it works completly fine.

This is what it says:

[LOG 13:44:37.716] [32.95486] DarkMultiPlayer: Hashed file: darkmultiplayer/plugins/darkmultiplayer-common.dll, hash: 2a2685dcce137b037883870d9cb6352b6573f399bd4fcb5e7880d2eb2417d8c7

[LOG 13:44:37.717] [32.95788] DarkMultiPlayer: Hashed file: darkmultiplayer/plugins/darkmultiplayer.dll, hash: d23a6ae307bb5046915eda83e7688873bad1f56f9c9a0c6534c3b5c31e8bdb46

[LOG 13:44:37.718] [32.95818] DarkMultiPlayer: Hashed file: darkmultiplayer/plugins/messagewriter.dll, hash: 3b823946ab13b302aabd44f019e5425a4bc78ba5ace6179f0fbb766626bd005c

[LOG 13:44:37.719] [32.95934] DarkMultiPlayer: Hashed file: kerbaltek/hyperedit.dll, hash: 39257059445cdc2962d7056d9412158cc1e4ee9ca94de6904070592489b248b6

[LOG 13:44:38.285] AddonLoader: Instantiating addon 'HyperEditModule' from assembly 'HyperEdit'

[LOG 13:44:51.553] [46.96174] DarkMultiPlayer: Trying to connect to KerbalSpace.Spazer.net, port 6702

[LOG 13:44:51.555] [47.01058] DarkMultiPlayer: Connecting to 172.14.42.184 port 6702...

[LOG 13:45:11.561] [67.01565] DarkMultiPlayer: Disconnected, reason: Failed to connect!

[LOG 13:45:12.562] [68.01892] DarkMultiPlayer: Connection error: System.Net.Sockets.SocketException: Et forsøg på at oprette forbindelse mislykkedes, fordi den part, der havde oprettet forbindelse, ikke svarede korrekt efter en periode, eller en oprettet forbindelse blev afbrudt, fordi værten ikke svarede.

at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP, Boolean requireSocketPolicy) [0x00000] in <filename unknown>:0

at System.Net.Sockets.Socket+Worker.Connect () [0x00000] in <filename unknown>:0

[LOG 13:46:18.299] [133.7256] DarkMultiPlayer: Trying to connect to KerbalSpace.Spazer.net, port 3416

[LOG 13:46:18.301] [133.7562] DarkMultiPlayer: Connecting to 172.14.42.184 port 3416...

[LOG 13:46:39.301] [154.7613] DarkMultiPlayer: Connection error: System.Net.Sockets.SocketException: -Et forsøg på at oprette forbindelse mislykkedes, fordi den part, der havde oprettet forbindelse, ikke svarede korrekt efter en periode, eller en oprettet forbindelse blev afbrudt, fordi værten ikke svarede.

at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP, Boolean requireSocketPolicy) [0x00000] in <filename unknown>:0

at System.Net.Sockets.Socket+Worker.Connect () [0x00000] in <filename unknown>:0

Link to comment
Share on other sites

I've found out what was the the problem that caused all the games gui's to turn invisible. It turn turns out some mods which contain any form of gui, for examble: Mechjeb, confuses dmp so it tries to load the wrong gui, or that is what seems to cause the problem for me.

Output log:

[EXC 15:22:32.353] ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint

[EXC 15:22:32.363] ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint

[EXC 15:22:32.377] ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint

[EXC 15:22:32.393] ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint

[EXC 15:22:32.410] ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint

[EXC 15:22:32.426] ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint

[EXC 15:22:32.443] ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint

[EXC 15:22:32.460] ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint

[EXC 15:22:32.477] ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint

[EXC 15:22:32.493] ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint

[EXC 15:22:32.510] ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint

[EXC 15:22:32.527] ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint

[EXC 15:22:32.543] ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint

[EXC 15:22:32.560] ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint

[EXC 15:22:32.579] ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint

[EXC 15:22:32.595] ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint

[EXC 15:22:32.612] ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint

[EXC 15:22:32.628] ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint

[EXC 15:22:32.643] ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint

[EXC 15:22:32.660] ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint

[EXC 15:22:32.677] ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint

[EXC 15:22:32.693] ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint

[EXC 15:22:32.710] ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint

[EXC 15:22:32.727] ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint

[EXC 15:22:32.745] ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint

[EXC 15:22:32.762] ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint

[EXC 15:22:32.778] ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint

[EXC 15:22:32.795] ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint

[EXC 15:22:32.810] ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint

[EXC 15:22:32.827] ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint

[EXC 15:22:32.844] ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint

[EXC 15:22:32.862] ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint

[EXC 15:22:32.877] ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint

[EXC 15:22:32.894] ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint

[EXC 15:22:32.910] ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint

[EXC 15:22:32.927] ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint

[EXC 15:22:32.944] ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint

[EXC 15:22:32.960] ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint

[EXC 15:22:32.977] ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint

And it spams like 50 of these every second, so the crash files size has gone from 3bytes to 23kb.

Link to comment
Share on other sites

@Treki26: Because it's a .NET assembly - That exe runs on linux and mac with mono, and runs on the .NET 4 framework on windows. It does *not* run under wine :).

.NET is basically microsoft java, and even though I'm a linux user (and develop DMP on linux exclusively), I think they've done very well with the language.

Though how do I run it? I downloaded and installed mono and I still can't run the .exe file.

Link to comment
Share on other sites

When I press the stock Load button, it keeps saying this over and over again:

ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint

at UnityEngine.GUILayoutUtility.BeginLayoutGroup (UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options, System.Type LayoutType) [0x00000] in <filename unknown>:0

at UnityEngine.GUILayout.BeginHorizontal (UnityEngine.GUIContent content, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) [0x00000] in <filename unknown>:0

at UnityEngine.GUILayout.BeginHorizontal (UnityEngine.GUILayoutOption[] options) [0x00000] in <filename unknown>:0

at DarkMultiPlayer.PlayerStatusWindow.DrawContent (Int32 windowID) [0x00000] in <filename unknown>:0

at UnityEngine.GUILayout+LayoutedWindow.DoWindow (Int32 windowID) [0x00000] in <filename unknown>:0

at UnityEngine.GUI.CallWindowDelegate (UnityEngine.WindowFunction func, Int32 id, UnityEngine.GUISkin _skin, Int32 forceRect, Single width, Single height, UnityEngine.GUIStyle style) [0x00000] in <filename unknown>:0

(Filename: Line: -1)

It also doesn't let me load vessels.

Link to comment
Share on other sites

When I press the stock Load button, it keeps saying this over and over again:

ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint

at UnityEngine.GUILayoutUtility.BeginLayoutGroup (UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options, System.Type LayoutType) [0x00000] in <filename unknown>:0

at UnityEngine.GUILayout.BeginHorizontal (UnityEngine.GUIContent content, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) [0x00000] in <filename unknown>:0

at UnityEngine.GUILayout.BeginHorizontal (UnityEngine.GUILayoutOption[] options) [0x00000] in <filename unknown>:0

at DarkMultiPlayer.PlayerStatusWindow.DrawContent (Int32 windowID) [0x00000] in <filename unknown>:0

at UnityEngine.GUILayout+LayoutedWindow.DoWindow (Int32 windowID) [0x00000] in <filename unknown>:0

at UnityEngine.GUI.CallWindowDelegate (UnityEngine.WindowFunction func, Int32 id, UnityEngine.GUISkin _skin, Int32 forceRect, Single width, Single height, UnityEngine.GUIStyle style) [0x00000] in <filename unknown>:0

(Filename: Line: -1)

It also doesn't let me load vessels.

What other plugins are you running?

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