With cordite in the air, splintered steel, shell casings and powder burns, there’s only one explanation...
Discuss & improve the game engine.

Moderators: Tequila, sparcdr, torhu

Postby Pardner » Fri Oct 30, 2009 10:20 pm

I think it would be. But wouldn't that have to depend on weither the server uses the default server config, or were you going to create a dedicated cvar to hold the different cycles? such as:
pl_dm
pl_br
pl_du
(from Joe's script)

Image
Image
User avatar
Pardner
SG Team
 
Posts: 1786
Joined: Fri Nov 18, 2005 5:48 am
Location: MD, USA



Postby /dev/random » Fri Oct 30, 2009 10:29 pm

g_mapcycles contains the available cycles. It only needs to be marked as systeminfo to be used in clients' ui.
User avatar
/dev/random
Smokin' Amigo!
 
Posts: 410
Joined: Thu Jan 22, 2009 1:58 pm



Postby Tequila » Sat Oct 31, 2009 10:29 am

/dev/random is right, but, right now, the command server systeminfo (CS_SERVERINFO) string seems bigger and bigger... Too big then, I really thing we should start to clean it a little.

But for this case, as g_mapcycles could have very different sizes, we should completely think to add a new command server like CS_VOTEINFO to handle such stuff.

Maybe torhu can do something around as he added himself the CS_WEAPONINFO recently so he is completely aware of the constraints ;)
User avatar
Tequila
SG Team
 
Posts: 1100
Joined: Thu Nov 15, 2007 11:33 pm
Location: Montpellier, France



Postby Tequila » Sat Oct 31, 2009 10:48 am

Just created an issue which forbid actually the /dev/random suggestion: "Info string length exceeded" issue
Torhu, if you want to take it, just do. I'll eventually help for the UI part ;)
User avatar
Tequila
SG Team
 
Posts: 1100
Joined: Thu Nov 15, 2007 11:33 pm
Location: Montpellier, France



Postby torhu » Mon Nov 02, 2009 2:17 am

Ok, I'll see about adding a config string for this, at least.
In game: =SG=monSter
Monster Browser
User avatar
torhu
SG Team
 
Posts: 1125
Joined: Thu Jan 06, 2005 8:12 pm
Location: Norway



Postby torhu » Sat Nov 07, 2009 10:23 pm

The callvote menu now supports voting on map cycles. Look for it when 1.1 beta 3 is released. :)
In game: =SG=monSter
Monster Browser
User avatar
torhu
SG Team
 
Posts: 1125
Joined: Thu Jan 06, 2005 8:12 pm
Location: Norway



Postby Joe Kari » Mon Dec 14, 2009 10:17 pm

Hi, I'm really sorry to be so late....

Here my server conf that go with playlist code.
Note that last time I worked on that, I have had some bug (there are rumors about .cfg too big that cause hazardous crash in q3/ioq3), so it needs some test. There are plenty of files.

