Author Topic: How To Setup A Dedicated Server or Servers  (Read 19158 times)

CFodder

  • Posts: 150
Is pretty easy to do once you get the hang of the config (which isn't overly complicated), will just cover the basics. All edits should be done in the server_config.cfg file.

Standard Setup
1.  Go to your Wreckfest folder, generally located at:  ... \Steam\steamapps\common\Bugbear Entertainment.
2.  Open the server_config.cfg file in notepad (or any other editor).
3.  Change the name of your server, put a password etc in and take note of the Steam_Port, Game_Port and Query_Port settings, default are 27015, 33530 and 27016 respectively.
4.  In your router forward the 27015 and 27016 ports for TCP and UDP, the 33540 for UDP.
5.  Go back to your Wreckfest folder and run the start_server_initial.bat file, this will start up the server and if your ports above are forwarded properly it will be advertised.

Fowarding Alternative Ports
If you have other games running on your server using the above ports then you can easily change the default ones, in my case I just added 10 to each of the ports above and forwarded those as per step 4.

Running More Than One Dedicated Server
This is all taken from St. Jimmy's post http://community.bugbeargames.com/index.php/topic,7798.45.html so all credit for this goes to him :)

a. Make a copy of the \server\ folder and name it \server2\
b. Make a copy of the initial_server_config.cfg and name it initial_server2_config.cfg
c. Make a copy of the start_server.bat and name it start_server2.bat
d. Make a copy of the start_server_initial.bat and name it start_server2_initial.bat
e. Edit initial_server2_config.cfg - Right click initial_server2_config.cfg and choose Edit... notepad should open, change line:

      # Clear previous user privileges every time when executing start_server_initial.bat
        to
     # Clear previous user privileges every time when executing start_server2_initial.bat

f. Then change ports. You need to be naturally on different ports than the other server. Example ports for the second server:
      steam_port=26900
      query_port=26901


g. Edit start_server2.bat - Right click start_server2.bat and choose Edit... notepad should open, change:

      @echo off
      start /B server\Wreckfest.exe -s

        to
      @echo off
      start /B server2\Wreckfest.exe -s server_config=server2_config.cfg


h. Edit start_server2_initial.bat - Right click start_server2_initial.bat and choose Edit... notepad should open, change:

      @echo off

      IF NOT EXIST server_config.cfg (
          copy initial_server_config.cfg server_config.cfg
      )

      start /B server\Wreckfest.exe -s server_config=server_config.cfg

        to
      @echo off

      IF NOT EXIST server2_config.cfg (
          copy initial_server2_config.cfg server2_config.cfg
      )

      start /B server2\Wreckfest.exe -s server_config=server2_config.cfg


i.   Run the start_server2_initial.bat so server2_config.cfg gets generated!
j. To start the server2 use the server2.bat
k. Now you can edit the server2_config.cfg to set the rules and what not for the second server :) Also now you've initials for two servers.

Server Colours (courtesy of Firebird):

^1 red
^2 green
^3 orange
^4 blue
^5 cyan
^6 magenta
^7 white
^8 grey
^9 dark grey

Will post up a batch file a bit later for automatically updating your server(s)

Setting Up A Track Rotation
At the end of your server_config.cfg edit the event loop settings for each track you want to have in the rotation. Note that if you want to play a track more than once just add another instance of it - the server won't reload tracks until it goes to a new one.

Below is an example of the first track in the rotation we use:

# Race 1
# Sandpit 1
el_add=sandpit1
el_num_teams=2
el_laps=3
el_time_limit=20
el_elimination_interval=0
el_car_reset_disabled=1
el_wrong_way_limitel_disabled=1
el_car_class_restriction=
el_car_restriction=
el_weather=

They're all pretty self explanatory, for the second track in the rotation I just copy and pasted the above, changed it to Race 2, the track name that you see in game, the actual name of the track on the server and the number of laps. Generally the reverse tracks will just have _rev after the track name for the server side, for these tracks I've put {rev} after their names

Map Names

Client / Server

Races
Sandpit 1 / sandpit1 {rev}
Sandpit 1b / sandpit1b {rev}
Sandpit 2 / sandpit6 {rev}
Sandpit 3 / sandpit4 {rev}
sandpit Alt Route / sandpit4b {rev}
Tarmac 1 / forest5 {rev}
Tarmac 2 / racing2 {rev}
Tarmac 3 / valer
Figure 8 / oval1b
Figure 8 Small / derby11_rev
Oval / oval1
Speedway 2 / oval2
Inner Oval / oval2c
Inner Oval Figure 8 / oval2d
Gravel 1 / stadium2 {rev}
Mixed 1 / kaanaa
Mixed 2 / valkenswaard
Mixed 3 - Route 1 / forest7 {rev}
Mixed 3 - Route 2 / forest7b {rev}
Mixed 4 / mixed4

