[xaseco2] Plugin: all 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

spyke
cyclist
cyclist
Posts: 48
Joined: 11 Mar 2011 16:41
Owned TM-games: TMU

[xaseco2] Plugin: all checkpoints widget

Post by spyke » 27 Dec 2011 11:44

hi,

Same plugin than on Xaseco that gives you all your informations on all checkpoints (dedimania and local).

some examples :

Image

Image

adding a new version

v1.2 : Update 27/09/2013 ->
1. update with plugin Dedimania


v1.1 : Update 20/01/2012 ->
1. Adding the possibility to "hide" dedimania checkpoints
2. Include : Third-Party Plugins UpToDate


v1.0 : 20/12/2011 ->
contains 4 specifics checkpoint panels.
1. your diff with your best dedimania record.(individual)
2. your diff with the best dedimania record. (leader)
3. your diff with your best local record. (individual)
4. your diff with the best local record. (leader)

-information about your rank on the dedimania and on the local server (only if you have one).
-information on the maximum number of rank given to the server.


1. unzip the script to xaseco2 base directory
2. edit xaseco2's plugins.xml and include the following line:
Code:
<plugin>plugin.spyke_allcps.php</plugin>
3. restart xaseco2



v1.2 : 27/09/2013 0h45 AM
http://ultimate-mania.fr/telechargement ... s_v1.2.zip



spyker.
Last edited by spyke on 26 Sep 2013 22:50, edited 4 times in total.

wtc
pedestrian
pedestrian
Posts: 6
Joined: 03 Feb 2010 03:44
Owned TM-games: WTC
Contact:

Re: [xaseco2] Plugin: all checkpoints widget

Post by wtc » 11 Jan 2012 13:52

Hello Spyker,
Your plugin is very good, very helpful, thank you for spending time to create is a very good idea.
Congratulations I will use it on servers and WTC Trial and WTC RPG.
Thank you for the TM community and for me.
Stef

PS:
Do you have a version without the dedimania, with the display in the center?
I have a server (WTC Trialmaster 2012) only with local time.
You're welcome on WTC serveurs (trial)

spyke
cyclist
cyclist
Posts: 48
Joined: 11 Mar 2011 16:41
Owned TM-games: TMU

Re: [xaseco2] Plugin: all checkpoints widget

Post by spyke » 14 Jan 2012 09:52

hi,

I'll do a variation of this plugin with the ability to "hide" or "show" dedimania and local records.
I'm pretty busy right now so .... within two weeks ... not before.

spyke
cyclist
cyclist
Posts: 48
Joined: 11 Mar 2011 16:41
Owned TM-games: TMU

Re: [xaseco2] Plugin: all checkpoints widget

Post by spyke » 19 Jan 2012 14:30

up for update^^

koma
highway camper
highway camper
Posts: 3
Joined: 24 Jan 2012 14:09
Owned TM-games: TM2

Re: [xaseco2] Plugin: all checkpoints widget

Post by koma » 24 Jan 2012 14:17

Hi Spyker,
great Plugin!!
One Question: Is it possible to change the grade of transparency of the CP Times in the custom TextRaceChrono style?

I already checked the plugin.spyke_allcps.php but did not finde the trick in these lines:

Code: Select all

$xmlchrono .= '<frame posn="'.$this->frame3_custom_posn_x.' '.$this->frame3_custom_posn_y.' 0.3">';
		$xmlchrono .= '<quad posn="0 19.1 0.3" sizen="20 4"/>';		
		$xmlchrono .= '<label scale="0.7" posn="0 -1.5 0.1" halign="center" valign="center" textsize="1" text="$s$'.$this->text_color.'leader"/>';
		$xmlchrono .= '<label scale="0.6" posn="0 1.2 0.1" halign="center" valign="center" style="TextRaceChrono" text="$s$'.$dedibestof.'"/>';
		$xmlchrono .= '</frame>';
Thanks for your support!!
koma

spyke
cyclist
cyclist
Posts: 48
Joined: 11 Mar 2011 16:41
Owned TM-games: TMU

Re: [xaseco2] Plugin: all checkpoints widget

Post by spyke » 26 Jan 2012 00:01

sorry but...no ^^

zahgurim_4
pedestrian
pedestrian
Posts: 13
Joined: 18 Sep 2011 11:19
Owned TM-games: TMU, TM2
Location: Lerum, Sweden
Contact:

Re: [xaseco2] Plugin: all checkpoints widget

Post by zahgurim_4 » 22 Sep 2013 07:45

Hi,

Im getting the following error constantly.

Code: Select all

[PHP Notice] Undefined index: MaxRecords on line 159 in file /home/tm2/admini/xaseco2/plugins/plugin.spyke_allcps.php
What that row in the file says is:

Code: Select all

$maxdedi = $dedi_db['MaxRecords'];
Any ideas?
Thanks for a nice plugin btw. :)
ad'ubbe! / ad'Racing! TM2 Canyon
http://adracing.net

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

Re: [xaseco2] Plugin: all checkpoints widget

