Difference between revisions of "How to make a server"

From Fortress Forever Wiki
Jump to navigationJump to search
(adding to new Category:Tutorials)
Line 421: Line 421:
 
[[How_to_make_a_server#Configuring Your Server|Configuring Your Server:]] [http://support.steampowered.com/cgi-bin/steampowered.cfg/php/enduser/std_adp.php?p_faqid=140&p_created=1093311485&p_sid=Gs2APcWi&p_lva=&p_sp=cF9zcmNoPTEmcF9zb3J0X2J5PSZwX2dyaWRzb3J0PSZwX3Jvd19jbnQ9MTEmcF9wcm9kcz0mcF9jYXRzPSZwX3B2PSZwX2N2PSZwX3NlYXJjaF90eXBlPWFuc3dlcnMuc2VhcmNoX25sJnBfcGFnZT0xJnBfc2VhcmNoX3RleHQ9RmFzdCBETA**&p_li=&p_topview=1 www.steampowered.com]
 
[[How_to_make_a_server#Configuring Your Server|Configuring Your Server:]] [http://support.steampowered.com/cgi-bin/steampowered.cfg/php/enduser/std_adp.php?p_faqid=140&p_created=1093311485&p_sid=Gs2APcWi&p_lva=&p_sp=cF9zcmNoPTEmcF9zb3J0X2J5PSZwX2dyaWRzb3J0PSZwX3Jvd19jbnQ9MTEmcF9wcm9kcz0mcF9jYXRzPSZwX3B2PSZwX2N2PSZwX3NlYXJjaF90eXBlPWFuc3dlcnMuc2VhcmNoX25sJnBfcGFnZT0xJnBfc2VhcmNoX3RleHQ9RmFzdCBETA**&p_li=&p_topview=1 www.steampowered.com]
  
[Category:Tutorials]
+
[[Category:Tutorials]]

Revision as of 21:03, 1 February 2008

Overview

What is a server?

A server is a portal that allows other online players to play the game.

There are 4 types of servers to choose from:

Listen Server

This type of server may be started in-game by selecting the Create Server option. Listen Servers are ideal for small LAN games (this type of server is not intended to be used as a public server).

Steam Dedicated Server

This type of server may be started through Steam by selecting a server application to run under the Tools tab. Steam Dedicated Servers require more system resources than the Stand-Alone Dedicated Server and cannot be started automatically when your computer is booted up.

Stand-Alone Dedicated Server

This type of server is intended for advanced users who intend to run the dedicated server software to host internet games. Stand-Alone Dedicated Servers offer the best performance and configuration options, however, you must use a console interface to manage the server.

Linux Dedicated Server

The Linux Dedicated Server is a variant of the Stand-Alone Dedicated Server designed to run on Linux.

Getting Started

What programs do I need?

Before you even start the server install you really need to have several programs which are necessary tools that will enable you to configure/update and manage your server.

Listed below are the programs that are recommended you have installed and are somewhat familiar with before you start putting together your server.

FTP - File Transfer Protocol Program

In order to upload your server’s files from your computer to the remote server that runs your ff server and vise versa you must have an FTP or File Transfer Protocol Program. Many hosting companies offer file access through your browser and it is useful for a quick update if you are not on your primary computer. However, an actual FTP client is much more stable and faster to use.

There are lots of free FTP programs available on the Internet but almost all of them have limitations, nag screens or are supported by ads. We recommend the following FTP clients which are widely used, fully functional and completely free:

Coreftp

WinSCP

Compression Utility Program

In order to conserve hard drive space, extract compressed files (of various formats) and to create .bz2 files if you utilize the fast download feature for your web site you need to have a compression utility program.

There are lots of free compression utility programs available on the Internet but almost all of them have limitations, nag screens or are supported by ads. We recommend using the following compression utility program which is widely used, fully functional and completely free:

7-zip

Server Management Program

In order to manage your server, test configuration variables and check on it’s status one must have a server management program.

There are lots of free server management programs available on the Internet but a lot of them have limitations, nag screens, are supported by ads . We recommend using the following server management utility which is widely used, fully functional and completely free:

HLSW Gameserver Tool

Note(s):

A) Download and use the “Official Download” for the most stable version.

B) You do not need to utilize the built steam log in part of HLSW to effectively manage your server. It is only required if you want to be able to log into it and utilize Steam functions like chat. Just click on “Offline Mode” to manage you server.

Installing the Mod

Most game server companies are willing to download and install mods for you so give them the link for the Downloads Section and ask them to download and install the latest release for you.

If they are not willing to do this you will need to use one of the FTP Programs above and extract the Latest Version of Fortress Forever to your Half Life 2 Based Server.

Note(s):

A) You must be running a Half Life 2 based server for Fortress Forever to run.

B) You may need to create a new FortressForever file in your server's core files. You will need to consult your server company for suggestions on how to do this.

