[Xaseco] Best Checkpoints Widget

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

Moderators: Xymph, TM-Patrol

afisse
cyclist
cyclist
Posts: 48
Joined: 13 Jun 2009 11:54
Owned TM-games: TMUF

Re: [Xaseco] Best Checkpoints Widget

Post by afisse » 11 Sep 2009 22:25

n4p1 wrote:Nice plugin.
Can you add more players on list? Something like a first 5 players with best times on 1st, 2nd etc. cp?
I'm sorry i don't understand what you mean,
there is a parameter to change the number of best cps shown in the xml file, is that help you?
Galaad, le chevalier au coeur pur

n4p1
tricycle manager
tricycle manager
Posts: 28
Joined: 01 Dec 2008 08:58
Owned TM-games: TMUF

Re: [Xaseco] Best Checkpoints Widget

Post by n4p1 » 17 Sep 2009 13:31

afisse wrote:is that help you?
No :)

Now it works like this:

1st CP:
1. nickname1

2nd CP:
1. nickname1

Could you please make it looks like:

1st CP:
1. nickname1
2. nickname2
3. nickname3
4. nickname4
5. nickname5


2nd CP:
1. nickname1
2. nickname2
3. nickname3
4. nickname4
5. nickname5

etc...

It could be set in xml settings file

nouseforname
swift roadking
swift roadking
Posts: 840
Joined: 20 Apr 2008 08:58
Owned TM-games: TMUF,TMNF, TMN
Manialink(s): therookies
Location: Germany
Contact:

Re: [Xaseco] Best Checkpoints Widget

Post by nouseforname » 17 Sep 2009 13:47

n4p1 wrote:
afisse wrote:is that help you?
No :)

Now it works like this:
an how many display fields you wanna have? if one track have eg 21 cp's i have 3 lines already, with even only ONE position of cp times.
if you would have best 5 cp times for this track, you couldnt see the track anymore^^
Owner of the Rookie servers and some more. :)
Rookies HP
My Project
Rookies Manialinkcolor>

afisse
cyclist
cyclist
Posts: 48
Joined: 13 Jun 2009 11:54
Owned TM-games: TMUF

Re: [Xaseco] Best Checkpoints Widget

Post by afisse » 18 Sep 2009 08:08

Hi all

Ok i understand what you mean, i can do it for sure, and add a xml parameter for that.
nouseforname is right with a lot number of cps, it's bad, but it's the same problem with my "Best Runs" widget, black united snow map have about 20 cps! and when 3 players finishes the map, we are too blind to play :cry: ,
so : thx xml parameter :thumbsup:
I work on that

Bb all
Galaad, le chevalier au coeur pur

n4p1
tricycle manager
tricycle manager
Posts: 28
Joined: 01 Dec 2008 08:58
Owned TM-games: TMUF

Re: [Xaseco] Best Checkpoints Widget

Post by n4p1 » 21 Sep 2009 18:53

Yep its true many cp will hide game :D
But on my server is not more than 5-6 cp on tracks. So it would be very nice to have this feature as a option in settings file.

afisse
cyclist
cyclist
Posts: 48
Joined: 13 Jun 2009 11:54
Owned TM-games: TMUF

Re: [Xaseco] Best Checkpoints Widget

Post by afisse » 22 Sep 2009 18:28

n4p1 wrote:Yep its true many cp will hide game :D
But on my server is not more than 5-6 cp on tracks. So it would be very nice to have this feature as a option in settings file.
no problem :D
i just need time
i will post when it's ok :thumbsup:
bb all
Galaad, le chevalier au coeur pur

n4p1
tricycle manager
tricycle manager
Posts: 28
Joined: 01 Dec 2008 08:58
Owned TM-games: TMUF

Re: [Xaseco] Best Checkpoints Widget

Post by n4p1 » 16 Oct 2009 18:17

Any progress? :)

afisse
cyclist
cyclist
Posts: 48
Joined: 13 Jun 2009 11:54
Owned TM-games: TMUF

Re: [Xaseco] Best Checkpoints Widget

Post by afisse » 23 Oct 2009 19:01

yep, just need time^^ :thumbsup:
Galaad, le chevalier au coeur pur

©H®IS
highway camper
highway camper
Posts: 3
Joined: 01 Nov 2009 07:27
Owned TM-games: TMNF
Manialink(s): M&C
Contact:

Re: [Xaseco] Best Checkpoints Widget

Post by ©H®IS » 01 Nov 2009 07:46

I modified your plug-in in order to display bestcps on several lines.

Image

I added a line in the *.xml file

Code: Select all

<!-- Make sure <cps_per_line> is smaller than <number> -->
<cps_per_line>8</cps_per_line>
and in the *.php

Code: Select all

function principale_bestcps($aseco, $param){
...
$nb_cp_per_line = $fic->cps_per_line;
...
}

Code: Select all

