Inside3D!
     

Map Cycling?

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming
View previous topic :: View next topic  
Author Message
MonkRocker



Joined: 07 Aug 2010
Posts: 6

PostPosted: Sun Aug 08, 2010 3:08 am    Post subject: Map Cycling? Reply with quote

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
View user's profile Send private message
Spike



Joined: 05 Nov 2004
Posts: 944
Location: UK

PostPosted: Sun Aug 08, 2010 10:06 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
MonkRocker



Joined: 07 Aug 2010
Posts: 6

PostPosted: Sun Aug 08, 2010 3:25 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2004 phpBB Group