Page 1 of 2

XASECO2 (TM²C) v1.01

Posted: 19 Sep 2012 10:35
by Xymph
It's been a long time coming, but a new update of XASECO2 is now available. This version 1.01 release provides a completely rewritten GBXDataFetcher module with new GBXChallMapFetcher and GBXReplayFetcher classes that correctly process ManiaPlanet maps and replays, based on arc_ and Electron's work on the GBX file structures. Also included are the previously released MXInfoFetcher and MXInfoSearcher classes to use the new ManiaExchange API (and support ShootMania, although that's not used in XASECO2).

Further changes include a new Dedimania-related event, improved error checking and handling in the Dedimania system and the local database plugin, and various minor tweaks and fixes as outlined in the full release notes:

New features and other changes in the v1.01 release of XASECO2:
  • * rewrote the GBXDataFetcher module completely to correctly process ManiaPlanet maps and replays -- the new GBXChallMapFetcher and GBXReplayFetcher classes are not compatible with the old GBXChallengeFetcher and GBXReplayFetcher ones, but a new GBXChallengeFetcher wrapper class is provided for backwards compatibility with third-party plugins
    * new onDediRecsLoaded event to indicate that the Dedimania records for a new track have been received from the master server (thanks undef.de)
    * the game state (racing or scoreboard) is now maintained in $aseco->server->gamestate with constants Server::RACE and Server::SCORE (thanks undef.de)
    * updated the MXInfoFetcher and MXInfoSearcher classes to use the new ManiaExchange API, support ShootMania, and support 24-char UIDs
    * in the /mxinfo output, changed the LB Rating entry into Track Value, per the change on the MX TM² site
    * improved error checking and handling in the Dedimania system and the local database plugin
    * added a version of the Repair records script (repairrecs2.php) for the XASECO2 database
Bug fixes in the v1.01 release of XASECO2:
  • * there is no log message to indicate that a Dedimania record is ignored when the pertaining login is banned from Dedimania during the current map -- fixed
    * the error checking in the MXInfoSearcher class is slightly too strict -- fixed
Remember these installation/upgrade notes:

Important:
  • To configure your server for the central Dedimania database, you must copy the login value in the <masterserver_account> section from your server's dedicated_cfg.txt file into the corresponding section of the dedimania.xml file. Further, register your server with the Dedimania system, generate a DedimaniaCode, and add that in dedimania.xml as well.
  • Open port 8082 on your firewall/router for communication with the central Dedimania server.
  • In the zip file, all *.XML and *.PHP config files are located inside the newinstall/ directory. This means that you can (and have to) unzip the download and replace all the PHP code files, without worrying about overwriting your customized config files. However, for every XML/PHP config file that was updated (see here), you must replace your version with the one from the newinstall/ directory, or compare them and add any new/changed configuration settings to your version to insure the system remains working correctly.
  • For a new installation, go into the newinstall/ directory and move all *.XML files into the main directory (next to aseco.php), all *.PHP files into the includes/ directory, and XAseco2.bat|XAseco2.sh also into the main directory.
Grab it from http://www.gamers.org/tm2/ .

Enjoy,
Xymph

Re: XASECO2 (TM²C) v1.01

Posted: 22 Sep 2012 13:16
by Spaï
Hi Xymph,

I try to develop a plugin for the Stunters Title Pack i made in TM²C.(manialink : stunters)
When i read the ListCallbacks_2012-06-19.html, i look ManiaPlanet.ModeScriptCallback(string Param1, string Param2);

But, when i look in the XAseco.php i see TrackMania.ModeScriptCallback.
i've tested the two method, but no success, is this really implemented ?

This is my plugin code :

Code: Select all

Aseco::registerEvent('onBeginMap', 'reset_stunters');
Aseco::registerEvent('onPlayerFinish', 'store_stunters_score');
Aseco::registerEvent('TrackMania.RulesScriptCallback', 'plugin_stunters_callback'); // Or ManiaPlanet.RulesScriptCallback


function reset_stunters($aseco, $data)
{
 $aseco->console_text("Reset Test");
}

function store_stunters_score($aseco, $finish_item)
{
	$aseco->console_text("Finish Test");
}  

function plugin_stunters_callback($aseco, $data)
{
	$aseco->console_text("test CallBack");
	$aseco->console_text($data[0]);
	$aseco->console_text($data[1]);
}
in ManiaScript i write : XmlRpc.sendCallBack("test2", "test2");

onBeginMap working
onPlayerFinish not working (i think it's normal)
RulesScriptCallback not working

(sorry for my poor english ;) )

Re: XASECO2 (TM²C) v1.01

Posted: 22 Sep 2012 14:32
by TheM
First of all, please use

Code: Select all

 tags when you post code.
Second, if you had looked carefully and compared the ListCallbacks list with the callbacks used in XAseco2, you would've found out that the "TrackMania./ManiaPlanet." part is removed in XAseco(2) and "on" is added. This makes the ManiaPlanet.BeginMap callback, onBeginMap in XAseco(2). The same applies to ManiaPlanet.RulesScriptCallback, making it [b]onRulesScriptCallback[/b].

Re: XASECO2 (TM²C) v1.01

Posted: 22 Sep 2012 16:17
by Spaï
Thx for your response.

Tested with onRulesScriptCallback, and it's not working...

Re: XASECO2 (TM²C) v1.01

Posted: 22 Sep 2012 17:03
by Xymph
Also, XASECO2 operates in the default API, so ListCallbacks_2011-08-01.html applies. But it is entirely possible that the RulesScriptCallback callback doesn't work in that API version.
The default API version is necessary for backwards compatility and because callback flow around track switches in the newest API is (or was, when I last looked at it) broken.

Re: XASECO2 (TM²C) v1.01

Posted: 22 Sep 2012 19:45
by Spaï
Effectively,
for information,
i wrote this simple php script to know what happen:

Code: Select all

<?php
require 'includes/GbxRemote.inc.php';

$ip = "127.0.0.1";
$port = "5000";
$login = "SuperAdmin";
$password = "SuperAdmin";


$client = new IXR_Client_Gbx;
$client->InitWithIp($ip, $port);

$client->query("Authenticate", $login, $password);
	
$result = $client->query('SetApiVersion', '2012-06-19');

$client->query("GetVersion");

$NameVersion = $client->getResponse(); 
echo "\n\rserver : " . $NameVersion['Name'] . " " . $NameVersion['Version'] ."\n\r";

if (!$client->query('EnableCallbacks', true))
{
	Error($client->getErrorMessage(), $client->getErrorCode());
}
flush();
		
while(true)
{
	$client->readCB(1*1000*1000);
	if ($client->IsError())
	{
		Error($client->getErrorMessage(), $client->getErrorCode());
	}

	$calls = $client->getCBResponses();
	foreach ($calls as $call)
	{
		echo $call[0]."\n";
	}

}

?>
With $client->query('SetApiVersion', '2012-06-19');

i've got the ManiaPlanet.ModeScriptCallback ok, if i set an older Api version, the script callback not received by the php script.

Then, i think i can't make plugin for XAseco2 if all is based on the Api version 2011-08-01...

Thx a lot ;)

