-
Notifications
You must be signed in to change notification settings - Fork 20
Game Server Configuration
- Compiled server binaries and a working MariaDB database server (if you do not have at least one yet, please go back to Building and installing page.
- Text editor(Notepad++ recommended, although Wordpad and Notepad should work aswell, on Windows).
By opening Game Server's configuration file with text editor, which is project_dir/cfg/gameserver_1_1.ini
you can see some already commented options.
Each section will be explained below.
In this section all configuration related to the server is kept. That means here you can: change listen port, change log level and etc.
Note: There is no listen ip option. This is because all of the servers are listening on Ip.Any.
- ip - even though servers are listening on Ip.Any, this ip is used to send to the client. It should be your public aka WAN ip.
- port - it is listen port which default is
38111
. - use_local_ip - if this is set then if the client will be connected from the private network, then Freya will push local IP.
- max_users - it will determine how much players this game server can hold.
In this section all configuration related to the server and game settings are kept. That means here you can: change type, rates, etc.
- server_type - this setting determines server's type. For now, only normal type is supported(type = 0).
- ignore_sub_password - if this is set then sub password expiration is not checked.
In this section all configuration related to the master server is kept. That means here you can: change master server's ip and port.
- ip - ip of the master server.
- port - port of the master server.
In this section all configuration related to the scripting engine is kept.
- directory - directory where scripts are stored.
Freya supports multi channels as well as multi servers. By default, only first server and first channel configuration file (project_dir/cfg/gameserver_1_1.ini
) is available. To create another channel server, you need to copy the same configuration file and rename it to gameserver_1_2.ini
and change listening port.
You can create gameserver_2_1.ini
to have second server with first channel and etc. However, [gameX]
section must be set in MasterServer
with a different game database.
If gameserver is launched without arguments, then it will use gameserver_1_1
configuration. You need to pass <server_id> <channel_id> to launch anything else. For example, to launch 3 server and 2 channel server:
- configuration file -
gameserver_3_2.ini
- server must be launched with these arguments:
bin/gameserver 3 2