shrubmod for Enemy Territory


Features (most recently-updated first)
shrubbot
Version Added or Last Modified: 1.2
Documentation last modified: 04:52:12 AM Jan 11, 2004
shrubbot is a system implemented in shrubmod that allows you to set any number of user levels with different capabilities for each level. For example, assuming there exists a set of commands that are available, they can be assigned in such a way that increasing user levels have access to more commands. g_shrubbot (blank) is initially blank and, when enabled, specifies the name of the config file for the bot. The config file contains config blocks specifying a level, an admin, or a ban.

In the config file, you must specify a number of levels and the commands each level has access to. The commands are identified by a flag - a single, case-sensitive alphanumeric character. These flags include:
a - admintest
b - ban/unban
c - cancelvote
d - disorient/orient
f - grant access to all Capture the Flag commands
G - readconfig
h - help
k - kick
l - launch/throw/fling
L - launcha/throwa/flinga
i - listplayers
K - lock/unlock
m - mute/unmute
n - nextmap
N - rename
p - putteam
r - reset/restart
v - revive
s - setlevel
H - shake
B - showbans
S - shuffle
P - spec999
w - swap
C - time
u - uptime
The following flags are not commands but specify special privileges a level or user has:
1 - cannot be vote kicked, vote muted, dropped from inactivity, dropped due to high team damage ratio, or complained against
2 - cannot be censored or flood protected
3 - can run commands "silently" through the console (/!commandname parameters)
4 - can see Axis' and Allies' team chat as a spectator
5 - can switch teams any time, regardless of balance
6 - does not need to specify a reason for a kick/ban
7 - can call a vote at any time (regardless of a vote being disabled or voting limitations)
8 - does not need to specify a duration for a ban
9 - can run commands from team and fireteam chat (as opposed to global chat)
A level config block is in the format:
[level]
level= 0
flags= ahC
name= Prole
Every player defaults to level 0, so it is important to specify flags for this level. The name of the level is optional and is displayed when a user uses the admintest command. What is important in the above block is that the flags indicate that a level 0 user has access to the admintest, help, and time commands.

You can specify the flags for any number of levels, but assigning a player to an undefined level means that a player will not have access to any commands. An asterisk (*) as a flag represents every command available.

Assigning a player to a level is largely automated through in-game commands, but for your reference, they come in the format:
[admin]
name= shrub
guid= ABCDEFGH123ABCDEFGH123ABCDEFGH12345
level= 5
flags= +wr-R
The flags specified for an admin block are optional and modify the base flags for the level specified. In this example, in addition to having the level 5 commands, shrub will be able to run swap (w), reset (r), and will not be able to run restart (R).

To assign a user to a level via the console (you will likely need to do this for the first high-level admin), use the command:
setlevel [clientnum] [level]
Naturally, this must be done while the desired player is connected to the server.

Commands are performed via the in-game chat using the format:
!commandname parameters
The function and syntax of each command can be seen through the !help [command name] command. Messages from shrubbot that are private are colored blue. Public messages are light yellow.

First-Time Setup
It is recommended that you specify the flags for level 0 and a high level - say, 5 - whose flag is "*". Set yourself to level 5 via rcon, and you can then set others' levels in-game through the !setlevel [name] [level] command.

If PunkBuster is not enabled, it is likely that some players will not be assigned a GUID and shrubbot will not function as intended.

More on Level Flags
For convenience, you can use '*' as the first character of a level flag and subsequent characters will be removed from that level's privileges. For example, setting a level flag to "*k" will give that level all privileges and commands except for the ability to kick. Why you would do this, I do not know - but there it is for illustrative purposes. Note that these are level flags and not user flags.

Name Matching
Many commands require you to specify the player they target. You can do it in either two ways: use the player's client number or use a partial or full name. When specifying names, omit the color codes. shrubbot will warn you an abort a command if text you specify matches more than one name. If multiple matches are found, the client number of each match is displayed next to the name in parentheses. If you are unable to write text in such a way that it targets the specific client, then you should revert to using the client number. When a space is needed, either enclose the name in quotation marks or replace the space with a backslash (\).

Banning
Bans are based on both the player's current IP and his GUID. Asterisk wildcards are supported. If you would like to broaden the range of a banned IP, replace the appropriate quartile(s) with an '*'. For example, do not use "192.168.*", use "192.168.*.*".

When a player is kicked by the bot or denied a connection, the contents of g_dropMsg (blank) is appended to the message the player receives in the disconnect box. It is recommended that g_dropMsg be set to something along the lines of, "If you believe this kick or ban was undeserved, contact disputes@server.com with the details."