Post by undef.de » 22 Sep 2013 12:28

koma wrote: One Question: Is it possible to change the grade of transparency of the CP Times in the custom TextRaceChrono style?

Code: Select all

$xmlchrono .= '<frame posn="'.$this->frame3_custom_posn_x.' '.$this->frame3_custom_posn_y.' 0.3">';
		$xmlchrono .= '<quad posn="0 19.1 0.3" sizen="20 4"/>';		
		$xmlchrono .= '<label scale="0.7" posn="0 -1.5 0.1" halign="center" valign="center" textsize="1" text="$s$'.$this->text_color.'leader"/>';
		$xmlchrono .= '<label scale="0.6" posn="0 1.2 0.1" halign="center" valign="center" style="TextRaceChrono" text="$s$'.$dedibestof.'"/>';
		$xmlchrono .= '</frame>';
A little bit late for a answer, but...

Instead of setting the color of the messages with $COLORCODE (only RGB) in the attribute "text", set the color in the attribute "textcolor". In "textcolor" you then can use RGBA, A = alpha = opacity. Alpha can be [0-9A-F].

Example:

Code: Select all

$xmlchrono .= '<frame posn="'.$this->frame3_custom_posn_x.' '.$this->frame3_custom_posn_y.' 0.3">';
		$xmlchrono .= '<quad posn="0 19.1 0.3" sizen="20 4"/>';		
		$xmlchrono .= '<label scale="0.7" posn="0 -1.5 0.1" halign="center" valign="center" textsize="1" textcolor="'.$this->text_color.'8" text="$sleader"/>';
		$xmlchrono .= '<label scale="0.6" posn="0 1.2 0.1" halign="center" valign="center" style="TextRaceChrono"  textcolor="'.$this->text_color.'8" text="$s$'.$dedibestof.'"/>';
		$xmlchrono .= '</frame>';
But the above example does not 100% work, because $dedibestof may hold the color and text together, i did not looked into the code.
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

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

Re: [xaseco2] Plugin: all checkpoints widget

Post by undef.de » 22 Sep 2013 12:33

zahgurim_4 wrote: Im getting the following error constantly.

Code: Select all

[PHP Notice] Undefined index: MaxRecords on line 159 in file /home/tm2/admini/xaseco2/plugins/plugin.spyke_allcps.php
What that row in the file says is:

Code: Select all

$maxdedi = $dedi_db['MaxRecords'];
At XAseco2/1.03 release notes:

Code: Select all

removed the <max_recs> setting from dedimania.xml to insure that only the Server and player MaxRank values from the Dedimania master server are used, and to avoid confusion
So $dedi_db['MaxRecords'] does not exists anymore.

As work-a-round edit line 159 to:

Code: Select all

$maxdedi = ($aseco->server->title == 'TMStadium' ? 15 : 30);
That (should) fit all cases...taken from plugin.dedimania.php at XAseco2/1.03.
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

zahgurim_4
pedestrian
pedestrian
Posts: 13
Joined: 18 Sep 2011 11:19
Owned TM-games: TMU, TM2
Location: Lerum, Sweden
Contact:

Re: [xaseco2] Plugin: all checkpoints widget

Post by zahgurim_4 » 22 Sep 2013 20:43

undef.de wrote:
zahgurim_4 wrote: Im getting the following error constantly.

Code: Select all

[PHP Notice] Undefined index: MaxRecords on line 159 in file /home/tm2/admini/xaseco2/plugins/plugin.spyke_allcps.php
What that row in the file says is:

Code: Select all

$maxdedi = $dedi_db['MaxRecords'];
At XAseco2/1.03 release notes:

Code: Select all

removed the <max_recs> setting from dedimania.xml to insure that only the Server and player MaxRank values from the Dedimania master server are used, and to avoid confusion
So $dedi_db['MaxRecords'] does not exists anymore.

As work-a-round edit line 159 to:

Code: Select all

$maxdedi = ($aseco->server->title == 'TMStadium' ? 15 : 30);
That (should) fit all cases...taken from plugin.dedimania.php at XAseco2/1.03.

Thanks alot Undef.
I'm gonna give it a try. :-)
ad'ubbe! / ad'Racing! TM2 Canyon
http://adracing.net

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

Re: [xaseco2] Plugin: all checkpoints widget

Post by undef.de » 24 Sep 2013 13:06

undef.de wrote: As work-a-round edit line 159 to:

Code: Select all

$maxdedi = ($aseco->server->title == 'TMStadium' ? 15 : 30);
That (should) fit all cases...taken from plugin.dedimania.php at XAseco2/1.03.
Xymph think the correct fix would be:

Code: Select all

$maxdedi = max($dedi_db['ServerMaxRank'], $command['author']->dedirank);
Please try it and let us know the result.
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

zahgurim_4
pedestrian
pedestrian
Posts: 13
Joined: 18 Sep 2011 11:19
Owned TM-games: TMU, TM2
Location: Lerum, Sweden
Contact:

Re: [xaseco2] Plugin: all checkpoints widget

