Plugin-Structure for developers

MPAseco is a server controller for Shootmania, which provides you with a framework and some standard plugins.

Moderators: kremsy, NADEO

Post Reply
kremsy
Posts: 1692
Joined: 21 Jul 2011, 09:51

Plugin-Structure for developers

Post by kremsy » 07 Oct 2012, 15:21

Hello Guys,

for bigger Projects and more advanced Programmers I would suggest an Object oriented Structure like this one:
http://test.esc-clan.net/lukas/pluginst ... edv020.zip

for simplier Projects you can take the Standart version:
1.) (Plugin Description)

Code: Select all

/**
 *   Plugin Information
 *   Plugin Version
 *   Plugin Author 
 */
2.) Events and Commands

Code: Select all

  Aseco::registerEvent('onPlayerManialinkPageAnswer',	'xyz_ManialinkPageAnswer');  
  Aseco::registerEvent('onPlayerConnect', 'xyz_playerconnect');

  Aseco::addChatCommand('bestslotwins', 'Displays the best Slot Scores');
3.) Plugin functions which are called via the Events

Code: Select all

  function xy_playerconnect($aseco, $player){
 //Your function code
}
and it would be nice if you can Set the Author and version number to the Plugins Class:

Code: Select all

$PluginXY = new Plugin();
$PluginXY->setAuthor("Max Mustermann"); 
$PluginXY->setVersion("0.02");
(The Plugin Class will be included in next MPAseco version (at the moment it is defined for example in the Fufi Widgets Plugin)

If you make any XML files for the plugin specfic settings, please put it into the folder configs/plugins/.

A static list of the methods in API 2011-10-06 & 2012-06-19 you can find here:
http://www.gamers.org/tm2/docs/ListMeth ... 10-06.html
And you can find the dynamic list here:
http://methods.xaseco.org/methodstmc.php

Here you can find a list of the available Callbacks:
http://www.gamers.org/tm2/docs/ListCall ... 06-19.html
(a list of our specific Callbacks are come soon)

Thanks to Xymph for this links!

Best regards,
Lukas
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
Xymph
Posts: 1284
Joined: 15 Jun 2010, 20:35
Contact:

Re: Plugin-Structure for developers

Post by Xymph » 07 Oct 2012, 17:10

kremsy wrote:Here you can find a list of the available Callbacks:
http://test.esc-clan.net/lukas/ListCall ... 06-19.html
That's a mirror, the source is http://www.gamers.org/tm2/docs/ListCall ... 06-19.html ;)
kremsy wrote:Here you can find a list of the available Methods:
http://methods.xaseco.org/methodstm2.php
That one is for API 2011-08-01, which probably isn't the one used in MPAseco.
A static list of the methods in API 2011-10-06 & 2012-06-19 is here: http://www.gamers.org/tm2/docs/ListMeth ... 10-06.html
and the dynamic list here: http://methods.xaseco.org/methodstmc.php
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub

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

Re: Plugin-Structure for developers

Post by kremsy » 07 Oct 2012, 19:15

Xymph wrote:
kremsy wrote:Here you can find a list of the available Callbacks:
http://test.esc-clan.net/lukas/ListCall ... 06-19.html
That's a mirror, the source is http://www.gamers.org/tm2/docs/ListCall ... 06-19.html ;)
kremsy wrote:Here you can find a list of the available Methods:
http://methods.xaseco.org/methodstm2.php
That one is for API 2011-08-01, which probably isn't the one used in MPAseco.
A static list of the methods in API 2011-10-06 & 2012-06-19 is here: http://www.gamers.org/tm2/docs/ListMeth ... 10-06.html
and the dynamic list here: http://methods.xaseco.org/methodstmc.php
Changed it, thank you very much!
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 “MPAseco”

Who is online

Users browsing this forum: No registered users and 2 guests