Version 2 Released! It includes some breaking changes, you can find the changelist here.
A library for interacting with the XML-RPC protocol of TrackMania servers and similar titles built with .NET 5. It is built using the task async pattern (TAP). It comes with pre-made methods for all the documented XML-RPC methods provided by the trackmania server and allows you to easily hook into and react on callbacks. Interacting with ModeScript is also simplified through special features.
Install the library from Nuget: dotnet add package GbxRemote.Net
Make sure you have an updated version of the Trackmania Server installed and running.
The following basic program connects to the server host 127.0.0.1 and the port 5000 (default XMLRPC port). It retrieves a list of players currently on the server and prints them out to the console.
using System;
using GbxRemoteNet;
// create client instance
GbxRemoteClient client = new("127.0.0.1", 5000);
// connect and login
if (!await client.LoginAsync("SuperAdmin", "SuperAdmin"))
{
Console.WriteLine("Failed to login.");
return;
}
Console.WriteLine("Connected and authenticated!");
// get player list
var players = await client.GetPlayerListAsync();
// print player logins and nicknames to the console
foreach (var player in players)
{
var info = await client.GetDetailedPlayerInfoAsync(player.Login);
Console.WriteLine($"Login: {player.Login}, NickName: {player.NickName}");
}
// disconnect and clean up
await client.DisconnectAsync();
To learn more about the usage of this library, head over to the main documentation.
The full documentation with API reference can be found here.
We give limited support for this library via our Discord server - if you have any questions on how to use this, please check out the User Guide below and the source code documentation first and foremost. If you're still stuck afterwards, feel free to ask in the #support channel on our Discord server. Please do not message any of the maintainers privately about getting support for this library.
If you have any questions, issues, bugs or suggestions, don't hesitate create open an Issue! You can also join our Discord for questions.
You may also help with development by creating a pull request, but please create a new branch first.