Local server doesn't render map



  • Same here, I've been trying to connect to any community server I wasn't signed up to and got the same issue. It might have something to do with the player creation or the new world selection screen (persistent world, seasonal etc)



  • I have the same problem, can't get my private development sever working.



  • A temporary workaround that I've found is adding a badge specification for your user in storage, either db.json or whatever you're using.

    For example, in my db.json file I've found the object containing my user's data:

    {
      // ...
      "cpu": 100,
      "cpuAvailable": 0,
      "registeredDate": "2020-06-18T23:37:08.049Z",
      "credits": 0,
      "gcl": 0,
      "username": "silas",
      "usernameLower": "silas"
      // ...
    }
    

    Add the badge field with the following fields:

    
      "badge": {
        "type": 12,
        "color1": "#999999",
        "color2": "#999999",
        "color3": "#999999",
        "flip": false,
        "param": 26
      }
    

    Feel free to change the values, and save. You should now be able to see the map, which means it's probably an issue with the client handling of first time login.

    Note: this obviously does not fix login on private servers where you don't have access to the database.

    Hope this helps someone!

    ☺


  • Yep, this looks like a bug in the Steam new user flow. No badge created, game probably throws an exception, and the rest of the client never does anything useful.

    Found a likely db.json candidate in steamapps/common/screeps/server.

    No such file in AppData/local/screeps, and there are several other db.json files under server/package/node_modules but I figure they're not relevant.

    So... being a lazy coder, I never tried to verify the bug today before I started changing code 🙂 so I just added the badge object, started it up, and now it looks better. The "Display" popup in the top right of the map is there, rooms render, I can drill down into rooms, and "SELECT YOUR ROOM" is displayed (and I can place a Spawn, too).

    This seems to be the fix, silas, thanks!

    👍


  • Glad to help! Although I think this should be left as unsolved to allow the actual bug to be fixed, mine is just a workaround and does not allow for example to join community servers 🙂



  • ok, sure. I'm new here, I'll bow to your wisdom here. Marked unsolved.

    😆


  • Devs are aware and working on it.

    I advise against editing the db.json directly as it is risky. Using the private server cli you can enter the following after replacing the username parameter:

    storage.db.users.update({username:username},{$set: {badge: {type: 0, color1: '#000000', color2: '#000000', color3: '#000000', param: 0, flip: false}}})

    This will work with the screepsmod-mongo mod as well if you are using that.

    For private servers that are not being hosted by yourself you will have to contact the server admin to get the badge set so you can fix your map and place your spawn.

    Most third party servers listed on the screeps client frontpage have slack channels on chat.screeps.com so feel free to stop by and ask for support.

    👍

  • Culture

    Another alternative is to use the API, set a password using authmod https://server.screepspl.us/web has a change password page, as does any other server running screepsmod-auth and screepsmod-admin-utils.

    Then a simple script like this should set the badge (place in empty folder, npm install screeps-api, then run)

    const { ScreepsAPI } = require('screeps-api')
    ScreepsAPI.fromConfig('splus1').then(async api => {
      const ret = await api.raw.user.badge({ type: 24, color1: '#ff0000', color2: '#ffb400', color3: '#ff6a27', param: 0, flip: false })
      if (ret.ok) console.log('Badge Set')
    })
    


  • @psy372 Yes definitely better this way, I tried using the update method but was missing the second parameter since the APIs for LokiJS are quite lacking, thanks for sharing ☺


  • Dev Team

    Should be fixed atm. Sorry for the inconvenience!

    🌊🎉