pelican-eggs / eggs

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

[Egg Request]: V Rising #1662

Closed MADDMAXKZ closed 2 years ago

MADDMAXKZ commented 2 years ago

Does this expand an already existing service

No

Link to a game or software

V Rising Egg

Links for the download

N/A

Links for the install docs

Requesting a Game egg For Pterodactyl

gOOvER commented 2 years ago

https://github.com/StunlockStudios/vrising-dedicated-server-instructions/issues/1#issuecomment-1129496258

mutschler commented 2 years ago

Here's a Startingpoint:

It works but Im not really sure if all the commands are supported via commandline, so you'll most likely need to edit the ServerHostSettings.json manually after install..

{
    "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
    "meta": {
        "version": "PTDL_v1",
        "update_url": null
    },
    "exported_at": "2022-05-18T10:04:22+02:00",
    "name": "V Rising",
    "author": "unknown@unknown.com",
    "description": "V Rising Server see https:\/\/github.com\/StunlockStudios\/vrising-dedicated-server-instructions",
    "features": null,
    "images": [
        "quay.io\/parkervcp\/pterodactyl-images:debian_wine-5"
    ],
    "file_denylist": [],
    "startup": "xvfb-run wine .\/VRisingServer.exe -nographics -batchmode -serverName \"{{SERVER_NAME}}\" -port {{SERVER_PORT}} -password \"{{SERVER_PASSWORD}}\" -listOnMasterServer {{SERVER_PUBLIC}} -maxConnectedUsers {{MAX_USERS}}",
    "config": {
        "files": "{}",
        "startup": "{\r\n    \"done\": \"Loaded ServerGameSettings:\",\r\n\"userInteraction\": []\r\n}",
        "logs": "{}",
        "stop": "^V"
    },
    "scripts": {
        "installation": {
            "script": "#!\/bin\/bash\r\n\r\napt update\r\napt -y install curl unzip lib32gcc1 ca-certificates xvfb\r\ncd \/tmp\r\ncurl -sSL -o steamcmd.tar.gz https:\/\/steamcdn-a.akamaihd.net\/client\/installer\/steamcmd_linux.tar.gz\r\n\r\nmkdir -p \/mnt\/server\/steam\r\ntar -xzvf steamcmd.tar.gz -C \/mnt\/server\/steam\r\n\r\nexport WINETRICKS_RUN=mono\r\nexport HOME=\/mnt\/server\r\nexport AUTO_UPDATE=1\r\nexport SRCDS_APPID=1829350\r\n\r\ncd \/mnt\/server\/steam\r\nchown -R root:root \/mnt\r\n\r\n.\/steamcmd.sh +@sSteamCmdForcePlatformType windows +login anonymous +force_install_dir \/mnt\/server +app_update 1829350 validate +quit\r\n\r\n## setup 32 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk32\r\ncp -v \/mnt\/server\/steam\/linux32\/steamclient.so \/mnt\/server\/.steam\/sdk32\/steamclient.so\r\n\r\n## setup 64 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk64\r\ncp -v \/mnt\/server\/steam\/linux64\/steamclient.so \/mnt\/server\/.steam\/sdk64\/steamclient.so\r\n\r\n#create custom server.cfg\\r\\ncp \\\"\\\/mnt\\\/server\\\/Risk of Rain 2_Data\\\/Config\\\/server_startup.cfg\\\" \\\"\\\/mnt\\\/server\\\/Risk of Rain 2_Data\\\/Config\\\/server.cfg\\\"",
            "container": "debian:buster-slim",
            "entrypoint": "bash"
        }
    },
    "variables": [
        {
            "name": "Password",
            "description": "",
            "env_variable": "SERVER_PASSWORD",
            "default_value": "",
            "user_viewable": true,
            "user_editable": true,
            "rules": "string|max:20"
        },
        {
            "name": "Port",
            "description": "",
            "env_variable": "PORT",
            "default_value": "2456",
            "user_viewable": true,
            "user_editable": true,
            "rules": "required|int"
        },
        {
            "name": "Server Name",
            "description": "",
            "env_variable": "SERVER_NAME",
            "default_value": "",
            "user_viewable": true,
            "user_editable": true,
            "rules": "required|string|max:20"
        },
        {
            "name": "Public",
            "description": "",
            "env_variable": "SERVER_PUBLIC",
            "default_value": "1",
            "user_viewable": true,
            "user_editable": true,
            "rules": "required|boolean"
        },
        {
            "name": "Max Users",
            "description": "",
            "env_variable": "MAX_USERS",
            "default_value": "40",
            "user_viewable": true,
            "user_editable": true,
            "rules": "required|int"
        }
    ]
}
gOOvER commented 2 years ago

