Local server doesn't render map



  • I just moved to a new laptop, and have freshly installed lots of things, including screeps. This is an Alienware Windows 10 Pro laptop, so it's got decent memory & disk & whatnot.

    So. I launch screeps, click Private server, then click "Start server" next to localhost. The server seems to start up fine.

    Then I click on the "localhost" box again, and I get a screeps window with my profile in the upper right (I created a new account) but it didn't ask me to pick a badge. I'm on the World View, but none of the rooms render -- the screen is just a wash of dark grey. The zoom in/out buttons are on the left, menu top left, stats top rightish, profile popup, and in the middle (below the "Check out the alpha version..." banner is a search box.

    As I mouse around, rooms display a lighter-grey hover-over, and a popup displays the room names (eg Room W6N6) and owners (hint: they're all none).

    And that's it. I can't click on any rooms.

    No mods installed, but I'm expecting it to look like some Youtube videos, eg Atanner's "Screeps Starter Codebase Template".

    The six processes all look ok; none are reporting egregious errors -- backend says it's couldn't reload bot aI "simplebot" (ENOENT), and the backend previously complained about STEAM_KEY env variable not found but it did say it was trying to connect to the local Steam client (and no further errors, so I assume that worked).

    Connecting (in the Steam client) generates a Sign in message, and two GETs (the second of which takes 1ms and says '(unfinished).

    Any idea what's going on? Is there any way to debug this?



  • I don't think it's just you, I'm running into the same issue right now. I thought it was an issue with mongodb and rolled back to just a normal base install, and I'm having the same issues. I'm able to create username, but no badge and none of the rooms are being displayed. When I had mongo running I could see the entries in the data base, but nothing would render. I was looking for a way to back date the game to the previous version, as right now I believe the new patch broke something. It seems like it's only impacting fresh servers, as I am able to get onto my longer running server with out the issue, as well as Atanner's server.



  • I have the same problem. Map doesn't render on local server and on community servers.



  • 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!

    🎉🌊