LibXmlRpc Improvements

You can talk about ManiaScript for ManiaPlanet here

Moderator: English Moderator

reaby
Posts: 956
Joined: 29 Dec 2010, 23:26
Location: Eastern Finland
Contact:

Re: LibXmlRpc Improvements

Post 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
     }

}
 
User avatar
undef.de
Posts: 2095
Joined: 06 Apr 2011, 21:57
Location: Germany, North Sea Coast
Contact:

Re: LibXmlRpc Improvements

Post 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.
Developer of UASECO, a controller with support of the Modescript Gamemodes for TM².
Visit the official website for more: UASECO.org


Developer of various plugins for XAseco/XAseco2 and MPAseco, visit my lab: www.undef.name

You like what I do? Then award a ManiaStar.
User avatar
undef.de
Posts: 2095
Joined: 06 Apr 2011, 21:57
Location: Germany, North Sea Coast
Contact:

Re: LibXmlRpc Improvements

Post 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. :)
Developer of UASECO, a controller with support of the Modescript Gamemodes for TM².
Visit the official website for more: UASECO.org


Developer of various plugins for XAseco/XAseco2 and MPAseco, visit my lab: www.undef.name

You like what I do? Then award a ManiaStar.
User avatar
undef.de
Posts: 2095
Joined: 06 Apr 2011, 21:57
Location: Germany, North Sea Coast
Contact:

Re: LibXmlRpc Improvements

Post 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?).
Developer of UASECO, a controller with support of the Modescript Gamemodes for TM².
Visit the official website for more: UASECO.org


Developer of various plugins for XAseco/XAseco2 and MPAseco, visit my lab: www.undef.name

You like what I do? Then award a ManiaStar.
User avatar
undef.de
Posts: 2095
Joined: 06 Apr 2011, 21:57
Location: Germany, North Sea Coast
Contact:

Re: LibXmlRpc Improvements

Post 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.
Developer of UASECO, a controller with support of the Modescript Gamemodes for TM².
Visit the official website for more: UASECO.org


Developer of various plugins for XAseco/XAseco2 and MPAseco, visit my lab: www.undef.name

You like what I do? Then award a ManiaStar.
User avatar
undef.de
Posts: 2095
Joined: 06 Apr 2011, 21:57
Location: Germany, North Sea Coast
Contact:

Re: LibXmlRpc Improvements

Post 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
Developer of UASECO, a controller with support of the Modescript Gamemodes for TM².
Visit the official website for more: UASECO.org


Developer of various plugins for XAseco/XAseco2 and MPAseco, visit my lab: www.undef.name

You like what I do? Then award a ManiaStar.
Post Reply

Return to “ManiaScript”

Who is online

Users browsing this forum: No registered users and 1 guest