Random Map Rotation

Status: 
Pending

Simply Put

A cvar or function in the server.cfg that will randomly cycle through a list of maps

the maps can be controlled in a few cvars

lmd_randommapcount "value"
lmd_rmap1 "map"
lmd_rmap2 "map"
lmd_rmap3 "map"
lmd_rmapn "map"

or however it is easiest to do.

the mod will choose a map at random, (but never the same one 2 times in a row) to use as the next map

this should also account for when the server crashes, it should just pick one map at random.

This can be used as 2 things

1, a temp fix for the map change bug (would keep the maps rotating even after crash)
2, more variety on servers, not too much of one map type thing.

0
Your rating: None
NikitaRus
Offline
Joined: 05/21/2010
You could do the same with

You could do the same with entities. Making a different variations of target_level_change and removing the same map you're using from the list. Using a func_timer with spawnflags,1 that targets a lmd_toggle with few options that warn you about how much time is left for the map, and a final lmd_toggle target using a target_random which choose a map from the list.

You can even make that on a .cfg and exec it on every map you want, or create separate cfg for every map you want, removing the current map from the script.

NikitaRus
Offline
Joined: 05/21/2010
Or using this: Note: remember

Or using this:

Note: remember to edit the mapchange of the current map to a target_print instead of a target_level_change. So players don't restart the map if they vote for the same map.

place lmd_terminal 30 model,map_objects/desert/view_panel_desert,spawnflags,2,target,voteffa3,target2,voterogue,target3,votestamp,target4,votedanger,message,Votacion de mapas,cmd,Votar FFA3,cmd2,Votar Rogue,cmd3,Votar Stamp,cmd4,Votar Danger,cmd5,Votar Desert,target5,votedesert,cmd6,Votar Vjun3,target6,votevjun3,group,votemap

place lmd_terminal 30 model,map_objects/desert/view_panel_desert,spawnflags,2,target,voteffa3,target2,voterogue,target3,votestamp,target4,votedanger,message,Votacion de mapas,cmd,Votar FFA3,cmd2,Votar Rogue,cmd3,Votar Stamp,cmd4,Votar Danger,cmd5,Votar Desert,target5,votedesert,cmd6,Votar Vjun3,target6,votevjun3,group,votemap
wait 15

place lmd_toggle 0 targetname,voteffa3_toggle,count,3,target,voteffa3_1,target2,voteffa3_2,target3,voteffa3_3,group,votemap
place lmd_toggle 0 targetname,voterogue_toggle,count,3,target,voterogue_1,target2,voterogue_2,target3,voterogue_3,group,votemap
place lmd_toggle 0 targetname,votestamp_toggle,count,3,target,votestamp_1,target2,votestamp_2,target3,votestamp_3,group,votemap
place lmd_toggle 0 targetname,votedanger_toggle,count,3,target,votedanger_1,target2,votedanger_2,target3,votedanger_3,group,votemap
place lmd_toggle 0 targetname,votedesert_toggle,count,3,target,votedesert_1,target2,votedesert_2,target3,votedesert_3,group,votemap
place lmd_toggle 0 targetname,votevjun3_toggle,count,3,target,votevjun3_1,target2,votevjun3_2,target3,votevjun3_3,group,votemap
wait 30

place target_print 0 targetname,voteffa3_1,spawnflags,16,message,^1ANUNCIO^7: ^2Se ha realizado una votacion para cambiar el mapa a ^3mp/ffa3^2. Faltan ^32^2 votos mas.,group,votemap
place target_print 0 targetname,voterogue_1,spawnflags,16,message,^1ANUNCIO^7: ^2Se ha realizado una votacion para cambiar el mapa a ^3t2_rogue^2. Faltan ^32^2 votos mas.,group,votemap
place target_print 0 targetname,votestamp_1,spawnflags,16,message,^1ANUNCIO^7: ^2Se ha realizado una votacion para cambiar el mapa a ^3t3_stamp^2. Faltan ^32^2 votos mas.,group,votemap
place target_print 0 targetname,votedanger_1,spawnflags,16,message,^1ANUNCIO^7: ^2Se ha realizado una votacion para cambiar el mapa a ^3t1_danger^2. Faltan ^32^2 votos mas.,group,votemap
place target_print 0 targetname,votedesert_1,spawnflags,16,message,^1ANUNCIO^7: ^2Se ha realizado una votacion para cambiar el mapa a ^3mp/siege_desert^2. Faltan ^32^2 votos mas.,group,votemap
place target_print 0 targetname,votevjun3_1,spawnflags,16,message,^1ANUNCIO^7: ^2Se ha realizado una votacion para cambiar el mapa a ^3vjun3^2. Faltan ^32^2 votos mas.,group,votemap
wait 30