Other Console Commands
If you make changes to the config file externally, use the console command readconfig to reload the config file specified in g_shrubbot. Note that the admin status is checked on an !admintest and when first connecting. Note that if you deny !admintest to level 0 users, then you must reconnect to refresh your admin status if you are unable to !admintest.

Command Logging
You can log users' shrubbot actions and attempts to access shrubbot commands by setting g_logAdmin variable to the desired file name.

Changes in 1.2


Weapons Changes
Version Added or Last Modified: 1.2
Documentation last modified: 04:48:52 AM Jan 11, 2004
g_weapons (0) is a bitflag variable with the following attributes. Add up the values corresponding to the desired features and set g_weapons appropriately to enable them:
1 - field ops do not spawn with binoculars with Level 0 battle sense
2 - syringes work underwater
4 - pliers work underwater (it will click due to client-side prediction)
8 - "Too many airstrikes requested" will restore used charge bar
16 - "Too many airstrikes requested" will restore half of used charge bar

Added in 1.2
32 - ammo packs also restore lost helmets
64 - binoculars are dropped (if a player has a pair) on limbo. Any player can pick up the binoculars and will gain a set if they did not already have one

g_weaponLimits (0) is a bitflag variable with the following properties:
1 - count picked up weapons towards a team's total weapon count (used for heavy weapon restrictions)
2 - do not drop panzerfausts on limbo
4 - do not drop flamethrowers on limbo
8 - do not drop mortars on limbo
16 - do not drop mobile MG42s on limbo

The following cvars will limit the per-team weapon counts accordingly:

Text Censorship
Version Added or Last Modified: 1.2
Documentation last modified: 04:47:27 AM Jan 11, 2004
g_censor (blank) specifies words that are censored from chat. Each word or phrase is separated by a comma and is not case-sensitive. Words that are censored are replaced with asterisks and colors are removed.

g_censorNames (blank) works similarly, but is used for player names.

g_censorPenalty (0) is a bitflag variable that specifies what punishment, should any, be applied when using a censored term in chat or names. Add up the values corresponding to each option and set g_censorPenalty appropriately:
1 - kill players who use censored text in their chats
2 - kick players who use censored text in their names. Players who have censored text in their names are also not permitted to join the server.
4 - kill players who use censored text in their chats, but don't gib them (in case players are exploiting censor gibs to prevent uniform steals)

Text Shortcuts
Version Added or Last Modified: 1.2
Documentation last modified: 04:45:23 AM Jan 11, 2004
When g_shortcuts (0) is set to 1, text shortcuts are enabled which allow players to type "shortcuts" in the form [x]. These are replaced with the appropriate text. Shortcuts include:
[a] - last person who gave you ammo
[d] - last person who killed you
[h] - last person who gave you health
[k] - last person you killed
[l] - your current location
[n] - your name
[r] - last person who revived you
[p] - teammate you are pointing at
[s] - your health
[w] - weapon you are currently holding
[t] - ammo for current weapon
For example, typing "Help me at [l]! I only have [s] health left" will produce something like "Help me at (A,2)! I only have 20 health left!"
Text/Log Options
Version Added or Last Modified: 1.2
Documentation last modified: 04:38:42 AM Jan 11, 2004
g_logOptions (0) is a bitflagged variable with the following attributes that modify text or log-related aspects of the game. Add up the desired features to enable them:
1 - Move kill, connect, and team change messages to the bottom of the clients' screens
2 - Display a countdown on adrenaline usage to make it easier to know when it will expire
4 - Disable the tap-out confirmation dialog box
8 - Display connection attempts by banned players
16 - Report gibs
32 - Omit "Item" lines from logfile
64 - Enable extended damage stats output
128 - Enable extended time and XP stats output

General Fixes & Things Not Needing Much Elaboration
Version Added or Last Modified: 1.2
Documentation last modified: 04:35:25 AM Jan 11, 2004

Added in 1.2
g_misc (0) is a bitflag variable with the following properties. Add up the desired features and set g_misc appropriately to enable them:
1 - enable double-jumping. Players receive a boost in their jump by double-tapping the jump key.
2 - enable BINOCULAR MASTER competition. Should be used in conjunction with binocular dropping (g_weapons 64). Every minute and at the end of the round, the top 3 players who have picked up the most binoculars are displayed.
4 - prevent non-admins (level 1+ in shrubbot) from joining the server

