-
Notifications
You must be signed in to change notification settings - Fork 0
Using a Private Server
We don't want to push dysfunctional code to MMO, as it can make our bot less efficient or have it stop working entirely. MMO is also slow, and doesn't always provide us with the scenarios we want to test for. Therefore, we need a place to test our code, and a private server works perfectly for this.
Check out this section once your private server is working.
To enhance our testing, there are various things we can change about our private server environment.
- The steamless-client to more CPU efficiently view your server from the web, instead of using the steam desktop client
- Commands to modify the game environment, or to fix server issues
- (additional) Mods to change server behaviour easily, like mongodb for better performance, konami to change game constants, or market to, well, add a market
The Docker version provides much more control, less bugs, no memory leak and much faster speed than the Steam version. It is strongly suggested to use this instead.
- Go to Screeps Server and follow the readme instructions for setting up and running the server. There is also the wonderful Performance Server that has automated testing with milestones - although it isn't ideal for manual testing.
- When the server is running, open the top-left navigator and select "Change Password". Then enter your desired password. Alternatively, run
setPassword('Username', 'YourDesiredPassword')in the server command line - Open your credentials file in your bot's repo and set up the
pserversection with your password and username - You can now run
npm run push-pserverfrom the bot repo directory
With your private server utilized for development, we can start looking at Spawning Into the World
Please keep in mind the Steam version is slow, has many bugs, contains a memory leak that will slow the server to a crawl after a few hours, and is hard to customize. It is highly recommended you use the Docker version instead
- Start Screeps
- Click Private Server
- Click Start
- Open Server location via CMD (
cd C:\Users\<user>\AppData\Local\Screeps\scripts\screeps.com\server - Run
npm install screepsmod-auth - In the
Screep Serverwindow, clickCLItab - Type
setPassword('Username', 'YourDesiredPassword') - Open your credentials file in your bot's repo and set up the
pserversection with your password and username - You can now run
npm run push-pserverfrom the bot repo directory - Done :-)
With your private server utilized for development, we can start looking at Spawning Into the World