place target_print 0 targetname,voteffa3_2,spawnflags,16,message,^1ANUNCIO^7: ^2Se ha realizado una votacion para cambiar el mapa a ^3mp/ffa3^2. Faltan ^31^2 voto mas.,group,votemap
place target_print 0 targetname,voterogue_2,spawnflags,16,message,^1ANUNCIO^7: ^2Se ha realizado una votacion para cambiar el mapa a ^3t2_rogue^2. Faltan ^31^2 voto mas.,group,votemap
place target_print 0 targetname,votestamp_2,spawnflags,16,message,^1ANUNCIO^7: ^2Se ha realizado una votacion para cambiar el mapa a ^3t3_stamp^2. Faltan ^31^2 voto mas.,group,votemap
place target_print 0 targetname,votedanger_2,spawnflags,16,message,^1ANUNCIO^7: ^2Se ha realizado una votacion para cambiar el mapa a ^3t1_danger^2. Faltan ^31^2 voto mas.,group,votemap
place target_print 0 targetname,votedesert_2,spawnflags,16,message,^1ANUNCIO^7: ^2Se ha realizado una votacion para cambiar el mapa a ^3mp/siege_desert^2. Faltan ^31^2 voto mas.,group,votemap
place target_print 0 targetname,votevjun3_2,spawnflags,16,message,^1ANUNCIO^7: ^2Se ha realizado una votacion para cambiar el mapa a ^3vjun3^2. Faltan ^31^2 voto mas.,group,votemap
wait 30

place target_print 0 targetname,voteffa3_3,spawnflags,16,message,^1ANUNCIO^7: ^2El mapa ^3mp/ffa3^2 acaba de ganar la votacion. Cambiando de mapa...,group,votemap
place target_print 0 targetname,voterogue_3,spawnflags,16,message,^1ANUNCIO^7: ^2El mapa ^3t2_rogue acaba de ganar la votacion. Cambiando de mapa...,group,votemap
place target_print 0 targetname,votestamp_3,spawnflags,16,message,^1ANUNCIO^7: ^2El mapa ^3t3_stamp^2 acaba de ganar la votacion. Cambiando de mapa...,group,votemap
place target_print 0 targetname,votedanger_3,spawnflags,16,message,^1ANUNCIO^7: ^2El mapa ^3t1_danger^2 acaba de ganar la votacion. Cambiando de mapa...,group,votemap
place target_print 0 targetname,votedesert_3,spawnflags,16,message,^1ANUNCIO^7: ^2El mapa ^3mp/siege_desert^2 acaba de ganar la votacion. Cambiando de mapa...,group,votemap
place target_print 0 targetname,votevjun3_3,spawnflags,16,message,^1ANUNCIO^7: ^2El mapa ^3vjun3^2 acaba de ganar la votacion. Cambiando de mapa...,group,votemap
wait 30

place lmd_gate 0 targetname,voteffa3,target,voteffa3_toggle,target2,vote_deac,group,votemap
place lmd_gate 0 targetname,voterogue,target,voterogue_toggle,target2,vote_deac,group,votemap
place lmd_gate 0 targetname,votestamp,target,votestamp_toggle,target2,vote_deac,group,votemap
place lmd_gate 0 targetname,votedanger,target,votedanger_toggle,target2,vote_deac,group,votemap
place lmd_gate 0 targetname,votedesert,target,votedesert_toggle,target2,vote_deac,group,votemap
place lmd_gate 0 targetname,votevjun3,target,votevjun3_toggle,target2,vote_deac,group,votemap
wait 30

place target_relay 0 targetname,vote_deac,target,vote_deac15,group,votemap
place target_relay 0 targetname,vote_deac,target,vote_deac10,group,votemap
place target_relay 0 targetname,vote_deac,target,vote_deac5,group,votemap
wait 30

place target_activate 0 targetname,vote_delay_2,target,vote_deac15,group,votemap
place target_deactivate 0 targetname,vote_delay,target,vote_deac10,group,votemap
place target_deactivate 0 targetname,vote_delay,target,vote_deac5,group,votemap
wait 30

