LsHallo / ets2-dedicated-convoy-server

Provides a docker container for ETS2/ATS multiplayer dedicated server.
Apache License 2.0
57 stars 11 forks source link

[Potential improvement] Setting more than 8 players as Max Players #22

Closed mantazzo closed 4 months ago

mantazzo commented 6 months ago

So, as it was discovered, there is a rather simple trick to increase the max amount of players available for a Convoy server without any extra plugins or anything.

The trick is to modify config.cfg (or, in dedicated server case, config_ds.cfg) and edit line "g_max_convoy_size". By default, it is 8, but you can set it to up to 128 players. This works easily in normal conditions, but for dedicated server case, you need to make the cfg file read-only to make it work reliably.

From personal testing on linux server, it seems that modifying config_ds.cfg in save_data, then chmod 400 the cfg, then setting the max players in the docker-compose file - all that allowed me to host a bigger dedicated server (using the 1.50 image which was linked in a different issue).

Now, the question is - would it be possible somehow to automate this process in the image?

LsHallo commented 6 months ago

That is a really nice find. I think this process can be automated.

It'll probably be a few days though. Kinda busy at the moment. And i also might wait for a working 1.50 server from SCS before starting.

LsHallo commented 6 months ago

I've done a first version of this feature. Unfortunately I'm unable to test right now. You are free to checkout max_player_limit and build it yourself to test. It looks promising. The server startup warns *** WARNING *** : [MP] Warning: Proper player limit exceeded. but I have no way to verify since I cant open ETS atm. Known problems:

You can also try my server: 85568392929016792/101 PW: 321

mantazzo commented 6 months ago

Regarding first launch - could probably do a warning, something in the lines of: "WARNING: No config file detected! This is because you are either launching this for the first time, or there is some misconfiguration. Using default value."

LsHallo commented 6 months ago

If you can test my branch I would really welcome it. There is some strange behavior and I want to verify that is also happens on your end. I've added a check if config_ds exists and if not the entrypoint script will temporarily start the server until config_ds is generated. It will then modify config_ds and for real start the server. It loads fine and the config_ds dump the server startup gives shows the correct g_max_convoy_size but after successful startup of the server it only shows 8 players and the player limit exceed warning also does not show. After restarting the container however everything works as expected... Really strange...

327-LIVE commented 4 months ago

Bonjours, y a t'il du nouveau pour pouvoir lancer un serveur pouvant accepter 128 joueurs ?

LsHallo commented 4 months ago

@327-LIVE It is still really buggy and not super reliable. I can include it as an experimental feature but I won't be able to give support. It is just too unreliable.

LsHallo commented 4 months ago

@mantazzo In your testing where you able to see the server in the server browser? See #27 as I can't see the modded server.

mantazzo commented 4 months ago

Sorry for late answer - I had no issues with detecting my own server, but as mentioned in #27 person may need to set 128 player support in game's config file manually to see the servers. Not 100% sure about this one.