1. This forum is archived for reference. For support & bug reports visit the help section of forums.stardewvalley.net

Bug/Issue [Multiplayer Beta] Loosing Connection While Creating Character Glitches Out Client Slots

Discussion in 'Support' started by fredi_68, May 2, 2018.

  1. fredi_68

    fredi_68 Poptop Tamer

    Hello there
    I was very excited to finally play this game multiplayer so when I heard it came out I rounded up a few people and we tried to get a game going.
    My first attempt at hosting a server worked pretty well. My friend could join and we played for a while until the two others were ready to join. Immediately after my second friend tried to get into the server it became apparent that his keyboard had stopped working so he couldn't enter anything in the character creation screen. He eventually managed to force close the game and relog. At this point we still thought something was wrong with the games UI so he tried to join again. This time, he must have selected the other remaining farmhand cabin (this is the only way I can explain what is about to happen). Since his keyboard was still broken, he had to leave again. Then, our fourth man tried to get in but got an error message saying that there were no free slots available. It took me a while to figure out that it was due to the keyboard person occupying two server slots despite not even being in the game. Needless to say we had to restart.

    TL;DR: I think it would be for the best if there was an easy way for the host to reset client slots from within the game, perhaps through a chat command. Alternatively, maybe allow anyone to access created characters (i.e. don't lock them to a player)?

    If anyone knows of a way to get rid of glitched out farmhand characters, let me know. Otherwise I'll try to edit the savegame manually (I'm sure nothing bad will come from that, definitely).

    Also the multiplayer drop down menu in the settings is a bit weird, you have to hold the button down when selecting something. This has probably been pointed out by others. Just putting it here in case they didn't, doesn't really deserve its own thread imo.
     
      ZanCat likes this.
    • ZanCat

      ZanCat Void-Bound Voyager

      Having the same issue.

      I thought this feature would be similar to Terraria, where you first create your character, then you choose which world / server you want to join. :/ It's sad because I have a farm with a friend and I don't want to lose all that progress.
       
      • fredi_68

        fredi_68 Poptop Tamer

        Seeing as I'm not the only one I'll try to figure out the inner workings of the farmhand system and post a savegame hack / fix here if I can get it to work. I agree, it's a bit annoying when you spent a couple hours doing stuff and then have to start over, especially since the early game is quite chaotic in this game (particularily so in multiplayer), and trying to recover lost progress by replaying is basically impossible.
         
        • fredi_68

          fredi_68 Poptop Tamer

          So I've checked the savegame files and found out where the farmhand data is stored.

          BE AWARE THAT THIS IS A VERY VERY VERY SHADY HACK AND YOU SHOULD MOST DEFINITELY BACK UP YOUR SAVEGAME FILES BEFORE YOU DO ANY OF THESE EDITS.


          I'll use dot-access style writing for element access due to lack of a better way (not really to experienced with XML description conventions):

          The farmhand buildings are located at

          <SaveGame>.<locations>.<GameLocation xsi:type="Farm">.<buildings>

          If you started a new game for multiplayer (like we did), you should see 1 - 3 entries there, corresponding to your farmhand shacks. If you used an older savefile you may have to look for buildings with the element <buildingType>Plank Cabin</buildingType>.
          In there you will find a tag called <indoors>. IF there is a farmhand associated with this cabin, there will be a subelement called <farmhand>. If you are confident this is a glitched farmhand (I could easily tell by the fact that one of mine didn't have a name set :p), you can just delete the entire farmhand tag. The game SHOULD load the savegame correctly after a restart. I haven't been able to confirm that this resets the client slots yet but the game didn't add the tags back so I reckon it worked, probably.

          If you want to switch a farmhand from one player to another, that'll be a bit more difficult I believe. I've been able to localize two candidates for a player ID, one at <farmhand>.<userID> and one at <farmhand>.<UniqueMultiplayerID> . Neither of these seem to be related directly to the Steam user IDs, which is what we used to connect (which makes sense, since the multiplayer is supposedly cross-platform enabled for Steam and GOG) but I could be wrong on that. If you manage to localize the player ID of the person that wants to use a different slot, switching out one of these should do the job I believe. Again, this may very well break just about everything so proceed with caution.

          I will investigate this further and return with more insight once (and if) I've gained any.

          EDIT 1: Obviously the element containing the farmhand building data will have a buildingType corresponding to the kind of building. In other words, it may be one of [Plank Cabin, Log Cabin, or Stone Cabin].
          I'm stupid. Please forgive.

          EDIT 2: Alright, did some more datamining on the savegame files I got from the session last night and here's what I got: The important tag is the <userID>. It's value stays consistent over multiple games, while the UniqueMultiplayerID always changes (I'm guessing that's just a random identifier for internal use). Still don't know how to obtain this userID, the only way I found was to look it up in the savegame, then copy it out to a textfile and store it. If anyone here knows what those IDs mean, where they come from or how they are calculated, I'd be very happy to know. I wanna make sure I can fix glitched farmhands for our games in the future.
           
            Last edited: May 2, 2018

          Share This Page