Script callbacks

Moderator: NADEO

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

Re: Script callbacks

Post by w1lla » 14 Aug 2013, 10:19

Strange... Seems to be fixed Never mind my post then....

Had some issues with MatchStart as Callback but fixed it eventually.
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
w1lla
Posts: 2362
Joined: 15 Jun 2010, 11:09
Location: Netherlands
Contact:

Re: Script callbacks

Post by w1lla » 09 Sep 2013, 18:12

New Callback:

Code: Select all

LibStats_GetWeaponsHasHit
Missing.
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: 1216
Joined: 26 Apr 2011, 21:08

Re: Script callbacks

Post by Eole » 24 Oct 2013, 14:51

The list of methods and callbacks available in the Nadeo scripts is also on the ManiaPlanet GitHub documentation now :
http://maniaplanet.github.io/documentat ... ripts.html
Contribute to the ManiaPlanet documentation on GitHub
A question about ManiaScript? Ask it here!

User avatar
steeffeen
Translator
Translator
Posts: 2472
Joined: 14 Oct 2012, 16:22
Location: Germany

Re: Script callbacks

Post by steeffeen » 24 Oct 2013, 15:32

so elite will keep being weird and different than ANY other mode causing more work for controller authors and unnecessary network usage?
    Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

    ManiaControl, FancyManiaLinks

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

    Re: Script callbacks

    Post by w1lla » 25 Oct 2013, 00:39

    For elite its not aproblem just a way to code properly for authors
    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: 1216
    Joined: 26 Apr 2011, 21:08

    Re: Script callbacks

    Post by Eole » 25 Oct 2013, 18:16

    Elite already uses some generic callbacks and methods.

    Callbacks:
    LibXmlRpc_LoadingMap
    LibXmlRpc_BeginMatch
    LibXmlRpc_BeginMap
    LibXmlRpc_BeginSubmatch
    LibXmlRpc_BeginRound
    LibXmlRpc_BeginTurn
    LibXmlRpc_EndTurn
    LibXmlRpc_EndRound
    LibXmlRpc_EndSubmatch
    LibXmlRpc_EndMap
    LibXmlRpc_EndMatch

    Methods:
    LibXmlRpc_DisableAltMenu
    LibXmlRpc_EnableAltMenu
    LibXmlRpc_GetScores

    In the next version the following callbacks will be added:
    LibXmlRpc_BeginWarmUp
    LibXmlRpc_EndWarmUp
    LibXmlRpc_OnHit
    LibXmlRpc_OnArmorEmpty
    LibXmlRpc_OnPlayerRequestRespawn
    LibXmlRpc_OnCapture
    LibXmlRpc_OnShoot
    LibXmlRpc_OnNearMiss

    There will be a new setting S_UseLegacyCallback to turn on or off the old callbacks (by default they'll be turned on).
    But as the new callbacks are generic, they will have far less informations about the events than the legacy ones.
    Contribute to the ManiaPlanet documentation on GitHub
    A question about ManiaScript? Ask it here!

    User avatar
    steeffeen
    Translator
    Translator
    Posts: 2472
    Joined: 14 Oct 2012, 16:22
    Location: Germany

    Re: Script callbacks

    Post by steeffeen » 25 Oct 2013, 18:28

    okay my bad then, i wasn't aware that the new callbacks are available as well
    good thing about being able to turn off the old (huge) ones :thumbsup:
      Game Mode and Title Pack Creator, Developer, ShootMania-Player & more

      ManiaControl, FancyManiaLinks

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

      Re: Script callbacks

      Post by kremsy » 07 Nov 2013, 09:59

      As far as I can see the WarmUp_Extend and WarmUp_Stop are still not working.
      http://maniaplanet.github.io/documentat ... ripts.html

      Don't know it exactly on the Extend yet, but the Stop is defnitily not working, maybe is it called LibXmlRpc_WarmUp_Stop instead of only WarmUp_Stop ?
      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: 1216
      Joined: 26 Apr 2011, 21:08

      Re: Script callbacks

      Post by Eole » 07 Nov 2013, 16:15

      In which mode did you try? Currently it only works on Elite (version >= 2013-07-07), the other modes will be supported with the next update.

      When I do my test I call something like that in my controller:

      Code: Select all

      client.query('TriggerModeScriptEvent', ['WarmUp_Stop', '']);
      
      Then a "Warm up stop" message is displayed in the chat and the warm up stops immediately. If the match can't begin (because there's not enough players, ...) a new warmup starts but If all is ok, the match begins.
      Contribute to the ManiaPlanet documentation on GitHub
      A question about ManiaScript? Ask it here!

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

      Re: Script callbacks

      Post by kremsy » 31 Jan 2014, 20:03

      The Extend Callback is reacting a bit weired, if a warmup is in progress and the counter counts down, you extend nothing happens, if the warmup get stopped (by unf6 of a player) you see that the time got increase by the extending value.

      But in fact it should be if the warmup counts down (timer is at 30s) you extend by 10 second it should go directly to 40 and keeps continuisly to be counted down.

      Another thing would be, is there any possability to make a Method or something where I can ask if it is a TeamMode or not, would be a very important Information. (made already a workaround for that, but would be nice if there would be any possability in this direction in the future).

      More important would be a command to ask if the Gamemode supports the extend and end warmup commands (to build buttons in a Menu only in the modes where they are needed).

      Another thing would be that the disableScoreboadOnAlt should also work while warmup stages ;).
      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

      Post Reply

      Return to “Dedicated Server”

      Who is online

      Users browsing this forum: No registered users and 2 guests