All this are copy-paste of my last configuration (don't pay attention at server name and other things ;) )

First, the server.cfg, the file that must be execed to start a server :
//Smokin' Guns server configuration.
// Lines with "//" in front of them are ignored by the server. Remove or add these lines to activate or deactivate command lines.

// Administrator Info
sets Admin "Joe Kari"
sets Email "someone AT somewhere.fr"

// Server Name and Daily Message
set sv_hostname "JK server"
sets g_motd "Blah"// This is the message that will be displayed during loading.
sets sv_Location "France"
sets MOD_URL "forum.smokin-guns.org"
sets IRC "#smokinguns @ irc.freenode.net"


// Game Settings
set sv_maxclients "12" // The maximum number of connected clients allowed.
//set g_maxGameClients "" // The maximum number of players that can actually join into the game. All other connected clients can only Spectate.
//set sv_privateClients "2" // sv_privateClients and sv_privatePassword allow for private slots on the server. Example: If sv_maxclients = 16 and sv_privateClients = 2 then there will be 14 public slots and 2 private.
set g_gametype "0" // 0 = deathmatch, 1 = duel, 3 = team deathmatch, 4 = round teamplay, 5 = bank robbery
set fraglimit "30" // 0 = none
set timelimit "20" // 0 = none
set duellimit "2" // 0 = none
set scorelimit "10" // 0 = none
set g_roundtime "4" // 0 = none
set g_dowarmup "0" // Set to 1 to enable a warmup counter before the match starts.
set g_warmup "20" // Number of seconds the warmup lasts.
set g_friendlyFire "1" // 0 = off, 1 = on
set g_chaseonly "0" // 0 = off, 1 = on - Enables or disables free spectator mode.
set g_specsareflies "1" // 0 = off, 1 = on
set g_splitchat "0" // 0 = off, 1 = on - Spectators can't chat with players when set to 1. Set to 0 for deathmatch servers.
set g_delagHitscan "1" // 1 = delagging code enabled, 0 = disabled
set g_smoothclients "1"
set g_deathcam "0" // 0 = off, 1 = on Affects point of view upon being killed.

// duel
set du_enabletrio "1" // 0 = off, 1 = on
set du_forcetrio "1" // 0 = off, 1 = on

// teamnames
set g_redteamname "Lawmen"
set g_blueteamname "Outlaws"

// Passwords
set rconpassword "blah" // Remote administration password.
//set sv_privatePassword "" // Password for private slots on server. Client enters password by typing "set password -----" at the console.
//set g_password "" // Used to password protect the server. Client enters password by typing "set password -----" at the console.


// Bot Setup
set bot_enable "1" // 0 = off, 1 = on
set bot_minplayers "3" // This command manages the addition/removal of autobots. Bots will leave if there is not enough room on the server. As people join, the bots remove themselves one at a time to allow room for the addition of players.
set bot_noBR "0" // set to 1 to disable automatic (bot_minplayers) adding of bots in bank robbery
set bot_noDuel "0" // set to 1 to disable automatic adding (bot_minplayers) of bots in duels
set bot_nochat "1" //set to 1 disables the bot chats
set g_spskill "3" // Sets bot skill. 1 is easiest with 5 being the hardest.

// Server Settings
//set sv_pure "1" // A Pure server will only let users connect if they have the exact same .pk3 files in their SG directory as the server does. Helps stop cheaters from using modified code.
set sv_pure "0"
set g_allowvote "1" // 0 = off, 1 = on
set g_allowVoteKick "1" // 0 = off, 1 = on
set sv_allowdownload "1" // 0 = off, 1 = on
set gamename "smokinguns"
set sv_maxRate "10000" // Sets the maximum allowable rate a client may have set when connected to the server. A suggested setting is 8000 or 10000 so server bandwidth is not used up by high speed clients, thus allowing modem players to have a smoother game.
set g_log "server.log" // This is to set the name of the output file. By default it's "games.log".
set g_inactivity 300 // Number of seconds before an inactive player is kicked.
set sv_floodprotect "1" // 0 = off, 1 = on
set sv_strictAuth "0"
set g_filterBan "1"



// Experimental feature
// g_newshotgunpattern 1 // more realistic shotgun pattern (less randomness, homogenous orthoradial density)
// g_moneyRespawn 1 // new money formula at respawn (if enabled, what a teamkiller lost is given to his teammate)



// Master Servers
seta sv_master1 "master.quake3arena.com" // By default the server will report to the Id Software master server.
seta sv_master2 "master0.gamespy.com" // Server reports to gamespy master server.
// The server can report to a maximum of 5 master servers.






// Those commands are execed just before the nextmap

set dm_config "g_gametype 0 ; kickbots"
set br_config "g_gametype 5 ; kickbots"
set du_config "g_gametype 1 ; kickbots"





exec server_mapcycles.cfg // this is where mapcycles are stored, just to avoid flooding the server.cfg file




// Uncomment only one of these lines, depending on what kind of server you want to run:

//exec server_deathmatch.cfg // this set up the default SG's mapcycle switching behaviour for DM
//exec server_bank_robbery.cfg // this set up the default SG's mapcycle switching behaviour for BR
exec server_duel.cfg // this set up the default SG's mapcycle switching behaviour for Duel




// auto_mapcycle should be set by server_deathmatch.cfg or server_bank_robbery.cfg or server_duel.cfg
// if those file are not loaded, uncomment this (and set up the playlist you want) :
// set auto_mapcycle "vstr mapcycle_mixed"
set mapcycle "vstr auto_mapcycle"
set nextmap vstr mapcycle
vstr nextmap




Then the server_mapcycles.cfg file, containing all macycles (this is probably the one that should be cuted in smaller one).

//Smokin' Guns server mapcycles configuration.
// Lines with "//" in front of them are ignored by the server. Remove or add these lines to activate or deactivate command lines.



// mapcycle mapcycle_small_dm for 4 and less players
set mapcycle_small_dm1 "vstr dm_config ; map dm_train ; set mapcycle_small_dm vstr mapcycle_small_dm2 ; set nextmap vstr mapcycle"
set mapcycle_small_dm2 "vstr dm_config ; map dm_newtown ; set mapcycle_small_dm vstr mapcycle_small_dm3 ; set nextmap vstr mapcycle"
set mapcycle_small_dm3 "vstr dm_config ; map dm_tillian ; set mapcycle_small_dm vstr mapcycle_small_dm4 ; set nextmap vstr mapcycle"
set mapcycle_small_dm4 "vstr dm_config ; map dm_fort ; set mapcycle_small_dm vstr mapcycle_small_dm5 ; set nextmap vstr mapcycle"
set mapcycle_small_dm5 "vstr dm_config ; map dm_dry ; set mapcycle_small_dm vstr mapcycle_small_dm6 ; set nextmap vstr mapcycle"
set mapcycle_small_dm6 "vstr dm_config ; map dm_dawnfort ; set mapcycle_small_dm vstr mapcycle_small_dm7 ; set nextmap vstr mapcycle"
set mapcycle_small_dm7 "vstr dm_config ; map dm_hangemhigh ; set mapcycle_small_dm vstr mapcycle_small_dm1 ; set nextmap vstr mapcycle"

set mapcycle_small_dm "vstr mapcycle_small_dm1"



// mapcycle medium_dm for 4/5/6/7 players
set mapcycle_medium_dm1 "vstr dm_config ; map dm_hangemhigh ; set mapcycle_medium_dm vstr mapcycle_medium_dm2 ; set nextmap vstr mapcycle"
set mapcycle_medium_dm2 "vstr dm_config ; map dm_dry ; set mapcycle_medium_dm vstr mapcycle_medium_dm3 ; set nextmap vstr mapcycle"
set mapcycle_medium_dm3 "vstr dm_config ; map dm_coyotebluff ; set mapcycle_medium_dm vstr mapcycle_medium_dm4 ; set nextmap vstr mapcycle"
set mapcycle_medium_dm4 "vstr dm_config ; map dm_alamo_tiny ; set mapcycle_medium_dm vstr mapcycle_medium_dm5 ; set nextmap vstr mapcycle"
set mapcycle_medium_dm5 "vstr dm_config ; map dm_mine ; set mapcycle_medium_dm vstr mapcycle_medium_dm6 ; set nextmap vstr mapcycle"
set mapcycle_medium_dm6 "vstr dm_config ; map dm_backwater ; set mapcycle_medium_dm vstr mapcycle_medium_dm7 ; set nextmap vstr mapcycle"
set mapcycle_medium_dm7 "vstr dm_config ; map dm_tillian ; set mapcycle_medium_dm vstr mapcycle_medium_dm8 ; set nextmap vstr mapcycle"
set mapcycle_medium_dm8 "vstr dm_config ; map dm_fort ; set mapcycle_medium_dm vstr mapcycle_medium_dm9 ; set nextmap vstr mapcycle"
set mapcycle_medium_dm9 "vstr dm_config ; map dm_nonamecity ; set mapcycle_medium_dm vstr mapcycle_medium_dm10 ; set nextmap vstr mapcycle"
set mapcycle_medium_dm10 "vstr dm_config ; map dm_sancuchillo ; set mapcycle_medium_dm vstr mapcycle_medium_dm11 ; set nextmap vstr mapcycle"
set mapcycle_medium_dm11 "vstr dm_config ; map dm_newtown ; set mapcycle_medium_dm vstr mapcycle_medium_dm12 ; set nextmap vstr mapcycle"
set mapcycle_medium_dm12 "vstr dm_config ; map dm_canyon ; set mapcycle_medium_dm vstr mapcycle_medium_dm13 ; set nextmap vstr mapcycle"
set mapcycle_medium_dm13 "vstr dm_config ; map dm_dawnfort ; set mapcycle_medium_dm vstr mapcycle_medium_dm14 ; set nextmap vstr mapcycle"
set mapcycle_medium_dm14 "vstr dm_config ; map dm_train ; set mapcycle_medium_dm vstr mapcycle_medium_dm1 ; set nextmap vstr mapcycle"

set mapcycle_medium_dm "vstr mapcycle_medium_dm1"



// mapcycle large_dm for 7 and more players
set mapcycle_large_dm1 "vstr dm_config ; map dm_dry ; set mapcycle_large_dm vstr mapcycle_large_dm2 ; set nextmap vstr mapcycle"
set mapcycle_large_dm2 "vstr dm_config ; map dm_coyotebluff ; set mapcycle_large_dm vstr mapcycle_large_dm3 ; set nextmap vstr mapcycle"
set mapcycle_large_dm3 "vstr dm_config ; map dm_backwater ; set mapcycle_large_dm vstr mapcycle_large_dm4 ; set nextmap vstr mapcycle"
set mapcycle_large_dm4 "vstr dm_config ; map dm_nonamecity ; set mapcycle_large_dm vstr mapcycle_large_dm5 ; set nextmap vstr mapcycle"
set mapcycle_large_dm5 "vstr dm_config ; map dm_sancuchillo ; set mapcycle_large_dm vstr mapcycle_large_dm6 ; set nextmap vstr mapcycle"
set mapcycle_large_dm6 "vstr dm_config ; map dm_alamo_tiny ; set mapcycle_large_dm vstr mapcycle_large_dm7 ; set nextmap vstr mapcycle"
set mapcycle_large_dm7 "vstr dm_config ; map dm_steamboat ; set mapcycle_large_dm vstr mapcycle_large_dm1 ; set nextmap vstr mapcycle"

set mapcycle_large_dm "vstr mapcycle_large_dm1"



// mapcycle mapcycle_small_br for 6 or less players
set mapcycle_small_br1 "vstr br_config ; map br_durango ; set mapcycle_small_br vstr mapcycle_small_br2 ; set nextmap vstr mapcycle"
set mapcycle_small_br2 "vstr br_config ; map br_cobber ; set mapcycle_small_br vstr mapcycle_small_br3 ; set nextmap vstr mapcycle"
set mapcycle_small_br3 "vstr br_config ; map br_alamo_tiny ; set mapcycle_small_br vstr mapcycle_small_br4 ; set nextmap vstr mapcycle"
set mapcycle_small_br4 "vstr br_config ; map br_newtown ; set mapcycle_small_br vstr mapcycle_small_br5 ; set nextmap vstr mapcycle"
set mapcycle_small_br5 "vstr br_config ; map br_hangemhigh ; set mapcycle_small_br vstr mapcycle_small_br6 ; set nextmap vstr mapcycle"
set mapcycle_small_br6 "vstr br_config ; map br_dawnfort ; set mapcycle_small_br vstr mapcycle_small_br7 ; set nextmap vstr mapcycle"
set mapcycle_small_br7 "vstr br_config ; map br_train ; set mapcycle_small_br vstr mapcycle_small_br1 ; set nextmap vstr mapcycle"

set mapcycle_small_br "vstr mapcycle_small_br1"



// mapcycle mapcycle_medium_br for 6 to 10 players
set mapcycle_medium_br1 "vstr br_config ; map br_elpaso ; set mapcycle_medium_br vstr mapcycle_medium_br2 ; set nextmap vstr mapcycle"
set mapcycle_medium_br2 "vstr br_config ; map br_durango ; set mapcycle_medium_br vstr mapcycle_medium_br3 ; set nextmap vstr mapcycle"
set mapcycle_medium_br3 "vstr br_config ; map br_cobber ; set mapcycle_medium_br vstr mapcycle_medium_br4 ; set nextmap vstr mapcycle"
set mapcycle_medium_br4 "vstr br_config ; map br_coyotebluff ; set mapcycle_medium_br vstr mapcycle_medium_br5 ; set nextmap vstr mapcycle"
set mapcycle_medium_br5 "vstr br_config ; map br_mexico ; set mapcycle_medium_br vstr mapcycle_medium_br6 ; set nextmap vstr mapcycle"
set mapcycle_medium_br6 "vstr br_config ; map br_santacruz ; set mapcycle_medium_br vstr mapcycle_medium_br7 ; set nextmap vstr mapcycle"
set mapcycle_medium_br7 "vstr br_config ; map br_farm ; set mapcycle_medium_br vstr mapcycle_medium_br8 ; set nextmap vstr mapcycle"
set mapcycle_medium_br8 "vstr br_config ; map br_backwater ; set mapcycle_medium_br vstr mapcycle_medium_br9 ; set nextmap vstr mapcycle"
set mapcycle_medium_br9 "vstr br_config ; map br_alamo_tiny ; set mapcycle_medium_br vstr mapcycle_medium_br10 ; set nextmap vstr mapcycle"
set mapcycle_medium_br10 "vstr br_config ; map br_newtown ; set mapcycle_medium_br vstr mapcycle_medium_br11 ; set nextmap vstr mapcycle"
set mapcycle_medium_br11 "vstr br_config ; map br_hangemhigh ; set mapcycle_medium_br vstr mapcycle_medium_br12 ; set nextmap vstr mapcycle"
set mapcycle_medium_br12 "vstr br_config ; map br_dawnfort ; set mapcycle_medium_br vstr mapcycle_medium_br13 ; set nextmap vstr mapcycle"
set mapcycle_medium_br13 "vstr br_config ; map br_train ; set mapcycle_medium_br vstr mapcycle_medium_br14 ; set nextmap vstr mapcycle"
set mapcycle_medium_br14 "vstr br_config ; map br_nonamecity ; set mapcycle_medium_br vstr mapcycle_medium_br1 ; set nextmap vstr mapcycle"

set mapcycle_medium_br "vstr mapcycle_medium_br1"



// mapcycle mapcycle_large_br 10 or more players
set mapcycle_large_br1 "vstr br_config ; map br_elpaso ; set mapcycle_large_br vstr mapcycle_large_br2 ; set nextmap vstr mapcycle"
set mapcycle_large_br2 "vstr br_config ; map br_cobber ; set mapcycle_large_br vstr mapcycle_large_br3 ; set nextmap vstr mapcycle"
set mapcycle_large_br3 "vstr br_config ; map br_coyotebluff ; set mapcycle_large_br vstr mapcycle_large_br4 ; set nextmap vstr mapcycle"
set mapcycle_large_br4 "vstr br_config ; map br_santacruz ; set mapcycle_large_br vstr mapcycle_large_br5 ; set nextmap vstr mapcycle"
set mapcycle_large_br5 "vstr br_config ; map br_farm ; set mapcycle_large_br vstr mapcycle_large_br6 ; set nextmap vstr mapcycle"
set mapcycle_large_br6 "vstr br_config ; map br_backwater ; set mapcycle_large_br vstr mapcycle_large_br7 ; set nextmap vstr mapcycle"
set mapcycle_large_br7 "vstr br_config ; map br_alamo_tiny ; set mapcycle_large_br vstr mapcycle_large_br8 ; set nextmap vstr mapcycle"
set mapcycle_large_br8 "vstr br_config ; map br_train ; set mapcycle_large_br vstr mapcycle_large_br9 ; set nextmap vstr mapcycle"
set mapcycle_large_br9 "vstr br_config ; map br_nonamecity ; set mapcycle_large_br vstr mapcycle_large_br1 ; set nextmap vstr mapcycle"
//set mapcycle_large_br10 "vstr br_config ; map br_mexico ; set mapcycle_large_br vstr mapcycle_large_br1 ; set nextmap vstr mapcycle"

set mapcycle_large_br "vstr mapcycle_large_br1"







// mapcycle duel
set mapcycle_duel1 "vstr du_config ; map du_highnoon ; set mapcycle_duel vstr mapcycle_duel2 ; set nextmap vstr mapcycle"
set mapcycle_duel2 "vstr du_config ; map du_showdown ; set mapcycle_duel vstr mapcycle_duel1 ; set nextmap vstr mapcycle"

set mapcycle_duel "vstr mapcycle_duel1"


// mapcycle that players could vote for
set g_mapcycles "mapcycle_deathmatch mapcycle_small_dm mapcycle_medium_dm mapcycle_large_dm mapcycle_small_br mapcycle_medium_br mapcycle_large_br mapcycle_bankrobbery mapcycle_duel mapcycle_mixed"




Then the server_duel.cfg file, which contain duel behaviour. Note that du_forcetrio and du_enabletrio are adaptive, it changes every time the number of player change, to keep the game more interesting.


//Smokin' Guns server configuration.
// Lines with "//" in front of them are ignored by the server. Remove or add these lines to activate or deactivate command lines.



// First reset all the onEvent var (we assume that a server never run more than 16 players)

set onEvent_playerConnect ""
set onEvent_playerDisconnect ""

set onEvent_playersUpTo1 ""
set onEvent_playersUpTo2 ""
set onEvent_playersUpTo3 ""
set onEvent_playersUpTo4 ""
set onEvent_playersUpTo5 ""
set onEvent_playersUpTo6 ""
set onEvent_playersUpTo7 ""
set onEvent_playersUpTo8 ""
set onEvent_playersUpTo9 ""
set onEvent_playersUpTo10 ""
set onEvent_playersUpTo11 ""
set onEvent_playersUpTo12 ""
set onEvent_playersUpTo13 ""
set onEvent_playersUpTo14 ""
set onEvent_playersUpTo15 ""
set onEvent_playersUpTo16 ""

set onEvent_playersDownTo0 ""
set onEvent_playersDownTo1 ""
set onEvent_playersDownTo2 ""
set onEvent_playersDownTo3 ""
set onEvent_playersDownTo4 ""
set onEvent_playersDownTo5 ""
set onEvent_playersDownTo6 ""
set onEvent_playersDownTo7 ""
set onEvent_playersDownTo8 ""
set onEvent_playersDownTo9 ""
set onEvent_playersDownTo10 ""
set onEvent_playersDownTo11 ""
set onEvent_playersDownTo12 ""
set onEvent_playersDownTo13 ""
set onEvent_playersDownTo14 ""
set onEvent_playersDownTo15 ""



// Initial setting (don't forget that a server start with no players)

set auto_mapcycle "vstr mapcycle_duel"
kickbots
bot_minplayers 0
bot_nochat 0
set du_enabletrio 0
set du_forcetrio 0

// Set up all the event


// to save server's CPU load : no bot if no player connected (it appears that bot_minplayers has no effect when nobody is here, so we have to use kickbots)
set onEvent_playersDownTo0 "kickbots; bot_minplayers 0"

// 1 bot if you are alone on the server
set onEvent_playersUpTo1 "bot_minplayers 2; bot_nochat 0"
set onEvent_playersDownTo1 "bot_minplayers 2; bot_nochat 0"

// then kick all bot
set onEvent_playersUpTo2 "kickbots; bot_minplayers 0; bot_nochat 1"

set onEvent_playersDownTo2 "du_enabletrio 0; du_forcetrio 0"
set onEvent_playersUpTo3 "du_enabletrio 1; du_forcetrio 1"
set onEvent_playersDownTo3 "du_enabletrio 1; du_forcetrio 1"
set onEvent_playersUpTo4 "du_enabletrio 0; du_forcetrio 0"
set onEvent_playersDownTo4 "du_enabletrio 0; du_forcetrio 0"
set onEvent_playersUpTo5 "du_enabletrio 1; du_forcetrio 0"
set onEvent_playersDownTo5 "du_enabletrio 1; du_forcetrio 0"
set onEvent_playersUpTo6 "du_enabletrio 1; du_forcetrio 1"
set onEvent_playersDownTo6 "du_enabletrio 1; du_forcetrio 1"
set onEvent_playersUpTo7 "du_enabletrio 1; du_forcetrio 0"
set onEvent_playersDownTo8 "du_enabletrio 1; du_forcetrio 0"
set onEvent_playersUpTo9 "du_enabletrio 1; du_forcetrio 1"
set onEvent_playersDownTo9 "du_enabletrio 1; du_forcetrio 1"
set onEvent_playersUpTo10 "du_enabletrio 1; du_forcetrio 0"
set onEvent_playersDownTo11 "du_enabletrio 1; du_forcetrio 0"
set onEvent_playersUpTo12 "du_enabletrio 1; du_forcetrio 1"
set onEvent_playersDownTo12 "du_enabletrio 1; du_forcetrio 1"
set onEvent_playersUpTo13 "du_enabletrio 1; du_forcetrio 0"
set onEvent_playersDownTo14 "du_enabletrio 1; du_forcetrio 0"
set onEvent_playersUpTo15 "du_enabletrio 1; du_forcetrio 1"
set onEvent_playersDownTo15 "du_enabletrio 1; du_forcetrio 1"
set onEvent_playersUpTo16 "du_enabletrio 1; du_forcetrio 0"




Then the server_deathmatch.cfg, this config switch to mapcycle depending on the number of player (the more player, the biger are the map).

//Smokin' Guns server configuration.
// Lines with "//" in front of them are ignored by the server. Remove or add these lines to activate or deactivate command lines.



// First reset all the onEvent var (we assume that a server never run more than 16 players)

set onEvent_playerConnect ""
set onEvent_playerDisconnect ""

set onEvent_playersUpTo1 ""
set onEvent_playersUpTo2 ""
set onEvent_playersUpTo3 ""
set onEvent_playersUpTo4 ""
set onEvent_playersUpTo5 ""
set onEvent_playersUpTo6 ""
set onEvent_playersUpTo7 ""
set onEvent_playersUpTo8 ""
set onEvent_playersUpTo9 ""
set onEvent_playersUpTo10 ""
set onEvent_playersUpTo11 ""
set onEvent_playersUpTo12 ""
set onEvent_playersUpTo13 ""
set onEvent_playersUpTo14 ""
set onEvent_playersUpTo15 ""
set onEvent_playersUpTo16 ""

set onEvent_playersDownTo0 ""
set onEvent_playersDownTo1 ""
set onEvent_playersDownTo2 ""
set onEvent_playersDownTo3 ""
set onEvent_playersDownTo4 ""
set onEvent_playersDownTo5 ""
set onEvent_playersDownTo6 ""
set onEvent_playersDownTo7 ""
set onEvent_playersDownTo8 ""
set onEvent_playersDownTo9 ""
set onEvent_playersDownTo10 ""
set onEvent_playersDownTo11 ""
set onEvent_playersDownTo12 ""
set onEvent_playersDownTo13 ""
set onEvent_playersDownTo14 ""
set onEvent_playersDownTo15 ""



// Initial setting (don't forget that a server start with no players)

set auto_mapcycle "vstr mapcycle_small_dm"
kickbots
bot_minplayers 0
bot_nochat 0
fraglimit 20


// Set up all the event


// to save server's CPU load : no bot if no player connected (it appears that bot_minplayers has no effect when nobody is here, so we have to use kickbots)
set onEvent_playersDownTo0 "kickbots; bot_minplayers 0"

// 3 bots to give some challenge if you are alone on the server
set onEvent_playersUpTo1 "bot_minplayers 4; bot_nochat 0"
set onEvent_playersDownTo1 "bot_minplayers 4; bot_nochat 0"

// then fix the bot_minplayer to 3...
set onEvent_playersUpTo2 "bot_minplayers 3; bot_nochat 1"

set onEvent_playersDownTo3 "set auto_mapcycle vstr mapcycle_small_dm ; set mapcycle vstr auto_mapcycle ; fraglimit 20"
set onEvent_playersUpTo5 "set auto_mapcycle vstr mapcycle_medium_dm ; set mapcycle vstr auto_mapcycle ; fraglimit 25"
set onEvent_playersDownTo6 "set auto_mapcycle vstr mapcycle_medium_dm ; set mapcycle vstr auto_mapcycle ; fraglimit 25"
set onEvent_playersUpTo8 "set auto_mapcycle vstr mapcycle_large_dm ; set mapcycle vstr auto_mapcycle ; fraglimit 30"




Then the server_bank_robbery.cfg, as for deathmatch, it switch between mapcycles (the more player, the biger map).

//Smokin' Guns server configuration.
// Lines with "//" in front of them are ignored by the server. Remove or add these lines to activate or deactivate command lines.



// First reset all the onEvent var (we assume that a server never run more than 16 players)

set onEvent_playerConnect ""
set onEvent_playerDisconnect ""

set onEvent_playersUpTo1 ""
set onEvent_playersUpTo2 ""
set onEvent_playersUpTo3 ""
set onEvent_playersUpTo4 ""
set onEvent_playersUpTo5 ""
set onEvent_playersUpTo6 ""
set onEvent_playersUpTo7 ""
set onEvent_playersUpTo8 ""
set onEvent_playersUpTo9 ""
set onEvent_playersUpTo10 ""
set onEvent_playersUpTo11 ""
set onEvent_playersUpTo12 ""
set onEvent_playersUpTo13 ""
set onEvent_playersUpTo14 ""
set onEvent_playersUpTo15 ""
set onEvent_playersUpTo16 ""

set onEvent_playersDownTo0 ""
set onEvent_playersDownTo1 ""
set onEvent_playersDownTo2 ""
set onEvent_playersDownTo3 ""
set onEvent_playersDownTo4 ""
set onEvent_playersDownTo5 ""
set onEvent_playersDownTo6 ""
set onEvent_playersDownTo7 ""
set onEvent_playersDownTo8 ""
set onEvent_playersDownTo9 ""
set onEvent_playersDownTo10 ""
set onEvent_playersDownTo11 ""
set onEvent_playersDownTo12 ""
set onEvent_playersDownTo13 ""
set onEvent_playersDownTo14 ""
set onEvent_playersDownTo15 ""



// Initial setting (don't forget that a server start with no players)

set auto_mapcycle "vstr mapcycle_small_br"
kickbots
bot_minplayers 0
bot_nochat 0
scorelimit 10


// Set up all the event


// to save server's CPU load : no bot if no player connected (it appears that bot_minplayers has no effect when nobody is here, so we have to use kickbots)
set onEvent_playersDownTo0 "kickbots; bot_minplayers 0"

// 3 bots to give some challenge if you are alone on the server
set onEvent_playersUpTo1 "bot_minplayers 4; bot_nochat 0"
set onEvent_playersDownTo1 "bot_minplayers 4; bot_nochat 0"

// then kick all bot...
set onEvent_playersUpTo2 "kickbots; bot_minplayers 0; bot_nochat 1"

set onEvent_playersDownTo5 "set auto_mapcycle vstr mapcycle_small_br ; set mapcycle vstr auto_mapcycle"
set onEvent_playersUpTo7 "set auto_mapcycle vstr mapcycle_medium_br ; set mapcycle vstr auto_mapcycle"
set onEvent_playersDownTo9 "set auto_mapcycle vstr mapcycle_medium_br ; set mapcycle vstr auto_mapcycle"
set onEvent_playersUpTo11 "set auto_mapcycle vstr mapcycle_large_br ; set mapcycle vstr auto_mapcycle"




In server.cfg, just comment or uncomment those lines...

//exec server_deathmatch.cfg // this set up the default SG's mapcycle switching behaviour for DM
//exec server_bank_robbery.cfg // this set up the default SG's mapcycle switching behaviour for BR
exec server_duel.cfg // this set up the default SG's mapcycle switching behaviour for Duel


... to make your server act like a BR server, a DM server or a DU server.

I hope someone will have time to test and merge those file into the current config.
I hope that .cfg filesize bug has gone :/
The ultimate workaround should be to load only what should be load (so divide the server_mapcycles.cfg into multiple file - one per mapcycle, and exec only used mapcycle).

EDIT:
I have changed the font-size, but be carefull, it still last some "wordwrap".
User avatar
Joe Kari
SG Team
 
Posts: 879
Joined: Sun Sep 16, 2007 8:44 pm
Location: France



Postby Tequila » Tue Dec 15, 2009 1:29 am

:D
This is a BIG come back !!!

Okay I'll take a look ;)
User avatar
Tequila
SG Team
 
Posts: 1100
Joined: Thu Nov 15, 2007 11:33 pm
Location: Montpellier, France



Postby Joe Kari » Wed Dec 16, 2009 6:34 pm

@ Tequila : Does it work ? ;)
User avatar
Joe Kari
SG Team
 
