Show current song onscreen?

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

Moderators: Xymph, TM-Patrol

MINICIBER
cyclist
cyclist
Posts: 46
Joined: 19 Mar 2009 00:48
Owned TM-games: TMU
Contact:

Re: Show current song onscreen?

Post by MINICIBER » 09 Jan 2010 00:05

how can read the tag comment?

josetey_77
pedestrian
pedestrian
Posts: 10
Joined: 11 Feb 2010 15:08
Owned TM-games: TMUF
Manialink(s): http://car-park.com
Location: spain-alicante
Contact:

Re: Show current song onscreen?

Post by josetey_77 » 11 Feb 2010 15:26

This plugin goes in the version 1.10 of xaseco esque I it copy the source code and it me does not go me the xaseco reads it but it does not go out at all ariba of the song

User avatar
david_jumper
happy cruiser
happy cruiser
Posts: 140
Joined: 21 Mar 2009 09:28
Owned TM-games: TMU, TMS
Manialink(s): djump
Location: Pforzheim (Germany)
Contact:

Re: Show current song onscreen?

Post by david_jumper » 25 Aug 2010 23:45

How do I make it disappear on Race End?

sebazul
wheelbarrow operator
wheelbarrow operator
Posts: 18
Joined: 02 Jan 2010 01:39
Owned TM-games: tms

Re: Show current song onscreen?

Post by sebazul » 26 Aug 2010 21:19

david_jumper wrote:How do I make it disappear on Race End?
add this function an event

Code: Select all

Aseco::registerEvent('onEndRace', 'Current_Song_Off');

   function Current_Song_Off() {
      $xml = '<manialink id="0815470000133">
      <frame posn="0 0 0">
         <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="2009110574" />
      </frame>
      </manialink>';
      $aseco->client->addCall('SendDisplayManialinkPage', array($xml, 0, false));
   }


regards

biloudeprovence
road tourist
road tourist
Posts: 82
Joined: 24 Jul 2008 09:49
Owned TM-games: TMU

Re: Show current song onscreen?

Post by biloudeprovence » 17 Sep 2010 08:23

Hi all
GG very nice plugin
So
The icon and title song appear in the race and the score.
But I would like to disable the icon and the title next song in the score. is it possible ??

thx a lot for your response

User avatar
Jackel
speedy pilot
speedy pilot
Posts: 316
Joined: 06 Oct 2006 09:57
Owned TM-games: TMN,TMU,&TMS
Location: Florida, USA
Contact:

Re: Show current song onscreen?

Post by Jackel » 17 Sep 2010 14:44

biloudeprovence wrote:Hi all
GG very nice plugin
So
The icon and title song appear in the race and the score.
But I would like to disable the icon and the title next song in the score. is it possible ??

thx a lot for your response
read the post right above yours. that will answer your question.
Founder and Admin of Cobra Gaming Systems.

Image
Image
Image

tchamba
cyclist
cyclist
Posts: 39
Joined: 06 Jul 2008 11:29
Owned TM-games: tmu
Location: France (28)

Re: Show current song onscreen?

Post by tchamba » 19 Sep 2010 09:54

Hi all
I'm added this code and I have following error :
Xaseco fatal error in c/../../plugin.current.song.php online
this line : $aseco->client->addCall('SendDisplayManialinkPage', array($xml, 0, false));
Thx a lot
sorry for my very bad english
Last edited by tchamba on 22 Sep 2010 16:30, edited 1 time in total.

tchamba
cyclist
cyclist
Posts: 39
Joined: 06 Jul 2008 11:29
Owned TM-games: tmu
Location: France (28)

Re: Show current song onscreen?

Post by tchamba » 22 Sep 2010 16:18

Hi all
I'm added this

Code: Select all

Aseco::registerEvent('onEndRace', 'Current_Song_Off');

   function Current_Song_Off() {
      $xml = '<manialink id="0815470000133">
      <frame posn="0 0 0">
         <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="2009110574" />
      </frame>
      </manialink>';
      $aseco->client->addCall('SendDisplayManialinkPage', array($xml, 0, false));
   }

