The list of XmlRpc callbacks and methods available in the Nadeo scripts is now on GitHub :
https://doc.maniaplanet.com/dedicated-s ... pc-scripts
Script callbacks
Moderator: NADEO
Re: Script callbacks
Yeah thanks
I would like to see the common script callbacks as own callbacks from the dedicated server. Not going over the "Mainaplanet.ModeScriptCallbackArray" callback. Shouldn´t it be possible to use the normal "ManiaPlanet.BeginMatch/BeginMap" callbacks for this ?
best regards, Jojo
I would like to see the common script callbacks as own callbacks from the dedicated server. Not going over the "Mainaplanet.ModeScriptCallbackArray" callback. Shouldn´t it be possible to use the normal "ManiaPlanet.BeginMatch/BeginMap" callbacks for this ?
best regards, Jojo
Re: Script callbacks
i guess that's not the case because shootmania is so customizable that it's different in every mode
Re: Script callbacks
The common script callbacks are in every mode (except elite to keep backwards compatibility), so in fact they are some kind of a standard. The current way is just a bit bad to handle for servercontrollers because every SM Plugin in fact needs to register for the "Mainaplanet.ModeScriptCallbackArray" callback from the server and then check with many if´s/switch statements what callback was called. In terms of performance just bad.steeffeen wrote:i guess that's not the case because shootmania is so customizable that it's different in every mode
regards, Jojo
Re: Script callbacks
No ofc not. Look:kremsy wrote:You think one switch statement makes a bad performance?Jojo_44 wrote:The common script callbacks are in every mode (except elite to keep backwards compatibility), so in fact they are some kind of a standard. The current way is just a bit bad to handle for servercontrollers because every SM Plugin in fact needs to register for the "Mainaplanet.ModeScriptCallbackArray" callback from the server and then check with many if´s/switch statements what callback was called. In terms of performance just bad.steeffeen wrote:i guess that's not the case because shootmania is so customizable that it's different in every mode
regards, Jojo
Let´s say you want a function to be called when the Map ends. So in Xaseco2 (tm2) f.e. you register this function to be called when the callback "ManiaPlanet.EndMap" is called from the server. If you want the same for shootmania (f.e. in mpaseco) you register for the callback "Mainaplanet.ModeScriptCallbackArray" and check if the param1 is "MapEnd". But here it comes: "Mainaplanet.ModeScriptCallbackArray" is called also for every other single callback from SM Scripts which Eole posted. So your function is also triggered for "onShoot" f.e. too even if you just want "EndMap". So your function is in my view unnecessarily often called. You can now come and say: well a function call + a if statement are not that hard in terms of performance but remember how often the onShoot callback is called f.e. (+ all others) and you may have 10 functions or more registered for "Mainaplanet.ModeScriptCallbackArray". So you have hundreds of functions calls for nothing.
regards, Jojo
Re: Script callbacks
The callback is sent once all players have loaded the map. I can call it earlier but then, it's not certain that all players will have complete the transition from the previous map.
There will be a new callback for Royal in the next update, giving the login of the round winner. It's sent just before the LibXmlRpc_EndRound callback:
There will be a new callback for Royal in the next update, giving the login of the round winner. It's sent just before the LibXmlRpc_EndRound callback:
Code: Select all
Name: "Royal_RoundWinner"
Data: An array with the login of the player who won the round
example: ["Login"]
Note: This callback is sent just before the end of the round, when the round winner is determined
Who is online
Users browsing this forum: No registered users and 2 guests