Posts: 879
Joined: Sun Sep 16, 2007 8:44 pm
Location: France



Postby mLy! » Thu Jan 07, 2010 5:01 pm

Tequila anwsered all my quesitons on IRC thx


Wow, I can't believe I missed this post. This 'idea' was on my to do list to post as a request.

Anyway.

I have some question about this. I don't think I fully understoood all.
Is it possible to change mapcycle automaticaly depending on connected players instead of vote.
And if so, can the 'mapcycle only finishes when last human player disconnected' be turned off? This would conflict ofcourse the automatic change.

Second. I took a look at you cycles and you made 3 for BR. I would suggest to have only 2, small and big.

Third. A request to allow/disallow the vote for cycles independant of allow/not allow voting for maps.
My Latest fragmovies:
Winning BB cup
User avatar
mLy!
Gunslinger
 
Posts: 218
Joined: Wed Feb 11, 2009 8:46 pm



Postby Joe Kari » Thu Jan 07, 2010 6:03 pm

mLy! wrote:Is it possible to change mapcycle automaticaly depending on connected players instead of vote.

Yes it is, you can trigger a lot of event with connecting/disconnecting player.
For example in duel mode, my config try to adapt the best with number of player to allow or force trio.
2 players: no trio
3 players: force trio
4 players: no trio
5 players: allow trio
6 players: force trio
...

By the way, it is a config file, so server admin can do want they want with that.

mLy! wrote:And if so, can the 'mapcycle only finishes when last human player disconnected' be turned off? This would conflict ofcourse the automatic change.

What do you mean by that ?

mLy! wrote:Second. I took a look at you cycles and you made 3 for BR. I would suggest to have only 2, small and big.

Admins will do what they want ;)
IMO it's much better to have 3.
User avatar
Joe Kari
SG Team
 
Posts: 879
Joined: Sun Sep 16, 2007 8:44 pm
Location: France



Previous

Return to Code

Show Sidebar
Show Sidebar

User Control Panel