View previous topic :: View next topic |
Author |
Message |
MonkRocker
Joined: 07 Aug 2010 Posts: 6
|
Posted: Sun Aug 08, 2010 3:08 am Post subject: Map Cycling? |
|
|
QuakeC n00b here. Was trying to think of a good way to implement some sort of map list/map cycling.
Was thinking of something along the lines of
Code: |
sv_map_list = "dm2;dm4;dm6;e2m1;"
|
in a .cfg file somewhere which is read by qc and sets nextmap appropriately.
One thing I'm having trouble figuring out: where does one define a new sv_ var? I've been poking around the code but have yet to see any. Hints on where to look? Or is this something that's handled by the engine and not QuakeC at all?
Is there a better way to do what I'm trying to do? I'd much rather be able to set a time/fraglimit and blast through 10 maps without having to type a new map command at the end of every level. I like the idea of having it in a cfg file because it's easy to edit and use.
Thanks in advance. |
|
Back to top |
|
 |
Spike
Joined: 05 Nov 2004 Posts: 944 Location: UK
|
Posted: Sun Aug 08, 2010 10:06 am Post subject: |
|
|
the cheap way is to do: localcmd("exec "); localcmd(mapname); localcmd(".cfg\n");
and then put the line 'changelevel $newmap' inside $oldmap.cfg
QuakeWorld mods traditionally do something similar, but using the server's localinfo for it.
Or you can use FRIK_FILE for it with a single file.
Or you can use DP_CON_SET to create cvars in your server.cfg or whatever which can then be read with one of the numerous cvar_string extensions in combination with the FRIK_FILE extension to parse parts of the cvar.
Custom cvars cannot normally be created from mods. You can hijack existing otherwise-unused cvars to do what you want, if you want (temp1, scratch*, saved*, nomonsters are cvars that the engine does not itself use). _________________ What's a signature? |
|
Back to top |
|
 |
MonkRocker
Joined: 07 Aug 2010 Posts: 6
|
Posted: Sun Aug 08, 2010 3:25 pm Post subject: |
|
|
Spike wrote: | the cheap way is to do: localcmd("exec "); localcmd(mapname); localcmd(".cfg\n");
and then put the line 'changelevel $newmap' inside $oldmap.cfg
QuakeWorld mods traditionally do something similar, but using the server's localinfo for it.
Or you can use FRIK_FILE for it with a single file.
Or you can use DP_CON_SET to create cvars in your server.cfg or whatever which can then be read with one of the numerous cvar_string extensions in combination with the FRIK_FILE extension to parse parts of the cvar.
Custom cvars cannot normally be created from mods. You can hijack existing otherwise-unused cvars to do what you want, if you want (temp1, scratch*, saved*, nomonsters are cvars that the engine does not itself use). |
Whoa. That's a barrage of information there. Let's pretend for the sake of discussion that my experience level is working through a few cut/paste tutorials, and MauveBib's tutorials for beginners. Since....it's true. ;) Modding weapons I get the hang of, and I am starting to understand the basic flow of things, but beyond that...
If I understand you correctly, your first method seems to mean that I'd need a separate .cfg file for each map I want to cycle through?
That doesn't seem very "elegant".
Your second idea sounds interesting but: FRIK_FILE? DP_CON_SET? I assume the latter is related to Darkplaces. Where would I find more info about these two things?
Thanks!
Edit: More specifically. Where would I find FRIK_FILE? I looked on FrikaC's project pages and didn't see it. I found some QC Wiki documentation for it, but no link to the actual files. The QuakeC world is a world of dead links. :( |
|
Back to top |
|
 |
|