Skip to content

Base Commands

Person8880 edited this page Nov 7, 2020 · 33 revisions

Overview

The base commands plugin provides quite a few generic and useful commands and should really be left enabled unless you really don't want them.

Config

The default config will look something like this:

{
    "AllTalk": false,
    "AllTalkLocal": false,
    "AllTalkPreGame": false,
    "AllTalkSpectator": false,
    "CommanderBotVoteDelayInSeconds": 300,
    "CustomVotePrefix": "POLL: ",
    "DisableLuaRun": false,
    "EjectVotesNeeded": [
        {
            "FractionOfTeamToPass": 0.5
        }
    ],
    "FriendlyFire": false,
    "FriendlyFirePreGame": true,
    "FriendlyFireScale": 1,
    "GaggedPlayers": {
        "123": true
    },
    "LogLevel": "Info",
    "Rates": {
        "ApplyRates": true,
        "BWLimit": 50,
        "Interp": 100,
        "MoveRate": 26,
        "SendRate": 20,
        "TickRate": 30
    },
    "VoteSettings": {
        "VoteKickPlayer": {
            "AFKTimeInSeconds": 60,
            "ConsiderAFKPlayersInVotes": true
        }
    },
    "__Version": "1.6"
}

The file should be called "BaseCommands.json" and should be placed in the directory defined as your plugin config directory (default is config://shine/plugins).

Option Description
AllTalk Enables all talk, use this if you want all talk to always be enabled.
AllTalkLocal Enables all talk specifically for the local voice chat channel.
AllTalkPreGame Enables all talk during the pre game time, where both teams are waiting for commanders to be chosen. Once the game is about to start, it is disabled. Make sure the other setting is false when using this, otherwise all talk will always be enabled.
AllTalkSpectator Enables hearing all teams chat when in spectator.
EjectVotesNeeded A sequence of entries determining the fraction of players on a team needed to vote to eject a commander. The default is a single entry at 50%. To add multiple entries, set MaxSecondsAsCommander in all entries except the last to restrict when they apply. This will make each entry apply only until the current commander has commanded for the given time in the current round.
CommanderBotVoteDelayInSeconds Sets the number of seconds after which a vote for commander bots will start.
CustomVotePrefix A prefix to add to the start of all custom vote messages. This can be used to make it clear that a custom vote will not trigger any action at the end of it.
DisableLuaRun If set to true, the "sh_luarun" command will not be created.
FriendlyFire Sets whether friendly fire should be enabled.
FriendlyFireScale Sets a scale multiplier on friendly fire damage.
FriendlyFirePreGame Sets whether to allow friendly fire before a round has started.
GaggedPlayers Stores a table of NS2 IDs that should be permanently gagged.
VoteSettings Allows for controlling whether AFK players are considered in vanilla votes. Each entry's key should be the name of a vanilla vote. Set ConsiderAFKPlayersInVotes to false to prevent AFK players from counting towards the total votes. AFKTimeInSeconds controls how long a player should be AFK before they are no longer counted.

Commands

Command Chat Command Arguments Description
sh_help N/A <searchterm> Displays all matching commands you can run and their chat command and help text. Leave the search term blank to get a list of all commands you can run.
sh_loadplugin N/A <plugin> Loads or reloads the given plugin.
sh_unloadplugin N/A <plugin> Unloads the given plugin.
sh_listplugins N/A N/A Lists all enabled plugins.
sh_reloadusers N/A N/A Reloads user data.
sh_slotsummary N/A N/A Prints a summary of player/spectator/reserved slot usage to the console.
sh_luarun !luarun <lua> Runs the given Lua code on the server. Be careful with this.
sh_rcon !rcon <command> Runs the given command in the server console.
sh_password !password <password> Sets the server password.
sh_alltalk !alltalk <true/false> Enables or disables all talk. Leave the argument blank to toggle it.
sh_alltalklocal !alltalklocal <true/false> Enables or disables local all talk. Leave the argument blank to toggle it.
sh_alltalkpregame !alltalkpregame <true/false> Enables or disables all talk for the pre-game. Leave the argument blank to toggle it.
sh_kick !kick <player> (reason) Kicks the given player from the server.
sh_status N/A N/A Prints a list of all connected players and their information.
Note: this command is allowed by default. However, granting sh_status explicitly will make IP addresses show in the output.
sh_who N/A <optional player> Prints ranking information of all connected players, or the given player.
sh_changelevel !map <mapname> Changes the map to the given map name.
sh_cyclemap !cyclemap N/A Changes the map to the next in the map cycle.
sh_reloadmap !reloadmap N/A Reloads the current map.
sh_listmaps N/A N/A Lists all maps found on the server.
sh_reset !reset N/A Resets the game round.
sh_rr !rr <players> Moves the given player(s) to the ready room.
sh_forcerandom !random <players> Forces the given player(s) onto a random team.
sh_setteam !team or !setteam <players> <team> (force) Moves the given player(s) onto the given team.
sh_autobalance !autobalance <true/false> <player amount> <delay> Enables or disables auto balance. Player amount defaults to 2, delay defaults to 10 seconds.
sh_eject !eject <player> Forces the given player out of the command chair.
sh_say !say <message> Says the given message to all players from the name given in the config value ChatName.
sh_teamsay !teamsay <team> <message> Says the given message to all players on the given team from the name given in the config value ChatName.
sh_pm !pm <player> <message> Sends a private message to the given player from the name given in the config value ChatName.
sh_csay !csay <message> Displays a message in the top centre of every player's screen. If the first word of the message is one of white, red, orange, yellow, green, lightblue, blue or purple, then the message will be that colour.
sh_gag !gag <player> <duration> Silences text chat from the given player for the given duration in seconds. If you don't specify a duration, it will last until map change or ungag.
sh_gagid !gagid <steamid> Silences chat from the given Steam ID permanently, including after map changes.
sh_ungag !ungag <player> Allows the given player to use text chat again if they were gagged.
sh_ungagid !ungagid <steamid> Removes the given Steam ID from the permanent gag list.
sh_listgags N/A N/A Prints a list of all gagged players.
sh_cheats !cheats N/A Enables or disables cheats on the server.
sh_forceroundstart !forceroundstart N/A Forces the round to start.
sh_friendlyfire !ff or !friendlyfire <scale> Sets and saves the friendly fire scale. Set to 0 to disable.
sh_customvote !customvote <question> Starts a vote using the NS2 vote system with the given question.
sh_stopvote !stopvote N/A Stops the current vanilla vote, if one is in progress.

Server rate commands

These commands affect the performance and bandwidth usage of your server. Consider carefully what you set them to. If you don't know what they are, then leave them as default.

There are some inter-dependent rates. The commands will automatically warn you if you tried to set them out of the allowed range.

Command Chat Command Arguments Description
sh_interp !interp <interpolation time> Sets the interpolation time (in ms) to use and saves it (default is 100).
sh_moverate !moverate <rate> Sets the move rate and saves it (default is 26).
sh_tickrate !tickrate <rate> Sets the tick rate and saves it (default is 30).
sh_bwlimit !bwlimit <limit in kb/s> Sets the bandwidth limit per player and saves it (default is 50kb/s).
sh_sendrate !sendrate <rate> Sets the rate to send updates to clients and saves it (default is 20).
Clone this wiki locally