Customizing Your Server

Once you have your server set up, you will probably want to customize your server. There are several things you can do to customize your server. However we have broken it down to Basic Server Customizations and Advanced Server Customizations to make things simpler.

Basic Server Customizations

This section will cover some of the more basic changes you may want to implement on your server.

Such as:

Changing Your Server's Name

In order to change your server's name you need to edit three files.

1. The first file you will need to edit is your autoexec.cfg.

  • You can find this file in the following directory: FortressForever/.
  • If the file doesn't exist you will need to create one.

Once you have located/created this file you need to open the file add the following two lines to it:

log on
exec server.cfg

Note: You need to make sure you save the changes you make to the file, upload it on your server and then stop and restart your server for the changes to take effect.

2. The second file you need to create/edit is the server.cfg file.

  • You can find this file in the following directory: FortressForever/cfg/.
  • If the file doesn't exist you will need to create one.

There are a lot of different server side settings you can put in this file, but for this example we will just deal with changing your server's name.

In your server.cfg find the line that starts with:

"hostname"

.

It should be located somewhere near the top of the file and read like this:

hostname "your server name here"

To change your server's name, simply replace the text "your server name here" with the name of the server. But make sure you leave the quotation marks in place.

Note: Don't forget to save the changes you make to the file and upload it on your server.

* For a more detailed tutorial on setting up your server.cfg file see the advanced scripting section *

3. The third and final file you need to edit is the valve.rc file.

  • You can find this file in the following directory: FortressForever/cfg/.

You will need to edit this file so that it looks exactly like the example below. Make sure all lines that are commented out below are commented out in your file.

FYI: Putting a set of // in front of a line comments out the variable from being read by the server.

When completed the file should look like the one below:

// load the base configuration
//exec default.cfg

// Setup custom controller
exec joystick.cfg

// run a user script file if present
exec autoexec.cfg


//
// stuff command line statements
//
stuffcmds

//disable this for now.
//startupmenu

//hostname "your server name"

//mp_prematch 0
//mp_forcerespawn 0

//sv_allowdownload 1
//sv_allowupload 1

Review: The only lines that should NOT be commented out are:

exec joystick.cfg
exec autoexec.cfg
stuffcmds

Note: Don't forget to save the changes you make to the file, upload it on your server and then stop and restart your server for the changes to take effect.

Creating a Custom Map Cycle

Creating your own custom map cycle is fairly simple. To begin you will need to find and open your maplist.txt file.

  • You can find this file in the following directory: FortressForever/maplist.txt

You will need to edit this file with your favorite editing program. If you are unsure which program to use you may want to look at notepad or notepad++.

Once you have opened up your maplist.txt you will see the default map cycle:

ff_shutdown2
ff_cornfield
ff_crossover
ff_aardvark
ff_push
ff_hunted
ff_cz2
ff_dustbowl
ff_well

You will want to replace this list with a list of maps that you would like in your rotation.

For example you want ff_well.bsp, ff_monkey.bsp, ff_2morforever.bsb to be the map rotation. All you do is edit your maplist.txt file to include those maps.

ff_well
ff_monkey
ff_2moreforever

Be sure to take note that the .bsp is NOT included when referencing the map in your maplist.txt file.

You will also need to make sure that you put your start up map at the top of the list. After that you can place the maps in any order you desire.

  • The current default start up map is ff_well but you may want to check with your server provider to confirm that this is the file they have set as your default start up map.
  • Another way to confirm is to stop and restart your server. You will then want to check, in game, to see what map is playing. Whatever map you see is your default start up map.


Note: Spelling is critical! The map names must match the file name exactly (without the .bsp). If these do not match your server will crash.

As always, once you are done make sure to save your changes, upload your maplist.txt to your server, and restart it.

Customizing Your Message of the Day

Uploading Maps

To upload maps to your server you will first need to have some basic knowledge of FTP programs. Once you have some understanding of the FTP program you are going to be using the process is fairly simple.


