Page 2 of 5

Re: LibXmlRpc Improvements

Posted: 22 Oct 2014, 12:46
by reaby
sorry my posting, but looks heavily that these modifications you ask -> are only for your use case of the game mode

Why I don't see a problem of fetching and keeping warmup status at your plugin class as you get the callbacks LibXmlRpc_BeginWarmup and LibXmlRpc_EndWarmup.

and why I do only see huge problems of modification of the generalized core system of game mode.

what if you then later need to adapt something else, or have another idea for the plugin, and then you are missing the callbacks, what then, ask nadeo again to enable them ?

Sorry argue with this, but you really should just modify your plugins code in this case, here's an example:

Code: Select all


class myplugin {
     private $isWarmup = false;

     function LibXmlRpc_BeginWarmup() {
            $this->isWarmup = true;
      }

      function LibXmlRpc_EndWarmup() {
            $this->isWarmup = false;
      }

     function BeginRound($stuff) {
           if ($this->isWarmup) {
                    return;
           }

      // more stuff
     }

}
 

Re: LibXmlRpc Improvements

Posted: 22 Oct 2014, 13:30
by undef.de
reaby wrote: Why I don't see a problem of fetching and keeping warmup status at your plugin class as you get the callbacks LibXmlRpc_BeginWarmup and LibXmlRpc_EndWarmup.

Sorry argue with this, but you really should just modify your plugins code in this case.
I think also that this should work.

Re: LibXmlRpc Improvements

Posted: 22 Oct 2014, 18:32
by undef.de
kremsy wrote:And what is if for example the servercontroller get restarted during the warmup phase?
Just trigger WarmUp_GetStatus to get WarmUp_Status on controller start. :)

Re: LibXmlRpc Improvements

Posted: 22 Oct 2014, 23:02
by undef.de
Run into a small "problem" with these improvements:

If i block some callbacks with LibXmlRpc_BlockCallback (e.g. LibXmlRpc_BeginMatchStop and others) and restart the Map, then the blocked callbacks are enabled after restarting, because of:

http://forum.maniaplanet.com/viewtopic. ... 34#p221734:
Eole wrote:When voting/forcing a restart map the whole script is restarted, so most of the script variables loose their current value and take the default one. A map change doesn't restart the script and so doesn't cause the same problem. It's the case for all game modes on TrackMania and ShootMania.
So if i block the callbacks again at LibXmlRpc_BeginServer, then at least LibXmlRpc_BeginMatchStop is called in the meanwhile. I have changed my switch/case that unused callbacks are not matched, before i matching all unused also.

Is there a chance to change the resetting of:
  • LibXmlRpc_BlockCallback
  • UI_SetProperties
  • LibScoresTable2_SetStyleFromXml
  • SetModeScriptSettings
Because all of them a controller has to re-setup them on restarting a map.

Also if i change some of the UI_SetProperties, then currently you can
  1. see the turned off widgets
  2. see jumping widgets, because of a changed position
while restarting just before the intro starts.

Btw.: If i turn off the intro in the launcher, that didn't have any effect (only with Modescripts?).

Re: LibXmlRpc Improvements

Posted: 23 Oct 2014, 09:52
by undef.de
kremsy wrote:
undef.de wrote:
kremsy wrote:And what is if for example the servercontroller get restarted during the warmup phase?
Just trigger WarmUp_GetStatus to get WarmUp_Status on controller start. :)
These callbacks dont tell you that you are in warmup, they just twll if the mode has the warmup script or not.
The name of the trigger was indicating to me that the status is returned and not if the mode uses WarmUp. :shock:

Then there is a need for a trigger like LibXmlRpc_GetWarmUp to get LibXmlRpc_WarmUp as it is available in TM.
http://doc.maniaplanet.com/dedicated-server/xmlrpc/xml-rpc-scripts.html#LibXmlRpc_GetWarmUp wrote:LibXmlRpc_WarmUp
Data : An array with a boolean to indicate if the mode is in warm up or not.
Example : ["True"]
Note : This callback is sent when the script receives the LibXmlRpc_GetWarmUp trigger.

Re: LibXmlRpc Improvements

Posted: 31 Oct 2014, 22:02
by undef.de
Yes agree, adding a warmup flag to LibXmlRpc_BeginRound and LibXmlRpc_EndRound would be helpful.

And a settings cache for not reset given settings on a map restart: http://forum.maniaplanet.com/viewtopic. ... 13#p232113