XASECO2 (TM²C) v1.01

Discuss everything about Xymph's Aseco flavoured server control scripts for TM Forever / classic TMN and for TM² Canyon.

Moderators: Xymph, TM-Patrol

Xymph
Pit Crew
Pit Crew
Posts: 5645
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

XASECO2 (TM²C) v1.01

Post by Xymph » 19 Sep 2012 10:35

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
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

Spaï
highway camper
highway camper
Posts: 4
Joined: 24 Oct 2010 14:28
Owned TM-games: TMUF
Location: Calais- France
Contact:

Re: XASECO2 (TM²C) v1.01

Post by Spaï » 22 Sep 2012 13:16

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 ;) )
Last edited by Spaï on 22 Sep 2012 15:30, edited 1 time in total.
Image - Have fun making sound and video with your webcam ;)

User avatar
TheM
Pit Crew
Pit Crew
Posts: 286
Joined: 25 Feb 2009 16:43
Owned TM-games: TMU(F), TMN(F), TM2
Location: Brabant, Netherlands
Contact:

Re: XASECO2 (TM²C) v1.01

Post by TheM » 22 Sep 2012 14:32

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].

Spaï
highway camper
highway camper
Posts: 4
Joined: 24 Oct 2010 14:28
Owned TM-games: TMUF
Location: Calais- France
Contact:

Re: XASECO2 (TM²C) v1.01

Post by Spaï » 22 Sep 2012 16:17

Thx for your response.

Tested with onRulesScriptCallback, and it's not working...
Image - Have fun making sound and video with your webcam ;)

Xymph
Pit Crew
Pit Crew
Posts: 5645
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: XASECO2 (TM²C) v1.01

Post by Xymph » 22 Sep 2012 17:03

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.
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

Spaï
highway camper
highway camper
Posts: 4
Joined: 24 Oct 2010 14:28
Owned TM-games: TMUF
Location: Calais- France
Contact:

Re: XASECO2 (TM²C) v1.01

Post by Spaï » 22 Sep 2012 19:45

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 ;)
Image - Have fun making sound and video with your webcam ;)

Xymph
Pit Crew
Pit Crew
Posts: 5645
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: XASECO2 (TM²C) v1.01

Post by Xymph » 22 Sep 2012 20:28

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.
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

Maximuson
cyclist
cyclist
Posts: 43
Joined: 25 Nov 2010 05:27
Owned TM-games: TMU

Re: XASECO2 (TM²C) v1.01

Post by Maximuson » 10 Oct 2012 10:27

what about music? music on server is working?

User avatar
w1lla
TM-Patrol
TM-Patrol
Posts: 1466
Joined: 23 May 2007 07:20
Owned TM-games: TMU, TMN, TMF
Manialink(s): intr
Location: Venray

Re: XASECO2 (TM²C) v1.01

Post by w1lla » 06 Dec 2012 12:43

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.

Code: Select all

tmnforever is nations and united makes it special. tmnforever has united. I need united!

User avatar
rasmusdk
highway camper
highway camper
Posts: 3
Joined: 21 Sep 2012 08:00
Owned TM-games: TMUF, TM2
Location: Denmark

Re: XASECO2 (TM²C) v1.01

Post by rasmusdk » 09 Dec 2012 19:01

"/list norecent" does not work. It says: No maps found, try again!

Xymph
Pit Crew
Pit Crew
Posts: 5645
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: XASECO2 (TM²C) v1.01

Post by Xymph » 16 Dec 2012 17:41

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, ...
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

Xymph
Pit Crew
Pit Crew
Posts: 5645
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: XASECO2 (TM²C) v1.01

Post by Xymph » 16 Dec 2012 18:52

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.
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

User avatar
sbone
happy cruiser
happy cruiser
Posts: 180
Joined: 13 Sep 2007 18:11
Owned TM-games: TMUF, TM2
Location: In the sky...
Contact:

Re: XASECO2 (TM²C) v1.01

Post by sbone » 11 Feb 2013 17:53

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

@+
-- SbOne --
Public CSb1 portal : http://csb1.sbone.fr -/- Team CSb1 : http://sbone.fr

Xymph
Pit Crew
Pit Crew
Posts: 5645
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: XASECO2 (TM²C) v1.01

Post by Xymph » 11 Feb 2013 18:26

sbone wrote:since past Maniaplanet update (2 ago), we discover new levels zone in game like "Europe"...
http://forum.maniaplanet.com/viewtopic. ... 63#p142663
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

User avatar
RamCUP2000
road tourist
road tourist
Posts: 105
Joined: 01 Apr 2009 17:43
Owned TM-games: MP, TMU(F), TMS, TMO
Manialink(s): usdmania
Location: Czech republic » Jihomoravský kraj » Břeclav
Contact:

XASECO2 (TM²C) v1.01b

Post by RamCUP2000 » 17 Feb 2013 11:04

in this my hot-fix...
is repaired nation name (ex.: currently:Europe, after hot-fix:Germany)

xaseco2_1.01b.zip
Image
Czech ManiaPlanet Moderator
TrackMania player since Q2 2004 (TrackMania v1.2.5)

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests