ASECO/RASP v0.84 released!

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
soehest
happy cruiser
happy cruiser
Posts: 161
Joined: 07 Jun 2007 13:52
Owned TM-games: TMU
Contact:

Re: ASECO/RASP v0.84 released!

Post by soehest » 26 Oct 2007 22:44

Xymph, can i please draw your attention to this post:
viewtopic.php?f=28&t=10922

i think it has something to do with /addmin add no longer using the tmx id for filename which actually is a very nice thing, but seems to get me into big trouble :-)

Daniel

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

Re: ASECO/RASP v0.84 released!

Post by Xymph » 26 Oct 2007 23:25

soehest wrote:Xymph, can i please draw your attention to this post:
viewtopic.php?f=28&t=10922

i think it has something to do with /addmin add no longer using the tmx id for filename which actually is a very nice thing, but seems to get me into big trouble :-)
It's /admin, not /addmin. :wink:
Anyway, I already saw it and have been trying to narrow down the problem for the past half hour. Conveniently, since doing a /add (user voted addition) of that track gets it 'stuck' in the jukebox, it also allows me to test that new skip feature. :)
But you may be on the right track with that question mark... more when I have nailed it down.

Edit: Indeed, changing all '?' characters in a filename into '_' fixes the problem with both /add and /admin add. Thanks for discovering this bug and its solution. :1010

There are still 2 topics/questions (in bold on page 4) that I'm hoping to get feedback on, before I want to release v0.85.
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

cow
smooth traffic navigator
smooth traffic navigator
Posts: 216
Joined: 20 Mar 2007 02:53
Owned TM-games: TMU, TMS, TMO
Contact:

Re: ASECO/RASP v0.84 released!

Post by cow » 27 Oct 2007 04:03

one other little thing.. hopefully anyway.

can we have two or more vote ratios..
aka
if players < 5 ratios =.6
else ratio =.4

the problem is when it is really busy votes are hard to pass
aka 36 people getting 18 to vote before time runs out.. is tough

and a few people have meantioned that when like only 3 people racing and auto vote on.. votes auto pass because only 1 vote is needed when they were trying to give the other people input
join me at the music tower
Tet19's MusicTower

User avatar
BReMFoX
smooth traffic navigator
smooth traffic navigator
Posts: 275
Joined: 05 Sep 2006 08:53
Owned TM-games: TMUF
Location: The Netherlands

Re: ASECO/RASP v0.84 released!

Post by BReMFoX » 27 Oct 2007 07:22

I don't know if it's a bug, but the message "CallVotes disabled. See /helpvote for info on chat-based voting." is shown to everybody when some1 joins the server?

I am using the XXX El Fuego Join/Leave message plugin.
The rank it shows with this plugin is different from the message "You server rank is:"
e.g.
Your server rank is 21/500 Average: 53
>> F07BReMFoX Ladderrank 14895 Serverrank 20/500
Maybe the calculating is different?

Below the plugin:

Code: Select all

<?php 
// Player Join/Leave Message plugin 
// By XXX El Fuego 
// December 29th, 2006 
// Modded by soehest 06-08-2007


// Show Player Connected message 
Aseco::registerEvent("onPlayerConnect", "player_join"); 

// Show Player Disconnected message 
Aseco::registerEvent("onPlayerDisconnect", "player_left"); 

function player_join (&$aseco, &$command) { 
   $playernick = stripColors ($command->nickname); 
   $playerrank = $command->ladderrank; 
   $login = $command->login;
   $query = 'SELECT Id FROM players WHERE Login=' . quotedString($login);
   $result = mysql_query($query);
   if (mysql_num_rows($result) > 0)
                        {
                        $row = mysql_fetch_row($result);
                        $rtn = $row[0];
                        }
                else
                        {
                        $rtn = 0;
                        }
   mysql_free_result($result);

   $query = 'SELECT avg FROM rs_rank WHERE playerID=' . quotedString($rtn) . ' ORDER BY avg ASC';
   $res = mysql_query($query);
   if (mysql_num_rows($res) > 0) 
   {
   $row = mysql_fetch_array($res);
   $query2 = 'SELECT * FROM rs_rank WHERE avg>0 and avg <' . $row['avg'];
   $rank = mysql_num_rows(mysql_query($query2));
   $query3 = 'SELECT * FROM rs_rank';
   $ranktotals = mysql_num_rows(mysql_query($query3));
   $rankout = '$fff'.$rank.'$0f0/$fff'.$ranktotals.'';
   } 
   else {
   $rankout = '$fffN$0f0/$fffA';
   }   

if ($aseco->isAdmin($login)) 
   {
   $msg = '$0f0>> $fff'.$playernick.' (admin) $0f0Ladderrank $fff'.$playerrank.' $0f0Serverrank '.$rankout.'';
   }
   else 
   {
   $msg = '$0f0>> $fff'.$playernick.' $0f0Ladderrank $fff'.$playerrank.' $0f0Serverrank '.$rankout.'';
   }
   $aseco->addCall("ChatSendServerMessage", array($msg)); 
   mysql_free_result($res);
} 