function display_best_cps($aseco){ // affiche les best cps
...
$line	= 0; // indice de la ligne pour affichage des CP
...
$posy;
...
$nb_cp_per_line = $fic->cps_per_line; 	//Nombre de CPS à afficher par ligne
...
if ($place == (($line + 1) * $nb_cp_per_line + 1)){
			$line++;
			$i = 0;
		}
$posx = $i * 11.5;
		$posy = -($line*2.25);
		$xml.='<quad  posn="'.$posx.' '.$posy.'" sizen="11.5 2.2" halign="center" valign="center" style="Bgs1InRace" substyle="NavButton" />';
		$posx = $posx - 5.25;
		$xml.='<label posn="'.$posx.' '.$posy.'" sizen="5.5 2" halign="left" valign="center" text="'.$texte.'"/>';
		$posx = $posx + 4.9;
		$xml.='<label posn="'.$posx.' '.$posy.'" sizen="5.5 2" halign="left" valign="center" text="'.$value->nickname.'"/>';
		$i++;
		$place++;
	}// end foreach
when <cps_per_line>1</cps_per_line> in the xml's config file, it display vertically

---> Download the modified plugin <---
Last edited by ©H®IS on 09 Nov 2009 06:46, edited 4 times in total.

afisse
cyclist
cyclist
Posts: 48
Joined: 13 Jun 2009 11:54
Owned TM-games: TMUF

Re: [Xaseco] Best Checkpoints Widget

Post by afisse » 01 Nov 2009 20:42

Great ! I had no time for this now :thumbsup:
thx a loooooooot
Galaad, le chevalier au coeur pur

1337180
highway camper
highway camper
Posts: 3
Joined: 18 Nov 2009 09:22
Owned TM-games: TMU

Re: [Xaseco] Best Checkpoints Widget

Post by 1337180 » 27 Nov 2009 17:42

Best Checkpoints Widget Yeah true :P but cant see s*** :D
How can I edit script to make that tinny windows bigger? Playing 800x600 and its really small and cant really see who is who....
Ty very much

n4p1
tricycle manager
tricycle manager
Posts: 28
Joined: 01 Dec 2008 08:58
Owned TM-games: TMUF

Re: [Xaseco] Best Checkpoints Widget

Post by n4p1 » 30 Nov 2009 06:56

©H®IS wrote:I modified your plug-in in order to display bestcps on several lines.
Thank you very much! :)

1337180
highway camper
highway camper
Posts: 3
Joined: 18 Nov 2009 09:22
Owned TM-games: TMU

Re: [Xaseco] Best Checkpoints Widget

Post by 1337180 » 08 Dec 2009 06:37

hello, im asking again, is there a way to make that widgets little bit bigger? It's complicated? Can somebody help me with this please? Thanks very much..

©H®IS
highway camper
highway camper
Posts: 3
Joined: 01 Nov 2009 07:27
Owned TM-games: TMNF
Manialink(s): M&C
Contact:

Re: [Xaseco] Best Checkpoints Widget

Post by ©H®IS » 19 Dec 2009 11:35

1337180 wrote:hello, im asking again, is there a way to make that widgets little bit bigger? It's complicated? Can somebody help me with this please? Thanks very much..
You can modify the widget in the plugin.bestcps.php file (line 78, 80 & 82 in the original file), increase the values XXX and YYY:

line 78 : the size of the background quad (sizen="XXX YYY")
line 80 : the size of the text : time (sizen="XXX YYY")
line 82 : the size of the text : nickname (sizen="XXX YYY")

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] Best Checkpoints Widget

Post by Ant » 08 Jan 2010 20:20

First of all - nice plugin, very handy :thumbsup:

A few things though, is it possible to not display it during score panel cos it gets in the way of other things then !
EDIT--> I found the solution to this (was a simple one) - just add this line in plugin.bestcps.php

Code: Select all

Aseco::registerEvent('onEndRace', 'clear_bestcps');
now that section looks like this :

Code: Select all

Aseco::registerEvent("onCheckpoint", "principale_bestcps");
Aseco::registerEvent('onEndRace', 'clear_bestcps');
Aseco::registerEvent("onNewChallenge", "init_bestcps");
Aseco::registerEvent('onNewChallenge', 'clear_bestcps');
Aseco::registerEvent("onPlayerFinish", "update_finish_time");
---------------------------------------------------------------------------------------------------------------------------------------------------
©H®IS wrote:
You can modify the widget in the plugin.bestcps.php file (line 78, 80 & 82 in the original file), increase the values XXX and YYY:

line 78 : the size of the background quad (sizen="XXX YYY")
line 80 : the size of the text : time (sizen="XXX YYY")
line 82 : the size of the text : nickname (sizen="XXX YYY")
I found these lines and edited them to make my display bigger, but the result was just making the background bigger - I even tried setting the time and nickname to the same size as background, but it won't change !! wots up ? I'm using the version that ©H®IS uploaded and have the times going down vertically.

Also is it possible for it to be named when times appear - example - mine are all going vertically down the side of the screen, can there be a name at the top like Live Best CPS or something like that ??

Post Reply