Script callbacks

Moderator: NADEO

User avatar
w1lla
Posts: 2373
Joined: 15 Jun 2010, 11:09
Location: Netherlands
Contact:

Re: Script callbacks

Post by w1lla » 25 Apr 2013, 11:37

In Elite/Heroes, etc. When players Leave a match and other Join the map or in any other random way, The script lets the Score of Map/Turn/Round be the same like e.x: 2-3. But its not set back to 0-0.

Hope this can be done in the future by a Callback or TriggerModeEvent.
TM² Info
SM Info
QM Info

OS: Windows 10 x64 Professional
MB: MSI 970A-G46
Processor: AMD FX-6300 3500 mHz
RAM Memory: 16 GB DDR3
Video: SAPPHIRE DUAL-X R9 280X 3GB GDDR5
KB: Logitech G510s
Mouse: Logitech G300s
Mode Creation
ManiaScript Docs

User avatar
Eole
Nadeo
Nadeo
Posts: 1259
Joined: 26 Apr 2011, 21:08

Re: Script callbacks

Post by Eole » 25 Apr 2013, 12:18

A call to RestartMap() should set the scores to 0.
Contribute to the ManiaPlanet documentation on GitHub
A question about ManiaScript? Ask it here!

kremsy
Posts: 1723
Joined: 21 Jul 2011, 09:51

Re: Script callbacks

Post by kremsy » 25 Apr 2013, 16:17

Eole wrote:In Elite/Heroes to speed up the process of "vote next map" the script skip directly to the next map if the vote passes. The scores of the map are ignored and the results are not displayed. So in this case the LibXmlRpc_EndMap callback will be sent at the same frame than the map unload. Unless you use the S_MatchmakingSleep setting to add a waiting time between these two steps (it was added specifically for the matchmaking in this goal).
S_MatchmakingSleep = 0: no waiting time.
S_MatchmakingSleep > 0: wait for x seconds.
S_MatchmakingSleep < 0: wait until this value is changed to something else.

I can probably add a default waiting time of 1 second or so with a message for the players, but not 5 to 10 seconds.
Alright, I will test it if its working with 1sec, but I think it will, I personally don't see any problem that people are waiting 3-5secs between the maps on nextmap vote, it's definitly no problem.

But anyway there should always be a EndMap callback even when the map get skipped by vote or Method, and at least one sec before the mapchange.
Lukas alias Kremsy, Developer of:
ManiaControl: http://www.maniacontrol.com
ParagonLeague: http://league.paragon-esports.com
MPAseco: http://mpaseco.org
ManiaViewer: http://www.maniaviewer.com

kremsy
Posts: 1723
Joined: 21 Jul 2011, 09:51

Re: Script callbacks

Post by kremsy » 26 Apr 2013, 09:04

I tried it out, one sec with that setting works fine.
Lukas alias Kremsy, Developer of:
ManiaControl: http://www.maniacontrol.com
ParagonLeague: http://league.paragon-esports.com
MPAseco: http://mpaseco.org
ManiaViewer: http://www.maniaviewer.com

kremsy
Posts: 1723
Joined: 21 Jul 2011, 09:51

Re: Script callbacks

Post by kremsy » 26 Apr 2013, 22:17

And check out these one or two posts of me in the dedicated release:

http://forum.maniaplanet.com/viewtopic. ... 91#p161844

Scoreboard disabling does now not even work with the old one and Elite and Heroes :(.

This is a bit annoying, hope it's possible for you to find a solution and give there any thing that it is always possible.
Lukas alias Kremsy, Developer of:
ManiaControl: http://www.maniacontrol.com
ParagonLeague: http://league.paragon-esports.com
MPAseco: http://mpaseco.org
ManiaViewer: http://www.maniaviewer.com

kremsy
Posts: 1723
Joined: 21 Jul 2011, 09:51

Re: Script callbacks

Post by kremsy » 05 May 2013, 12:01

Sorry eole, it was my mistake that this what I posted in the link above did not work anymore in the new version (forgot to call this libary in the playloop)...

But anyway it would be nice if you can provide these Methods to disable / enable every scoreboard. Until then it would be nice if you can put the following piece of code in the playloop:

Code: Select all

     declare Player = GetPlayer(Event.Param2);
                               if (Player != Null) {
                                  // Player dependent events (login passed)
                                  switch (Event.Param1) {
                                     case "disableAltMenu": {
                                        declare UI <=> UIManager.GetUI(Player);
                                        if (UI != Null) {
                                           UI.AltMenuNoDefaultScores = True;
                                           UI.AltMenuNoCustomScores = True;
                                        }
                                     }
                                     case "enableAltMenu": {
                                        declare UI <=> UIManager.GetUI(Player);
                                        if (UI != Null) {
                                           UI.AltMenuNoDefaultScores = False;
                                           UI.AltMenuNoCustomScores = False;
                                        }
                                     }
                                  }
                               }
                            }
Have a nice weekend ;).
Lukas alias Kremsy, Developer of:
ManiaControl: http://www.maniacontrol.com
ParagonLeague: http://league.paragon-esports.com
MPAseco: http://mpaseco.org
ManiaViewer: http://www.maniaviewer.com

User avatar
Eole
Nadeo
Nadeo
Posts: 1259
Joined: 26 Apr 2011, 21:08

Re: Script callbacks

Post by Eole » 16 May 2013, 16:02

With the latest update you can hide/show the scores table on alt via XmlRpc with TriggerModeScriptEvent(String1, String2);.

Code: Select all

Hide the scores table on alt key for a player:
String1: "LibXmlRpc_DisableAltMenu"
String2: "LoginOfThePlayer"

Code: Select all

Display the scores table on alt key for player:
String1: "LibXmlRpc_EnableAltMenu"
String2: "LoginOfThePlayer"
Contribute to the ManiaPlanet documentation on GitHub
A question about ManiaScript? Ask it here!

kremsy
Posts: 1723
Joined: 21 Jul 2011, 09:51

Re: Script callbacks

Post by kremsy » 16 May 2013, 16:04

Thank you very much Eole :). :thumbsup:
Lukas alias Kremsy, Developer of:
ManiaControl: http://www.maniacontrol.com
ParagonLeague: http://league.paragon-esports.com
MPAseco: http://mpaseco.org
ManiaViewer: http://www.maniaviewer.com

User avatar
Jojo_44
Posts: 500
Joined: 12 Jul 2010, 15:58
Location: Germany->Bavaria
Contact:

Re: Script callbacks

Post by Jojo_44 » 16 May 2013, 16:12

Eole wrote:With the latest update you can hide/show the scores table on alt via XmlRpc with TriggerModeScriptEvent(String1, String2);.
Thanks a lot :yes: :thx: :clap:
Image
my english sounds very unfriendly but it isn´t ;)

User avatar
Eole
Nadeo
Nadeo
Posts: 1259
Joined: 26 Apr 2011, 21:08

Re: Script callbacks

Post by Eole » 16 May 2013, 16:59

@Kremsy: The scoreboard is also smaller and have the same width in all game modes now (the only exception is Siege). Miracles do happen. :mrgreen:
Contribute to the ManiaPlanet documentation on GitHub
A question about ManiaScript? Ask it here!

Post Reply

Return to “Dedicated Server”

Who is online

Users browsing this forum: No registered users and 1 guest