1)I want to be able to have a large number of maps available on the server so that if players want to vote to a particular map they can do this. However, I also want it so that when the server changes level after the timelimit has been hit, it will only select a map from a subset of all the maps available on the server. How can I do this? I would also like to apply this same thing to the default id maps, for example, when the server goes to change the level, it will only find a random level from dm1, dm2, dm3, dm4, dm5, dm6, and not select a level from any of the episodic maps. But, also have the episodic maps available to change level to upon player request and vote.

2)I want to be able to lock out certain game modes, but keep others available to vote. For example, I want the clients to be only able to vote between match, practice, and normal, but not be able to vote the game mode to rocket arena or head-hunters or anything else. Is there a way to do this?

1)I want to be able to have a large number of maps available on the server so that if players want to vote to a particular map they can do this. However, I also want it so that when the server changes level after the timelimit has been hit, it will only select a map from a subset of all the maps available on the server. How can I do this? I would also like to apply this same thing to the default id maps, for example, when the server goes to change the level, it will only find a random level from dm1, dm2, dm3, dm4, dm5, dm6, and not select a level from any of the episodic maps. But, also have the episodic maps available to change level to upon player request and vote.

This can be done with the standard maps, but you have to modify settings.qc file and replace "TRUE" with "FALSE" to all of the maps in the function user_allowed_maps you don't want the game to select. You must also place the level selection to random, because of the way the linear code selection works. At current, there is no way to allow custom maps and not have them be selected in the rotation. This is something I can easily address though and walk you through if you're interested.

desh wrote:

2)I want to be able to lock out certain game modes, but keep others available to vote. For example, I want the clients to be only able to vote between match, practice, and normal, but not be able to vote the game mode to rocket arena or head-hunters or anything else. Is there a way to do this?

Unfortunately this too is going to require you to modify the source and recompile. You'll need to open up the file vote.qc and in the function vote go through all of the various vote options and change the value of "cancel" to 1. Here is an example block of code specific to one vote option, in this case it's practice mode:

To clarify, in the user_allowed_map function in the settings.qc file, after changing a map (for example e1m8) from "return TRUE" to "return FALSE" this map will not be selected during the random map selection process, but the map (e1m8) would still be able to be voted on and warped to by the clients?

To do this for custom maps, could I simply add code to the user_allowed_map function for all custom maps that I want to "return FALSE"? For example, after the dm6 line add the following:

Code:

else if (m == "cleaver" ) { return FALSE ; } //

would this eliminate the custom map, cleaver.bsp, from being selected during the random map selection process?

2)I want to be able to lock out certain game modes, but keep others available to vote. For example, I want the clients to be only able to vote between match, practice, and normal, but not be able to vote the game mode to rocket arena or head-hunters or anything else. Is there a way to do this?

Unfortunately this too is going to require you to modify the source and recompile. You'll need to open up the file vote.qc and in the function vote go through all of the various vote options and change the value of "cancel" to 1. Here is an example block of code specific to one vote option, in this case it's practice mode:

But, there are other ways of disabling some of the other vote options, for example, vote-rune and vote-hook can be disabled through other means?

I know that vote-hook is one and vote-team is another, but not vote-rune. Although you might be able to prevent the availability of runes making it zero so regardless of what state vote-rune is in, no runes will ever appear. Some options are prevented from being triggered, like vote-quad for example if there aren't any quads of the level.

desh wrote:

To clarify, in the user_allowed_map function in the settings.qc file, after changing a map (for example e1m8) from "return TRUE" to "return FALSE" this map will not be selected during the random map selection process, but the map (e1m8) would still be able to be voted on and warped to by the clients?

To do this for custom maps, could I simply add code to the user_allowed_map function for all custom maps that I want to "return FALSE"? For example, after the dm6 line add the following:

Code:

else if (m == "cleaver" ) { return FALSE ; } //

would this eliminate the custom map, cleaver.bsp, from being selected during the random map selection process?

Nope. If you want to eliminate all custom maps from the level selection code edit the file map.qc in the functon select_map by changing

Code:

if (!noexit & NOEXIT_NO_CUSTOM_LEVELS)

with

Code:

if (0)

This will still give you the freedom of disabling the custom level voting if you wish (using noexit cvar), but will never select a custom map in the rotation.

Nope. If you want to eliminate all custom maps from the level selection code edit the file map.qc in the functon select_map by changing

No, what I want to do is eliminate some of the custom maps from the random level selection code, but also keep the availability of having those maps eliminated from the level selection code to be selected by way of vote by the clients currently on the server.

No, what I want to do is eliminate some of the custom maps from the random level selection code, but also keep the availability of having those maps eliminated from the level selection code to be selected by way of vote by the clients currently on the server.

The simplest way to do this is to edit the map-auto.qc script. Since this is a generated script though you would have to manually edit this each time you add/remove more maps so that new level impulses can be generated. You must also make sure that you when you generate the map-auto.qc file, you list the maps you don't want in the rotation last. Next, you need to modify the map-auto.qc script. Search for the function sized_custom_count, here is an example of what it might look like:

In the example above, it shows that I have 9 small levels in the custom rotation. If you generated the map-auto.qc as I suggested by putting the levels you want in the rotation first, all you need to do now is subtract the amount of levels you don't want played from the value per level size. NOTE: You can see what these levels are in the function sized_custom. Here is what my sized_custom function looks like for this example:

Yes, that makes perfect sense. I had been looking at the map-auto.qc file a lot, so I was wondering if there was something there I could do. I was hesitant, however, because it is automatically generated.

When and how is this file automatically generated? I guess what I'm getting at, is if map-auto.qc is automatically generated, where would I add custom maps?

Last edited by desh on Tue May 12, 2009 9:47 pm, edited 1 time in total.

Yes, however, I should point out that the level selection code for standard maps differs greatly from the custom maps. It might be more effective to edit the user_allowed_map in settings.qc for standard. Also, anytime you make changes related to the custom maps and you need to recompile, you should completely exit out the server and start up. This will ensure all custom maps are read back into the hunk. Alternatively you can type update-hunkinit from the server, but if you added new maps then you'll need to type update-bindings as well. It's probably easier to just restart the server, but I've never made mention to these commands before so I figured I'd air them our here.

yes, it execs the startlevel.cfg (that's why it says unknown command for all the commands). The server is still runequake server because if i connect to it, it starts up with the runequake display screen, and all the client side commands work.

Check your config.cfg on the new machine and remove any saved1, saved2, saved3, and saved4 values and make them zero. You probably ran the mod in listen mode and then exited the server and those values got saved to config.cfg when you exited. If you don't use config.cfg for anything or rarely modify it, change the attributes to read only.

only the first map from each group (small, medium, and large) can be selected through the random map selection process. However, when typing the "custom" command, it only shows the first map of each group as well. Now the aliasing commands of all the maps is still intact (e.g. using the command "cleaver" or "ztndm3" will still initiate a vote to change the map to cleaver.bsp or ztndm3.bsp, respectively), but all the available maps on the server are not listed when the "custom" command is issued.

// this is a copy of the new original function, but with a new namefloat (float levsize)sized_custom_count_real ={ if (levsize == 1) return 41; if (levsize == 2) return 78; if (levsize == 3) return 40; return FALSE;};

Next, in rjs.qc search for sized_custom_count and change it to sized_custom_count_real, which is located in the function custom_sprint.

Who is online

Users browsing this forum: No registered users and 6 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum