Difference between revisions of "ETPro:Pluggable Config Files"
(Updates) |
(setl limits) |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 32: | Line 32: | ||
set g_userTimeLimit 12 | set g_userTimeLimit 12 | ||
command "forcecvar r_drawfoliage 0" | command "forcecvar r_drawfoliage 0" | ||
+ | mapscripthash <sha1 hash> | ||
} | } | ||
... | ... | ||
− | signature | + | signature <sig> |
===Config file details=== | ===Config file details=== | ||
;comments : any text following // is a comment and is ignored | ;comments : any text following // is a comment and is ignored | ||
Line 52: | Line 53: | ||
;set <cvarname> "value" : sets the specified cvar to the specified value. | ;set <cvarname> "value" : sets the specified cvar to the specified value. | ||
;setl <cvarname> "value" : sets the specified cvar to the specified value, and locks it so that it cannot be changed by rcon, forcecvar or other means until the config is unloaded | ;setl <cvarname> "value" : sets the specified cvar to the specified value, and locks it so that it cannot be changed by rcon, forcecvar or other means until the config is unloaded | ||
+ | note: setl names and values are limited to 63 characters in etpro versions up to and including 3.2.6 | ||
;command "command text" : execute "command text" | ;command "command text" : execute "command text" | ||
+ | ;mapscripthash <sha1 hash> : Require a particular mapscript be used for a map. Must appear in a non-default map section. The hash can be found by loading the map and checking the value of the readonly server cvar b_mapscripthash, or be obtained using external hashing tools like sha1sum (1). If the mapscript does not match when the map is loaded, a message will be sent to all players, and the config will be unloaded. | ||
==Config related commands== | ==Config related commands== | ||
Line 73: | Line 76: | ||
==Getting Your Configuration Certified== | ==Getting Your Configuration Certified== | ||
− | The easiest way is to send a private message to | + | The easiest way is to send a private message to [http://bani.anime.net/banimod/forums/profile.php?mode=viewprofile&u=2 bani] or [http://bani.anime.net/banimod/forums/profile.php?mode=viewprofile&u=800 Rain] or [http://bani.anime.net/banimod/forums/profile.php?mode=viewprofile&u=1462 zinx] or [http://bani.anime.net/banimod/forums/profile.php?mode=viewprofile&u=761 ReyalP] with the URL using the [http://bani.anime.net/banimod/forums/privmsg.php?folder=sentbox ETPro forums], including a link to the <tt>.config</tt> hosted on the league's website. |
An alternate way, if the first way fails, is to talk to one of the [[ETPro Developer]]s on [[IRC]]. | An alternate way, if the first way fails, is to talk to one of the [[ETPro Developer]]s on [[IRC]]. |
Latest revision as of 04:36, 26 February 2007
ETPro supports Pluggable Config Files. These files provide servers the use of additional features not available from traditional .cfg files.
Contents
Creation and Installation
Config files must be located in etpro/configs and their names must end in .config
Config file format
The following shows the .config syntax. This is not a complete config, the ... indicates that in a real config many similar commands would follow
configname "^/foobar^f 6v6" // config for 6v6 foobar league version 1.2.3.4 foobar6v6.version.foobarleague.com init { setl sv_pure 1 setl sv_cheats 0 setl g_gametype 3 ... command "pb_sv_enable" command "pb_sv_kicklen 1" command "pb_sv_cvarempty" ... } map default { set g_userTimeLimit 0 setl g_useralliedrespawntime 0 setl g_useraxisrespawntime 0 setl b_moverscale 1 } map radar { set g_userTimeLimit 12 command "forcecvar r_drawfoliage 0" mapscripthash <sha1 hash> } ... signature <sig>
Config file details
- comments
- any text following // is a comment and is ignored
- version w.x.y.z some.dns.name
- ET will check that version matches the IP returned form some.dns.name If it does, ETPro displays the message "config is latest version available" to all players in warmup. not fully implemented - etpro doesn't currently do the DNS check.
- configname <name>
- defines the name of the config. This name is displayed to players in warmup, but is not used to refer to the config in config related commands. The name may contain ET Color Codes
- init
- The init block is executed only once, when the config is loaded by referee or rcon/console. It is never reloaded.
- map <mapname>|default
- The map blocks are loaded on every map_restart. The parameter is the mapname to match to. A parameter of default will execute that block for all maps. map blocks are executed in order from first to last. Generally you want your default block first, and then specific map blocks to override it.
- signature <sig>
- provides crypotgraphic signature to verify that that the config is unmodified. ETPro displays the message "config is certified" to all players in warmup. The signature must be generated by the etpro team.
init and map are followed by a block, delimited by curly braces {}. Each block can contain the following keywords
- set <cvarname> "value"
- sets the specified cvar to the specified value.
- setl <cvarname> "value"
- sets the specified cvar to the specified value, and locks it so that it cannot be changed by rcon, forcecvar or other means until the config is unloaded
note: setl names and values are limited to 63 characters in etpro versions up to and including 3.2.6
- command "command text"
- execute "command text"
- mapscripthash <sha1 hash>
- Require a particular mapscript be used for a map. Must appear in a non-default map section. The hash can be found by loading the map and checking the value of the readonly server cvar b_mapscripthash, or be obtained using external hashing tools like sha1sum (1). If the mapscript does not match when the map is loaded, a message will be sent to all players, and the config will be unloaded.
- callvote | ref config <config file name>
- set the current config by vote or ref.
- config <config file name>|none
- set the current config from the server console, or unload the current config. Settings set by the config remain in effect, but are no longer locked. Map specific blocks are no longer in effect.
notes:
- config none can only be used from the console (or rcon) not ref or vote.
- you must use the filename of the .config (minus the .config extension), not the 'configname' contained in the .config file. The 'configname' is a longer (possibly colored etc) descriptive name.
- do not try to load a config with set config <configname>. This will cause the config and ref config commands to stop working until the server is restarted.
Common pitfalls to watchout for
- Any cvar that isn't a number (vote_allow_config, b_watermark, b_levels_medic etc) must have quotes around it's value, even if its value is a single character.
- XP levels lists should not have commas in them (b_levels_medic etc)
- Putting cvars in groups alphabetically as above makes it a lot easier to maintain and verify.
- Make sure there is an extra newline at the end of the file (after the closing '}')
- Test your .config - you can do this simply by putting it in your /etpro/configs directory, and starting ET with +set dedicated 2 +exec server.cfg, then calling the .config with /config NAME. The console will report any major syntax errors in the .config
- Make sure to include all relevant gameplay-related cvars. Most are included in this list.
Getting Your Configuration Certified
The easiest way is to send a private message to bani or Rain or zinx or ReyalP with the URL using the ETPro forums, including a link to the .config hosted on the league's website.
An alternate way, if the first way fails, is to talk to one of the ETPro Developers on IRC.
See also
- Cvar Restrictions
- Forced Cvars
- WolfWiki:Community_Portal#Leagues / Competitions is a good place to find full config file examples.