[XASECO] Plugin: Records-Eyepiece 1.1.1 (UPDATE)

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

Moderators: Xymph, TM-Patrol

User avatar
L3cKy
smooth traffic navigator
smooth traffic navigator
Posts: 193
Joined: 05 Sep 2007 13:55
Owned TM-games: TMUF
Location: Berlin
Contact:

Re: [XASECO] Plugin: Records-Eyepiece 1.1.1 (UPDATE)

Post by L3cKy » 07 Jul 2018 13:46

There is a problem with the music widget and the function "re_getMusicServerPlaylist" somehow records eyepiece dont sort the song id`s correctly at a map change after a player choosed a song.

Walkthrough to the issue:
Restart xaseco > change map > choose song > change map (correct song is playing) > choose song > change map (correct song is playing OR here already the wrong song is playing) > choose song > change map (wrong song is playing)

It seems like records eyepiece is playing a song before or after the (by player) choosed one.

With adding a new event at the plugin.musicserver.php the issue is gone at records eyepiece (but of course the problem is somewhere at the plugin.records_eyepiece.php and need to be fixed ^^):

Code: Select all

//Thanks to [X]Skills
Aseco::registerEvent('onNewChallenge', 'test_fix');

function test_fix($aseco) {
	global $music_server;

    if ($music_server->cachetags) {
    	refresh_tags($aseco, $music_server);
        $aseco->releaseEvent('onMusicboxReloaded', null);
	}
}

User avatar
L3cKy
smooth traffic navigator
smooth traffic navigator
Posts: 193
Joined: 05 Sep 2007 13:55
Owned TM-games: TMUF
Location: Berlin
Contact:

Re: [XASECO] Plugin: Records-Eyepiece 1.1.1 (UPDATE)

Post by L3cKy » 08 Sep 2018 18:10

I added a little nice feature to see the track difficulty at Current Track inside the Challengewidget.
This works only if the track is uploaded on TMX otherwise the feature is disabled.

Image


Code: Select all

Search in the plugin.records_eyepiece.php for the function "re_buildChallengeWidget" and add/replace the lines from start to end ... you maybe also need to adjust the coordinates ... 

/*
#///////////////////////////////////////////////////////////////////////#
#									#
#///////////////////////////////////////////////////////////////////////#
*/

function re_buildChallengeWidget ($state = 'race') {
	global $aseco, $re_config;


	if ($re_config['CHALLENGE_WIDGET'][0]['ENABLED'][0] == true) {

		$xml = false;
		if ($state == 'race') {

			// Set the right Icon and Title position
			$position = (($re_config['CHALLENGE_WIDGET'][0]['RACE'][0]['POS_X'][0] < 0) ? 'right' : 'left');

			if ($position == 'right') {
				$imagex	= ($re_config['Positions'][$position]['image_open']['x'] + ($re_config['CHALLENGE_WIDGET'][0]['WIDTH'][0] - 15.5));
				$iconx	= ($re_config['Positions'][$position]['icon']['x'] + ($re_config['CHALLENGE_WIDGET'][0]['WIDTH'][0] - 15.5));
				$titlex	= ($re_config['Positions'][$position]['title']['x'] + ($re_config['CHALLENGE_WIDGET'][0]['WIDTH'][0] - 15.5));
			}
			else {
				$imagex	= $re_config['Positions'][$position]['image_open']['x'];
				$iconx	= $re_config['Positions'][$position]['icon']['x'];
				$titlex	= $re_config['Positions'][$position]['title']['x'];
			}


			// Create the ChallengeWidget at Race
			$xml = str_replace(
				array(
					'%manialinkid%',
					'%actionid%',
					'%posx%',
					'%posy%',
					'%image_open_pos_x%',
					'%image_open_pos_y%',
					'%image_open%',
					'%posx_icon%',
					'%posy_icon%',
					'%posx_title%',
					'%posy_title%',
					'%halign%',
					'%trackname%',
					'%authortime%',
					'%author%'
				),
				array(
					$re_config['ManialinkId'] .'05',
					$re_config['ManialinkId'] .'02',
					$re_config['CHALLENGE_WIDGET'][0]['RACE'][0]['POS_X'][0],
					$re_config['CHALLENGE_WIDGET'][0]['RACE'][0]['POS_Y'][0],
					$imagex,
					-5.35,
					$re_config['Positions'][$position]['image_open']['image'],
					$iconx,
					$re_config['Positions'][$position]['icon']['y'],
					$titlex,
					$re_config['Positions'][$position]['title']['y'],
					$re_config['Positions'][$position]['title']['halign'],
					$re_config['Challenge']['Current']['name'],
					$re_config['Challenge']['Current']['authortime'],
					$re_config['Challenge']['Current']['author']
				),
				$re_config['Templates']['CHALLENGE_DEFAULT']['HEADER']
			);
			$xml .= $re_config['Templates']['CHALLENGE_DEFAULT']['FOOTER'];


			# START ADD ##############################################################################################################


			if ($re_config['Challenge']['Current']['pageurl'] != false) {
				if ($re_config['Challenge']['Current']['diffic'] == 'Beginner') {
					$diffi = "http://i.imgur.com/aYN1adR.png";
				} elseif ($re_config['Challenge']['Current']['diffic'] == 'Intermediate') {
					$diffi = "http://i.imgur.com/4vo4fHe.png";
				} else {
					$diffi = "http://i.imgur.com/3TBYFId.png";
				}

   				$xml .= '<manialink id="444444445555555555">
         	 				<frame posn="58.5 41.5 0">
     	   					<label scale="0.825" textsize="1" posn="0 0 0" sizen="6 2" halign="center" text="$z$FFFDifficulty:$z"/>
          	 				<quad posn="3.5 -0.5 0" sizen="2 1.5" halign="center" valign="center" image="'.$diffi.'" />
     	  	 				</frame>
   		 	  			</manialink>';
			} else {
				$xml .= '<manialink id="444444445555555555"></manialink>';
			}

		}
		else if ($state == 'score') {

			// Create the ChallengeWidget at Score
			$xml = str_replace(
				array(
					'%manialinkid%',
					'%posx%',
					'%posy%',
					'%nexttrackname%',
					'%nextauthortime%',
					'%nextauthor%',
					'%nextenv%',
					'%nextmood%',
					'%nextgoldtime%',
					'%nextsilvertime%',
					'%nextbronzetime%'
				),
				array(
					$re_config['ManialinkId'] .'05',
					$re_config['CHALLENGE_WIDGET'][0]['SCORE'][0]['POS_X'][0],
					$re_config['CHALLENGE_WIDGET'][0]['SCORE'][0]['POS_Y'][0],
					$re_config['STYLE'][0]['WIDGET_SCORE'][0]['FORMATTING_CODES'][0] . $re_config['Challenge']['Next']['name'],
					$re_config['STYLE'][0]['WIDGET_SCORE'][0]['FORMATTING_CODES'][0] . $re_config['Challenge']['Next']['authortime'],
					$re_config['STYLE'][0]['WIDGET_SCORE'][0]['FORMATTING_CODES'][0] . $re_config['Challenge']['Next']['author'],
					$re_config['STYLE'][0]['WIDGET_SCORE'][0]['FORMATTING_CODES'][0] . $re_config['Challenge']['Next']['env'],
					$re_config['STYLE'][0]['WIDGET_SCORE'][0]['FORMATTING_CODES'][0] . $re_config['Challenge']['Next']['mood'],
					$re_config['STYLE'][0]['WIDGET_SCORE'][0]['FORMATTING_CODES'][0] . $re_config['Challenge']['Next']['goldtime'],
					$re_config['STYLE'][0]['WIDGET_SCORE'][0]['FORMATTING_CODES'][0] . $re_config['Challenge']['Next']['silvertime'],
					$re_config['STYLE'][0]['WIDGET_SCORE'][0]['FORMATTING_CODES'][0] . $re_config['Challenge']['Next']['bronzetime']
				),
				$re_config['Templates']['CHALLENGE_SCORE']['HEADER']
			);
			$xml .= $re_config['Templates']['CHALLENGE_SCORE']['FOOTER'];
			$xml .= '<manialink id="444444445555555555"></manialink>';
		}
		
############################################################################################################### END ADD #

		if ($xml != false) {
			return $xml;
		}
	}
}

/*
#///////////////////////////////////////////////////////////////////////#
#									#
#///////////////////////////////////////////////////////////////////////#
*/
Greetings L3cky
Last edited by L3cKy on 26 Mar 2019 16:39, edited 2 times in total.

NoTimeToDrive
sunday driver
sunday driver
Posts: 51
Joined: 31 Mar 2013 15:13
Owned TM-games: TMU TMUF

Re: [XASECO] Plugin: Records-Eyepiece 1.1.1 (UPDATE)

Post by NoTimeToDrive » 15 Sep 2018 11:20

Hey L3cKy.

Thanks for this little upgrade :thumbsup:
I add it today into the server.
And it looks great 8)
Nice idea from you :lovetm

Thanks A Lot!!! :1

Grt Ed

User avatar
L3cKy
smooth traffic navigator
smooth traffic navigator
Posts: 193
Joined: 05 Sep 2007 13:55
Owned TM-games: TMUF
Location: Berlin
Contact:

Re: [XASECO] Plugin: Records-Eyepiece 1.1.1 (UPDATE)

Post by L3cKy » 16 Sep 2018 04:29

NoTimeToDrive wrote:
15 Sep 2018 11:20
Hey L3cKy.

Thanks for this little upgrade :thumbsup:
I add it today into the server.
And it looks great 8)
Nice idea from you :lovetm

Thanks A Lot!!! :1

Grt Ed
Thanks for the feedback ... ;)

pete9516
highway camper
highway camper
Posts: 3
Joined: 30 Aug 2018 21:39
Owned TM-games: TMUF

Re: [XASECO] Plugin: Records-Eyepiece 1.1.1 (UPDATE)

Post by pete9516 » 21 Apr 2019 20:18

undef.de wrote:
11 Mar 2018 14:26
weasel wrote:
11 Mar 2018 13:54
Omg , that amound of maps :P
Doesn't that slow down xaseco much ?
If you turn off the re-reading of the map at each mapchange, then it shouldn't bother much.
Hey there, can you tell us how to turn off the re-reading of the map at each mapchange? Thank you really much

User avatar
undef.de
Pit Crew
Pit Crew
Posts: 1340
Joined: 31 Aug 2009 18:38
Owned TM-games: TMF, TM2C/S/V, SM
Manialink(s): undef, tmkarma
Location: Germany
Contact:

Re: [XASECO] Plugin: Records-Eyepiece 1.1.1 (UPDATE)

Post by undef.de » 22 Apr 2019 08:53

pete9516 wrote:
21 Apr 2019 20:18
undef.de wrote:
11 Mar 2018 14:26
weasel wrote:
11 Mar 2018 13:54
Omg , that amound of maps :P
Doesn't that slow down xaseco much ?
If you turn off the re-reading of the map at each mapchange, then it shouldn't bother much.
Hey there, can you tell us how to turn off the re-reading of the map at each mapchange? Thank you really much
Edit "rasp.settings.php" and set "$reset_cache_start" to "false";
Developer of various plugins for XAseco/XAseco2 and MPAseco,
like Records-Eyepiece, TM-Karma, Alternate Scoretable...
Visit my Lab: www.undef.name

Get it now:
» TM2 Valley
» TM2 Canyon
» TM2 Stadium
» SM Storm

gorn_z34
pedestrian
pedestrian
Posts: 8
Joined: 25 Feb 2019 17:32
Owned TM-games: TMUF

Re: [XASECO] Plugin: Records-Eyepiece 1.1.1 (UPDATE)

Post by gorn_z34 » 17 Sep 2019 00:33

What does reloading at each maps gives? And why its worth to disable it? What do i will notice when i will disable it?

User avatar
undef.de
Pit Crew
Pit Crew
Posts: 1340
Joined: 31 Aug 2009 18:38
Owned TM-games: TMF, TM2C/S/V, SM
Manialink(s): undef, tmkarma
Location: Germany
Contact:

Re: [XASECO] Plugin: Records-Eyepiece 1.1.1 (UPDATE)

Post by undef.de » 17 Sep 2019 14:34

gorn_z34 wrote:
17 Sep 2019 00:33
What does reloading at each maps gives? And why its worth to disable it? What do i will notice when i will disable it?
If you have many maps (e.g. 2000+) on your server you have now a slow map change, like the Records-Eyepiece widgets will be shown later. If you turn off the re-read, then the widgets will be shown on time.
Developer of various plugins for XAseco/XAseco2 and MPAseco,
like Records-Eyepiece, TM-Karma, Alternate Scoretable...
Visit my Lab: www.undef.name

Get it now:
» TM2 Valley
» TM2 Canyon
» TM2 Stadium
» SM Storm

gorn_z34
pedestrian
pedestrian
Posts: 8
Joined: 25 Feb 2019 17:32
Owned TM-games: TMUF

Re: [XASECO] Plugin: Records-Eyepiece 1.1.1 (UPDATE)

Post by gorn_z34 » 17 Sep 2019 15:53

I know but does it affect, for example signs loading to the players? Is it needful? What are the disadvantages of disabling it?

User avatar
undef.de
Pit Crew
Pit Crew
Posts: 1340
Joined: 31 Aug 2009 18:38
Owned TM-games: TMF, TM2C/S/V, SM
Manialink(s): undef, tmkarma
Location: Germany
Contact:

Re: [XASECO] Plugin: Records-Eyepiece 1.1.1 (UPDATE)

Post by undef.de » 17 Sep 2019 18:05

gorn_z34 wrote:
17 Sep 2019 15:53
I know but does it affect, for example signs loading to the players?
No, it's just for XAseco/Records-Eyepiece.
gorn_z34 wrote:
17 Sep 2019 15:53
Is it needful?
If you have more then 2000 maps on your server, then yes.
gorn_z34 wrote:
17 Sep 2019 15:53
What are the disadvantages of disabling it?
If you add maps with an external tool (like RemoteCP or AdminServ...) then newly added maps will not be shown in XAseco/Records-Eyepiece.
Developer of various plugins for XAseco/XAseco2 and MPAseco,
like Records-Eyepiece, TM-Karma, Alternate Scoretable...
Visit my Lab: www.undef.name

Get it now:
» TM2 Valley
» TM2 Canyon
» TM2 Stadium
» SM Storm

Post Reply