[Tuto][ManiaLive] Disable Legacy Callbacks in scripted TM

Post here every finished plugin

Moderator: NADEO

Post Reply
User avatar
w1lla
Posts: 2396
Joined: 15 Jun 2010, 11:09
Location: Netherlands
Contact:

[Tuto][ManiaLive] Disable Legacy Callbacks in scripted TM

Post by w1lla »

Hi,

Want to disable legacy callbacks and use the xmlrpc callbacks sent from the scripted gamemodes?

Do the following:

Add in your plugin you are writing:

Code: Select all

$this->connection->setModeScriptSettings(array('S_UseScriptCallbacks' => true)); //Debug Way...
$this->connection->setModeScriptSettings(array('S_UseLegacyCallbacks' => false)); //Debug Way...
in the

Code: Select all

onLoad(){
}
function of your plugin.

This will disable the legacy callbacks and enable the scriptCallbacks.

However in manialive the Storage.php has no way of checking things for updateRanking and such.

This will need to be worked on.

If there are people around and want to help make manialive a bit better for scripted gamemodes please be free and send a pm.
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
The_Big_Boo
Posts: 1041
Joined: 15 Jun 2010, 15:46

Re: [Tuto][ManiaLive] Disable Legacy Callbacks in scripted T

Post by The_Big_Boo »

w1lla wrote:

Code: Select all

$this->connection->setModeScriptSettings(array('S_UseScriptCallbacks' => true)); //Debug Way...
$this->connection->setModeScriptSettings(array('S_UseLegacyCallbacks' => false)); //Debug Way...
This should be done in a single call instead of two.

Otherwise, I agree a better support for scripts would be nice. It could be done by a plugin adding new events for scripts though it won't change anything to the Storage class...
OS: Win 7 Pro x64
RAM: 2x4GB Corsair @ 1600MHz
CPU: Intel i5 760 @ 3.6GHz
Mobo: Asus P7P55D-E
GPU: NVidia GTX 760 2GB
HDD: WD Black 1TB
Sound: VIA VT1828S (onboard)
Peripherals: Razer DeathAdder - Razer DeathStalker - Logitech F310
oliverde8
Posts: 1345
Joined: 16 Jun 2010, 07:33
Location: in a Blue Box

Re: [Tuto][ManiaLive] Disable Legacy Callbacks in scripted T

Post by oliverde8 »

I do not understand the interest of deactivating legacy modes events totaly. eXpansion has SM Elite & Script callbacl support and it has been added as described by The_Big_Boo. The core plugin initiate a class depending if SM Elite or other script mode and that object will then send new events.
Image
Developper for The next generation, Clean and Powerfull controller eXpansion for your SM & TM server . Working on eXpansion² with full MP4 support and many other awesome features...
Post Reply

Return to “ManiaLive Plugins”

Who is online

Users browsing this forum: No registered users and 1 guest