This code return a error : Xaseco fatal error in c/../../plugin.current.song.php online
this line : $aseco->client->addCall('SendDisplayManialinkPage', array($xml, 0, false));
You could help me resoudre has this probleme
Thx a lot for your reponse
sorry for my very bad english

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: Show current song onscreen?

Post by TheM » 22 Sep 2010 17:37

Try:

Code: Select all

Aseco::registerEvent('onEndRace', 'Current_Song_Off');

   function Current_Song_Off() {
      $xml = '<manialink id="0815470000133">
      <frame posn="0 0 0">
         <quad posn="0 0 0" sizen="0 0" halign="center" valign="center" action="2009110574" />
      </frame>
      </manialink>';
      $aseco->client->query('SendDisplayManialinkPage', $xml, 0, false);
   }


darkrifle
wheelbarrow operator
wheelbarrow operator
Posts: 22
Joined: 06 Oct 2010 15:13
Owned TM-games: TMNF

Re: Show current song onscreen?

Post by darkrifle » 16 Oct 2010 19:23

w1lla wrote:

Code: Select all

<?php
Aseco::registerEvent('onNewChallenge', 'song_info');
Aseco::registerEvent('onPlayerConnect', 'song_info');
Aseco::registerEvent('onEndRace', 'song_info');

function song_info($aseco, $command) {
        global $music_server;

        // get current song and strip server path
        $aseco->client->query('GetForcedMusic');
        $current = $aseco->client->getResponse();
        if ($current['Url'] != '' || $current['File'] != '') {
                $current = str_replace($music_server->server, '',
                                       ($current['Url'] != '' ? $current['Url'] : $current['File']));
                $tags = $music_server->tags[$current];
                $current = preg_replace('|.*[/\\\\]|', '', $current);
                $current = preg_replace('|\.[^.]+$|', '', $current);
                //if ($music_server->cachetags && isset($tags))

                $xml = '<manialinks><manialink id="0102255">';
                $xml .= '<frame>';
                $xml .= '<quad sizen="19 15" posn="-50 49 2" halign="center"style="Bgs1InRace" substyle="NavButton" action="{name:show,param:1}"/>';
                $xml .= '<quad sizen="5 5" posn="-56 46 2" halign="center" style="Icons64x64_1" substyle="Music"/>';
                $xml .= '<label sizen="10 10" textsize="2" textcolor="fff" posn="-50 44 2" halign="center" text="'.$tags['Artist'].'" />';
                $xml .= '<label sizen="10 10" textsize="2" textcolor="fff" posn="-50 41 2" halign="center" text="'.$tags['Title'].'" />';
                $xml .= '</frame>';
                $xml .= '</manialink></manialinks>';
                $aseco->client->query("SendDisplayManialinkPage", $xml, 0, false);
        }
}
?>
Here we go....

Fixed the problem...

with posn="" you can change the position, textsize="2" is the textsize, label sizen="10 10" is the size off the average label, quad sizen="5 5" can be based on the image of the music note....
How come my Music icon is green and not blue as on the fish stabb styles page? I want it blue :(

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

Re: Show current song onscreen?

Post by ccx » 22 Oct 2010 13:53

Hello !
My musictagscache.xml is empty (...)

That is for aseco and not xaseco
Definitively does not work with Xaseco ? (V1.12 installed)

My musicserver.xml :

Code: Select all

   <cache_tags>true</cache_tags>
   <cache_readonly>false</cache_readonly>
   <cache_file>musictagscache.xml</cache_file>
I always have wondered why my musictagscache.xml file remains empty ?
Hmm, just contains those lines :

Code: Select all

<?xml version="1.0" encoding="utf-8" ?>
<tags>
</tags>
Thanks for your response. If you can make it works with Xaseco, pls let me know your .xml configuration :D

Regards :lovetm

ccx.

Post Reply