Derby
Mudpit / derby2
Speedbowl / oval2b
Stadium / derby3
Small Stadium / derby10
Lawnmower Derby / derby10_mower

Server Commands
If you've been made an admin or moderator you can use all or some of the following commands:

/message [new message] - send a mesage to the chat
/kick [id] - kick a player
/band [id] - ban a player
/bansteamid [steam id] - ban a steam id
/unban [ban index] - lift a ban, use "bans" for ban indices
/unbansteamid [steam id] - lieft a ban by steam id
/clearbans - clear all bans
/balanceteams - balance teams
/restart - server restart
/bot - add a bot
/op [id] - add moderator privileges
/admin [id] - add admin privileges
/demote [id] - clear admin and moderator pivileges
/password [new password] - set password
/servername [new server name] - set name of the server
/welcome [new welcome message] - set the welcome message
/eventloop - toggle automatic event rotation if configured
« Last Edit: May 01, 2017, 02:12:59 AM by CFodder »

Murf

  • Posts: 34
So this should not be done on the same pc you are playing the game on?

CFodder

  • Posts: 150
So this should not be done on the same pc you are playing the game on?

No reason it can't, the only reason I don't is I leave the dedicated servers on 24/7 whereas turn my own one off.

Purple44

  • *
  • Posts: 7143
I use my second computer for running dedicated server software ( a quad 6600, 4870 video card ). I found you need to have Steam running before starting dedicated server software. Don't need to start Wreckfest on second computer, just log into Steam. If Steam not running, you get this error:



I did not have to forward any ports to have players be able to see my dedicated server in host list and were able to join my server.

If you look at pic above, you see commands you can use on the fly after you start the dedicated server software. Like change the password or welcome message without having to restart the dedicated server software.

Just type in /password cheese - to change your password from the one in the  initial_server_config.cfg file. Here what the  stock initial_server_config.cfg file look like:

# General - ascii character limits: server_name(31), welcome_message(254), password(31)
server_name=
welcome_message=
password=wreckfest
max_players=24

# Allow car reset?
car_reset_disabled=0

# Clear previous user privileges every time when executing start_server.bat
# 0 = keep, 1 = clear
clear_users=1

# 0 = first to join receives owner privileges, 1 = doesn't receive owner privileges
owner_disabled=0

# Lan
# 0 = use Steam, 1 = without Steam
lan=0

# Only used when lan=0
# Server is visible in LAN search only for query ports 27015-27020 and 26900-26905.
steam_port=27015
game_port=33540
query_port=27016

# Tracks:
# derby3
# derby10
# derby2
# derby11_rev
# stadium2, stadium2_rev
# forest5, forest5_rev
# oval1, oval1b
# oval2, oval2b
# sandpit1, sandpit1_rev
# sandpit1b, sandpit1b_rev
# sandpit6, sandpit6_rev
track=derby3

# Gamemodes:
# racing, derby, derby deathmatch, team derby, team race, elimination race
gamemode=derby

# Prepopulate with bots, 0-24
bots=0

# Team modes only, 2-4
num_teams=2

# Races only, 1-60
laps=3

# Derby time limit in minutes
time_limit=20

# For elimination race, 0, 20, 30, 45, 60, 90
# (0 means elimination each lap, others are seconds)
elimination_interval=0

# Classes: a, b, c, d
car_class_restriction=a

# Cars:
# american sedan
# european
# european coupe
# american muscle
# american muscle 2
# american muscle 3
# european coupe 2
car_restriction=

# Weathers:
# bright day
weather=


You will see that the password is already set to wreckfest in the stock config file.


I did some testing yesterday with Heddly and WorldofBay. Found only an Admin ( and I assume a moderator ) can make track, lap, etc changes. We left the lobby and left WorldofBay in there by himself and he could not make event changes.

I think this will be a problem with dedicated servers. If there no Admin or Mod in the lobby to make changes, then we are back to Build #6 and racing the same tack over and over again. :(

In Gas Guzzlers Extreme dedicated server software I can make up a track lits the game randomly picks from and I can make a tournament and set the order of the modes to be played.





Or you could allow the players to vote in changes like in GGE. A player could call for a vote to change to Gravel track. If there a majority of yes votes ( F1 ), track get changed. Then have to vote on lap count change maybe.



Or Bugbear could have game pick a random track, a random car and a random mode ( like race or derby ). Everybody races with the same car. I really hope Bugbear will add this to online host options, be it me hosting Wreckfest or a dedicated server.  :D




« Last Edit: July 02, 2015, 03:43:08 PM by Purple44 »
Flatout Joint, where the mods were.

i5 2500, 8GB, Nvidia 660 960, SB Recon, Win 10 or Win7 64bit, DFGT Wheel