place target_deactivate 0 targetname,vote_delay_2,target,vote_deac15,group,votemap
place target_activate 0 targetname,vote_delay_2,target,vote_deac10,group,votemap
place target_deactivate 0 targetname,vote_delay_2,target,vote_deac5,group,votemap
wait 30

place target_deactivate 0 targetname,vote_delay_1,target,vote_deac15,group,votemap
place target_deactivate 0 targetname,vote_delay_1,target,vote_deac10,group,votemap
place target_activate 0 targetname,vote_delay_1,target,vote_deac5,group,votemap

place target_print 0 targetname,vote_deac15,spawnflags,20,message,^1SISTEMA^7: ^2Todavia faltan menos de ^315^2 minutos para votar.,group,votemap
place target_print 0 targetname,vote_deac10,spawnflags,20,message,^1SISTEMA^7: ^2Todavia faltan menos de ^310^2 minutos para votar.,group,votemap
place target_print 0 targetname,vote_deac5,spawnflags,20,message,^1SISTEMA^7: ^2Todavia faltan menos de ^35^2 minutos para votar.,group,votemap
wait 30

place target_delay 0 targetname,voteffa3_3,delay,5,target,map_ffa3,group,votemap
place target_delay 0 targetname,voterogue_3,delay,5,target,map_rogue,group,votemap
place target_delay 0 targetname,votestamp_3,delay,5,target,map_stamp,group,votemap
place target_delay 0 targetname,votedanger_3,delay,5,target,map_danger,group,votemap
place target_delay 0 targetname,votedesert_3,delay,5,target,map_desert,group,votemap
place target_delay 0 targetname,votevjun3_3,delay,5,target,map_vjun3,group,votemap
wait 30

place target_level_change 0 targetname,map_ffa3,mapname,mp/ffa3,group,votemap
place target_level_change 0 targetname,map_rogue,mapname,t2_rogue,group,votemap
place target_level_change 0 targetname,map_stamp,mapname,t3_stamp,group,votemap
place target_level_change 0 targetname,map_danger,mapname,t1_danger,group,votemap
place target_level_change 0 targetname,map_desert,mapname,mp/siege_desert,group,votemap
place target_level_change 0 targetname,map_vjun3,mapname,vjun3,group,votemap
wait 30

place target_delay 0 targetname,vote_delay,target,vote_delay_2,delay,300,group,votemap
place target_delay 0 targetname,vote_delay_2,target,vote_delay_1,delay,300,group,votemap
place target_delay 0 targetname,vote_delay_1,target,vote_act,delay,300,group,votemap
place target_activate 0 targetname,vote_delay,target,vote_deac15,group,votemap
wait 30

place target_relay 0 targetname,voteffa3_1,target,vote_delay,group,votemap
place target_relay 0 targetname,voterogue_1,target,vote_delay,group,votemap
place target_relay 0 targetname,votestamp_1,target,vote_delay,group,votemap
place target_relay 0 targetname,votedanger_1,target,vote_delay,group,votemap
place target_relay 0 targetname,votedesert_1,target,vote_delay,group,votemap
place target_relay 0 targetname,votevjun3_1,target,vote_delay,group,votemap
wait 30

place target_relay 0 targetname,voteffa3_2,target,vote_delay,group,votemap
place target_relay 0 targetname,voterogue_2,target,vote_delay,group,votemap
place target_relay 0 targetname,votestamp_2,target,vote_delay,group,votemap
place target_relay 0 targetname,votedanger_2,target,vote_delay,group,votemap
place target_relay 0 targetname,votedesert_2,target,vote_delay,group,votemap
place target_relay 0 targetname,votevjun3_2,target,vote_delay,group,votemap
wait 30

place target_deactivate 0 targetname,voteffa3,target,voteffa3,target2,voterogue,target3,votestamp,target4,votedanger,target5,votedesert,target6,votevjun3,group,votemap
place target_deactivate 0 targetname,voterogue,target,voteffa3,target2,voterogue,target3,votestamp,target4,votedanger,target5,votedesert,target6,votevjun3,group,votemap
place target_deactivate 0 targetname,votestamp,target,voteffa3,target2,voterogue,target3,votestamp,target4,votedanger,target5,votedesert,target6,votevjun3,group,votemap
place target_deactivate 0 targetname,votedanger,target,voteffa3,target2,voterogue,target3,votestamp,target4,votedanger,target5,votedesert,target6,votevjun3,group,votemap
place target_deactivate 0 targetname,votedesert,target,voteffa3,target2,voterogue,target3,votestamp,target4,votedanger,target5,votedesert,target6,votevjun3,group,votemap
place target_deactivate 0 targetname,votevjun3,target,voteffa3,target2,voterogue,target3,votestamp,target4,votedanger,target5,votedesert,target6,votevjun3,group,votemap
wait 30

