ScreepsMods / screepsmod-map-tool

MIT License
14 stars 8 forks source link

The map was tripping up my server #25

Open Ratstail91 opened 2 years ago

Ratstail91 commented 2 years ago

I used this map tool to generate terrain for my server using the screepers launcher thing.

However, for some reason, something involving WorldGridData was trying to index an undefined variable. I was able to fix it by first opening up the source code in the browser, and commenting out the following line in the function "fixExits":

//    if (room.terrain === wall) continue

Actually, here's the line itself: https://github.com/ScreepsMods/screepsmod-map-tool/blob/f98ad279ccf4300a4c199a8479f5e9d8aec7fb65/public/renderer.js#L1046

Then, I selected "fix rooms", which regenerated the highway rooms that ran along the inside of the "wall" rooms, giving them all a nice outer wall. This was enough to change the error message, so I restarted the server, and it worked.

Here is my config.yml:

steamKey: <API KEY>
mods: # Recommended mods
- screepsmod-auth
- screepsmod-admin-utils
- screepsmod-mongo  # You must install and start `mongodb` and `redis` before this mod will work
- screepsmod-map-tool
- screepsmod-market
bots:
  simplebot: screepsbot-zeswarm
serverConfig: # This section requires screepsmod-admin-utils to work
  welcomeText:  |
    <h1 style="text-align: center;">KR Game Studios Screeps Server</h1>
  constants: # Used to override screeps constants
  tickRate: 1000  # In milliseconds. This is a lower bound. Users reported problems when set too low.
env:
  backend:
    MAPTOOL_USER: <USERNAME>
    MAPTOOL_PASS: <PASSWORD>

I have 16 bots and one player, in 2x2 sectors, running on ubuntu.

I don't know what exactly caused the issue, but I'm pretty certain it was the bots trying to path through the exit tiles.

bastianh commented 1 year ago

I think there is something wrong with terraindata, because I saw some error in the logs. Also it looks like something is wonky with the room data .. since the screepsmod-admin web page always show all rooms as active on every tick