To start open your FTP program and connect to your server. Once there you will need to navigate to the place where you have stored the maps you wish to upload on your computer. Then you will want to navigate to the FortressForever/ directory on your server.


Generally the mapper will have a readme attached to his / her map files that will explain what files your getting and where they belong. The most common files you will see are:

<mapname>.bmp
<mapname>.lua
<mapname>.txt 
readme.txt

Note: You will generally find these files located in a maps folder.


You may also see some other files / folders in there such as:

materials (folder)
vgui (Folder - materials/vgiu)
loadingscreens (Folder - materials/vgui/loadingscreens)
<mapname>.vmt
<mapname>.vtf
<mapname>.res

Note: These will vary by map and mapper. The specific map you are downloading may or may not include all of the above files. You may also see more files then the one's listed above. But do not worry.


As a server operator you do not really need to concern yourself with the files that are included in the zip file. All you need to do is make sure that any files that are included are uploaded to your server. If you miss even a single file you run the risk of crashing your server. So it is very important that you keep all files and folders in tact when uploading maps to your server.


Use your FTP program to upload the desired map(s) onto your server. Depending on the amount of maps you are uploading and the size of the files this process can take anywhere from a few minutes to several hours. Don't worry though, just let your FTP program do all the work. Once it has completed check to verify that all the files have been successfully uploaded. If they have then you may close your FTP program.


If done correctly your new map(s) will be uploaded onto your server. To be safe you may want to stop and restart your server.

Advanced Server Customizations

This section will cover some of the more advanced changes you may want to implement on your server.

Such as:


Installing MetaMod:Source

Metamod:Source is an advanced plugin system for Half-Life 2. Plugins for Metamod:Source are written in C++ (not to be confused with "SourceMod"). It is similar to Valve's plugin layer, but much more advanced. It is coupled with SourceHook, an expansive API layer for intercepting and hooking individual virtual functions. Metamod:Source greatly simplifies otherwise hacky tasks and provides safe ways for multiple plugins to hook the same object.

It is recommended that you never download a beta version of anything if you are planning on using your server for public games. Most companies will have a released version and a beta version. Generally you are going to have problems if you download / upload a beta version. So again, you may want to download / upload the latest released version. This will make your install a lot easier, especially if you are not familar with your server files. You will also need to know what operating system (OS) you have for your server. Windows, or Linux 32 or 64 bit for the installer to install the proper files. For more details on how to install MetaMod:Source you might want to read through the MetaMod:Source Web-Site

Installing Admin Plugins

There are several plugins available to you as a server owner that you may or may not want to upload onto your server. Some of the most common plugins are Admin Plugins. These are plugins (or additions) that you can upload to your server to help you moderate and control the content and activity on your server.


If you are interested in installing additional plugins to your server, below are some links to get you started:

sourcemod

mani-admin-plugin


This is by no means a complete list of the plugins availble, but attempting to list them all would be very difficult. You may want to try using your favorite search engine to find some of the less popular plugins out there.


Seeing as there are countless plugins available, there isn't a whole lot of advice that can be offered in this section. However if you ever have any questions or concerns you are strongly urged to seek out help and ask questions!

Creating a Fast Downloads Server

Half-Life now supports the download of custom content (maps, skins, sounds, and so on) from a HTTP server (ie: webserver) when connecting, instead of downloading directly from the game server itself.

HTTP downloading has three major benefits:

1. There is no impact on the game server when downloading custom content, as a completely separate HTTP content server does the transfer

2. Players will download custom content at their maximum transfer rate, resulting in much faster downloads

3. Players who are downloading custom content do not take up a player slot on the server while they wait

What Players Connecting See

When a player connects to a server utilizing custom content, one of two things will occur:

1. If the server is not configured for HTTP download, the game server will use the normal "trickle" download mechanism

2. If the server is configured for HTTP downloading, the player will see an enhanced download dialog, and much faster downloads. While this content is downloading, they are not connected to the game server. Once the download finishes, they are automatically reconnected to the game server, and ready to play.

If any of the custom content is not present on the HTTP content server or the case of the file name does not match then the player will disconnect from the HTTP and fall back and download any remaining content via trickle download from the server.


Configuring Your Server

To configure your server for fast downloads, just follow these easy steps.

1. Make a list of all the custom files (.res, .lua, .bsp, .vmt, .vtf, etc) used on your server

2. Put these files on a HTTP server (ie: webserver), keeping the folder layout intact

3. OPTIONAL: To display a "banner image" to players that download content, place a 340x56 pixel image in the file <custom content directory>/gfx/banner.gif

