Friday, 7 January 2011

SFS1X: Basic Server Configuration

Hi. This tutorial isn't finished yet. I'll update it as I need in my future tutorials. So let's begin!


A Zone is like an application (like a game, a chat, etc.) or a group of rooms, if you prefer, and each room has its players that can join all the rooms inside the zone where they are. You can create a new Zone only by editing the config.xml under [SmartFoxServer Installation Folder]\Server (with any text editor like notepad)

To create a new zone, you only need to add this code before the <Zones> section. (Each zone is defined by a <Zone> block)

<Zone name="ZoneName" uCountUpdate="true" maxUsers="200" customLogin="false">

This is a simple Zone. Of course there are much more parameters to set in the Zone like for example roomListVars, that sets if the rooms can have or not Room Variables. Here's an explanation about the above parameters:

name - is the name of the Zone
uCountUpdate - if set to true, it sends to the clients an userCountUpdate event when the number of players/users in a room changes.
maxUsers - sets the maximum amount of users that the Zone will handle
customLogin - if set to false, the server handles the login proccess, but if set to true, the server doesn't handle the login process. When it receives the login request from the client, it redirects it for the Zone Extension, that will handle the login proccess.

This is just the first part of the configuration of a Zone. You need also to configure the default Rooms that will be always in the Zone and there are many other things to configure like the buddyList (optional), the Database Manager (optional), the Extensions (optional), Moderators (optional), etc.

Database Manager

To configure the Database Manager, you need to add this code in the Zone where you want to add it.

<DatabaseManager active="true">
  <Driver>The Driver</Driver>
    <ConnectionString>The URL</ConnectionString>
  <UserName>Database Username</UserName>
  <Password>Database Password</Password>
  <TestSQL><![CDATA[Test SQL Statement]]></TestSQL>

I think I don't need to explain the paremeters of the Database Manager, as its names tell everything.

I'll explain the of this parameters later.

For more information about the Basic Configuration, you can check the docs (

Stay tuned for updates ;-)

No comments:

Post a Comment