Post by zahgurim_4 » 24 Sep 2013 17:09

undef.de wrote:
undef.de wrote: As work-a-round edit line 159 to:

Code: Select all

$maxdedi = ($aseco->server->title == 'TMStadium' ? 15 : 30);
That (should) fit all cases...taken from plugin.dedimania.php at XAseco2/1.03.
Xymph think the correct fix would be:

Code: Select all

$maxdedi = max($dedi_db['ServerMaxRank'], $command['author']->dedirank);
Please try it and let us know the result.
Xymph's solution gave me a new error:

Code: Select all

[PHP Notice] Undefined index: Records on line 45 in file /home/tm2/admini/xaseco2/plugins/plugin.spyke_allcps.php
Im pasting line 45 and the part after it:

Code: Select all

					for ($i=0; $i < count($dedi_db['Challenge']['Records']); $i++)
							{
							if (isset($dedi_db['Challenge']['Records'][$i]['NewBest'])){
								$dedidata['login']	= $dedi_db['Challenge']['Records'][$i]['Login'];
								$dediarray[$dedidata['login']] = array("rank" =>$i, "checkpoints" => $dedi_db['Challenge']['Records'][$i]['Checks']);
								}else{
									$dedidata['login'] = $dedi_db['Challenge']['Records'][$i]['Login'];
									$dediarray[$dedidata['login']] = array("rank" =>$i, "checkpoints" => explode(',', $dedi_db['Challenge']['Records'][$i]['Checks']));
									}
							}
							if (isset($dedi_db['Challenge']['Records'][0]['NewBest'])){
										if (isset($dedi_db['Challenge']['Records'][0]['Checks'])){
										$dedileadertemp = $dedi_db['Challenge']['Records'][0]['Checks'];
										}else {
											$dedileadertemp = "";
											}	
										}else {
										if (isset($dedi_db['Challenge']['Records'][0]['Checks'])){
										$dedileadertemp = explode(',', $dedi_db['Challenge']['Records'][0]['Checks']);
										}else {
											$dedileadertemp = "";
											}
										}
													
							if (isset($dediarray)){
										$info->dedicheck = $dediarray;
										}else {
											$info->dedicheck ="";
											}
														
							
					$i = 0;	while ($i < $aseco->server->records->count())
							{
							$localdata['login'] = $aseco->server->records->getRecord($i)->player->login;
							$localarray[$localdata['login']] = array("rank" =>$i, "checkpoints" => $aseco->server->records->getRecord($i,true)->checks);
							$i++;
							}
							
							if (isset($localarray)){
										$info->localcheck = $localarray;
										}else {
											$info->localcheck ="";
Tried your one and got the following error after a while:

Code: Select all

[PHP Notice] Undefined index: Records on line 45 in file /home/tm2/admini/xaseco2/plugins/plugin.spyke_allcps.php
Looks familiar... ;)
Guess one solution feeds another problem....
ad'ubbe! / ad'Racing! TM2 Canyon
http://adracing.net

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

Re: [xaseco2] Plugin: all checkpoints widget

Post by undef.de » 24 Sep 2013 18:26

zahgurim_4 wrote:

Code: Select all

[PHP Notice] Undefined index: Records on line 45 in file /home/tm2/admini/xaseco2/plugins/plugin.spyke_allcps.php
That's another problem, the $dedi_db['Challenge']['Records'] is used without a check if it is already available. This notice may printed out without the work-a-round too.
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

zahgurim_4
pedestrian
pedestrian
Posts: 13
Joined: 18 Sep 2011 11:19
Owned TM-games: TMU, TM2
Location: Lerum, Sweden
Contact:

Re: [xaseco2] Plugin: all checkpoints widget

Post by zahgurim_4 » 25 Sep 2013 16:42

undef.de wrote:
zahgurim_4 wrote:

Code: Select all

[PHP Notice] Undefined index: Records on line 45 in file /home/tm2/admini/xaseco2/plugins/plugin.spyke_allcps.php
That's another problem, the $dedi_db['Challenge']['Records'] is used without a check if it is already available. This notice may printed out without the work-a-round too.
Oh, ok.
And I'm gessing there's no easy work-around for that one?
Why don't you just make a similar plugin from scratch that's up to date with Xaseco2? ;-)
You'll have that done within an hour or so... :P

It is a great plugin for training servers etc.
ad'ubbe! / ad'Racing! TM2 Canyon
http://adracing.net

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

Re: [xaseco2] Plugin: all checkpoints widget

Post by undef.de » 25 Sep 2013 17:08

zahgurim_4 wrote: Why don't you just make a similar plugin from scratch that's up to date with Xaseco2? ;-)
You'll have that done within an hour or so... :P
Write a similar plugin from scratch isn't done within a "hour or so". :roflol: And i didn't have time left right now to do something at my own plugins... :|

And on the other hand: spyke isn't gone, he is only "away". :lol: Give him the chance to answer.
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

Who is online

Users browsing this forum: No registered users and 1 guest