4. Set the sv_downloadurl cvar to "http://yourserver/custom_content_directory/"

Example:

Your server uses the non-standard map "ff_generic", which requires the following files:

C:\Program Files\Steam\Steamapps\FortressForever\maps\ff_generic.bsp

C:\Program Files\Steam\Steamapps\FortressForever\maps\ff_generic.lua

C:\Program Files\Steam\Steamapps\FortressForever\sound\ambience\ff_generic_a.wav

C:\Program Files\Steam\Steamapps\FortressForever\sound\ambience\ff_generic_b.wav

C:\Program Files\Steam\Steamapps\FortressForever\sound\ambience\ff_generic_c.wav


You have web space (perhaps through your ISP) with the URL "http://www.fakeurl.com/notreal" that you will use to host your custom content.


To do this, you copy the files needed for "ff_generic" to your webspace, placing them in a folder called "my_ff" in your webspace top-level directory, keeping their directory layout intact.


You now have the following files in your webspace:

http://www.fakeurl.com/notreal/my_ff/FortressForever/maps/ff_generic.bsp http://www.fakeurl.com/notreal/my_ff/FortressForever/maps/ff_generic.lua http://www.fakeurl.com/notreal/my_ff/FortressForever/sound/ambience/ff_generic_a.wav http://www.fakeurl.com/notreal/my_ff/FortressForever/sound/ambience/ff_generic_b.wav http://www.fakeurl.com/notreal/my_ff/FortressForever/sound/ambience/ff_generic_c.wav


You now set the "sv_downloadurl" cvar on your game server to "http://www.fakeurl.com/notreal/my_ff/".


Players who then connect to your server will automatically download the map "ff_generic" and its required files from your webspace when they connect

(unless they already have it, of course).

Technical Details
  • The maximum length of the sv_downloadurl is 127 characters
  • A username and password can be specified for the HTTP server by embedding them in the sv_downloadurl like so:
http://username:password@www.somewhere.com/

( Note - recent IE patches may disable this functionality )

  • If a connecting player has an existing file of the same name, it will not be overwritten. The download file will be skipped.
  • Certain game-crtical and/or dangerous files cannot be downloaded (ie: *.exe, *.vbs, etc)
Summary

1. The command you enter into the server is:

sv_downloadurl "http://<yoururl>/FortressForever/"

use quotemarks on either side of the string and include the final "/".

2. Then you create folders for gfx/env, maps, overviews, sound, sprites, models, etc. and populate them with the respective resource and in the "FortressForever" directory exactly the way you would populate your server normally.

If the client has ANY of the files already (including the BSP) it will not be overwritten, there is no way to do that, the client must delete the out of date or offending resource him/herself.

Win32 http servers are more case insensitive then linux http servers but its best to do the job right in the beginning otherwise you end up propagating bad resources to all the clients which will make things a real headache later.

3. To make your client DL times even faster and conserve space on your hosting account compress all files to .bz2 format.

Help

Altough we have tried our hardest to be as detailed and helpful as possible, we all know that there is no way we can possibly answer all your questions. So if you feel your in need of some major help, please feel free to contact someon via the portals below:

[AE] on TeamSpeak

The [AE]Clan has offered and setup an outlet to give people assistance with setting up their server using the voice communication program Team Speak. To utilize this resource you must have the program installed. The program is completely free and user friendly, not to mention easy to use. It can be downloaded from: The Teamspeak Web-Site

To get server help from the [AE]Clan; download and install Team Speak the then copy and paste the following line into your browser:

teamspeak://63.209.37.155:8822/nickname=FF_Help

When you click on the link you will get a message asking if you want to launch an associated program which you will need to accept in order for the link to automatically launch the Team Speak program and put you in the [AE] clan’s communication server.

Note(s):

A) Once you enter the server if someone doesn’t join the channel and make contact you with you within 3-5 minutes click on an [AE] player’s name that is in another channel and send them a text message requesting assistance.

B) Please be patient while waiting for someone to assist you as they may have to stop playing FF and then join you in the channel to provide you assistance.

IRC

See discussion page

Email

If you can not find what your looking for please feel free to email us at FortressForeverHelp@gmail.com and we will assist you the best we can.

Please use descriptive titles in the "subject" line as to assure that your email is sent to the right box and checked by the appropriate person(s).

References

Web-Sites

What is a server: www.steampowered.com

Configuring Your Server: www.steampowered.com