MX Bikes Official Forum

General Category => Documentation => Topic started by: Niko Mouk on January 22, 2020, 10:17:03 PM

Title: MxBikes URL Protocol Handler script
Post by: Niko Mouk on January 22, 2020, 10:17:03 PM
Hey dear developers,
Would it be possible to give us the MxBikes URL Protocol Handler script ?
The goal is to make the Steam versions able to open servers URL. Need it for the racing website I'm working on.

Thanks  :)
Title: Re: MxBikes URL Protocol Handler script
Post by: PiBoSo on January 23, 2020, 11:38:58 PM

The URL format is:
mxbikes://ip:port/local_ip:local_port/server name/password/track_id/layout_id/categories

"local_ip:local_port" is usually the same as "ip:port". It's only useful for clients connecting from the same LAN.
"password" must be 0 or 1. 1 if the server is password protected.
"layout_id" must be empty if the base layout is used.
Title: Re: MxBikes URL Protocol Handler script
Post by: Niko Mouk on January 24, 2020, 09:06:12 AM
Thank you, so for people who needs it the full schema is :
mxbikes.exe -connect "ip:port/local_ip:local_port/server name/password/track_id/layout_id/categories"
Here is the registry script needed, make sure to adapt the game path to yours:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\mxbikes]
@="URL:MX Bikes"
"URL Protocol"=""

[HKEY_CLASSES_ROOT\mxbikes\DefaultIcon]
@="E:\\Steam\\SteamApps\\common\\MX Bikes\\mxbikes.ico"

[HKEY_CLASSES_ROOT\mxbikes\shell]

[HKEY_CLASSES_ROOT\mxbikes\shell\open]

[HKEY_CLASSES_ROOT\mxbikes\shell\open\command]
@="E:\\Steam\\SteamApps\\common\\MX Bikes\\mxbikes.exe -connect \"%1\""

To run it, copy the code into a text file, save, change the file extension to .reg and double click it.
Title: Re: MxBikes URL Protocol Handler script
Post by: PiBoSo on January 25, 2020, 08:52:02 AM
Quote from: Niko Mouk on January 24, 2020, 09:06:12 AMThank you, so for people who needs it the full schema is :
mxbikes.exe -connect "ip:port/local_ip:local_port/server name/password/track_id/layout_id/categories"

Please note that the protocol must be added, too:
mxbikes.exe -connect "mxbikes://..."
Title: Re: MxBikes URL Protocol Handler script
Post by: Niko Mouk on February 02, 2020, 09:29:09 PM
I made this quick program for people who wants :
http://forum.mx-bikes.com/index.php?topic=3221.0 (http://forum.mx-bikes.com/index.php?topic=3221.0)