Re: XASECO2 (TM²C) v1.01

Posted: 22 Sep 2012 20:28
by Xymph
Spaï wrote:i wrote this simple php script to know what happen:
Uhh, the RPC Utilities already include a callbacks monitoring script. :wink:
Spaï wrote:i've got the ManiaPlanet.ModeScriptCallback ok, if i set an older Api version, the script callback not received by the php script.

Then, i think i can't make plugin for XAseco2 if all is based on the Api version 2011-08-01...
Right.

Re: XASECO2 (TM²C) v1.01

Posted: 10 Oct 2012 10:27
by Maximuson
what about music? music on server is working?

Re: XASECO2 (TM²C) v1.01

Posted: 06 Dec 2012 12:43
by w1lla
There seems to be a bug in /list norank.

According to the callback returned by the function there are no Ranks found on maps.

I find it quite strange.

Accordingly it seems that after:

Code: Select all

SELECT playerid FROM records
                         WHERE MapId=1
                         ORDER by Score ASC, Date ASC LIMIT 50
so line 465 in rasp.funcs.php it doesnt seem to rely on the playerId as corresponding.

So it doesnt seem to check for anything.

with kind regards,
w1lla.

Re: XASECO2 (TM²C) v1.01

Posted: 09 Dec 2012 19:01
by rasmusdk
"/list norecent" does not work. It says: No maps found, try again!

Re: XASECO2 (TM²C) v1.01

Posted: 16 Dec 2012 17:41
by Xymph
rasmusdk wrote:"/list norecent" does not work. It says: No maps found, try again!
You should also have seen some PHP errors in the log, and have mentioned those in your post.
Anyway, this bug was in there since the beginning of X2, so thanks for reporting it.

To fix it, edit includes/rasp.funcs.php and change all five occurrences of:

Code: Select all

    $sql = 'SELECT DISTINCT c.Uid, ...
into:

Code: Select all

    $sql = 'SELECT DISTINCT m.Uid, ...

Re: XASECO2 (TM²C) v1.01

Posted: 16 Dec 2012 18:52
by Xymph
w1lla wrote:There seems to be a bug in /list norank.

According to the callback returned by the function there are no Ranks found on maps.
Remember that for a track to show up in /list norank. it must be finished at least once. If it is already in /list nofinish, it won't be in /list norank.
w1lla wrote: I find it quite strange.

Accordingly it seems that after:

Code: Select all

SELECT playerid FROM records
                         WHERE MapId=1
                         ORDER by Score ASC, Date ASC LIMIT 50
so line 465 in rasp.funcs.php it doesnt seem to rely on the playerId as corresponding.

So it doesnt seem to check for anything.
I don't understand what you find strange. The while loop following that query checks the playerid on line 470: "if ($player->id == $plrow[0])" where plrow is fetched from the result of the above query.

If you still think there's a problem, please provide more details.

Re: XASECO2 (TM²C) v1.01

Posted: 11 Feb 2013 17:53
by sbone
Hi,

since past Maniaplanet update (2 ago), we discover new levels zone in game like "Europe"...
And i notice this in log :
[02/10,14:18:44] << player 250 joined the game [sbone : $s$i$000CSb$fa0¹$fff»$z$s$fa0Sbone : Europe : 68 : xx.xxx.xxx.xxx]
[XASECO2 Warning] Could not map country: Europe
[XASECO2 Warning] Could not map country: Europe
Thanks

@+

Re: XASECO2 (TM²C) v1.01

Posted: 11 Feb 2013 18:26
by Xymph
sbone wrote:since past Maniaplanet update (2 ago), we discover new levels zone in game like "Europe"...
http://forum.maniaplanet.com/viewtopic. ... 63#p142663

XASECO2 (TM²C) v1.01b

Posted: 17 Feb 2013 11:04
by RamCUP2000
in this my hot-fix...
is repaired nation name (ex.: currently:Europe, after hot-fix:Germany)

xaseco2_1.01b.zip