Dedimania Server Help Page

Site & Statistics:

Usage:

Where to send queries ? Note that later the main url will reply only to dedimania.CheckConnection, dedimania.GetVersion, dedimania.Authenticate and dedimania.ValidateAccount methods !

How to send a query ?
The form of xmlrpc queries and replies
What kind of records does Dedimania support ?
What kind of records does Dedimania not support ?
Sending xmlrpc request methods
Raw query/reply examples (without http compression of course)
Note1:
If you make a client script support, please notify it to Slig. First because I may open a new url port for your script, because the port 80 url use more resources, also because you should not use url used by other without telling it, and finally because i want to know what scripts are using Dedimania resources and on what port(s).
Note2:
The url http://dedimania.net/RPC4/server.php must never be used, except eventually for testing or rescue (for users who have a server which can't use 80xx ports). To know what url you have to use, see note 1 !

Available methods:

  • dedimania.CheckConnection
  • boolean dedimania.CheckConnection()
    Just reply true.

  • dedimania.GetVersion
  • struct dedimania.GetVersion()
    Reply a struct {'Version': int, 'MaxRecords': int}.

  • dedimania.Authenticate
  • boolean dedimania.Authenticate(struct)
    Allow user authentication by specifying a struct {'Game': string, 'Login': string, 'Password': string, 'Tool': string, 'Version': string, [Optionals: 'Packmask': string, 'Nation': string, 'ServerIP': string, 'ServerPort': int, 'XmlrpcPort': int]}. Game can be 'TMF', 'TMUF', 'TMNF', 'TMU', 'TMO', 'TMS' or 'TMN' (for TMUF/TMNF servers, please send TMF or TMUF or TMNF, and the Packmask !). Packmask should be the value returned by GetServerPackMask. Nation can be 3 letters nation or TMF Path.

  • dedimania.ValidateAccount
  • struct dedimania.ValidateAccount()
    Reply a struct {'Status': boolean, 'Messages': array of struct {'Date': string, 'Text': string} }. Status is always true, else you get a not authenticated error.
    Only if authenticated.


  • dedimania.PlayerArrive
  • struct dedimania.PlayerArrive(string, string, string, string, string, int, boolean, boolean)
    Announce that a new player has arrived. Arguments are (Game, Login, Nickname, Nation, TeamName, LadderRanking, IsSpec, IsOff). Game can be 'TMF', 'TMUF', 'TMNF', 'TMU', 'TMO', 'TMS' or 'TMN'.
    Reply a struct {'Login': string, 'TeamName': string, 'Nation': string, 'Options': array of struct {'Option': string, 'Value': string, 'Tool': string}, 'Aliases': array of struct {'Alias': string, 'Text': string, 'Tool': string} }.
    Only if authenticated.


  • dedimania.PlayerLeave
  • struct dedimania.PlayerLeave(string, string)
    Announce that a player has left. Arguments are (Game,Login). Game can be 'TMF', 'TMUF', 'TMNF', 'TMU', 'TMO', 'TMS' or 'TMN'.
    Reply a struct {'Login': string}.
    Only if authenticated.


  • dedimania.CurrentChallenge
  • struct dedimania.CurrentChallenge(string, string, string, string, string, int, struct, int, array)
    Set current challenge info and get records. Arguments are (Uid, Name, Environment, Author, Game, Mode, SrvInfo, MaxGetTimes, Players). Game is currently 'TMF', 'TMUF', 'TMNF', 'TMU', 'TMO', 'TMS' or 'TMN'. SrvInfo is a struct {'SrvName': string, 'Comment': string, 'Private': boolean, 'SrvIP': string, 'SrvPort': int, 'XmlrpcPort': int, 'NumPlayers': int, 'MaxPlayers': int, 'NumSpecs': int, 'MaxSpecs': int, 'LadderMode': int, 'NextFiveUID': string of next five uid separated with '/'}. Players is an array of struct {'Login': string, 'Nation': string, 'TeamName': string, 'TeamId': int, 'IsSpec': boolean, 'Ranking': int, 'IsOff': boolean}.
    Reply a struct {'Uid': string, 'TotalRaces': int, 'TotalPlayers': int, 'TimeAttackRaces': int, 'TimeAttackPlayers': int, 'NumberOfChecks': int, 'ServerMaxRecords': int, 'Records': array of struct {'Login': string, 'NickName': string, 'Best': int, 'Rank': int, 'Checks': array of int, 'Vote': int} }, NumberOfChecks per lap is 0 if unknown, Checks are the bestchecks of the associated record, Vote is 0 to 100 value, or -1 if player did not vote for the map.
    Only if authenticated.


  • dedimania.ChallengeRaceTimes
  • struct dedimania.ChallengeRaceTimes(string, string, string, string, string, int, int, int, array)
    Set current challenge info and players' best times, and get the updated records. Arguments are (Uid, Name, Environment, Author, Game, Mode, NumberOfChecks, MaxGetTimes, Times). Game is currently 'TMF', 'TMUF', 'TMNF', 'TMU', 'TMO', 'TMS' or 'TMN'. Times is a sorted (by 'Best') array of struct {'Login': string, 'Best': int, 'Checks': array of int}. Checks are BestCheckpoints array of the best time of player (can also be sent as a comma separated list of int in a string, which is far smaller in xmlrpc). In case of time equality the order in the Times array is used.
    Reply a struct {'Uid': string, 'TotalRaces': int, 'TotalPlayers': int, 'TimeAttackRaces': int, 'TimeAttackPlayers': int, 'NumberOfChecks': int, 'ServerMaxRecords': int, 'Records': array of struct {'Login': string, 'NickName': string, 'Best': int, 'Rank': int, 'Checks': array of int, 'NewBest': boolean} }, NumberOfChecks per lap is 0 if unknown.
    Only if authenticated.


  • dedimania.UpdateServerPlayers
  • boolean dedimania.UpdateServerPlayers(string, int, struct, array)
    Set current challenge and players info. Arguments are (Game, Mode, SrvInfo, Players). Game is currently 'TMF', 'TMUF', 'TMNF', 'TMU', 'TMO', 'TMS' or 'TMN'. SrvInfo is a struct {'SrvName': string, 'Comment': string, 'Private': boolean, 'SrvIP': string, 'SrvPort': int, 'XmlrpcPort': int, 'NumPlayers': int, 'MaxPlayers': int, 'NumSpecs': int, 'MaxSpecs': int, 'LadderMode': boolean, 'NextFiveUID': string of next five uid separated with '/'}. Players is an array of struct {'Login': string, 'Nation': string, 'TeamName': string, 'TeamId': int, 'IsSpec': boolean, 'Ranking': int, 'IsOff': boolean}.
    Reply true.
    Should be used every 4 minutes if no 'dedimania.CurrentChallenge' or 'dedimania.ChallengeRaceTimes' has been called, to keep the server and players 'On'.
    Only if authenticated.


  • dedimania.WarningsAndTTR
  • struct dedimania.WarningsAndTTR()
    Get warnings messages and TimeToRespond for all previous methods.
    Reply a struct {'globalTTR': int, 'methods': array of struct {'methodName': string, 'errors': string, 'TTR': int}}.


  • system.listMethods
  • array system.listMethods()
    This method lists all the methods that the XML-RPC server knows how to dispatch.

  • system.methodHelp
  • string system.methodHelp(string)
    Returns help text if defined for the method passed, otherwise returns an empty string.

  • system.methodSignature
  • array system.methodSignature(string)
    Returns an array of known signatures (an array of arrays) for the method name passed. If no signatures are known, returns a none-array (test for type != array to detect missing signature).

  • system.multicall
  • array system.multicall(array)
    Boxcar multiple RPC calls in one request. See http://www.xmlrpc.com/discuss/msgReader$1208 and raw examples for details. Each array entry is a struct {'methodCall':string, 'params':array}.