Here's a Startingpoint:

It works but Im not really sure if all the commands are supported via commandline, so you'll most likely need to edit the ServerHostSettings.json manually after install..

{
    "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
    "meta": {
        "version": "PTDL_v1",
        "update_url": null
    },
    "exported_at": "2022-05-18T10:04:22+02:00",
    "name": "V Rising",
    "author": "unknown@unknown.com",
    "description": "V Rising Server see https:\/\/github.com\/StunlockStudios\/vrising-dedicated-server-instructions",
    "features": null,
    "images": [
        "quay.io\/parkervcp\/pterodactyl-images:debian_wine-5"
    ],
    "file_denylist": [],
    "startup": "xvfb-run wine .\/VRisingServer.exe -nographics -batchmode -serverName \"{{SERVER_NAME}}\" -port {{SERVER_PORT}} -password \"{{SERVER_PASSWORD}}\" -listOnMasterServer {{SERVER_PUBLIC}} -maxConnectedUsers {{MAX_USERS}}",
    "config": {
        "files": "{}",
        "startup": "{\r\n    \"done\": \"Loaded ServerGameSettings:\",\r\n\"userInteraction\": []\r\n}",
        "logs": "{}",
        "stop": "^V"
    },
    "scripts": {
        "installation": {
            "script": "#!\/bin\/bash\r\n\r\napt update\r\napt -y install curl unzip lib32gcc1 ca-certificates xvfb\r\ncd \/tmp\r\ncurl -sSL -o steamcmd.tar.gz https:\/\/steamcdn-a.akamaihd.net\/client\/installer\/steamcmd_linux.tar.gz\r\n\r\nmkdir -p \/mnt\/server\/steam\r\ntar -xzvf steamcmd.tar.gz -C \/mnt\/server\/steam\r\n\r\nexport WINETRICKS_RUN=mono\r\nexport HOME=\/mnt\/server\r\nexport AUTO_UPDATE=1\r\nexport SRCDS_APPID=1829350\r\n\r\ncd \/mnt\/server\/steam\r\nchown -R root:root \/mnt\r\n\r\n.\/steamcmd.sh +@sSteamCmdForcePlatformType windows +login anonymous +force_install_dir \/mnt\/server +app_update 1829350 validate +quit\r\n\r\n## setup 32 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk32\r\ncp -v \/mnt\/server\/steam\/linux32\/steamclient.so \/mnt\/server\/.steam\/sdk32\/steamclient.so\r\n\r\n## setup 64 bit libraries\r\nmkdir -p \/mnt\/server\/.steam\/sdk64\r\ncp -v \/mnt\/server\/steam\/linux64\/steamclient.so \/mnt\/server\/.steam\/sdk64\/steamclient.so\r\n\r\n#create custom server.cfg\\r\\ncp \\\"\\\/mnt\\\/server\\\/Risk of Rain 2_Data\\\/Config\\\/server_startup.cfg\\\" \\\"\\\/mnt\\\/server\\\/Risk of Rain 2_Data\\\/Config\\\/server.cfg\\\"",
            "container": "debian:buster-slim",
            "entrypoint": "bash"
        }
    },
    "variables": [
        {
            "name": "Password",
            "description": "",
            "env_variable": "SERVER_PASSWORD",
            "default_value": "",
            "user_viewable": true,
            "user_editable": true,
            "rules": "string|max:20"
        },
        {
            "name": "Port",
            "description": "",
            "env_variable": "PORT",
            "default_value": "2456",
            "user_viewable": true,
            "user_editable": true,
            "rules": "required|int"
        },
        {
            "name": "Server Name",
            "description": "",
            "env_variable": "SERVER_NAME",
            "default_value": "",
            "user_viewable": true,
            "user_editable": true,
            "rules": "required|string|max:20"
        },
        {
            "name": "Public",
            "description": "",
            "env_variable": "SERVER_PUBLIC",
            "default_value": "1",
            "user_viewable": true,
            "user_editable": true,
            "rules": "required|boolean"
        },
        {
            "name": "Max Users",
            "description": "",
            "env_variable": "MAX_USERS",
            "default_value": "40",
            "user_viewable": true,
            "user_editable": true,
            "rules": "required|int"
        }
    ]
}

