Script callbacks

Moderator: NADEO

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

Re: Script callbacks

Post by Eole » 18 Apr 2013, 16:24

I moved the "LibXmlRpc_BeginMap" callback between the map load and the synchro.
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 » 18 Apr 2013, 19:57

Thanks :).

And please don't forget to make the new Scoreboard hideable via the TriggerModeScriptEvent Method.

Code: Select all

$client->query('TriggerModeScriptEvent', 'disableAltMenu', $login);  
$client->query('TriggerModeScriptEvent', 'enableAltMenu', $login);  
And please, please make the new Scoreboard 3cm smaller on the left and right site :).
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
steeffeen
Translator
Translator
Posts: 2472
Joined: 14 Oct 2012, 16:22
Location: Germany

Re: Script callbacks

Post by steeffeen » 18 Apr 2013, 20:09

be careful on not asking for too much :D :D
    Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

    ManiaControl, FancyManiaLinks

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

    Re: Script callbacks

    Post by kremsy » 18 Apr 2013, 20:10

    steeffeen wrote:be careful on not asking for too much :D :D
    It's about the fifth time I ask this two things :D :D .
    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 » 19 Apr 2013, 11:15

    kremsy wrote: And please don't forget to make the new Scoreboard hideable via the TriggerModeScriptEvent Method.

    Code: Select all

    $client->query('TriggerModeScriptEvent', 'disableAltMenu', $login);  
    $client->query('TriggerModeScriptEvent', 'enableAltMenu', $login);  
    
    Could you go into details? What do you want exactly? What should happen when you press alt with 'disableAltMenu'? And with 'enableAltMenu'? Is it for all game modes or only Battle/Royal/RoyalExp? If I remember correctly you said that it was possible before but not anymore after a certain update. If you have some links of your previous posts with details about that add them please.
    kremsy wrote: And please, please make the new Scoreboard 3cm smaller on the left and right site :).
    Same thing, do you have some precisions? 3cm on a smartphone screen is big while on 30' screen its nothing. Do you have an approximate size for the manialink/widget you want to display on the side? Is there a problem only with some modes or all modes? Is there an "ideal" scores table size for you? If it's just a few pixels smaller then maybe we can do something. If you want a scoreboard of 4 pixels wide, then it will be more difficult. :mrgreen:
    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 » 19 Apr 2013, 16:57

    Hello Eole,

    what we exactly want is, I give you an example: A player open a widgets, after that I will send disableAltMenu, when he closes the widget, the enableAltMethod will be called.

    When disableAltMenu comes, the Scoreboard should not pop-up when a player presses alt, when it get disabled it should pop up again.

    With the old Scoreboards we implemented it like this:

    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;
    												}
    											}
    										}
    									}
    But this is not Possible anymore with the New scoreboard from the Scores-table-script.

    So it would be nice if you can implement this function.

    For the scoreboard size, look the following screenshot:
    http://www.pictures.esc-clan.net/upload ... Shot97.jpg

    It would be really nice if you can make it a bit smaller that we still are able to make things like top-lists on the sides.
    Would really appreciate that :).

    Another thing I think which is unnecessary is the Name: "Royal_RoundWinner" callback, because you send the rankings anyway on the end of the Round, and every server-controller and stuff can easily get the winner out of that.
    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 » 19 Apr 2013, 17:36

    kremsy wrote:Another thing I think which is unnecessary is the Name: "Royal_RoundWinner" callback, because you send the rankings anyway on the end of the Round, and every server-controller and stuff can easily get the winner out of that.
    Mmmh, I thought that was what you requested: http://forum.maniaplanet.com/viewtopic. ... 97#p157922

    I'll see what I can do for the scores table width. I suppose this is only problematic in Battle/Royal where the scores table is indeed wider than in the other modes.
    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 » 19 Apr 2013, 17:50

    Eole wrote:
    kremsy wrote:Another thing I think which is unnecessary is the Name: "Royal_RoundWinner" callback, because you send the rankings anyway on the end of the Round, and every server-controller and stuff can easily get the winner out of that.
    Mmmh, I thought that was what you requested: http://forum.maniaplanet.com/viewtopic. ... 97#p157922

    I'll see what I can do for the scores table width. I suppose this is only problematic in Battle/Royal where the scores table is indeed wider than in the other modes.
    Yep!

    Sorry for the callback (was thinking wrong), yeah thats exactly what I wanted, thanks :).

    Yes its only in Battle / Royal and all custom modes which are using the new scoreboards, would be really nice if you can do that, especially the disable / enable Alt feature!
    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 » 19 Apr 2013, 18:48

    Also what I noticed is that the EndMap callback comes in Heroes very very late, sometimes just shortly before people starting loading the nextmap and Elite too :(.

    Need that callback Instantly when the End of the Map begins. (I think you had that like this in 11 / 04 release, so im surprised that it is not anymore).

    The callback is directly needed when the last Round is Over and the ladder Points scoreboards Pops-up.

    But when I set the S_MatchmakingSleep to 5 it is working, but anyway when this is a reason, it should be set as standard to 10 in all modes.
    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

    MuNgLo
    Posts: 316
    Joined: 12 Jul 2012, 03:37

    Re: Script callbacks

    Post by MuNgLo » 21 Apr 2013, 00:50

    For Elite the WeaponNum in OnArmorEmpty is always 0 it seems. Wich means I would have to track death_by_weapontype by resolving each hit. This is not as I thought you had "fixed" it back in febuary when I reported that attackers laserkills was bugged. :(

    Plz push a fixed version or state if it indeed is intentional.

    I thought it was my workaround for the laserkills by attacker that needed a rewrite or just taken out so this is first time I get around to checking it out.

    Code: Select all

        Name: "OnArmorEmpty"
        Note: This callback is sent when a player reaches 0 armor (eliminated by another player, falling in an offzone)
        Data example:
        {
            "Timestamp": 10117060,
            "StartTime": 10080830,
            "EndTime": 10140830,
            "PoleTime": 10125830,
            "Event": {
                "Type": "EType::OnArmorEmpty",
                "Damage": 0,
                "WeaponNum": 0,
                "MissDist": 0,
                "Shooter": {
                    "Login": "eole2",
                    "Name": "$aafV².$fffAessi",
                    "CurrentClan": 2,
                    "Armor": 100,
                    "ArmorMax": 100,
                    "IsTouchingGround": true,
                    "IsCapturing": true,
                    "IsInOffZone": false,
                    "Score": {
                        "AtkPoints": 0,
                        "DefPoints": 0
                    }
                },
                "Victim": {
                    "Login": "eole",
                    "Name": "$i$888b$fff`$888Side.$fffEole",
                    "CurrentClan": 1,
                    "Armor": 0,
                    "ArmorMax": 100,
                    "IsTouchingGround": true,
                    "IsCapturing": true,
                    "IsInOffZone": false,
                    "Score": {
                        "AtkPoints": 0,
                        "DefPoints": 0
                    }
                }
            }
        }

    Post Reply

    Return to “Dedicated Server”

    Who is online

    Users browsing this forum: No registered users and 2 guests