Ammo/Health Pack Distance
Version Added or Last Modified: 1.0
Documentation last modified: 06:44:41 PM Jan 6, 2004
g_packDistance (1) will scale the the distance at which ammo and health packs are thrown. Higher values will give you the necessary props for a future port of MML_Footy to ET.
Per-Map Configs
Version Added or Last Modified: 1.0
Documentation last modified: 06:44:41 PM Jan 6, 2004
g_mapConfigs (blank) will allow you to execute a custom config file for each map, e.g. to set per-team maxlives or respawn times in the middle of a campaign. When set, g_mapConfigs specifies the folder your map configs are in relative to the server's working directory. For example, if you place the configs in the folder where the mod is installed, set g_mapConfigs to ".". If you place the configs in a subfolder, set g_mapConfigs to the name of that subfolder.

Each config file must be named the same as the map it corresponds to and end with the extension ".cfg". "fueldump.cfg" and "oasis.cfg" are valid configs. "default.cfg" (located in the folder specified by g_mapConfigs will be executed prior to executing the map-specific config. You need not specify a config for every map, but note that some settings may carry over into the next map, so keep that in mind as you create a "default.cfg".
Corpse Dragging
Version Added or Last Modified: 1.0
Documentation last modified: 06:44:41 PM Jan 6, 2004
When g_dragCorpse (0) is set to 1, corpse dragging is enabled. When enabled, players can drag another "dead" player who has not yet entered limbo by holding down the +salute bind or +activate (the "use" key - defaults to "f"), crouching, and moving backwards while pointing at a body. Dragging can also be done underwater, but takes more effort.

Dragging is useful for limited life play, where non-medics can drag teammates to a safe area to wait for a medic. Medics can use dragging to assist revives in cases where it is difficult to reach the revivee. For example, when dead players become stacked, a medic can drag the teammate out of the pile to revive him. If an absent-minded teammate is standing on top of someone needing a revive, the medic can drag the body out and revive.
Intermission Time
Version Added or Last Modified: 1.0
Documentation last modified: 06:44:41 PM Jan 6, 2004
g_intermissionTime (60) adjusts the duration, in seconds, of the intermission period at the end of each round.
Private Messages
Version Added or Last Modified: 1.0
Documentation last modified: 06:44:41 PM Jan 6, 2004
g_privateMessages (0), when set to 1, will enable private messaging. Players may private message each other with the command:
/m [name] [msg]
The name can be a partial match, allowing for a group of people to be messaged, such as a clan. Colors should not be used in the name parameter. When there is a space needed in the name, either enclose the name in quotation marks or replace spaces with backslashes (\).
Server Messages
Version Added or Last Modified: 1.0
Documentation last modified: 06:44:41 PM Jan 6, 2004
Server messages allows you to cycle a set of messages to be displayed to all players during the game. g_msgs (0) controls the duration, in seconds, between each message. When set to 0, the feature is disabled.

g_msgpos (0) specifies the position of the messages. There are three available: 0 - chat area, 1 - center of the screen, 2 - left "notification" area.

The messages can be set with the g_msg1, g_msg2, ..., g_msgn variables, where you may have an unlimited number of messages. They must be set consecutively, however - when a blank message is encountered, the message displayed cycles back to the first one.
Shoving
Version Added or Last Modified: 1.0
Documentation last modified: 06:44:41 PM Jan 6, 2004
g_shove (0) will enable shoving for values above 0. Shoving is accomplished through the +salute bind or through +activate (the "use" key - defaults to "f") by pointing at another player at melee range and using the bind. Different angles achieve different results.

A value of 80 is recommended as a reasonable setting for allowing players to push door-blockers, idle players, and the like out of the way.

If you want to disable shove-assisted boosting, set g_shoveNoZ (0) to 1.
Skill Mods
Version Added or Last Modified: 1.0
Documentation last modified: 06:44:41 PM Jan 6, 2004
g_skills (0) is a bitflagged variable with the following attributes. Add up the desired features to enable them:
1 - any Level 4 Battle Sense can spot mines for teammates
2 - non-engineers with Level 4 Explosives & Construction will benefit from the flak jacket
4 - adrenaline carriers over to non-medic classes

Spectator Behavior
Version Added or Last Modified: 1.0
Documentation last modified: 06:44:41 PM Jan 6, 2004
g_spectator (0) is a bitflag with the following properties. Add up the desired values to enable each setting.
1 - free-look spectators can click on a player to spectate him. If the click doesn't point at another client, nothing happens.
2 - When spectator clicking is enabled (1), a "miss" cycles to the next client that can be spectated rather than doing nothing.
4 - Spectators continue following a player when he goes into limbo and respawns (same behavior as in RTCW)
8 - Spectators go into freelook mode after a spectated player limbos (4 takes precedence over 8)

Team Damage Restriction
Version Added or Last Modified: 1.2
Documentation last modified: 06:44:41 PM Jan 6, 2004
g_teamDamageRestriction (0), when greater than 0, will set the threshold of team damage a player can inflict before being automatically kicked from the server. A minimum of g_minHits (6) team hits is required before a player is considered for a kick.

For example, if g_teamDamageRestriction is set to 25, a player will be kicked if, any time after inflicting some form of damage on another player 30 times, 8 of said hits are to teammates. Damage from the flamethrower and friendly mines is scaled down appropriately.

Clients may check their current hit counts with the command /damage.

This method will allow for team killers who merely shoot teammates to low health levels to be punished easily and also not harshly punish those who have, inadvertedly or not, made the one hit that kills a teammate.

This feature can also be coupled with disabling the complaint system (g_complaintLimit 0). With an appropriate g_teamDamageRestriction setting, the lack of arguments related to complaints improves the server atmosphere tremendously.

Automatic Temp Bans (added in 1.2)
When g_autoTempBan (0) is set, a player is automatically temp-banned for g_autoTempBanTime (1800) seconds after he has been kicked g_autoTempBan times and for every subsequent kick over the limit until the XP Saver is reset. The XP Saver and shrubbot must be enabled for this feature to function.

XP Persistence
Version Added or Last Modified: 1.1
Documentation last modified: 06:44:41 PM Jan 6, 2004
g_XPSave (0) is a bitflagged variable that controls a number of XP persistence-related options. Add up the values corresponding to the desired features to and set g_XPSave appropriately to enable them:
1 - enable XP Saver
2 - XP is not reset on map_restarts, reset_matches, swap_teams, or shuffle_teams
4 - XP never resets (but the XP Saver will still reset when appropriate). 1 must be enabled for this to work.
About the XP Saver
When enabled, a player who is disconnected or kicked will have his XP saved and restored when he reconnects before the end of the campaign. In non-campaign gametypes, saved XP is cleared when XP normally resets.

The XP Saver relies on a valid GUID to match clients and may not work properly if PunkBuster is disabled on both client and server.

Stopwatch with XP Persistence
If you would like to run maps in stopwatch mode without XP resetting after each round, enable both option 1 and 4 (set g_XPSave to 5 or 7). Use the server command clearXP in your map rotation to reset XP at the desired round. Refer to the FAQ for sample rotations using this method.

1.1 Update
Lives left are also stored when the XP Saver is enabled, allowing the XP Saver to work better with limited-life servers.

1.2 Update
clearxp now resets skill levels immediately

Nade War
Version Added or Last Modified: 1.0
Documentation last modified: 06:44:41 PM Jan 6, 2004
g_nadeWar (0) can be used to enable nade wars when set to 1. In this mode, players receive only a knife and 100 grenades. They can fly by double-tapping their jump key and holding it down to ascend and releasing it to descend. Players can double-tap jump while in mid-air or "land" on a surface to stop flying.
Voting Behavior
Version Added or Last Modified: 1.0
Documentation last modified: 06:44:41 PM Jan 6, 2004
g_voting (0) is a bitflag variable with the following properties. Add up the desired attributes and set g_voting appropriately to enable them:
1 - Vote percentage is based on number of votes cast instead of total players who can vote
2 - Successful votes do not count against a player's vote limit

Class Changing
Version Added or Last Modified: 1.0
Documentation last modified: 06:44:41 PM Jan 6, 2004
g_classChange (0) enables class changing when set to 1. When enabled, a player can assume a dead teammates' class by pointing at his corpse and holding down +activate (in much the same fashion that a Covert Ops would steal an enemy's uniform) for a period of time.