looks like you only copy and paste; you use startup flags, which are not used with v-rising. Also -nographics -batchmode is not supported on windows. This is normally only for Linux to run a headless server

mutschler commented 2 years ago

Well... as i said... starting Point ;)

MADDMAXKZ commented 2 years ago

says server is running showing up on steam servers but i can not join my server or anything

mutschler commented 2 years ago

Default Ports are 9876 and 9877 i think, the Port command line Argument doesn't seem to work

MADDMAXKZ commented 2 years ago

so how do i make this work for my server? if i can not join it

tiweb442 commented 2 years ago

i can confirme that egg working fine as a start i can connect to the server fine

tiweb442 commented 2 years ago

server config are inside /home/container/VRisingServer_Data/StreamingAssets/Settings ServerGameSettings.json and ServerHostSettings.json

gOOvER commented 2 years ago

i can confirme that egg working fine as a start i can connect to the server fine

but as i wrote; there are a lot of Flags, which are not supported.

mutschler commented 2 years ago

so how do i make this work for my server? if i can not join it

Map the Ports from VRisingServer_Data/StreamingAssets/Settings/ServerHostSettings.json in Pterodactyl

mutschler commented 2 years ago

i can confirme that egg working fine as a start i can connect to the server fine

but as i wrote; there are a lot of Flags, which are not supported.

what are "a lot of Flags"? afaik there are two flags which are still in there because of the egg i used as a template (-nographics -batchmode) the documentation you linked says: "Some settings can be overwritten by command line parameters. Below is a list of some of the parameters that can be used." but doesn't state anything more about that...

cetiusrex commented 2 years ago

Hello, I have a working egg based on this image: "quay.io\/parkervcp\/pterodactyl-images:debian_wine-5",

The problem I am having with making this work 100% is that the variable parser isn't replacing the variables in the default ServerHostSettings.json, it replaces it in test files I have made, but not in the default location.

The code I'm using for the variable parser is here:

"config": {
        "files": "{\r\n    \"VRisingServer_Data\/StreamingAssets\/Settings\/ServerHostSettings.json\": {\r\n        \"parser\": \"json\",\r\n        \"find\": {\r\n            \"Port\": \"{{server.build.default.port}}\",\r\n            \"QueryPort\": \"{{server.build.env.QUERY_PORT}}\",\r\n            \"GameSettingsPreset\": \"{{server.build.env.SERVER_TYPE}}\"\r\n        }\r\n    }\r\n}",
        "startup": "{\r\n    \"done\": \"Streamed scene with\"\r\n}",
        "logs": "{}",
        "stop": "^C"
    },

When I use the above code the server crashes and won't start, even if I manually edit the ServerHostSettings.json file.

Any insight or suggestions would be welcome.

mutschler commented 2 years ago

