XASECO (TMN/TMF) v1.12

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

Moderators: Xymph, TM-Patrol

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

XASECO (TMN/TMF) v1.12

Post by Xymph » 17 Oct 2010 16:28

So, as promised, here is the new XAseco release. This version focuses on optimization of the database, database queries and lifting some ancient limitations, a series of new events for use in plugins, new sector times commands for local and Dedimania records, processing optimization around the end and start of tracks, a playtime enhancement, various small improvements, and a couple of minor bug fixes. Here are the complete v1.12 release notes:

New features and other changes in the v1.12 release of XASECO:
  • * new database and query optimizations:
    • * these database optimizations are automatically applied once the first time this release is run, but will take a while depending on the size of the database and the speed of your MySQL server, so be patient as they could easily take several minutes (especially the 'rs_times' changes) -- interrupting this process could result in a corrupt database, so... don't
      * the Score fields in the 'records' and 'rs_times' tables are converted from MediumInt to Int, increasing the maximum race time from 140 minutes to 596 hours
      * the 'records' Id, 'rs_times' ID and 'players' TimePlayed fields are also increased to Int, and the 'rs_karma' Score field is reduced to TinyInt
      * the keys on the 'records' and 'rs_times' tables are reorganized and expanded to improve the speed of various queries on those tables
      * RASP's clean-up of unused 'records' and 'rs_times' entries at start-up now only happens if $prune_records_times in rasp.settings.php is true, resulting in faster start-up
      * the speed of this clean-up is improved by different queries and related processing, and it is logged in more detail
      * preparation of the player stats panels at the scoreboard is sped up with an improved query and related processing
      * the speed of the /server and /nations commands is improved by different queries and related processing
      * the speed of the /topdons command is improved by an appropriate key on the 'players_extra' table
      * you can verify the result of all conversions against the MySQL schema in the localdb/*.sql files using SHOW CREATE TABLE queries or the 'mysqldump --no-data' command
      * XASECO's main tables are created automatically the first time this release is run, analogous to RASP's 'rs_*' tables, thus simplifying installation
      * the 'id' member of the Player object (holding the dedicated server's PlayerId value for a player) is renamed to 'pid' and 'id' now contains the database id from the 'players' table, analogous to the Challenge object -- this eliminates most player ID queries
      * thanks to Tyrann for providing dumps of a large database to analyze & test with
    * new and updated internal events (thanks undef):
    • * new onDedimaniaRecord event to indicate a new/improved/secured Dedimania record, including its position -- note that a Dedimania record is not official until confirmed after the end of a track
      * the onLocalRecord event also includes a new pos(ition) field
      * new onJukeboxChanged event to signal changes to the jukebox, passing along an action string ('add', 'clear', 'drop', 'play', 'replay', 'replay', 'restart' & 'skip') and the pertaining track data (or null for the 'clear' action)
      * new onMusicboxReloaded event to alert that the music server config file (musicserver.xml) was reloaded via /music reload
      * new onDonation event to indicate that a new donation was completed, including login and coppers amount
      * on TMF, restarting when at least one player already has a finish time or a score results in the scoreboard and ChatTime countdown, thus allowing time for the normal onNewChallenge and onEndRace events instead of the onRestartChallenge one -- for instant restarts the latter is issued as before, and the two restart types are logged distinctly
    * new support for sector times (not to be confused with sector records, as offered by third-party plugins):
    • * new /sectms command to display the sector times (if available, as they're only being stored since v1.06) for all local records on the current track
      * new /dedisectms command to display the sector times for all Dedimania records on the current track
      * on TMN there's room for the first 9 sectors, on TMF for the first 12 sectors of each record -- a '+' indicates when there are more sectors than can be displayed
    * eliminated checkpoints panel toggling due to temporary spectator status changes at the end and start of tracks, thus significantly reducing outgoing ManiaLink traffic during that period -- this also reduces the problem with stalled panels and widgets
    * PlayerFinish callbacks are now ignored when not in status 4 (Running - Play), again reducing processing overhead during the end and start of tracks
    * once a track is being replayed (after /replay or /admin replay), then /playtime and the total playtime message at the end of that track will include the number of replays and the overall playtime (thanks Milenco)
    * at start-up the dedicated server connection, LocalDB and RASP messages are now logged with timestamps
    * updated the stripColors function to (even) better reproduce the way the game strips incomplete tags (thanks Slig)
    * all Dedimania communication now occurs via port :8002 only, and you should remove the RPC4/server.php link from dedimania.xml
    * improved debug logging in the Dedimania plugin
    * upon shut down (via the /admin commands) or Fatal Error, all ManiaLinks on all connected clients are cleared (thanks Terron)
    * various tweaks and corrections to plugin.matchsave.php
    * retired chat.vote.php with its obsolete /vote and /score commands -- you can manual delete the empty 'votes' table via a DROP TABLE query
Bug fixes in the v1.12 release of XASECO:
  • * the onLocalRecord event is also issued for equalled records -- fixed
    * the /list & /autojuke nofinish & norank commands cause PHP warnings for players without finished tracks -- fixed
    * missing title or artist tags of .OGG songs can cause PHP warnings -- fixed
    * the TMXInfoFetcher can cause PHP warnings upon empty results from TMX API calls -- fixed
Don't forget these installation notes:
  • Important:

    * To register your server with the central Dedimania database, you must copy the login and password values in the <masterserver_account> section from your server's dedicated.cfg (TMN) or dedicated_cfg.txt (TMF) file into the corresponding section of the dedimania.xml file, and add the 3-character nation abbreviation. Instead of the password you can also use the community code for your server by using the server login/password on the official site for your game (TMO/TMS/TMN) or on this page for TMF.
    * Open port 8002 on your firewall/router for communication with the central Dedimania server.
    * In the zip file, all *.XML and *.PHP config files are now 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 above), 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, and *.PHP files into the includes/ directory.
Download it from http://www.gamers.org/tmn/ .

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

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: XASECO (TMN/TMF) v1.12

Post by TheM » 17 Oct 2010 17:04

Nice one Xymph, thanks for the release ! :)

User avatar
Ant
TM-Patrol
TM-Patrol
Posts: 1845
Joined: 01 Dec 2007 17:04
Owned TM-games: TMN, TMUF, TM Wii
Location: London, England
Contact:

Re: XASECO (TMN/TMF) v1.12

Post by Ant » 17 Oct 2010 17:15

Xymph wrote: * the Score fields in the 'records' and 'rs_times' tables are converted from MediumInt to Int, increasing the maximum race time from 140 minutes to 596 hours
596 hours !!! I don't think I can play for that long !! :wink:

Nice work on the new release by the way :thumbsup:

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

Re: XASECO (TMN/TMF) v1.12

Post by Xymph » 17 Oct 2010 17:59

Ant wrote:
Xymph wrote: * the Score fields in the 'records' and 'rs_times' tables are converted from MediumInt to Int, increasing the maximum race time from 140 minutes to 596 hours
596 hours !!! I don't think I can play for that long !!
Me neither, and I always considered 140 mins on a single race ridiculously long already, but apparently it wasn't for RPG tracks, hence this increase. Now the type limit really should be large enough. :wink:
Ant wrote:Nice work on the new release by the way :thumbsup:
Thanks.
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: 5654
Joined: 19 Aug 2007 12:58
Owned TM-games: TMN, TMU, TMF, TM²
Contact:

Re: XASECO (TMN/TMF) v1.12

Post by Xymph » 17 Oct 2010 18:15

A fairly last-minute and untested change resulted in a small bug. :oops: If you downloaded v1.12 before the timestamp of this post, fix it in aseco.php as follows:

Code: Select all

  function getPlayerNick($login, $forcequery = false) {

    if (isset($this->server->players->player_list[$login]) &&
        $this->server->players->player_list[$login]->id > 0 && !$forcequery) {
      $rtn = $this->server->players->player_list[$login]->id;
should become:

Code: Select all

  function getPlayerNick($login, $forcequery = false) {

    if (isset($this->server->players->player_list[$login]) &&
        $this->server->players->player_list[$login]->nickname != '' && !$forcequery) {
      $rtn = $this->server->players->player_list[$login]->nickname;
Sorry about that.
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
Ant
TM-Patrol
TM-Patrol
Posts: 1845
Joined: 01 Dec 2007 17:04
Owned TM-games: TMN, TMUF, TM Wii
Location: London, England
Contact:

Re: XASECO (TMN/TMF) v1.12

Post by Ant » 17 Oct 2010 19:59

Thanks for the fix, but I didn't notice anything wrong with it when I updated before that post. What did it fix ??

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

Re: XASECO (TMN/TMF) v1.12

Post by Xymph » 17 Oct 2010 20:14

Ant wrote:Thanks for the fix, but I didn't notice anything wrong with it when I updated before that post. What did it fix ??
Some places where a nickname should be shown (e.g. the master admins in /xaseco), that player's database id was shown.
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
Ant
TM-Patrol
TM-Patrol
Posts: 1845
Joined: 01 Dec 2007 17:04
Owned TM-games: TMN, TMUF, TM Wii
Location: London, England
Contact:

Re: XASECO (TMN/TMF) v1.12

Post by Ant » 17 Oct 2010 20:35

ahh ok, nice one man.

Edit:
Xymph wrote: * these database optimizations are automatically applied once the first time this release is run, but will take a while depending on the size of the database and the speed of your MySQL server, so be patient as they could easily take several minutes (especially the 'rs_times' changes) -- interrupting this process could result in a corrupt database, so... don't
So if I can start racing, does that mean this process is finished ?

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

Re: XASECO (TMN/TMF) v1.12

Post by Xymph » 17 Oct 2010 21:05

Ant wrote:ahh ok, nice one man.
More like, sloppy one. :roll:
Ant wrote:So if I can start racing, does that mean this process is finished ?
You can always race, regardless of whether XAseco is running, starting up, or whatever. :wink: But the process is finished when the two "Structure OK" messages have appeared in the log.
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
Ant
TM-Patrol
TM-Patrol
Posts: 1845
Joined: 01 Dec 2007 17:04
Owned TM-games: TMN, TMUF, TM Wii
Location: London, England
Contact:

Re: XASECO (TMN/TMF) v1.12

Post by Ant » 17 Oct 2010 21:21

Ok, well I got this the first time I ran it:

Code: Select all

[10/17,23:33:16] [LocalDB] Checking database structure...
[10/17,23:33:16] [LocalDB] Alter 'challenges' column 'Environment'...
[10/17,23:33:16] [LocalDB] Alter 'players' column 'TimePlayed'...
[10/17,23:33:17] [LocalDB] Alter 'records' column 'Id'...
[10/17,23:33:17] [LocalDB] Alter 'records' column 'Score'...
[10/17,23:33:17] [LocalDB] Drop 'records' key 'ChallengeId'...
[10/17,23:33:17] [LocalDB] Add 'records' key 'PlayerId'...
[10/17,23:33:17] [LocalDB] Add 'records' key 'ChallengeId'...
[10/17,23:33:17] [LocalDB] Drop 'players_extra' key 'playerID'...
[10/17,23:33:17] [LocalDB] Add 'players_extra' primary key 'playerID'...
[10/17,23:33:17] [LocalDB] Add 'players_extra' key 'donations'...
[10/17,23:33:17] [LocalDB] ...Structure OK!
[10/17,23:33:17] [RASP] Loading config file [rasp.xml]
[10/17,23:33:17] [RASP] Checking database structure...
[10/17,23:33:17] [RASP] Alter 'rs_times' column 'ID'...
[10/17,23:33:17] [RASP] Alter 'rs_times' column 'score'...
[10/17,23:33:18] [RASP] Drop 'rs_times' key 'rs_times_player_track'...
[10/17,23:33:18] [RASP] Add 'rs_times' key 'playerID'...
[10/17,23:33:18] [RASP] Add 'rs_times' key 'challengeID'...
[10/17,23:33:18] [RASP] Alter 'rs_karma' column 'score'...
[10/17,23:33:18] [RASP] ...Structure OK!
Every other time since, I still get this:

Code: Select all

[10/18,00:30:11] [LocalDB] Checking database structure...
[10/18,00:30:11] [LocalDB] Add 'players_extra' primary key 'playerID'...
[10/18,00:30:11] [LocalDB] ...Structure OK!
[10/18,00:30:11] [RASP] Loading config file [rasp.xml]
[10/18,00:30:11] [RASP] Checking database structure...
[10/18,00:30:11] [RASP] ...Structure OK!
Is this ok ?

ccx
sunday driver
sunday driver
Posts: 55
Joined: 07 Feb 2009 22:41
Owned TM-games: TMUF

Re: XASECO (TMN/TMF) v1.12

Post by ccx » 17 Oct 2010 22:26

Hello Xymph,

I passed this evening from V1.11 to 1.12. That works, but I have a doubt ..
Hmmm : I didn't understand what to do with the 3 files .sql in the folder \localdb ?

On the 1st post of this page, you talk of the query optimizations : "* new database and query optimizations".

But on this other page http://www.gamers.org/tmn/#install (section : Upgrading from v1.11 to v1.12) you don't talk to.

I saw .sql were here to create tables 'IF NOT EXISTS'.
So, I imagine I don't need to run those 3 .sql, as I already have one SQL DB ?...

But then, how my tables will get the new indexes or new fields definition ???
the Score fields in the 'records' and 'rs_times' tables are converted from MediumInt to Int
the keys on the 'records' and 'rs_times' tables are reorganized and expanded
etc..

I think I missed some of your explanations.. please tell me what.

Thx !

ccx.

User avatar
Ant
TM-Patrol
TM-Patrol
Posts: 1845
Joined: 01 Dec 2007 17:04
Owned TM-games: TMN, TMUF, TM Wii
Location: London, England
Contact:

Re: XASECO (TMN/TMF) v1.12

Post by Ant » 17 Oct 2010 23:51

ccx wrote: But then, how my tables will get the new indexes or new fields definition ???
the Score fields in the 'records' and 'rs_times' tables are converted from MediumInt to Int
the keys on the 'records' and 'rs_times' tables are reorganized and expanded
etc..

I think I missed some of your explanations.. please tell me what.

Thx !

ccx.
From near the top of Xymphs first post :
Xymph wrote: * these database optimizations are automatically applied once the first time this release is run, but will take a while depending on the size of the database and the speed of your MySQL server, so be patient as they could easily take several minutes (especially the 'rs_times' changes) -- interrupting this process could result in a corrupt database, so... don't

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

Re: XASECO (TMN/TMF) v1.12

Post by Xymph » 18 Oct 2010 05:47

Ant wrote:Ok, well I got this the first time I ran it:
Looks good.
Ant wrote:Every other time since, I still get this:

Code: Select all

[10/18,00:30:11] [LocalDB] Checking database structure...
[10/18,00:30:11] [LocalDB] Add 'players_extra' primary key 'playerID'...
[10/18,00:30:11] [LocalDB] ...Structure OK!
Is this ok ?
That one line shouldn't happen - can you post the output from "SHOW CREATE TABLE players_extra" and "SHOW INDEX FROM players_extra" ?
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
Ant
TM-Patrol
TM-Patrol
Posts: 1845
Joined: 01 Dec 2007 17:04
Owned TM-games: TMN, TMUF, TM Wii
Location: London, England
Contact:

Re: XASECO (TMN/TMF) v1.12

Post by Ant » 18 Oct 2010 07:24

Ok man, I'll get that when I can. I don't have access to my database - so i'll have to speak to noc.

Edit: Actually, I managed it via command line - the results are a few posts down.
Last edited by Ant on 18 Oct 2010 13:32, edited 1 time in total.

jamie_macdonald
TM-Patrol
TM-Patrol
Posts: 1612
Joined: 10 Jul 2008 19:48
Owned TM-games: TMUF, TMNF, TMS
Manialink(s): ET
Location: London, UK
Contact:

Re: XASECO (TMN/TMF) v1.12

Post by jamie_macdonald » 18 Oct 2010 09:11

Thanks very much sir. Xymph :thumbsup:

I will leave this for a day or two to let it "settle in" then i shall rollout among the 15 or so servers ...Appreciate all the work you do for us :)

Post Reply