The dead teammate will retain his original class when he respawns. The player who ransacked his corpse will need to pick up the primary weapon that the dead teammate dropped (or his own primary weapon if it can be picked up by the new class).

When a class-changed player dies and respawns, he will respawn as the class he was prior to changing.
/kill Changes
Version Added or Last Modified: 1.0
Documentation last modified: 06:44:41 PM Jan 6, 2004
g_slashKill (0) is a bitflag variable that changes the behaviour of the /kill command. Add up the desired options and set g_slashkill accordingly to enable them:
1 - a player will spawn with half a charge bar after /killing
2 - a player will spawn with 0 charge bar
4 - a player will spawn with the same amount of charge bar as when he /killed
8 - /kill is disabled

Goomba Killing
Version Added or Last Modified: 1.1
Documentation last modified: 06:44:41 PM Jan 6, 2004
g_goomba (0) enables "goomba" damage/killing when greater than zero. Higher values scale the damage given appropriately. Goomba damage occurs when a player jumps on top of an enemy. Given a high enough jump distance, g_goomba value, or a combination of both, you can kill or gib an enemy player this way. Jumping on top of a teammate will break one's fall.
Capture the Flag
Version Added or Last Modified: 1.2
Documentation last modified: 06:44:41 PM Jan 6, 2004
g_CTF (0) enables Capture the Flag (CTF) mode and specifies the number of captures needed for a team to win.