function player_left (&$aseco, &$command) { 
   $playernick = stripColors ($command->nickname); 
   $msg = '$f00<< $fff'.$playernick.'';
   $aseco->addCall("ChatSendServerMessage", array($msg)); 
} 
?>

User avatar
BReMFoX
smooth traffic navigator
smooth traffic navigator
Posts: 275
Joined: 05 Sep 2006 08:53
Owned TM-games: TMUF
Location: The Netherlands

Re: ASECO/RASP v0.84 released!

Post by BReMFoX » 27 Oct 2007 07:44

BReMFoX wrote:I don't know if it's a bug, but the message "CallVotes disabled. See /helpvote for info on chat-based voting." is shown to everybody when some1 joins the server?
My bad, got it solved....
It's an option :)

lupo.sk
pedestrian
pedestrian
Posts: 12
Joined: 03 Feb 2007 11:14

Re: ASECO/RASP v0.84 released!

Post by lupo.sk » 27 Oct 2007 08:12

I found this version of ASECO last week. I was waiting for new ASECO several month, and nothing :cry: Until now :lol: Beautyfull, wonderfull, excelent, marveles.
You did realy brutal good job.
On my Win 2003 WEB Server, PHP 5.2.0 and MySQL 5.0.45, I'm hosting 4 servers. 3x time atack and 1x team mode.

There is no problem. Everything is pretty stable for 4-5 days.
I would like to have some suggestion for improvement, but I havent.
Only one. Version 0.84 looks like final realese. You could call it 1.0.

You did excelent JOB Xymph.

User avatar
sbone
happy cruiser
happy cruiser
Posts: 181
Joined: 13 Sep 2007 18:11
Owned TM-games: TMUF, TM2
Location: In the sky...
Contact:

Re: ASECO/RASP v0.84 released!

Post by sbone » 27 Oct 2007 09:52

Xymph wrote: After mapping out all the fractional vote counts for 2-9 players versus ratios of 0.4, 0.5, 0.6 & 0.7, I found that using round() instead of floor() does the "right thing" in most cases up to 7 players. E.g. 3 players and ratios >= 0.5 will result in 2 votes required, 4 players with 0.7 requires 3 votes but 2 otherwise, but also 6 players and 0.6 requires 4, 7 players with 0.4 requires 3, etc. etc. With 8 or more players, round() isn't really needed anymore. Only for 2 & 3 players an extra adjustment is needed:

Code: Select all

// determine required number of votes
function required_votes($aseco, $ratio) {

  $numplrs = active_players($aseco);

  // compute normal vote count
  if ($numplrs <= 7) {
    $votes = round($numplrs * $ratio, 0);
  } else {
    $votes = floor($numplrs * $ratio);
  }
  // exceptions for low player count
  if ($votes == 0) {
    $votes = 1; // needed for /y
  } elseif ($numplrs >= 2 && $numplrs <= 3 && $votes == 1) {
    $votes = 2; // minimum
  }

  return $votes;
}
Xymph
in plugin.rasp_votes.php where should i put thoses lines ?
Thanks
-- SbOne --
Public CSb1 portal : http://csb1.sbone.fr -/- Team CSb1 : http://sbone.fr

User avatar
sbone
happy cruiser
happy cruiser
Posts: 181
Joined: 13 Sep 2007 18:11
Owned TM-games: TMUF, TM2
Location: In the sky...
Contact:

Re: ASECO/RASP v0.84 released!

Post by sbone » 27 Oct 2007 09:57

Xymph wrote:
sbone wrote:Great job again for this release :)
One little problem, in include/rasp.settings.php
i have :

