Jump to content

godarklight

Members
  • Posts

    682
  • Joined

  • Last visited

Posts posted by godarklight

  1. Just wanted to let you guys know that we have a KSP Multiplayer Server up and running 24/7. It is done by the Spearhead Gaming community and the IP is as follows:

    Server Name: Spearhead Gaming Darkmod & Server IP: 50.97.34.100:6802

    Posting this in the General forum section also.

    All good - if you want to show up on the public server lists you'll have to install the server reporter plugin though (I checked, it's not on there)

  2. Okay, what ip does 127.0.0.1 send you to, because I cant figure it out, I know its loopback but I dont know where the loopback is sent to, is it my public ip, private ip, or something else?

    Edit: Also, while im at it, what IP does DMP use? DNS?

    I'll try to make some analogies here :)

    ===

    Description of IP addresses:

    127.0.0.1 / localhost means "Home". It always refers to the computer that you are on.

    Private IP's are usually in the range of 192.168.0.x, I'll use the example of 192.168.0.2, and they mean something like "Unit 5 in my housing complex", or "House 5 on my street". So 192.168.0.2 means something different to every single private network. Your private network consists of your modem/router and all of the connected computers.

    Public IP's are basically any IP not in the range of 192.168.x.x or 10.x.x.x or 172.something.something.x, I'll use the example of 42.42.42.42 for the public IP now. The are like "42 wallaby way sydney" (of your unit complex). It means the exact same thing to every single computer on the internet - but it can't address your unit because it actually means the whole complex, or in your home computer terms, it means the modem/router.

    "Home" and "Unit 5" (127.0.0.1 and 192.168.0.2 respectively) both mean the same thing on your computer, so you can connect to your own DMPServer running on your own machine with either address.

    "Unit 5" (192.168.0.2) means your computer from within your own network, so locally networked computers have to connect to this address.

    "42 wallaby way sydney" only makes sense from outside of your network, it actually means the modem/router in the private network which is obviously *not* running a DMPServer so won't work if you try to connect to it.

    ===

    Now I'll bring port forwarding into it.

    The problem is that computers on the internet can only address the "42 wallaby way sydney" part, and from within your own network it actually means the router.

    If someone rocks up to your apartment complex (42.42.42.42), they'll get there and go "Huh, there's no DMPServer running here" and leave. What you need to do is hang a sign out the front of your place saying "Hey, There's a DMPServer running at unit 5!", this is called port forwarding. To do this you'll need to log into your router (there's a good chance it's http://192.168.0.1, it's whatever your default gateway is) and configure port forwarding. Just as there are thousands of ways of making signs, there's thousands of different ways to port forward - they all differ by router manufacturer.

    ===

    As far as the last question goes, it doesn't make a lot of sense. DMP listens on "everything", so it's listening on "Home" (local host: 127.0.0.1) and "Unit 5" (private IP 192.168.0.2). If you port forward people will be able to connect to your server, a good way to test it is with www.canyouseeme.org.

    DNS is also a completely unrelated thing, although you can use a free site like no-ip.com or afraid.org to give you a domain name so you can tell people "The sydney dentist" rather than "42.42.42.42". I personally use www.afraid.org myself to send http://godarklight.info.tm to http://203.206.79.85 (at the moment... it changes).

  3. I know that development has slowed on this mod, however I would like to know if there are any plans for dmp compatibility.

    Ello everyone!

    @ogledhill, I'd have to work with BahamutoD for that to work well - there's a lot of issues that come up when dealing with multiplayer, and the DMPClient has a rather poor design that doesn't lend itself out well to other plugins interfacing with it. You'd also be pretty limited to the master controlled warp modes rather than subspace, otherwise you have to deal with some really strange time paradoxes :-/

    DMP also gets pretty spaghetti in some (or a lot of...) cases, especially where KSP gets a little weird.

    @Baha, If you're up for it I'll help, even though I'm not much of a PvP type of guy. You'll also be defining the interface for other plugins to use as well, I find that things get better if you have hindsight on actual usage, rather than trying to guess (as the current DMPModInterface thing is).

    Also, forum watching bots are nice, you've got to get yourself one of these :)

  4. @treesniper12: I should probably provide a more clear description for all these things that can pop up, but basically, TCP connection refused means this the server replied with "No, you can't connect to me", rather than just not replying at all.

    The reason is pretty simple, it's always one of two things:

    1) It's a port forward problem:

    Client: "Hey, can I connect to you?", Modem replies: "What is this DMP thing? I'm just a modem! Leave me alone!".

    2) It's a firewall problem:

    Client: "Hey, can I connect to you?", Modem passes to your server, Server: "No, you're not allowed".

    If you haven't set up port forwarding, it's a port forwarding problem - so check that first. You'll need to forward TCP 6702 (by default) to your network address (usually 192.168.0.something). If you have set it up, it's a firewall problem. Some antiviruses also incorrectly think they should be firewalls, so check them too :P.

  5. Woah, haven't checked on the forums in a while :-/

    @Everyone, My internet was down yesterday if anyone noticed, everything is back up now. I've also spent a little time working on Ye Olde Server List to verify d-mp.org's data (as that is owned by VITAS). Things look correct :)

    @Aegrim: I did talk to the BDA developer a little while ago, I think he's looking at it but we haven't yet worked together to solve any problems.

    @Vladthemad: Reverts aren't disabled by default because it shouldn't be a terribly big memory leak, but it's still there. I'd need to look at pruning the history (and maybe just saving it to disk), but KSP reverting has its tentacles all over the place, there's many places that can cause it to happen.

    @Jansn/Vladthemad: I have very specific code that should fight against wiping of contracts - but if this is still an issue that I'll have to tackle it. I generally play sandbox though... Also, I'd expect all the modules to be lost at once if it failed to load properly. That's really odd.

    DMPServer only holds the latest state, so restarting won't change anything.

    Err, if ship doubling is easy to reproduce, let me know (and preferably catch me on IRC so we can test it)

    Also, as far as making designs in single player, the DarkMultiPlayer save is safe to use directly - it's only the persistent.sfs files that are wiped on connection, not the ships.

    Time warping is safe, but it can cause paradoxes (like driving through a future player).

    @Deadpan110: I saw that, HOCGaming was my favourite KSP youtuber though and got there ages ago :). Although I did smile when I saw it - He got nearly everything correct to.

    @AlthalusAvan: Thanks for letting us know, but be careful of the krakens :D

    @Thundagar: That's a KSP throw, looks like there's something in the experience things that I have to detect.

    @aman kd: I think you may have gotten me on IRC, but basically the server reporter plugin is required to appear on the server list. The reason for it is pretty simple, get the DMP servers to tell the server list when things change so it's instant, and a *lot* less chatty and cheaper on bandwidth as it doesn't need to be be scraped every minute or so. The really old server list I took down months ago used to scrape the json port, the new one just listens for connections from the reporter plugin.

    Also, if you fail to connect to the reporter, there's a good chance it was down - I've been working on it a little lately.

    @Shingles: Basically what longbyte1 said, you'll need to copy your old GameData/DarkMultiPlayer/Plugin/Data/(private|public)key.txt files over to your new install or use a new username. Unless you can get in touch with the server admin and get them to delete your old public key for you.

    Player keys don't expire, the username is protected forever ;).

  6. Woah, I checked on this thread every day for a week or two, and all of a sudden it blows up - I didn't notice :P

    I *think* there is a way to screw this up, if there is a mod that throws in OnGUI that is alphabetically before ExceptionDetector, It will likely cancel the rest of the OnGUI call which means the window will never pop up. I have no idea how to fix this other than renaming the folder to 0000_ExceptionDetector...

    This mod is mainly to light a fire under mod developers to stop throwing, and to provide players with some type of hope of diagnosing a broken install without looking at the logs.

    I don't mind helping people out directly though - I can usually get in touch with other mod devs if I need to forward on any issues :)

  7. Especially part mods. Having experimented briefly with DarkMultiplayer, part mods are going to be a small annoyance when the multiplayer is implemented. The more they eliminate their necessity, the better. With all the new plane parts and now fairings and heat shields, there are only a very small number I will want. Mostly, just the Mk3 Mini Expansion and Adjustable landing gear.

    My multiplayer alarm was set off :D

    Parts in multiplayer are trivial problem to solve (DMP uses a part whitelist). Also squad won't eliminate the need for part mods in general. Part modders have very different views and very different approaches when it comes to the game, and will offer a wide selection to players that doesn't always fit into the stock direction.

    Also, there's a severe lack of multiplayer on that confirmed list and it looks like DMP will be needed for a while longer, but we'll see :)

  8. So, this might be a bit of crazy defensive overcoding, but this works to defend against the problem:


    using System;
    using System.Reflection;
    using UnityEngine;

    namespace FixTheVAB
    {
    [KSPAddon(KSPAddon.Startup.EditorAny, false)]
    public class MainClass : MonoBehaviour
    {
    private int updatesUntilCapture = 10;
    private Callback<string> theirCallback;

    public void Update()
    {
    if (updatesUntilCapture == 0)
    {
    Debug.Log("Replacing GUI save method");
    //Find callback
    FieldInfo[] theirFields = typeof(ScreenSafeTextField).GetFields(BindingFlags.Instance | BindingFlags.NonPublic);
    foreach (FieldInfo testInfo in theirFields)
    {
    if (testInfo.FieldType == typeof(Callback<string>))
    {
    theirCallback = (Callback<string>)testInfo.GetValue(EditorLogic.fetch.shipNameField);
    string hexName = "";
    foreach (char c in testInfo.Name)
    {
    hexName += Convert.ToByte(c).ToString("x2");
    }
    Debug.Log("Found field: 0x" + hexName);
    }
    }
    //Save callback so we can restore it later
    if (theirCallback != null)
    {
    Delegate[] oldList = theirCallback.GetInvocationList();
    foreach (Delegate d in oldList)
    {
    if (d.Method != null && d.Method.Name != null)
    {
    Debug.Log("Replacing: " + d.Method.Name);
    }
    }
    EditorLogic.fetch.shipNameField.SetOnSubmitCallback(OurSave);
    }
    else
    {
    Debug.LogError("CALLBACK NOT CAPTURED");
    }
    updatesUntilCapture--;
    }
    if (updatesUntilCapture > 0)
    {
    updatesUntilCapture--;
    }
    }

    private void OurSave(string name)
    {
    Debug.Log("Skipping save of " + name);
    ScreenSafeUISlideTab componentUpwards = EditorLogic.fetch.shipDescriptionField.gameObject.GetComponentUpwards<ScreenSafeUISlideTab>();
    componentUpwards.Collapse();
    }

    public void OnDestroy()
    {
    if (theirCallback != null)
    {
    Debug.Log("Releasing GUI save method");
    EditorLogic.fetch.shipNameField.SetOnSubmitCallback(theirCallback);
    }
    }
    }
    }

    This works too. The above is kept around for proof of my foolishness. Thanks xEvilReeperx.


    using System;
    using UnityEngine;

    namespace FixTheVAB
    {
    [KSPAddon(KSPAddon.Startup.EditorAny, false)]
    public class MainClass : MonoBehaviour
    {
    public void Awake()
    {
    EditorLogic.fetch.shipNameField.submitOnEnter = false;
    }
    }
    }

    This is likely the best solution. It doesn't look look like there's any harm in clobbering it completely, and it brings back the collapse behaviour.


    using System;
    using UnityEngine;

    namespace FixTheVAB
    {
    [KSPAddon(KSPAddon.Startup.EditorAny, false)]
    public class MainClass : MonoBehaviour
    {
    private int updatesUntilCapture = 10;

    public void Update()
    {
    if (updatesUntilCapture == 0)
    {
    EditorLogic.fetch.shipNameField.SetOnSubmitCallback(OnSave);
    updatesUntilCapture--;
    }
    if (updatesUntilCapture > 0)
    {
    updatesUntilCapture--;
    }
    }

    private void OnSave(string name)
    {
    ScreenSafeUISlideTab componentUpwards = EditorLogic.fetch.shipDescriptionField.gameObject.GetComponentUpwards<ScreenSafeUISlideTab>();
    componentUpwards.Collapse();
    }

    public void OnDestroy()
    {
    EditorLogic.fetch.shipNameField.SetOnSubmitCallback(null);
    }
    }
    }

  9. Hello claw, I'm unsure if you know about this one, but I've found another case for a stock bugfix module as it's completely VAB/SPH breaking :)

    If you go into the editor without selecting a root part, and then type in a name at the top, you'll get a tiny vessel.craft file that has no parts. If you press load now, KSP will throw and the load won't work. If you leave the VAB and go back into it, you won't be able to load anything. The fix is to delete the vessel.craft file.

    .

    I'm unsure if it's on the bugtracker yet (3929 looked kinda close, but not really...), but you might be able to search it a bit better than me. If you like I'll write up some code to handle this, unless you'd like to.

  10. @Minorex: DMPServer takes nearly no resources, but so long as you've port forwarded and ports opened in the firewall it should just work. Your friend should be able to guide you through it if they have set it up, so long as you're not behind a carrier grade nat (only really applies to mobile broadband connections).

    @Vladthemad: The same way it always has. I suspect KSP is doing strange things again, or there's a time paradox issue :-/

    @MaLuS: Yes, I also exclusively develop under linux with mono/monodevelop. There is no native port (C/C++), because that would just be nuts :P.

    This is the pretty standard way of running it without a terminal attached:

    screen -dmS DMPServerName mono DMPServer.exe

    To attach to it, type screen -r DMPServerName. To detach: ctrl+a, then d.

    I'm unsure if dsonbill's scripts still work, but nothing has really changed in a while ;)

  11. @Nerezza: At first it was called KSPNREDetector. It's current name isn't completely terrible, and at least I didn't name this mod after myself :D

    @Olympic1: Could be MM, could be the mods that depend on MM. Although that's generally not too much of a problem as you have to explicitly hit that button

    @ultrasquid: If it's not a problem with MJ it *could* be a problem with something that changes the way MJ works, but the exceptions can cause

    (this was hotrockets back in the day).

    @undercoveryankee: Exceptions that bubble up into KSP are NOT harmless. If you throw in an Update call, all other things after that call are skipped, which causes all the strange problems. In DMP I catch and log them to prevent them bubbling up into KSP, which is slightly better than completely killing KSP with exceptions.

    Also, the what-plugin-to-blame logic is "from the top of the stack trace, step through until it finds a mod. If it doesn't find one, blame the first call" (which will either by mono, unity, or KSP)

    @MennoLente: The last one I played was simcity 2000. Although transport tycoon was better :P

    @Gaalidas: I'd really need KSP_Data/output_log.txt, and it should definitely detect it's own exceptions. This mod hijacks the KSP.log callback, so if it's throwing it might prevent KSP.log (and alt+f12 debug) from working. This mod really should not be throwing :-/

  12. @Everyone, seeing as how the tool is kind of useless at the moment, I decided to put a bit more work into it and directly point at which DLL file is causing the problem.

    It correctly walks down the stack looking for the first thing that's a mod. If it doesn't find one, it blames the first method that threw, which may be stock mono, or it may be KSP or Unity.

    I also moved it to a window as my Update method wasn't getting called if another mod throws (KSP loads in alphabetical order by the looks):

    NTocwjl.png


    using System;
    using System.Collections.Generic;
    using UnityEngine;

    namespace KSPTest
    {
    [KSPAddon(KSPAddon.Startup.EveryScene, false)]
    public class MainClass : MonoBehaviour
    {
    bool throwState = false;
    float lastThrowTime = float.NegativeInfinity;

    public void Update()
    {
    if ((Time.realtimeSinceStartup - lastThrowTime) > .5f)
    {
    lastThrowTime = Time.realtimeSinceStartup;
    throwState = !throwState;
    if (!throwState)
    {
    DivideByZero();
    }
    else
    {
    ThrowKNFEMethod();
    }
    }
    }

    public void ThrowKNFEMethod()
    {
    Dictionary<string,string> someDictionary = new Dictionary<string, string>();
    Debug.Log(someDictionary["Hello"]);
    }

    public void DivideByZero()
    {
    int a = 1;
    int b = 0;
    Debug.Log(a / B);
    }
    }
    }

    I used KWS from github as an example I occasionally help out there too.

    You'll almost certainly want to grab this version if you're trying to diagnose an install problem :)

  13. @RainDreamer: Basically, the far left side of the methods that are throwing should hint at which mod it actually is (that's the namespace). I could probably do a bit of parsing and print the DLL that it comes from as well.

    @Nemrav: Basically, anything that turns red in the alt+F12 debug menu.

    @nightingale: I'm not actually sure what the market for this is, but it's a very simple mod and it might come in handy for someone so I threw it up here. It *might* come in handy for mod developers, but there's a very slim chance of that as most are certainly capable of their own debugging, unless they just want a really noisy exception alert :).

    @1of6Billion: I'm a modder, not a future predicting miracle worker haha

  14. Download Links

    Download from my build server (pre-KSP-1.1).

    Download from my build server (version 2) (KSP-1.1).

    Download from my build server (version 3) (KSP-1.3).

    Download from SpaceDock.

    Licence: Unlicence (Public Domain).

    Source: Github

    So what *is* this thing?

    When a program does an invalid operation (such as dividing an integer by zero) an error called an exception is thrown.

    Exceptions can easily put KSP into a bad state and random things will stop working.

    This mod is a simple indicator for players to find misbehaving mods.

    Pretty screenshot:

    NTocwjl.png

  15. @popos1: Vessel protection is definitely planned for the next version.

    @thunderdan87: That sounds suspiciously a lot like a stock bug, if you can reproduce that in single player, that *definitely* needs to go on the squad bug tracker. If it's a DMP thing, try to break a universe and send it to me so I can work around it - you're likely not the only one who has run into this :)

  16. @thunderdan87: I'm not entirely sure what's going on there in the log file - It does hint at some weirdness, but I've never seen this caused before. I have a feeling it's not DMP... Can you try to load the DarkMultiPlayer save file in single player and load that vessel again?

    EDIT, Pastebin because I can't remember how to spoiler with KSP's forum editing: http://pastebin.com/utVN4DFA

    If I had to guess, you had some type of mod installed and have since removed it, but KSP is freaking out about the save file.

    @silvanus: I don't write changelogs until I've just about released, the best place is to check the commit logs:

    Release - The latest tagged version recommended for use.

    Development - The latest tagged version with fixes. This should theoretically be the most stable branch to use, and will remain compatible with release.

    Unstable - Where breaking changes go, this is basically the development branch.

    A few times in DMP's history I've had to push a release a little early (or just put up with annoying bugs) because there was a breaking change already introduced into my master branch, and I have a rule that versions with the first 3 numbers (DMP 0.2.0.x) should all be compatible with each other. This just frees me up so I can push a bugfix or proper release at any times.

    I haven't been putting a lot of time into it lately, the last major thing that went into unstable is the warp rework which fixes "Kicked for creating subspace", and also actually implements the MCW_LOWEST and SUBSPACE_SIMPLE modes.

  17. @Minorex: "::" actually means "Listen on all IPv4 and IPv6 addresses". DMPServer supports IPv6, the client supports v6 on linux and mac (The stuff is missing on windows for some unknown reason, when unity gets their act together it will start working).

    The fault is port forwarding or an incoming firewall, DMP only needs TCP 6702. If you're on mobile internet they generally have a ISP-level NAT (where your ISP never gives you a public IP), which means you'll never be able to host a server.

    I wouldn't recommend disabling the firewall, but there's some issue going on there :-/.

    @drakeredcrest: It's not a windows application, it's a .NET one. .NET apps run under mono (MRE) on linux and mac just fine - I exclusively develop on linux.

  18. @SaturnV: Mod parts are currently handled with a simple required/banned/allowed-parts list. Part adding mods should be in the required.

    @TJPrime: Extract DMP, double click? :P

    All other problems are network issues (firewalls/port forwarding). You're going to face this with every server, just kind of how the internet works (at least until IPv6 comes along...)

    @tater: Subspace isn't time compression, they are time epochs or locks (These few lines are a subspace). After you have a time locking feature for players, it's a small step to "things from the past are applied, things from the future are held back".

    There are far greater issues to be poked, like KSP's terrain: http://imgur.com/kzQgabf, or different contracts for different players acting strangely (Orbit kerbin contract with 50 craft already in orbit? KSP does not expect these things).

    I'm unsure if KSPM is going to go the subspace route (better for players) or the MCW_LOWEST route (the intuitive way that you'd expect warp to work like) - but warping really is one of the easiest problems to solve here, especially because planet positions and vessel orbit positions are completely deterministic given the universe time and kepler elements ;)

×
×
  • Create New...