控制台命令
阅读
2023-10-07更新
最新编辑:祖莉ZulyHiroky
阅读:
更新日期:2023-10-07
最新编辑:祖莉ZulyHiroky
此页面列出了控制台命令。要执行命令,请按打开控制台~,键入命令,然后按 ↵ 或者 进入. 几乎所有命令都区分大小写。
- 中列出的命令white可以随时执行。
- 中列出的命令orange需要启用作弊功能。
- 中列出的命令magenta需要服务器的许可。
- 参数列说明接受的参数类型(例如浮点数、键),或列出接受的参数,以|分隔。.
- 必需的参数由<>括起来。
- 可选参数由[]括起来。
如果一个命令接受多个参数,这些参数用空格分隔。
游戏命令
这些命令会影响海军陆战队和外星人的游戏玩法。
This page lists console commands. To execute a command, open the console by pressing ~ , type the command, then press ↵ or ENTER . Almost all commands are case-sensitive.
|
- Commands listed in white can be executed at any time.
- Commands listed in orange require cheats to be enabled.
- Commands listed in magenta require permission from the server.
- The Parameters column states the type of parameter accepted (e.g. float, key), or lists the accepted parameters separated by |.
- Required parameters are enclosed by <>.
- Optional parameters are enclosed by [].
If a command accepts multiple parameters, these are separated by spaces.
Gameplay
These commands affect gameplay for both Marines and Aliens.
Command | Parameters | Description |
---|---|---|
alltech | none | Unlocks (but not researches) all abilities for Aliens and removes all tech prerequisites for Marines. |
allfree | none | Gives all Players (and Bots) infinite 模板:PRes. |
autobuild | none | Toggle autobuild on or off. When autobuild is enabled, all structures and research will finish almost instantly. |
bind | [key [function]] | Bind the specified function to the specified key. If a function is not specified, the key will be unbound from every action that does not appear in the list of bindings in the settings menu. If a key is not specified, a list of bindable keys will be displayed in the console. Key names are case-sensitive. 模板:Keybindings |
changemap | <string> | Change the map to the one specified. Default maps are not case-sensitive, custom maps are. If the map cannot be found, the server selects the first map in MapCycle.json. Can only be executed from the server console. See sv_changemap. |
cheats | <float> | Turn cheats on or off. 0 turns off cheats, any other number turns cheats on. Can only be executed from the server console. See sv_cheats. |
clear | none | Clear the console. |
clear_binding | [key] | Clears the key of all manual bindings set with the bind command. Does not work on key bindings set in the game options. Key names are case-sensitive. |
command | none | Become commander if all Command Stations/Hives are empty. |
connect | <string> [password] | Connect to the stated IP address and port. IP:Port
Password is an optional parameter that can be used to connect to protected servers. |
damage | <float> | Multiplies all damage dealt by the set number. Maximum damage dealt with one attack is 2048. |
darwinmode | none | Toggle invulnerability and unlimited energy/ammo for yourself. |
disconnect | none | Exits the server to the main menu. |
exit | none | Exits the game to the desktop. |
fastevolve | none | Aliens evolve into Lifeforms much faster. |
heal | <float> | Heals the player for the set amount. |
highdamage | none | Multiplies all damage dealt by 10. |
j1 | none | Join the Marine team. Same as jointeamone. |
j2 | none | Join the Alien team. Same as jointeamtwo. |
j3 | none | Join a random team. |
jointeamone | none | Join the Marine team. Same as j1. |
jointeamtwo | none | Join the Alien team. Same as j2. |
kill | none | Commit suicide. |
logout | none | Exit the Command Station or Hive. |
maxfps | <number> | Change your your maximum FPS. Default is 200. |
name | <string> | Change your name as seen on the scoreboard. Quotes are not required in general. |
pres | [float] | Set your Personal Resources to the amount specified. If no parameter is given, set it to 100. |
print_bindings | none | Shows a list of all console set keybinds. |
readyroom | none | Leave your team and go to the ready room. Same as rr. |
reset | none | Restarts the current round. |
retry | none | Tries to connect to the server last connected to. |
rr | none | Leave your team and go to the ready room. Same as readyroom. |
say | <string> | Send a text message to allchat. Quotes are not required in general. |
setsensitivity | [float] | Set mouse sensitivity. Without parameter the current setting is displayed. |
setvv | [float] | Set Voice Volume from 0 to 100. Without parameter the current setting is displayed. |
spawn | <string> [1|2] | Spawn entities like marine, mac, arc, exo, exosuit, any lifeform or structure. |
spectate | none | Join the spectators. |
speed | [float] | Set the game speed. Sounds are not sped up/down. |
ssv | [float] | Set Sound Volume from 0 to 100. Without parameter the current setting is displayed. |
switch | none | Switch to the other team at your current position. Does nothing in spectate or the ready room. Same as skulk if marine, marine if alien. |
thirdperson | none | Enables/Disables the third person view. |
tres | [float] | Set your team's Team Resources to the amount specified. If no parameter is given, set it to 200. |
tsay | <string> | Send a text message to teamchat. Quotes are not required in general. |
unstuck | <string> | Moves you to a nearby location in case you are stuck and do not move for 5s after entering the command. Can be used once every 30s. |
Aliens
These commands affect gameplay for the Alien team.
Command | Parameters | Description |
---|---|---|
hivevision | <string> | Enable or disable outlines around objects in commander view. "false" disables outlines, any other string enables outlines. |
fade | none | Instantly become a fade. |
gorge | none | Instantly become a gorge. |
lerk | none | Instantly become a lerk. |
onos | none | Instantly become an onos. |
skulk | none | Instantly become a skulk. |
Marines
These commands affect gameplay for the Marine team.
Command | Parameters | Description |
---|---|---|
giveammo | none | Give yourself one clip of ammo for the currently selected weapon. |
give | <string> | Give yourself a weapon, examples: rifle, hmg, welder, shotgun, grenadelauncher, flamethrower, mine, pulsegrenade, clustergrenade, gasgrenade,.. |
jetpack | none | Give yourself a Jetpack. |
dualminigun | none | Instantly become a dual minigun Exosuit. |
dualrailgun | none | Instantly become a dual railgun Exosuit. |
exo | none | Instantly become a dual minigun Exosuit. |
Insight
These commands affect gameplay for spectators.
Command | Parameters | Description |
---|---|---|
jm | <int> [int <int> <int>] | Set the pen color for drawing on the screen. If all arguments are given, they are integers between 0 and 255 representing red, green, blue, and alpha, respectively. Otherwise, the first argument is an integer between 0 and 16777215 representing an RGB Int. Same as johnmadden and pen. |
johnmadden | <int> [int <int> <int>] | Set the pen color for drawing on the screen. If all arguments are given, they are integers between 0 and 255 representing red, green, blue, and alpha, respectively. Otherwise, the first argument is an integer between 0 and 16777215 representing an RGB Int. Same as jm and pen. |
pen | <int> [int <int> <int>] | Set the pen color for drawing on the screen. If all arguments are given, they are integers between 0 and 255 representing red, green, blue, and alpha, respectively. Otherwise, the first argument is an integer between 0 and 16777215 representing an RGB Int. Same as jm and johnmadden. |
score1 | <string> | Set the left score on the scoreboard. If the parameter is a number, or the characters "+" or "-", the score will be set to the number, incremented by one, or decremented by one, respectively. Any other input will set the score to "nil". |
score2 | <string> | Set the right score on the scoreboard. If the parameter is a number, or the characters "+" or "-", the score will be set to the number, incremented by one, or decremented by one, respectively. Any other input will set the score to "nil". |
scores | [string <string>] | Set scores. If no arguments are given, both scores are set to 0. Otherwise, the first argument affects the score displayed on the left, the second affects the score on the right. If the parameter is a number, or the characters "+" or "-", the relevant score will be set to the number, incremented by one, or decremented by one, respectively. Any other input will set the score to "nil". |
team1 | <string> | Set the left team name and display the scoreboard. |
team2 | <string> | Set the right team name and display the scoreboard. |
teams | <string> [string] | Set team names and display the scoreboard. If two arguments are given, the first becomes the name on the left, the second becomes the name on the right. If the second argument is omitted, "swap" or "switch" will exchange the names and scores between sides; "reset" or "clear" will set both scores to 0 and remove the scoreboard. |
Bots
These commands affect the bots on the server.
Command | Parameters | Description |
---|---|---|
addbot | [float] [0|1|2|3] [string] [string] | Add bots to the server. If no argument is given, one normal field bot is added randomly to Marines or Aliens. The floor of the first argument is the number of bots to add. The second argument is the team the bot will join: 0, 1, 2, or 3 will send the bot to the readyroom, Marines, Aliens, or Spectator, respectively. If the third argument is "com", the bot will be commander; otherwise it will be a field player. Does not require cheats when executed from the server console or connecting via localhost. Same as addbots. |
addbots | [float] [0|1|2|3] [string] [string] | Add bots to the server. If no argument is given, one normal field bot is added randomly to Marines or Aliens. The floor of the first argument is the number of bots to add. The second argument is the team the bot will join: 0, 1, 2, or 3 will send the bot to the readyroom, Marines, Aliens, or Spectator, respectively. If the third argument is "com", the bot will be commander; otherwise it will be a field player.Does not require cheats when executed from the server console or connecting via localhost. Same as addbot. |
addpassivebot | [float] [0|1|2|3] [string] | Same as addbot and addbots. |
freezebots | none | Toggle freezebots on or off. When frozen, bots cannot move, shoot, or join a team. Does not require cheats when executed from the server console. |
sv_maxbots | <float> | The server will add the max amount of bots dynamically to the teams |
removebot | [float] [0|1|2|3] | Remove bots from the server. The first argument is the number of bots to remove; if not given, one bot is removed. If the first argument is less than one, one bot is removed; if it is an integer greater than or equal to one, that many bots are removed; if it is a non-integer greater than one, all bots are removed. If the second argument is given, bots are removed from the corresponding team: 0, 1, 2, and 3, means readyroom, Marines, Aliens, and Spectator, respectively; otherwise the most recently added bot is removed first. Does not require cheats when executed from the server console. Same as removebots. |
removebots | [float] [0|1|2|3] | Remove bots from the server. The first argument is the number of bots to remove; if not given, one bot is removed. If the first argument is less than one, one bot is removed; if it is an integer greater than or equal to one, that many bots are removed; if it is a non-integer greater than one, all bots are removed. If the second argument is given, bots are removed from the corresponding team: 0, 1, 2, and 3, means readyroom, Marines, Aliens, and Spectator, respectively; otherwise the most recently added bot is removed first. Does not require cheats when executed from the server console. Same as removebot. |
Server Administration
These commands can help you manage the server.
Command | Parameters | Description |
---|---|---|
sv_add_reserved_slot | <name> <steamid> | Adds a new reserved slot for the SteamID specified. |
sv_alltalk | none | Toggles alltalk and changes the server setting |
sv_auto_kick_afk | <seconds> <number> | Auto-kick is disabled when the first argument is 0. A player will be kicked only when the
server is at the defined capacity (0-1). |
sv_autobalance | <true/false> <player count> <seconds> | Toggles auto team balance. The player count and seconds are optional. Co
nt defaults to 2 over balance to enable. Defaults to 10 second wait to enable. |
sv_ban | <player id> <duration in minutes> <reason text> | Bans the player from the server, pass in 0 for duration to ban forever |
sv_changemap | <map name> | Switches to the map specified. Default maps are not case-sensitive, custom maps are. If the map cannot be found, the server selects the first map in MapCycle.json. |
sv_cheats | <boolean> | Turns cheats on and off |
sv_dyndns | <address> | Set a dynamic dns for the server. Use "" to disable the usage of the dyndns. |
sv_eject | <player id> | Ejects Commander from the Command Structure |
sv_endgamehive2 | <TeamNumber 1 or 2> | Ends the game round |
sv_forceeventeams | none | Balances teams based on previous round and Hive skill |
sv_help | none | List all server commands. |
sv_installmod | <modid (in hex)> | Downloads the given mod to the server |
sv_kick | <player id> | Kicks the player from the server |
sv_listbans | none | Lists the banned players |
sv_maxbots | <float> | The server will add the max amount of bots dynamically to the teams |
sv_p_endlog | none | Ends performance logging |
sv_p_logall | none | Starts performance logging |
sv_password | <string> | Changes the password on the server |
sv_pregamealltalk | [<true/false>] | Toggles pregamealltalk and changes the server setting |
sv_psay | <player id> <message> | Sends a message to a single player |
sv_randomall | none | Forces all players to join a random team |
sv_remove_reserved_slot | <steamid> | Removes the reserved slot for the SteamID specified. |
sv_reserved_slots | <float> | Set the amount of reserved slots available on the server. |
sv_reset | none | Resets the game round |
sv_rookieonly | [<true/false>] | Toggles rookie_only and changes the server setting |
sv_rrall | none | Forces all players to go to the Ready Room |
sv_say | <string> | Sends a message to every player on the server |
sv_setseason | [<None, Fall, Winter, Default>] | Sets what season is loaded. Requires map change |
sv_setseasonmonth | none | Overrides the month used for the ByDate season |
sv_slay | <player id> | Kills player |
sv_spawnteams | <marinespawnname> <alienspawnname> | Spawns teams at specified locations. Locations must be exact |
sv_status | none | Lists player Ids and names for use in sv commands |
sv_statusip | none | Lists player Ids and names for use in sv commands |
sv_switchteam | <player id> <team number> | 0 is Ready Room, 1 is Marines, 2 is Aliens, 3 is Spectate |
sv_tests | <boolean> | Turns tests mode on and off. Grants access to commands such as nav_debug, and collision. |
sv_tsay | <team number> <message> | Sends a message to one team |
sv_tournament | <true/false> | Enables or disabled tournament mode. |
sv_unban | <steam id> | Removes the player matching the passed in Steam Id from the ban list |
Additionally check out the Shine Mod in order to administrate your server.
Debug
These commands can give you more information about how the game is running.
Command | Parameters | Description |
---|---|---|
debugspeed | none | Toggle a speedometer on your HUD. |
f_cache | <float> | Enable or disable file caching. 0 turns off file caching, any other number turns file caching on. |
fps | none | Toggle a frames-per-second display in the top left corner of your screen. |
net_stats | none | Toggle a display of server performance and network traffic information. |
profile | none | Toggle a display of various frame, delay and other information. |
r_stats | none | Toggle a display with information what is being rendered, etc. Important tool that shows you whether your GPU or CPU is the current bottleneck in order to achieve more FPS. If waiting for GPU has a Number higher than 0 (even flinching) then it is the GPU, otherwise the CPU) |
s_stats | none | Toggle a display with information what sounds are currently being played. |
version | none | Displays internal incremental build ID for testing purposes. |
Logs
These commands allow you to create Logs
Command | Parameters | Description |
---|---|---|
p_logall | [number] | Creates at frame by frame analysis of what is going on.
It creates onwindows in %appdata%/natural selection 2/ a <timestamp>.plog file.
For performance analysis use this when the performance is the lowest and do not record for shorter than 5 minutes. |
p_endlog | none | Ends the p_logall. Alternatively it ends when the round ends. |
net_log 53 | Enables verbose network logging. Needs to be activated before Joining a Server.
For network analysis use wait until the network issue occurs, wait for one minute and close the game. The log.txt on windows in %appdata%/Natural Selection 2/ will have more detailed network information. |
Rendering
These commands tell the game what to draw on your screen.
Command | Parameters | Description |
---|---|---|
r_gui | [string] | Enable or disable all menus and overlays. "true" or no argument will enable GUIs; any other string will disable GUIs. |
r_mode | none | Resets the render mode. |
r_mode albedo | none | Renders the true texture without any effect. |
r_mode depth | none | Renders only the depth map. |
r_mode emissive | none | Renders only the emissive maps of the textures. |
r_mode gloss | none | Renders only the gloss maps of the textures. |
r_mode lit | none | Renders with lighting. |
r_mode normals | none | Renders only the normal maps of the textures. |
r_mode specular | none | Renders only the specular maps of the textures. |
r_mode unlit | none | Renders without lighting. |
r_wireframe | none | Displays the wire frames. |
Networking
These commands can give you more information about how your client and the server are communicating.
Command | Parameters | Description |
---|---|---|
net_stats | none | Toggle a display of server performance and network traffic information. |
Troubleshooting
Command | Parameters | Description |
---|---|---|
removeallmods | none | Used from the Main Menu. Removes all installed Mods and unsubscribes from all Mods. Your currently subscribed ModIDs are saved away by this command and should be resubscribed automatically after ns2 is restarted. If that fails, use the resubmods console command. |
resubmods | none | Used from the Main Menu. Resubscribes to a list ModIDs previously saved in SparkCache "subedmods.txt" file. |
unloadmods | none | Used from the Main Menu. Deactives all loaded Mods and restarts the menu. |