• Welcome to MX Bikes Official Forum. Please login or sign up.
 
March 28, 2024, 08:13:03 PM

News:

MX Bikes beta18j available! :)


Dedicated server

Started by PiBoSo, October 02, 2014, 02:38:18 PM

Previous topic - Next topic

PiBoSo

October 02, 2014, 02:38:18 PM Last Edit: March 15, 2023, 04:24:44 PM by PiBoSo
To start a dedicated server, launch mxbikes.exe with the following parameters:
mxbikes.exe -dedicated (port number) [-set params (config_file)]

for example:
mxbikes.exe -dedicated 54210 -set params dedicated.ini


NOTE: if a client runs on the same PC, port 54210 cannot be used.


Configuration file must be in the installation path
If not set SERVER.INI is used.

Format:
[connection]
name =
maxclient =
password =
admin_password =
bandwidth = ; 0 -> very low, 1 -> low, 2 -> medium, 3 -> high, 4 -> very high
max_ping = ; milliseconds. 0 -> no limit
whitelist = ; the filename of the whitelist
blacklist = ; the filename of the blacklist
polls_disable = ; if set to 1, polls are disabled
location = ; information about server location
MOTD = ; message of the day. Use "/r" to split the message in multiple lines.

[export]
results =  ; "html", "xml" or "both". If set it will automatically export results at the end of the last session
directory = ; the directory where results will be saved ( must exist )
units =  ; 0 -> metric units, 1 -> US units, 2 -> UK units
prefix = ; filename prefix of results
incremental = ; 0 or 1. If set to 1, results are exported at the end of each session
contacts = ; 1 -> contacts between bikes are added to the XML export, 2 -> contacts with walls are exported, too

[replay]
save = ; 0 or 1, If set to 1 it will automatically save the full replay at the end of the race
directory = ; the directory where replays will be saved ( must exist )
prefix = ; filename prefix of replays

[event]
name = ; the name of the event ( optional )
track = ; track ID ( the track folder name, for ex. Practice ). If no track is found, then it is searched in the full names ( for ex. Winchester MXoN )
track_layout = ; track layout ( for ex. Short ). Empty -> Default. If "track" is used to search in the full names, then "track_layout" is used as a second filter ( for ex. 2018 to choose between different versions of Nevada )
tracks_shuffle = ; 0 -> no shuffling, 1 -> shuffle the tracks at start only, 2 -> re-shuffle the tracks at the end of the list
category = ; bike category allowed. Empty -> Open. Multiple categories can be set with a slash in between. For example: MX1/MX2
allowed_bikes = ; list of ID of allowed bikes, separated by a slash. For example: 350xf/450xf

[rating]
class = ; A -> 2000+, B -> 1600-1999, C -> 1200-1599, D -> 800-1199

[weather]
realistic = ; 0 or 1, if set to 1, following params are ignored
conditions = ; 0 -> sunny, 1 -> cloudy, 2 -> rainy
temperature = ; air temperature, celsius
wind_direction = ; 0 -> north, 1 -> north-east, 2 -> east, ..., 7 -> north-west
wind_speed = ; meters/second
track_conditions = ; 0 -> dry, 1 -> wet

[hardcore]
force_cockpit = ; 0 or 1
no_aids = ; 0 or 1
limited_tyre_sets = ; 0 or 1

[reset]
type = ; 0 -> no bike reset delay, 1 -> fixed time, 2 -> time based on the distance of the rider from the bike, 3 -> time based on the crash speed
time = ; if "type" is set to 1, the delay time in milliseconds

[race]
open_practice = ; 0 or 1. If set to 1, the following race settings are unused
format = ; 0 or 1. If set to 1 the qualify race is replaced by a qualify practice session. The pre-qualify session is skipped, too
quick_race = ; 0 or 1. If set to 1 all sessions except for warmup and race2 are skipped. The sighting lap is skipped, too
practice_length = ; minutes. If set to 0, the session is skipped
prequalify_length = ; minutes. If set to 0, the session is skipped
qualifypractice_length = ; minutes. If set to 0, the session is skipped
warmup_length = ; minutes. If set to 0, the session is skipped
sighting_lap = ; 0 or 1
race_length_format = ; 0 -> % of full length + 2 laps, 1 -> timed race + extra laps, 2 -> laps
race_length = ; % of full length. Only used if race_length_format is 0
race_minutes = ; only used if race_length_format is 1
race_extralaps = ; only used if race_length_format is 1
race_laps = ; only used if race_length_format is 2
restart_delay = ; server restart time in seconds. The default is 300, 5 minutes. If set at zero, there is no restart