Somehow the file has invalid characters in there... tried the same and cant get past invalid character 'ï' looking for beginning of value error message from wings :(

cetiusrex commented 2 years ago

That's the error I'm getting, but can't figure out where it's coming from. When I pull the file down and examine it, I don't see any invalid characters.

I've run it through a json lint as well and no errors were shown.

Roncarlos commented 2 years ago

Maybe that's due to some encoding issues.

cetiusrex commented 2 years ago

I did find an issue, when you make a change to the ServerHostSettings.json before the server has a first successful run it crashes and doesn't work again until you reinstall it. If however, you run the server fully first, then run your changes it works fine afterwards and can be modified over and over again.

The way I tested this was to write a shell script to use sed to replace the values in the json file. I then created a server with ./configparse.sh -p {{SERVER_PORT}} -q {{QUERY_PORT}} -n "{{SERVER_NAME}}" -t {{SERVER_TYPE}} & wine /home/container/VRisingServer.exe for the startup command. I tested by having the script run right from the beginning of a new run. This failed to run. I then started a new server, with only wine /home/container/VRisingServer.exe it started without any unusual errors. Then I changed the startup to the previous command and restarted, I did this a few times with changes to the config json. All worked. I did the above two tests a few times to confirm.

I'm not sure why this is happening, or how to fix it. Hope it helps understand what's going on. :)

gOOvER commented 2 years ago

I did find an issue, when you make a change to the ServerHostSettings.json before the server has a first successful run it crashes and doesn't work again until you reinstall it. If however, you run the server fully first, then run your changes it works fine afterwards and can be modified over and over again.

The way I tested this was to write a shell script to use sed to replace the values in the json file. I then created a server with ./configparse.sh -p {{SERVER_PORT}} -q {{QUERY_PORT}} -n "{{SERVER_NAME}}" -t {{SERVER_TYPE}} & wine /home/container/VRisingServer.exe for the startup command. I tested by having the script run right from the beginning of a new run. This failed to run. I then started a new server, with only wine /home/container/VRisingServer.exe it started without any unusual errors. Then I changed the startup to the previous command and restarted, I did this a few times with changes to the config json. All worked. I did the above two tests a few times to confirm.

I'm not sure why this is happening, or how to fix it. Hope it helps understand what's going on. :)

can't confirm. The Server runs fine on wine in my egg. Only there is a bug in-persistentDataPath.

What the hell is configparse.sh? You can parse config in the egg itself

gOOvER commented 2 years ago

That's the error I'm getting, but can't figure out where it's coming from. When I pull the file down and examine it, I don't see any invalid characters.

I've run it through a json lint as well and no errors were shown.

as a tip ;) Check EoL ;)

MADDMAXKZ commented 2 years ago

got the Egg to work but... when i try to edit settings like loot or guildsize they dont transfer to game

cetiusrex commented 2 years ago

can't confirm. The Server runs fine on wine in my egg. Only there is a bug in-persistentDataPath.

What the hell is configparse.sh? You can parse config in the egg itself

Can you describe or show how you got the parsing to work? I have yet to get that part to work right, so I wrote my own parsing script to test various options, which is what configparse.sh is.

The egg I have works fine as I described, as long as you don't use any config parsing. Any insight into how to make it work would be appreciated.

gOOvER commented 2 years ago

can't confirm. The Server runs fine on wine in my egg. Only there is a bug in-persistentDataPath. What the hell is configparse.sh? You can parse config in the egg itself

Can you describe or show how you got the parsing to work? I have yet to get that part to work right, so I wrote my own parsing script to test various options, which is what configparse.sh is.

The egg I have works fine as I described, as long as you don't use any config parsing. Any insight into how to make it work would be appreciated.

@cetiusrex https://pterodactyl.io/community/config/eggs/creating_a_custom_egg.html#configuration-files

cetiusrex commented 2 years ago

@gOOvER I've read that many times. The JSON I have should work, but it crashes the server when I run it. For informational purposes here's my JSON for the parser:

{
    "VRisingServer_Data/StreamingAssets/Settings/ServerHostSettings.json": {
        "parser": "json",
        "find": {
            "Port": "{{server.build.default.port}}",
            "QueryPort": "{{server.build.env.QUERY_PORT}}",
            "GameSettingsPreset": "\"{{server.build.env.SERVER_TYPE}}\""
        }
    }
}

I have also validated it through a JSON lint test.

lilkingjr1 commented 2 years ago

@cetiusrex The JSON parser you're using for the Configuration Files assumes all environment variables are Strings and prints them to the file with enclosing " quotations.

So, in your example, "QueryPort" would be printed as:

"QueryPort": "12345"

...and "GameSettingsPreset" would be printed as:

"GameSettingsPreset": ""My server type""

With this ⬆ being invald JSON presented to the game server.

Not sure if this relates to your issue, but I thought I'd point it out regardless. You may get better mileage with the File parser, at least until the JSON parser becomes more feature complete with support for data types other than Strings. Or, you could remove the added quotations surrounding SERVER_TYPE and just hope the server is okay with the port being presented as a String.

ImUrX commented 2 years ago

Did anyone have issues with the server showing in the public list?

MADDMAXKZ commented 2 years ago

Did anyone have issues with the server showing in the public list?

dont show up in list only shows up on lists if popular which is stupid

szentigrad3 commented 2 years ago

can anyone post their working egg please

gOOvER commented 2 years ago

can anyone post their working egg please

there is no public egg yet.

Nanako0129 commented 2 years ago

I did find an issue, when you make a change to the ServerHostSettings.json before the server has a first successful run it crashes and doesn't work again until you reinstall it. If however, you run the server fully first, then run your changes it works fine afterwards and can be modified over and over again.

The way I tested this was to write a shell script to use sed to replace the values in the json file. I then created a server with ./configparse.sh -p {{SERVER_PORT}} -q {{QUERY_PORT}} -n "{{SERVER_NAME}}" -t {{SERVER_TYPE}} & wine /home/container/VRisingServer.exe for the startup command. I tested by having the script run right from the beginning of a new run. This failed to run. I then started a new server, with only wine /home/container/VRisingServer.exe it started without any unusual errors. Then I changed the startup to the previous command and restarted, I did this a few times with changes to the config json. All worked. I did the above two tests a few times to confirm.

I'm not sure why this is happening, or how to fix it. Hope it helps understand what's going on. :)

Yes I can confirm that. I use xvfb-run wine /home/container/VRisingServer.exe as start up command at the first time, it works successfully. And I tried to edit ServerHostSettings.json it through the Pterodactyl panel, it failed to start up.

Then I restalled the server, download ServerHostSettings.json through Pterodactyl panel, open it with VSCode, and I found it's an UTF-8 BOM encoding file, so I edited it in VSCode, uploaded to VRisingServer_Data/StreamingAssets/Settings/ and it worked successfully.

killertobyd commented 2 years ago

@Nanako0129 would it be possible for you to insert your egg here? would be super nice :D

kapatheus commented 2 years ago

Here is my egg that I customised for a few customers. If anyone wants to try: https://github.com/kapatheus/egg-v-rising This is nothing special and hopefully a better one will become available one day, but at least it works.

MADDMAXKZ commented 2 years ago

Here is my egg that I customised for a few customers. If anyone wants to try: https://github.com/kapatheus/egg-v-rising This is nothing special and hopefully a better one will become available one day, but at least it works.

works great just have to get use to changing the setting in save data and not the regular data

kapatheus commented 2 years ago

Here is my egg that I customised for a few customers. If anyone wants to try: https://github.com/kapatheus/egg-v-rising This is nothing special and hopefully a better one will become available one day, but at least it works.

works great just have to get use to changing the setting in save data and not the regular data