Murf

  • Posts: 34
So this should not be done on the same pc you are playing the game on?

No reason it can't, the only reason I don't is I leave the dedicated servers on 24/7 whereas turn my own one off.

Awesome, will do it tonight then, wonder if it will perform better than creating the server through the game?


Also, once in game, you can change settings via the gui can't you? Like you can now when a game created server?

Purple44

  • *
  • Posts: 7143
So this should not be done on the same pc you are playing the game on?

No reason it can't, the only reason I don't is I leave the dedicated servers on 24/7 whereas turn my own one off.

Awesome, will do it tonight then, wonder if it will perform better than creating the server through the game?


Also, once in game, you can change settings via the gui can't you? Like you can now when a game created server?

Only someone that is an Admin or Mod can say change the track in my testing.
Flatout Joint, where the mods were.

i5 2500, 8GB, Nvidia 660 960, SB Recon, Win 10 or Win7 64bit, DFGT Wheel

Murf

  • Posts: 34
So this should not be done on the same pc you are playing the game on?

No reason it can't, the only reason I don't is I leave the dedicated servers on 24/7 whereas turn my own one off.

Awesome, will do it tonight then, wonder if it will perform better than creating the server through the game?


Also, once in game, you can change settings via the gui can't you? Like you can now when a game created server?

Only someone that is an Admin or Mod can say change the track in my testing.

Thank you sir. Got mine up, sucks I have to be in the office today but maybe my interwebs connection can let some people bash stuff :)

Does not seem anyone is able to type into the chat in the lobby.   Can type, but enter is not working.

Also need to change the instant go setting somewhere.   One person comes in and hits 'ready' and the game starts.   Maybe I'd have to put in the welcome message for no one to hit 'ready' until there are more people in?




« Last Edit: July 02, 2015, 06:32:27 PM by Murf »

Murf

  • Posts: 34

The only thing I haven't figured out how to do is get colours in the server name  :-\

Got the colors in the servername by adding ^(1-9) before..
ex.  ^3Bashfest! ^5Tdm ^2No Resets



You have any problem with others, or you, being able to type into the chat.  I started a server, went in it, but I could not type in the chat.  I could send a message via the server console, but was unable to type in chat. 

eje005

  • Posts: 29
4.  In your router forward the 27015 and 27016 ports for TCP and UDP, the 33530 for UDP.
5.  Go back to your Wreckfest folder and run the start_server_initial,bat file, this will start up the server and if your ports above are forwarded properly it will be advertised.
The only thing I haven't figured out how to do is get colours in the server name  :-\

33530 or 33540?  It was 33540 previously.

CFodder

  • Posts: 150
4.  In your router forward the 27015 and 27016 ports for TCP and UDP, the 33530 for UDP.
5.  Go back to your Wreckfest folder and run the start_server_initial,bat file, this will start up the server and if your ports above are forwarded properly it will be advertised.
The only thing I haven't figured out how to do is get colours in the server name  :-\

33530 or 33540?  It was 33540 previously.
Ooops, my bad  :-[, you're correct the default is 33540, have amended my original post.

CFodder

  • Posts: 150
So this should not be done on the same pc you are playing the game on?

No reason it can't, the only reason I don't is I leave the dedicated servers on 24/7 whereas turn my own one off.

Awesome, will do it tonight then, wonder if it will perform better than creating the server through the game?


Also, once in game, you can change settings via the gui can't you? Like you can now when a game created server?

Only someone that is an Admin or Mod can say change the track in my testing.
You set it so the first person on the server is an admin for it as we have for our second server, however that might not always be ideal.

Would be nice if you could add admins via their Steam ID's, would be the best option IMO.

Like your idea for the track rotation too Purple, I would also suggest we could set the number of laps per invidividual circuit as well.

CFodder

  • Posts: 150
I use my second computer for running dedicated server software ( a quad 6600, 4870 video card ). I found you need to have Steam running before starting dedicated server software. Don't need to start Wreckfest on second computer, just log into Steam ...

Correct, that was my error, have fixed the initial post.

Purple44

  • *
  • Posts: 7143
Just went online for about an hour and join about 6 different dedicated servers with no players in them. Not one would let me change the track.  :(
Flatout Joint, where the mods were.

i5 2500, 8GB, Nvidia 660 960, SB Recon, Win 10 or Win7 64bit, DFGT Wheel

CFodder

  • Posts: 150
If you join OLDr Saggy Circuit and are the first one on you should be able to.

Purple44

  • *
  • Posts: 7143
If you join OLDr Saggy Circuit and are the first one on you should be able to.

Nope, I just tried it with nobody in the lobby. Event settings is greyed out.
Flatout Joint, where the mods were.

i5 2500, 8GB, Nvidia 660 960, SB Recon, Win 10 or Win7 64bit, DFGT Wheel