pause = ; 0 or 1. If set to 1, the event is paused and saved at the end of "pause_session"
pause_session = ; practice, prequalify, qualifypractice, qualify, warmup, race1 or race2
pause_directory = ; the directory where data is saved. The default is "resume"
resume = ; the file to load to resume an event
save = ; 0 or 1. If set to 1, the event is saved at the end of "save_session". If "pause" is set, this setting is ignored
save_session = ; practice, prequalify, qualifypractice, qualify, warmup, race1 or race2
save_directory = ; the directory where data is saved. The default is "resume"

[live]
enable = ; 1 or 2 to enable live timing. If set to 1, data is sent through UDP packets ( more info: http://forum.mx-bikes.com/index.php?topic=233.0 ). If set to 2, data is written to a local file
port = ; the UDP port ( only used with "enable = 1" ). If missing or set to 0, port 54220 is used
password = ; ( only used with "enable = 1" )
file = ; the name of the file to write  ( only used with "enable = 2" )
track_position = ; 0 or 1. If set to 1, the track centerline and the position of all bikes are written, too ( only used with "enable = 2" )
contacts = ; 1 -> contacts between bikes are written, 2 -> contacts with walls are written, too ( only used with "enable = 2" )

[remote_admin]
enable = ; 1 to enable remote admin ( more info: http://forum.mx-bikes.com/index.php?topic=3891.0 )
port = ; the UDP port. If missing or set to 0, port 54230 is used
password =

[collisions]
disable = ; 0 or 1. If set to 1, collisions between bikes are disabled. The default is 1
max_ping = ; the ping over which collisions are disabled ( but high-ping clients still collide with the low-ping ones ). If set to 0, collisions are never disabled

[deformation]
scale = ; 0 to 1. 0 disables the terrain deformation ( values in between like 0.5 are allowed )
auto_reset = ; 0 or 1. If set to 1, the terrain deformation is reset at the beginning of each session

[dynamicsurface]
disable = ; 0 or 1. If set to 1, the dynamic track surface is disabled
persistent = ; 0 or 1. If set to 1, the dynamic track surface is not reset between events

[polls]
disable_during_races = ; 0 or 1. It set to 1, polls are disabled during races

[log]
file = ; the name of the file to write the dedicated server output to

NOTE: To minimize join lag, please make sure to restrict the allowed bike categories as much as possible

The replay buffer size can be set in the global.ini file: http://forum.mx-bikes.com/index.php?topic=198.msg6106#msg6106

It is possible to set up to 9 additional tracks, in the "events" section:
track2=
track2_layout=
track2_paint=
track3=
track3_layout=
track3_paint=
...
...
track10=
track10_layout=
track10_paint=
The server will move to the next at each restart and wrap to the first after the last.
The same track and layout can be repeated multiple times in the 10 "slots".

The whitelist and blacklist are a text file using the following format:
[entry0]
guid = ........

[entry1]
guid = ........

[entry2]
steamid = ........

The GUID can be read in the "Profiles" page.
Optionally, it is possible to replace "guid" with "steamid", to use the Steam ID number instead.
Whitelist only: it is possible to set, for each entry, the race number, the name, a prefix to the name ( for example a team "tag" ) and the bike.
Also, it is possible to set a custom string, up to 18 character long, that is added to the XML results export and to the live timing data.
[entry0]
guid = ........
race_number = ...
name = ...
name_prefix = ...
bike_id = ...
spectator = ; 0 or 1. If set to 1, the entry is forced as spectator
extra = ........

In the dedicated server text input, it is possible to type text that will be sent to the connected clients. It can be a personal message: http://forum.mx-bikes.com/index.php?topic=4729.msg44873#msg44873
It is also possible to send commands: http://forum.mx-bikes.com/index.php?topic=4729.msg44874#msg44874
Additional commands:
- "!restart" to reset the server
- "!whitelist update" to reload the whitelist file
- "!blacklist update" to reload the blacklist file
- "!admin" followed by client's name ( or #race number) to promote a client to admin
Text can be sent to the dedicated server from remote, too: http://forum.mx-bikes.com/index.php?topic=3891.0


NOTE: a license is not needed to start a dedicated server.

teeds

I've been trying this -

In the dedicated server text input, it is possible to type:
"restart" to reset the server


But when I type "restart" in the dedi console it only seems to type a message in chat, is there a command symbol of some kind in need to put in front of these dedi console commands?
"Damn dirt bikers!" - Bubba

PiBoSo

Quote from: teeds on May 14, 2015, 02:21:20 PM
I've been trying this -

In the dedicated server text input, it is possible to type:
"restart" to reset the server


But when I type "restart" in the dedi console it only seems to type a message in chat, is there a command symbol of some kind in need to put in front of these dedi console commands?

The "!" prefix must be used to execute a command.
First post updated.

teeds

"Damn dirt bikers!" - Bubba

PiBoSo


First post updated to add info about event name, race laps, event save, disable collisions and terrain deformation.

[GH]Cody

ok im hosting my own server, and whenever i have my dedicated server running i cant join any server, not even my own. when i click join on a server it doesnt say connecting, it just gives me the option to cancel the server like this


does anyone have a fix? when i close the server it works and im able to relaunch the game and join other servers.

PiBoSo

Quote from: gokitty199 on March 04, 2016, 02:55:22 AM
ok im hosting my own server, and whenever i have my dedicated server running i cant join any server, not even my own. when i click join on a server it doesnt say connecting, it just gives me the option to cancel the server like this

does anyone have a fix? when i close the server it works and im able to relaunch the game and join other servers.

When hosting on the same PC where the client is running, the port must be changed from 10410 to something else, for example 10411.

[GH]Cody

Quote from: PiBoSo on March 04, 2016, 11:35:16 AM
Quote from: gokitty199 on March 04, 2016, 02:55:22 AM
ok im hosting my own server, and whenever i have my dedicated server running i cant join any server, not even my own. when i click join on a server it doesnt say connecting, it just gives me the option to cancel the server like this

does anyone have a fix? when i close the server it works and im able to relaunch the game and join other servers.

When hosting on the same PC where the client is running, the port must be changed from 10410 to something else, for example 10411.
ahh thank you sir. great work on beta 4 by the way, quite an improvement.

teeds

Any chance we can get to set the qualifying race laps please? Looks like right now it's calculated at something like 70% of race distance, be nice if we could alter this as some Qualifying events, like LCQ, run less laps than a Heat race IRL.

I'd really like the ability to setup an ini for each race stage to get, for instance, the AMA Supercross 250 format of 2 heats, an LCQ and the main. I'd like to use the qualifying races for all heats and disable the qualy race for a main.

:)

Of course the ultimate way would be to allow us to totally customise an event, numerous heats, mains and all  :D  I can dream eh ;)
"Damn dirt bikers!" - Bubba

JJS209

is it possible to select that riders crash with each other? now it seems that they drive thru like they are ghosts.

Niko Mouk

 8) 300 Mbps french server is out.
Testing phase, password : saucisson (it was hard to make a choice between this and wine haha)
Hey ! If you like my work, you can 💰 donate on Paypal, thank you !

Niko Mouk

Quote from: JJS209 on March 15, 2016, 09:08:20 PM
is it possible to select that riders crash with each other? now it seems that they drive thru like they are ghosts.

[collisions]
disable = ; 0 or 1. If set to 1, collisions between bikes are disabled. The default is 1
Hey ! If you like my work, you can 💰 donate on Paypal, thank you !

PiBoSo

Quote from: geofanatec on March 22, 2016, 12:16:41 AM
If I make a "whitelist" will ONLY those riders be able to join server?

Yes.

Niko Mouk

I got a super question  ;D

How do you define which GUID is admin or not ?
Hey ! If you like my work, you can 💰 donate on Paypal, thank you !

Niko Mouk

So, I'm sorry, where do you put the apssword ? Nothing about it in the wiki
Hey ! If you like my work, you can 💰 donate on Paypal, thank you !