place target_activate 0 targetname,vote_act,target,voteffa3,target2,voterogue,target3,votestamp,target4,votedanger,target5,votedesert,target6,votevjun3,group,votemap
wait 30

place target_print 0 targetname,vote_delay_2,spawnflags,8,message,^1ANUNCIO^7: ^2Faltan ^310^2 minutos para poder votar por un mapa.,group,votemap
place target_print 0 targetname,vote_delay_1,spawnflags,8,message,^1ANUNCIO^7: ^2Faltan ^35^2 minutos para poder votar por un mapa.,group,votemap
place target_print 0 targetname,vote_act,spawnflags,16,message,^1ANUNCIO^7: ^2Se puede realizar un voto para cambiar de mapa.,group,votemap

Siebe
Offline
Joined: 05/26/2010
ya but that doesn't help on

ya but that doesn't help on map crashing, as it would resolve to the first map in the cycle

also

the target_level_change wouldn't help with the map crashes either, as my experience with them is that they cause crashes

ya your idea works in theory, but imo its not practical for the purpose.

edit:

that is just somewhat of a pain to do. and wouldn't help when the map crashes still. would still go back to the first map in the rotation.

ya people could use it, but I would prefer to have one built into the mod or as a script.

Euclid
Offline
Joined: 05/23/2010
yeah, p wong tried this on R

yeah, p wong tried this on R and it worked pretty well

Euclid
Offline
Joined: 05/23/2010
also: Laziness on siebe's

also: Laziness on siebe's part

Siebe
Offline
Joined: 05/26/2010
not really, that can be

not really, that can be implemented, but it doesn't help with map crashes.

if the server changes on map change what does that help cept the map can be voted on to change, and crash

NikitaRus
Offline
Joined: 05/21/2010
There's an easy way of

There's an easy way of solving it. Instead of suggesting things that are based on map crash it's easer to report the crash and wait for a fix.

bboy cero
Offline
Joined: 05/08/2010
It crashes when it's about to

It crashes when it's about to change to the next map. Sometimes it does not, sometimes it does. You can't really tell what's causing it. I think it would be much simplier and easier for phred to add the idea from the first post that trying to fix a server/map sometimes crashing at mapchange.

Siebe
Offline
Joined: 05/26/2010
that and its not just a fix,

that and its not just a fix, its something cool to add.

Euclid
Offline
Joined: 05/23/2010
fixing the crash should be a

fixing the crash should be a priority, but the random map idea should be considered also after the fix

Siebe
Offline
Joined: 05/26/2010
well it depends on which is

well it depends on which is faster to fix imo

if he can make the random map rotation quicker and easier then he should do that, then work on the map change crash imo.

Euclid
Offline
Joined: 05/23/2010
well, no, because i'm sure

well, no, because i'm sure there are servers who would rather have their map order not random

it's better to fix a known bug first and then do the additions, or else all of the bugs pile up a la T2

NikitaRus
Offline
Joined: 05/21/2010
It's better to make a system

It's better to make a system that after a crash starts the last map used, and make a mapchange system ingame.

Siebe
Offline
Joined: 05/26/2010
idk, my experience with

idk, my experience with target_level_change tells me they crash too much for my liking,

but the idea of starting at last map could be a cvar. that would be cool

iMp
Offline
Joined: 05/15/2010
you could do dynamic

you could do dynamic rotations with scripts you know ....

i remember seeing a guide of it in jediknight3.filefront.com but i dont remember how it was named tho.

Siebe
Offline
Joined: 05/26/2010
ya I know that I can, i just

ya I know that I can, i just don't know how lol

plus I figure many people would prolly use it, so it would be useful to add to the mod.

Euclid
Offline
Joined: 05/23/2010
target_level_change doesn't

target_level_change doesn't work because of the crashes

that's why it needs to be fixed

why is this topic still going? there's no discussion; bugs need to be fixed

christ

Siebe
Offline
Joined: 05/26/2010
agreed, fix the bug, then add

agreed, fix the bug, then add this idea.