News | Forum | People | FAQ | Links | Search | Register | Log in
Random Map Loader
Over the years, I've accumulated hundreds of very high quality maps from this place. Now, it is becoming a nightmare to select a map to play, since there are so much to choose. The maps list in Quakespasm is very long and scrolling the whole list is painfull.

To solve this problem, it would be very usefull to have a small bsp file : random.bsp, that do just one thing : randomly select and load a map from a list of map names stored in a text file. That file could be located inside the default map directory (next to the random.bsp file), and could be edited by the player, using his/her favorite text editor.

So each time the player call the map random.bsp from the console, the engine then loads a random map from the favorite list.

Now, I am not a programmer, and I don't know if this idea could be done for Quake. I think it could be very usefull if it's doable.

So what do you think ? Anyone knows how to do this ?
First | Previous | Next | Last
 
You'd be better off writing this as a separate map launcher program that fires up quake with a random map. 
 
Bollocks to that idea, you could even do this in a batch file. 
 
 
Then it would be OS dependant.

The idea above is to load a random map from within Quake, using the console only. This would be usefull since the player doesn't have to leave Quake, and could load many maps one after another (while staying in Quake).

If the user doesn't like a random choice, he/she could just call the random.bsp map again, directly from the console. 
 
Observation. 
Your proposal requires the ability to read info from a text file, so you are asking for an engine mod, nothing less.

If this has to work in game, then all you can do is pester the coder of your favourite engine to implement a console command to load a random map. No hacky random.bsp needed. 
I'm On OS X 
To me, any solution that uses the OS instead of the Quake console isn't interesting at all.

My query here is to find a solution from within Quake, without modifying the Engine (I'm using Quakespasm).

So is it possible to make a bsp fake "map" (the random.bsp file) that could read a text file inside the id1/maps folder ? 
 
My query here is to find a solution from within Quake, without modifying the Engine (I'm using Quakespasm).

So is it possible to make a bsp fake "map" (the random.bsp file) that could read a text file inside the id1/maps folder ?


No that's not possible because you can't read text files without a engine mod.

I think you might be able to hack something similar with a QC mod though, but the list of maps would have to be hardcoded in a QC file, or stored in entities in the random.bsp 
Then Again 
I bet Preach could come up some krazy idea to make it work in vanilla progs.... 
 
Baker, What Is This ? LOL 
This looks like something from The Matrix. 
 
Download - Created in 2006. 
Hack... 
Kinn,

maybe that hardcoded entities list could be edited using an HexEditor ? 
Oh Also 
Do you need this to load different mods as well, or is this list of maps all for one mod (vanilla I assume) 
 
maybe that hardcoded entities list could be edited using an HexEditor ?

Now this is getting silly 
 
Even easier on MacOS: http://stackoverflow.com/questions/1515730/is-there-a-command-like-watch-or-inotifywait-on-the-mac

In case you did not understand how it works, it randomises the map each time you access the file. So you stay within Quake and just load randommap again and again. 
 
Kinn :

for the moment, I'm not asking to load different mods. Default bsp maps from the id1/maps folder only would already be great (I have about 200 great maps in there).

If the list must be hardcoded, then HexEditing it could be the only choice left, without asking for a modification of the engine (Quakespasm).

Spirit :

while I'm a long time user of OS X, I'm really not familiar with that OS X stuff. So I really don't know how to use the ressources from your link. 
Baker 
That Mod is pretty impressive ! The undergate hall is cool to move in. 
 
Spirit's solution is described in those posts he linked to in the Quakespasm thread. He posted an example command for Linux that will link a different (randomly chosen) bsp file to randommap.bsp each time something (like Quake) opens the file.

If you're on OS X then you'll need to figure out how to modify that Linux command like so that it uses the file-watching tools available on OS X (fswatch), instead of the Linux-specific stuff (inotifywait). 
Johnny Law 
It isn't obvious at all how to use Spirit's code. Where do you put that code ? 
 
Theoretically it should be trivial to add a new command to QS which would switch to a random entry from the filelist... but I'm looking at the QS source and I have no idea where to begin. 
 
Adding a command to QuakeSpasm that reads a textfile to randomly load a map would be ideal ! I think it could actually be awesome ! 
Not A Textfile. 
The list of maps. 
List Of All Maps ? 
As indicated by someone elsewhere on the forum, there are maps that aren't actually true maps (I don't know if this is true).

I think it would be preferable that the user define a list of **favorite** maps in a text file, and the engine could then read it to load a map.

It may be more reliable. 
 
My favorite map is b_shell1.bsp 
First | Previous | Next | Last
You must be logged in to post in this thread.
Website copyright © 2002-2024 John Fitzgibbons. All posts are copyright their respective authors.