Go Back   Savage 2: A Tortured Soul Forum > Savage 2 Servers

Notices

Savage 2 Servers Announcements, discussion, and information regarding the Savage 2 servers.

Closed Thread
 
Thread Tools Display Modes
Old 07-28-2011, 10:06 PM   #1
S2stony
S2 Junior Staff Member

S2stony's Avatar
 
Join Date: Dec 2008
Location: Newerth Valley
Posts: 6,940
Thanks: 61
Thanked 298 Times in 142 Posts
Default How to Set Up a Server

I. Static IP

In order for your computer to talk with other computers, it needs to have an unchanging location. This is called a static IP.

Windows Vista and Windows 7 Users
  • Right-click on your connection in the task bar and click "Open network and sharing center."
  • Click on "Local area connection," select properties, and go to Internet protocol Version 4. Select properties in that menu.
  • Set a static IP for your computer. Only the last number should be different from your router. If your router's static IP is 192.168.1.1, your last digit can be anything from 192.168.1.2 to 192.168.1.256.
  • Set your subnet mask to 255.255.255.0, your default gateway to your router's static IP, and your preferred DNS server to your modem's IP.

Linux Users
  • Open /etc/rc.conf in your preferred text editor.
  • Edit the Networking section as follows, where $ITF is your network interface (ex.eth0, wlan0), $ADR is your preferred static IP (ex. 192.168.*.*), $MSK is your preferred netmask (ex. 255.255.255.0), and $GTW is the static IP of your router (ex. 192.168.*.*). Note that the first three numbers of your preferred static IP must be the same as the first three numbers of your router's static IP.
  1. interface=$ITF
  2. address=$ADR
  3. netmask=$MSK
  4. gateway=$GTW
II. Port Forwarding

Computers generally try to protect themselves from other computers. As such, you have to fiddle with your ports to let data through your firewall. Portforward.com may be useful.
  • Enter your router's static IP in your web browser.
  • Make ports 11235 through 11240 available to run the server. Make ports 11435 through 11535 available to use VoIP on your server. All ports are UDP-only.

III. Configuring Server

After installing the game client to your server, much more is necessary to be functional. Some of the following configurations should be set in the startup.cfg of your server. Windows users can find it in %HOMEPATH%\My Documents\Savage 2 - A tortured soul\Game\. Linux users can find it in /home/$USER/.savage2/game/. Note that some of these things can be changed on-the-fly with the same commands in the command box. Some things may be changed with a remote password with the in-game console. Other configurations may be set in map_rotation.cfg, which is found in the same directories.
  • Install Savage 2 to your server.
  • Open your startup.cfg file on your server and make the following necessary changes. Note that there are many more settings that may be changed, but please remember that changes have consequences.
  1. SetSave svr_adminPassword "$PASS" - Sets the administrator password to $PASS.
  2. SetSave svr_connectpass "$PASS" - Sets the server password to $PASS.
  3. SetSave svr_location "$LOC" - Sets the server location to $LOC.
  4. SetSave svr_login "$USER" - Along with svr_pass, lists your server in the server list, allowing players to connect without entering your static IP. Note that $USER must be a valid username.
  5. SetSave svr_maxclients "$COUNT" - Sets the max number of connect players to $COUNT. The recommended value is 26.
  6. SetSave svr_name "$NAME" - Sets the server's name to $NAME.
  7. SetSave svr_pass "$PASS" - Along with svr_login, lists your server in the server list, allowing players to connect without entering your static IP. Note that it must be a valid password.
  8. SetSave svr_remotePass "$PASS" - Sets the remote password to $PASS, allowing administrator access to a server from the client's console (ctrl-F8) by entering the command "$PASS $COMMAND", where $COMMAND is your intended command.
  9. SetSave sv_team1Race "$RACE" - Sets the race of team1 to $RACE. Options are "Human" and "Beast. Note that a similar command may be used to set the race of team 2. Also note that it is sv_, not svr_ as the others are.
  • If you intend to use custom maps, place the .s2z file in your ../game/maps/ directory, then add the following line to your map_rotation.cfg.
  1. AddMapToRotation "$MAP" 1.0000 - Adds the $MAP map to rotation on the server. Note that other maps may be removed from rotation by removing them from this file.
IV. Using Server

To make server startup simple, it is recommended to create a shortcut. Windows users can create a desktop shortcut to $PATH/Savage 2 - A Tortured Soul/DedicatedServer.bat. Some Linux users can do the same thing, though you may wish to create a bash alias. After executing your shortcut, a server-wide chat box and a server command box will open.
  • To run multiple servers on the same Linux machine, start the server with:
  1. ./savage2.bin "Set host_dedicatedServer true; setconfig $NAME"
  2. The directory ~/Savage2/game/$NAME will be created, with its own set of options.
  • Following are several useful commands which can be entered in the command box or in the in-game ctrl-F8 console if a remote password is enabled as described below.
  1. endgame $TEAM - Causes either team 1 or team 2 as entered in place of $TEAM to lose, sending the server to the next map.
  2. startgame - Causes the game to start with no regard to how many clients are connected.
  3. serverstatus - Shows the clients connected, disconected, and so on
  4. startserver - Starts the server if for some reason it doesn't start itself.
  5. kick $PLAYER - Kicks the player with the username $PLAYER
  6. givegold $PLAYER $AMOUNT - Gives $PLAYER as much gold as you enter in place of $AMOUNT. Note that 34,000 is the maximum possible without bugging.
  7. giveexp $PLAYER $AMOUNT - As with givegold, this gives as much experience to $PLAYER as you enter in $AMOUNT. There is no limit.
  8. giveteamgold $TEAM $AMOUNT - Gives team 1 or team 2 $AMOUNT of gold as indicated in $TEAM. The maximum without bugging is 50,000.
  9. giveclientitem $PLAYER "$ITEM" - Gives $PLAYER the in-game item indicated in $ITEM.
  10. changeworld $MAPNAME - Changes the current map to $MAPNAME.
__________________

Donations are still welcome - please go to www.PlaySavage2.com and click on the "Donate" button. TY

S2stony is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 12:36 AM.