Difference between revisions of "Natural Selection 2 Server Commands"

From Nitradopedia EN
Jump to: navigation, search
 
(One intermediate revision by one other user not shown)
Line 278: Line 278:
  
 
[[Category:Natural Selection 2]]
 
[[Category:Natural Selection 2]]
 +
[[Category:Characteristic configuration]]
 +
[[Category:Issue_ns2]]
 +
[[es:Comandos de servidor de Natural Selection 2]]

Latest revision as of 07:00, 10 September 2021

NS2Banner.png
Rent now your own prepaid Natural Selection 2 Server at nitrado.net

Natural Selection 2 Console Commands

This page lists the console commands, open the console by pressing ~, enter the command, then press ↵ or ENTER. Almost all commands are case sensitive.

  • The commands listed in black can be executed at any time.
  • Commands listed in orange can only be changed with cheats enabled.
  • The commands listed in purple can only be changed by adding permissions on the server
  • The Parameters column indicates the syntax to write the code (e.g. float, key), or the lists of accepted parameters separated by |.
  • Required parameters are written with <>.
  • Optional parameters are written with [].

If a command accepts multiple parameters, they are separated by spaces

Gameplay

These commands affect the gameplay of both Marines and Aliens.

Command Parameters Description
autobuild. none. Turn on or turn off the automatic construction, when this command is activated all investigations and structures will be finished almost instantly.
bind [key [function]] Binds the specified function to the specified code. If a function is not specified, the code will unlink for every action that does not appear in the list of bindings in the configuration menu. If no code is specified, a list of linkable codes will be displayed in the console. The console is case sensitive.
changemap <string> Change the map to the specified one. Default maps are not case sensitive, custom maps are. If the map cannot be found, the server selects the first map in MapCycle.json. It can only be run from the server console. Watch sv_changemap.
cheats <float> Enable or disable cheats. 0 deactivates cheats, any other number activates them. It can only be run from the server console. Watchcheats.
darwinmode none Alternate between invulnerability, energy, and unlimited ammo for yourself.
j1 none Join the Marines team, it can also be used jointeamone.
j2 none Join the Alien team, it can also be usedr jointeamtwo.
j3 none Join a random team.
jointeamone none Join the Marines team, it can also be used j1.
jointeamtwo none Join the Alien team, it can also be used j2.
kill none Commit suicide.
logout none Exit the Command Station (Marines) or the Hive (Aliens).
name <string> Change your name as seen on the bookmark. No quotes are required.
maxfps <number> Change maximum number of FPS, (Maximum 200).
pres [float] Set your personal resources to the specified amount. If no parameter is provided, set it to 100.
readyroom none Leave your team and go to the ready room. Same as rr.
reset none Restart the current round.
rr none Leave your team and go back to the lobby. Also works readyroom.
say <string> Send a message to the general chat. No quotes are required.
spectate none Become a spectator.
switch none Switch to the other team in your current position. It does not work in spectator mode or in the waiting room. It works the same as skulk if it's Marine, marine if it's Alien.
tres [float] Set your team's Resources to the specified amount. If no parameter is provided, set it to 200.

Manage Server

Administration exclusive commands

Command Parameters Description
sv_changemap <string> Change the map to the specified one. Default maps are not case sensitive, while custom maps are. If the map cannot be found, the server selects the first map in the MapCycle.json.
sv_cheats <float> Enable or disable cheats. 0 disables the traps, any other number activates the traps.
sv_status none List the game name, game ID, and Steam ID of all players on the server.

Aliens

These commands only work for the Alien team

Command Parameters Description
fade none Transform into Fade.
gorge none Transform yourself into Gorge.
hivevision <string> Activate or deactivate contours around objects in Commander view. "false" disables outlines, any other string enables outlines.
lerk none Transform yourself into Lerk.
onos none Transform yourself into Onos.
skulk none Transform into Skulk

Marines

These commands only affect the Marine team

Command Parameters Description
giveammo none Grants you an ammo magazine for the currently selected weapon.
give <string> Grants you a weapon, examples: rifle, machinegun, welder, shotgun, grenadelauncher, flamethrower, mine,..
jetpack none Grants you a Jetpack.

Insight

These commands only affect viewers.

Command Parameters Description
jm <int> [int <int> <int>] Set the color of the pen to draw on the screen. If all ranges are given, they are integers between 0 and 255 representing red, green, blue, and alpha, respectively. Otherwise, the first range is an integer between 0 and 16777215 representing an RGB Int. Same as johnmadden and pen .
johnmadden <int> [int <int> <int>] Set the color of the pen to draw on the screen. If all ranges are given, they are integers between 0 and 255 representing red, green, blue, and alpha, respectively. Otherwise, the first range is an integer between 0 and 16777215 representing an RGB Int. Same as jm and pen .
pen <int> [int <int> <int>] Set the color of the pen to draw on the screen. If all ranges are given, they are integers between 0 and 255 representing red, green, blue, and alpha, respectively. Otherwise, the first range is an integer between 0 and 16777215 representing an RGB Int. Same as jm and johnmadden .
score1 <string> Sets the score to the left on the scoreboard. If the parameter is a number, or the characters "+" or "-", the score will be set to the number, increased by one, or decreased by one, respectively. Any other input will set the score to "nil".
score2 <string> Set the correct score on the scoreboard. If the parameter is a number, or the characters "+" or "-", the score will be set to the number, increased by one, or decreased 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 punctuation will be set to the number, increased by one, or decreased by one, respectively. Any other input will set the score to "nil".
team1 <string> Set the team name to the left and display the scoreboard.
team2 <string> Set the team name to the right and display the scoreboard.
teams <string> [string] Set team names and show 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 swap the names and scores between the sides; "reset" or "clear" will set both scores to 0 and remove the marker.

Bots

These commands only affect bots.

Command Parameters Description
addbot [float] [0|1|2|3] [string] [string] Add bots to the server. If no argument is given, a random normal field bot is added 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 prep room, Marines, Aliens, or Spectator, respectively. If the third argument is "com", the bot will be the commander; otherwise, he will be an outfield player. If the third argument is "test" and the fourth argument is given, the bot will walk back and forth and not fire; otherwise it will behave normally. It does not require cheating when running from the server console. 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. If the third argument is "test" and the fourth argument is given, the bot will pace back and forth and not shoot; otherwise it will behave normally. Does not require cheats when executed from the server console. Same as addbot.
addpassivebot [float] [0|1|2|3] [string] Add passive bots to the server. Same as addbot with the fourth parameter set to true. This command will generate passive bots only if all three arguments are given and the third argument is "test"; otherwise it will spawn regular bots. It does not require cheating when running from the server console.
freezebots none Enable or disable freezebots. When frozen, bots cannot move, shoot, or join a team. It does not require cheating when running from the server console.
removebot [float] [0|1|2|3] Remove bots from the server. The first argument is the number of bots to kill; if not provided, a bot is removed. If the first argument is less than one, a bot is killed; if it is an integer greater than or equal to one, so many bots are killed; if it is not an integer greater than one, all bots are killed. If the second argument is given, the bots are eliminated from the corresponding team: 0, 1, 2 and 3, it means Readyroom, Marines, Aliens and Spectator, respectively; otherwise the most recently added bot is removed first. It does not require cheating when running from the server console. Same as removebot .
removebots [float] [0|1|2|3] Remove bots from the server. The first argument is the number of bots to kill; if not provided, a bot is removed. If the first argument is less than one, a bot is killed; if it is an integer greater than or equal to one, so many bots are killed; if it is not an integer greater than one, all bots are killed. If the second argument is given, the bots are eliminated from the corresponding team: 0, 1, 2 and 3, it means Readyroom, Marines, Aliens and Spectator, respectively; otherwise the most recently added bot is removed first. It does not require cheating when running from the server console. Same as removebots .