Code: Select all

//Set to true if you want to disable normal callvotes & enable chat-based votes
$feature_votes = true;
But in game, by default chat-based vote are disabled ?
Where did i mistake ?
Hmm, is the plugin file listed in your plugins.xml ?
If so, what message exactly do you get when trying a vote command?
Sorry, my mistake, it was a syntax error :?
-- SbOne --
Public CSb1 portal : http://csb1.sbone.fr -/- Team CSb1 : http://sbone.fr

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

Re: ASECO/RASP v0.84 released!

Post by Xymph » 27 Oct 2007 10:54

sbone wrote:
Xymph wrote: After mapping out all the fractional vote counts for 2-9 players versus ratios of 0.4, 0.5, 0.6 & 0.7, I found that using round() instead of floor() does the "right thing" in most cases up to 7 players. E.g. 3 players and ratios >= 0.5 will result in 2 votes required, 4 players with 0.7 requires 3 votes but 2 otherwise, but also 6 players and 0.6 requires 4, 7 players with 0.4 requires 3, etc. etc. With 8 or more players, round() isn't really needed anymore. Only for 2 & 3 players an extra adjustment is needed:

Code: Select all

// determine required number of votes
function required_votes($aseco, $ratio) {

  $numplrs = active_players($aseco);

  // compute normal vote count
  if ($numplrs <= 7) {
    $votes = round($numplrs * $ratio, 0);
  } else {
    $votes = floor($numplrs * $ratio);
  }
  // exceptions for low player count
  if ($votes == 0) {
    $votes = 1; // needed for /y
  } elseif ($numplrs >= 2 && $numplrs <= 3 && $votes == 1) {
    $votes = 2; // minimum
  }

  return $votes;
}
in plugin.rasp_votes.php where should i put thoses lines ?
Oh doesn't matter, at the end of the file for instance. Glad your other problem is resolved.
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

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

Re: ASECO/RASP v0.84 released!

Post by Xymph » 27 Oct 2007 11:02

BReMFoX wrote:I don't know if it's a bug, but the message "CallVotes disabled. See /helpvote for info on chat-based voting." is shown to everybody when some1 joins the server?
You found the option, ok. :) I changed it in v0.85 so that it can be turned off completely as well.
BReMFoX wrote:I am using the XXX El Fuego Join/Leave message plugin.
The rank it shows with this plugin is different from the message "You server rank is:"
e.g.
Your server rank is 21/500 Average: 53
>> F07BReMFoX Ladderrank 14895 Serverrank 20/500
Maybe the calculating is different?
Hmm, it looks similar to RASP's rank calculation. But to be honest, I don't understand why the rank has to be re-computed in the plugin, when it's already done in the main system.
Since you apparently don't use jfreu.plugin.php (which also shows player connect/leave messages), you could try switching from El Fuego's plugin to jfreu.player.php (included in the official distribution) which performs just that one feature from Jfreu's plugin.

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

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

Re: ASECO/RASP v0.84 released!

Post by Xymph » 27 Oct 2007 11:06

lupo.sk wrote:I found this version of ASECO last week. I was waiting for new ASECO several month, and nothing :cry: Until now :lol: Beautyfull, wonderfull, excelent, marveles.
You did realy brutal good job.
On my Win 2003 WEB Server, PHP 5.2.0 and MySQL 5.0.45, I'm hosting 4 servers. 3x time atack and 1x team mode.

There is no problem. Everything is pretty stable for 4-5 days.
I would like to have some suggestion for improvement, but I havent.
Only one. Version 0.84 looks like final realese. You could call it 1.0.

You did excelent JOB Xymph.
Thanks for the kind words, glad it's working out fine. But v0.85 will be out this weekend, I'm just waiting for feedback on 2 questions on page 4 (repeat hint). :wink:
BTW, I can't call it v1.0 because the ASECO series for TMU started at v1.0 (now at v1.2.0) so that would be confusing.

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

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

Re: ASECO/RASP v0.84 released!

Post by Xymph » 27 Oct 2007 11:16

cow wrote:one other little thing.. hopefully anyway.

can we have two or more vote ratios..
aka
if players < 5 ratios =.6
else ratio =.4

the problem is when it is really busy votes are hard to pass
aka 36 people getting 18 to vote before time runs out.. is tough