Yes, it is recommended to change, that's why I did it. I don't know if the setttings can otherwise be lost in future updates if they have been modified.

GStefanowich commented 2 years ago

@kapatheus I would like to point out though that your README.md says to use ports 9976 and 9977, but the default ports in the ServerHostSettings.json are 9876 and 9877. Tripped me up for a minute.

kapatheus commented 2 years ago

@kapatheus I would like to point out though that your README.md says to use ports 9976 and 9977, but the default ports in the ServerHostSettings.json are 9876 and 9877. Tripped me up for a minute.

Yeah, there was a mistake, it has already been corrected

GameServersHub commented 2 years ago

Here is my egg that I customised for a few customers. If anyone wants to try: https://github.com/kapatheus/egg-v-rising This is nothing special and hopefully a better one will become available one day, but at least it works.

Some of the settings break such as the boolean settings "true/false" since they are set to string anytime you change the settings via panel it converts it to a "string" and prevents it from loading correctly.

kapatheus commented 2 years ago

Here is my egg that I customised for a few customers. If anyone wants to try: https://github.com/kapatheus/egg-v-rising This is nothing special and hopefully a better one will become available one day, but at least it works.

Some of the settings break such as the boolean settings "true/false" since they are set to string anytime you change the settings via panel it converts it to a "string" and prevents it from loading correctly.

I just updated the egg, it fixes loss of saved settings on update/reinstall. I also updated descriptions and some input rules. True/false work for me now and there are some problems with boolean. See https://github.com/pterodactyl/panel/issues/4087

Nanako0129 commented 2 years ago

@Nanako0129 would it be possible for you to insert your egg here? would be super nice :D

@killertobyd I'm using the one that mutschler provides, and I modify the variable parser which is followed from cetiusrex. But the side effects are, I have to download ServerHostSettings.json, edit it with VSCode, and upload, so that the server would not fail to start up.

But hopefully, thanks for kapatheus provide the egg file! Such a great community!

GStefanowich commented 2 years ago

Looks like V Rising also falls victim to this 'Bug (?)' https://github.com/pterodactyl/panel/issues/3841 and causes issues 'Continuing' (Continue Game from the main menu) on a Server that's running on a secondary interface.

XardasDark commented 2 years ago

Egg was merged. Issue can be closed

gOOvER commented 2 years ago

fixed #1680

MaXx-62 commented 1 year ago

@gOOvER Hello, why when I want to stop the server with the eggs BepInex, I have to press kill because just the stop button does not stop the server

gOOvER commented 1 year ago

@gOOvER Hello, why when I want to stop the server with the eggs BepInex, I have to press kill because just the stop button does not stop the server

change stopcmd to : ^^C

MaXx-62 commented 1 year ago

@gOOvER Hello, why when I want to stop the server with the eggs BepInex, I have to press kill because just the stop button does not stop the server

change stopcmd to : ^^C

Also I noticed the server does not save after pressing stop

parkervcp commented 1 year ago

^^C immediately kills the server not giving it a chance to save.

gOOvER commented 1 year ago

@gOOvER Hello, why when I want to stop the server with the eggs BepInex, I have to press kill because just the stop button does not stop the server

change stopcmd to : ^^C

Also I noticed the server does not save after pressing stop

Yes, because Pterodactyl have a Bug with stopcmd and noone fix it. ^C is the normal, but dont work anymore

MaXx-62 commented 1 year ago

@gOOvER Hello, why when I want to stop the server with the eggs BepInex, I have to press kill because just the stop button does not stop the server

change stopcmd to : ^^C

Also I noticed the server does not save after pressing stop

Yes, because Pterodactyl have a Bug with stopcmd and noone fix it. ^C is the normal, but dont work anymore

okay, I understand, I have a question, do you think it is possible to merge 2 or more servers at the same time?

For example having the same backup on several servers to be able to make clusters of them

QuintenQVD0 commented 1 year ago

Please don't use an issue for this. Come to the discord or goover dm's