Rules
Players must capture the enemy team's flag by touching the flag and carrying it to your own flag. If a flag carrier dies, the flag is dropped in his place and can be re-taken by a teammate or returned by an enemy. A dropped flag will automatically return after a period of time. You cannot capture a flag when your own flag is missing from your flag base.

Conventions
The Axis team is red, and the letter 'r' will be used to represent the Axis team for commands that require specifying a team. Similarly, the Allied team is blue, with the letter 'b' corresponding to them.

Pre-defined Flag Bases
The locations of the CTF flags must be defined by the server admin (you). I have included sample positions for a handful of maps. Extract the "CTF" folder in the mod .zip file into the folder where your ET logfile is stored - the same location you store your shrubbot config.

Defining your own Flag Bases
For maps that have not been included as a sample in the .zip, you must define your own locations for each team's flag. shrubbot must be enabled and you must have access to the CTF-specific commands through the flag 'f'. Consult the shrubbot section for information on setting it up.

To place a flag, use the command !setflag , where team is either 'r' or 'b'. A flag will be placed directly where you are standing. You may need to kill yourself if you become stuck in the flag. To remove the flag, stand close to it and use the command !remctf and the flag will dissapear.

When you are finished placing both teams' flags, use !savectf to save your changes so that they will be automatically restored during subsequent rounds on the current map.

Defining Spawnpoints
g_CTFSpawn (0) can be used to enable the random spawnpoint system. If you leave g_CTFSpawn set to 0, the map's default spawnpoints will be used. When g_CTFSpawn is set to 1, you can place spawnpoints at any location for either team. The .ctf files included in the .zip already have pre-defined spawnpoints. If you would like to add or modify them or create new spawnpoints for a different map not included, you must have shrubbot enabled and have access to the CTF-specific commands via the 'f' flag.

Use !showspawns to toggle displaying the location of spawnpoints on and off. When on, spawnpoints for the Allied team will appear as a red 'L', with the horizontal portion of the 'L' pointing in the direction the player will be looking when he spawns. Axis spawnpoints resemble an upside-down 'L'. It is recommended that you change your client's cg_railtrailtime to 3000 in order to see the spawnpoints better.

To delete a spawnpoint, move close to it and use the command !remctf.

To add a spawnpoint, position yourself exactly the way you want a player to be oriented when spawning and use the command !setspawn , where team is either 'r' or 'b'. To change the team of a spawnpoint, use the command !changespawn

If you set g_CTFSpawn to 2, spawnpoints will be shared among both teams.

Notes
If you enable g_CTFSpawn and either or both teams have zero spawnpoints defined, g_CTFSpawn will automatically be set back to 0 and the map's default spawnpoitns will be used.

The forums at http://forums.ardiem.net will maintain a repository for user-contributed .ctf files.

The location of the flags is displayed on the command maps and unpdates as their position changes.

CTF is designed to work with a map's Last Man Standing config file. If a map does not have a LMS script, it may not work properly with CTF.

CTF occasionally runs checks to make sure that everything is in order. In certain circumstances, it may reset the state of a team's flags if something wrong is detected.
Play Dead
Version Added or Last Modified: 1.2
Documentation last modified: 06:44:41 PM Jan 6, 2004
g_playDead (0) enables feigning death when set to 1. When enabled, a player can play dead by using the /playdead command. Because of changes in ET, you cannot adjust your view with the mouse while playing dead. You can use the keyboard (thanks Ark) with the following binds:
bind leftarrow +left
bind rightarrow +right
bind uparrow +lookup
bind downarrow +lookdown
To stop playing dead, use the /playdead command again. If you set g_playDead to 2, a player will be locked momentarily when getting back up - similar to a revive, sans the invulnerability. This can be used to curb sudden attacks from behind, but a player can still hear someone getting up by listening for a weapon-switching sound. Additionally, the "corpse" of those who are playing dead cannot be walked through, assisting detection.
Return to Contents
shrubmod documentation - © 2003-2004 Ryan Mannion