Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add randommap command to simplify map rotations. #463

Open
emctague opened this issue Aug 7, 2020 · 0 comments
Open

Add randommap command to simplify map rotations. #463

emctague opened this issue Aug 7, 2020 · 0 comments

Comments

@emctague
Copy link

emctague commented Aug 7, 2020

I suggest adding a randommap command to simplify setting up servers that choose from some variety of maps.

Currently, it's rather annoying to have to edit a bunch of lines to set up a map rotation, especially if you want it to appear random. (I've resorted to writing a python script that scans all pk3s for bsp files, randomizes the list and generates a .cfg file with the randomized rotation.) This command would make it easier to get started hosting a server with a nice variety of maps.

randommap would select a random map out of all maps available to the server (i.e. the same maps one would see when autocompleting the map command) and immediately load said map. To ensure maps are randomized consistently, some vstr trickery could be used by the server operator to set off an endless chain of randomization:

set d1 "randommap; set nextmap vstr d1"
vstr d1

I have implemented this feature on a fork. I would submit a PR, but I figure it's important to create an issue for discussion first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant