joedwards32 / CS2

CS2 Dedicated Server Docker Image
https://hub.docker.com/r/joedwards32/cs2
MIT License
266 stars 54 forks source link

How to define custom map groups? #79

Open PfefferT opened 7 months ago

PfefferT commented 7 months ago

On old CS:GO it was possible to set GameMode_server.txt to define maxplayers and custom map groups. I am currently missing this inside the container. Is there anything new in this section? How can i achieve a custom mapgroup and where should I store this config?

labaland commented 7 months ago

i want to know too!

joedwards32 commented 6 months ago

This is possible. I just tested it.

I'll write up some doc shortly.

joedwards32 commented 6 months ago

gamemodes_server.txt

Here's an example map group config. I've updated https://github.com/joedwards32/CS2/raw/main/examples/cs2.cfg.tgz to include an example of this in action, for use with CS2_CFG_URL.

If you are using a persistent volume for the CS2 docker image, you can drop the file in /var/lib/docker/volumes/examples_cs2/_data/game/csgo/gamemodes_server.txt.

Once the file is in place, you can set CS2_MAPGROUP="mg_tournament"

carsonl commented 6 months ago

Would this work for workshop maps mixed with official maps? e.g.

host_workshop_map 3070584943 #  Agency (cs_agency)
map cs_office

For a dedicated server I look after, we only play workshop maps, and use the "workshop collection" method. In CS:GO they used to provide the "current" (and old) version of maps on the workshop as well, so I just included the official maps in the collection and we could have a mix...

If no one else responds, I'm sure I'll get a chance to test this myself at some point in the near future (and will report back )

joedwards32 commented 6 months ago

I don't have much experience with workshop maps. If you figure this out @carsonl please let us know :)

labaland commented 6 months ago

Would this work for workshop maps mixed with official maps? e.g.

host_workshop_map 3070584943 #  Agency (cs_agency)
map cs_office

For a dedicated server I look after, we only play workshop maps, and use the "workshop collection" method. In CS:GO they used to provide the "current" (and old) version of maps on the workshop as well, so I just included the official maps in the collection and we could have a mix...

If no one else responds, I'm sure I'll get a chance to test this myself at some point in the near future (and will report back )

Please tag me if u find a solution! i want this too!

carsonl commented 5 months ago

Yeah, I had a bit of a google to see if others are doing it, and then some naive entries in gamemodes_server.txt like the following, none of which worked: (I did test them one at a time)

                "3070584943" "1"
                "workshop/3070584943/cs_agency" "1"
                "cs_agency" "1"

I'll keep my eyes and ears open for any blogs/announcements