and a few people have meantioned that when like only 3 people racing and auto vote on.. votes auto pass because only 1 vote is needed when they were trying to give the other people input
This problem was addressed on page 3 of this thread already, though with a slightly different approach. With 2 or 3 players, any vote will requires 2 /y's, with 4-7 players the requirement fraction is rounded up, and with 8 or more players the fraction is rounded down as before.

So you can lower the ratio options on your server such that votes with a large number of players are a bit easier to pass, while votes with low player numbers don't auto-pass. Although you have to consider whether a minority of players should be able to decide a skip or replay for the rest... perhaps the reason a vote doesn't pass before it expires is because too many players disagree? :lol:

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
soehest
happy cruiser
happy cruiser
Posts: 161
Joined: 07 Jun 2007 13:52
Owned TM-games: TMU
Contact:

Re: ASECO/RASP v0.84 released!

Post by soehest » 27 Oct 2007 11:18

Xymph wrote:
soehest wrote:Xymph, can i please draw your attention to this post:
viewtopic.php?f=28&t=10922


Edit: Indeed, changing all '?' characters in a filename into '_' fixes the problem with both /add and /admin add. Thanks for discovering this bug and its solution. :1010

There are still 2 topics/questions (in bold on page 4) that I'm hoping to get feedback on, before I want to release v0.85.
Xymph
Eh i was tired after searching for that bug most of the evening, then every command becomes valid even /addmin :D Great this is narrowed down now, i will look at those questions on page 4 at once ;-)
Daniel

User avatar
soehest
happy cruiser
happy cruiser
Posts: 161
Joined: 07 Jun 2007 13:52
Owned TM-games: TMU
Contact:

Re: ASECO/RASP v0.84 released!

Post by soehest » 27 Oct 2007 11:29

Xymph wrote:
cow wrote:anyway.. a different idea..
well two
i see this alot.. "yay I'm now rank 12" This I do find more interesting then finding out they beat 35 record n a track.. is there anyway at the end of a track or beginning of another to publically congrats peopel on rank improvement?
That's an interesting idea, but technically hard because the rs_rank table is completely cleared at the end of the track, and then all the new ranks are computed and stored. Being able to show rank improvements would require keeping a copy of the old table, and then going over the new table and comparing every player for a change in rank. :roll:
Another problem is that there are already a large number of messages being displayed around track switches, and adding more to them doesn't seem wise - if anything the rank messages would snow under among the rest (or vice versa).
What do others think about this?
I do find this idea interesting, but as you mention there already is many things happening in the chat window so i would prefer to not have this happen as this would give tons of spam. A halfway solution could be a notice of someone takes over rank 1 2 or 3. This would not produce to much spam, and would be a nice addition. Talking of excess notices:

The personal best line posted here:

viewtopic.php?p=80928#p80928

is sometimes a double post as the pb already is shown in the fast alike records (if you have secured a record below 50) Wouldn't it be possible to only show this, and if a top50 record has not been accomplished perhaps put it after the fast alike records, this would remove an entire line :-)
Does this makes any sense? :-)

User avatar
soehest
happy cruiser
happy cruiser
Posts: 161
Joined: 07 Jun 2007 13:52
Owned TM-games: TMU
Contact:

Re: ASECO/RASP v0.84 released!

Post by soehest » 27 Oct 2007 11:38

Xymph wrote:
El Fuego wrote: Also, that line near the top regarding Flow ... that was a replay vote that was accepted but the track went to the next one in the list (Freebird). I had got the message saying the vote was passed, but the vote passed just as the scoreboard was coming up. So map Flow did not play again. When I tried replay and skip on Freebird these both worked. (Freebird and Flow are earlier in the log - not shown here).
During the scoreboard Aseco is already looking at the next track in the jukebox in order to give that message "The next track will be...as requested by...". So if the vote passes after that message, the track will still be jukeboxed, but return after the next track completes. There's little I can do about this, it's a timing issue, because if the vote passes when the scoreboard comes up but before the JB check, then the replay will still succeed right away. I could cancel/expire only replay votes before the JB check, or cancel all votes at the end of a race instead of the beginning of the next track, but that means e.g. a kick vote also ends a bit earlier than is currently the case, and a replay vote no longer has that extra second or 2 to pass. What do you/others think?
This is a tough question :-) I think the votes should expire at the end of each track to prevent confusion, people would eventually learn to vote fast (perhaps) :-)
Daniel

Post Reply