pelican-eggs / eggs

Service eggs for the pterodactyl panel
MIT License
2.87k stars 2.32k forks source link

[Egg Request]: Screeps Standalone Server #1361

Closed BippyMiester closed 1 year ago

BippyMiester commented 3 years ago

Service

N/A

Does this expand an already existing service

No

Link to game

https://github.com/screeps/screeps

Links for server downloads

https://github.com/screeps/screeps

Links for the install docs

https://docs.screeps.com/contributed/ps_ubuntu.html

BippyMiester commented 3 years ago

Also note, this is a pretty good guide on how to install the server as well.

https://www.reddit.com/r/screeps/comments/deyq66/newbiefriendly_ish_privatededicated_server_setup/

BippyMiester commented 3 years ago

Created a guide on how to install the server on Ubuntu 18.04. This is a fairly straight forward guide. A couple of variable suggestions would be any type of authentication in the config.yml file and the steamKey key at the top of the config file.

https://gist.github.com/JDsWebService/d827518943a54e6841ad45ac1a6f1ad0

parkervcp commented 3 years ago

It looks like the nodejs egg might work already

https://github.com/parkervcp/eggs/tree/master/bots/discord/discord.js

Vaultpls commented 2 years ago

I created a Egg that I'm currently playing through on. It utilizes the NodeJS 12 Egg. I use ghcr.io/parkervcp/yolks:nodejs_12 for startup and node:12-buster-slim for the installation script. Make sure your NPM installation variable includes "screeps" and other mods you want to install(like screepsmod-auth)

NodeJS 14 isn't supported and I believe you can use NodeJS LTS 12 and 16.

On installation I modified the NodeJS 12 egg to make sure it has the following: apt install -y git curl jq file unzip make gcc g++ python2.7 python2.7-dev libtool build-essential; mkdir /mnt/server/.npm-global; set PATH=/mnt/server/.npm-global/bin:$PATH; set NPM_CONFIG_PREFIX=/mnt/server/.npm-global; npm config set prefix '/mnt/server/.npm-global'; npm config set python /usr/bin/python2.7; mkdir -p /mnt/server; cd /mnt/server

Some commands or installation tools may be irrelevant but I haven't cleaned up my Egg/script.

Startup command is: npx screeps init; npx screeps start

I haven't exactly perfected the way of initializing the creation of the server so the console will require the input of your Steam API key but then after that you're golden!

BippyMiester commented 1 year ago

I created a Egg that I'm currently playing through on. It utilizes the NodeJS 12 Egg. I use ghcr.io/parkervcp/yolks:nodejs_12 for startup and node:12-buster-slim for the installation script. Make sure your NPM installation variable includes "screeps" and other mods you want to install(like screepsmod-auth)

NodeJS 14 isn't supported and I believe you can use NodeJS LTS 12 and 16.

On installation I modified the NodeJS 12 egg to make sure it has the following: apt install -y git curl jq file unzip make gcc g++ python2.7 python2.7-dev libtool build-essential; mkdir /mnt/server/.npm-global; set PATH=/mnt/server/.npm-global/bin:$PATH; set NPM_CONFIG_PREFIX=/mnt/server/.npm-global; npm config set prefix '/mnt/server/.npm-global'; npm config set python /usr/bin/python2.7; mkdir -p /mnt/server; cd /mnt/server

Some commands or installation tools may be irrelevant but I haven't cleaned up my Egg/script.

Startup command is: npx screeps init; npx screeps start

I haven't exactly perfected the way of initializing the creation of the server so the console will require the input of your Steam API key but then after that you're golden!

So that really doesn't help all that much. I tried this methodology for a few days now and I can't seem to get it to run at all. It would be really nice if someone would just create an out of the box, heres the egg's JSON file, import it and go method that would be awesome. I'm bumping this since its been almost 2 and a half years and I'm still waiting on someone to help me create this egg or create a pull request. 2 and a half years and its still an open issue. Does nobody check these egg requests?

parkervcp commented 1 year ago

2 and a half years and its still an open issue. Does nobody check these egg requests?

It's been a year and a half. That project hasn't seen updates in more than 2 years. Egg requests get looked at and I responded and I should have closed it then.

The generic eggs were always meant to be a starting point for services like this one. I will be closing this because the generic egg will handle it. It would just need some changes to the install script and the start command.

You need to use nodejs 12 and install python 2 as part of the install script. Anything newer will fail to install. The image needed to run the server will also need to be node 12. i.e. ghcr.io/parkervcp/yolks:nodejs_12. You also need to pull a .screepsrc and update the api token in the file because running screeps init will hang the install or the startup.

The start command needs to be changed to account for using the npx screeps start.

BippyMiester commented 1 year ago

Ok, so if its so easy then why not just create the egg? I don't understand anything about this process, and I've been requesting that this egg be made for years. I've tried the above method and yours and I can't get it to run, so if its that easy, can you just make it? You literally could have made it instead of explaining how to make it.

Also the project is still working and has about 1100 players running on the official servers on ONE shard. Theres not much to update as the API is pretty standard and doesn't need any further updates to it. So yea, of course there wouldn't be activity for 2 years. Its not needed.

Lela810 commented 8 months ago

I've created a Screeps egg with a working CLI. It most definitely is not up to standards, but will do its job pretty well. Maybe give it a try: https://github.com/Lela810/Screeps-Egg

parkervcp commented 8 months ago

I've created a Screeps egg with a working CLI. It most definitely is not up to standards, but will do its job pretty well. Maybe give it a try: https://github.com/Lela810/Screeps-Egg

I don't see why an init script is needed. You can run the npx install and init in the install script. You also shouldn't need to write a config unless the init doesn't make one.

Lela810 commented 8 months ago

I have tried running the npm i screeps during install, but it was always failing. But installing it during execution solved this issue. Due to this, npx screeps init also has to happen during execution.