[A/R2.0] Enhanced Karma plugin

This forum is dedicated to the Aseco/Rasp 2 server records and control script by Flo and Assembler Maniac. Announcements and issues can be discussed in this forum.

Moderators: Flo, Assembler Maniac, f*ckfish, TM-Patrol

Post Reply
nocturne
solid chaser
solid chaser
Posts: 1390
Joined: 08 Jun 2007 18:48
Owned TM-games: all
Contact:

[A/R2.0] Enhanced Karma plugin

Post by nocturne » 30 Apr 2008 00:51

Enhanced Karma Plugin v1.03.....-=[ Zip File ]=-......Level: Beginner
Adds the option to restrict karma votes either by 'required finishes' and/or by a minimum ladder ranking, and disables the display of the karma popup at the end of race to any player who doesn't meet either requirements. It should be compatible with third party widgets (such as Fufi's or oliverde8), provided they use the default RASP KarmaVote function.
.
Installation: Replace the default karma plugin with the one provided, and open up the RASP.XML file and change the '<Karma>' section to the following:

Code: Select all

	<karma>
		<recalc>1</recalc>				<!-- 1=True, 0=False -->
		<enable_vote_popup>1</enable_vote_popup>	<!-- 1=True, 0=False -->
		<show_vote_to_public>0</show_vote_to_public>    <!-- 1=True, 0=False -->
		<required_finishes>0</required_finishes>       <!-- Required number of finishes to be able to karma vote ;  numeric value, 0 to disable -->
		<required_rank>0</required_rank>       <!-- Required world rank to be able to karma vote ;  numeric value, 0 to disable -->
		<messages>
			<required_finishes>{#error}You must complete this track {1} time{2} before voting...</required_finishes>
			<required_rank>{#error}You must have a world rank of at least {1} to submit a karma vote...</required_rank>
			<karma_display>{#server}Track Karma: {#highlite}{1} {#server}votes, {#highlite}{2}%2b {3}- {#server}({#highlite}{4}% {#server}approval rating)</karma_display>
			<vote_failed>{#highlite} Vote Failed!</vote_failed>
			<vote_ok>{#highlite} Vote Registered!</vote_ok>
			<voted_already>{#highlite} You have already voted for this track</voted_already>
			<karma_good>good</karma_good>
			<karma_bad>bad</karma_bad>
			<karma_show_text>{1} thinks this track is {2} ({#highlite}/{3})</karma_show_text>
		</messages>
	</karma>
Then, just set the desired parameters and you should be good to go...
Last edited by nocturne on 04 Jun 2008 00:10, edited 4 times in total.

User avatar
Knutselmaaster
swift roadking
swift roadking
Posts: 692
Joined: 16 Feb 2007 01:40
Owned TM-games: TMO/TMN/TMNF/TMU
Manialink(s): intr
Location: Between DisneyLand and Paris
Contact:

Re: [A/R2.0] Enhanced Karma plugin

Post by Knutselmaaster » 02 May 2008 14:56

im interested....
If you want to, i can host your files on one of my servers....

nocturne
solid chaser
solid chaser
Posts: 1390
Joined: 08 Jun 2007 18:48
Owned TM-games: all
Contact:

Re: [A/R2.0] Enhanced Karma plugin

Post by nocturne » 03 May 2008 00:50

If you drop me a pm with your email address, I can email you a copy. Hosting is not a problem, as I can put a zip file up anywhere, but I just like having the PHPS file available to view the script directly from the browser.

Also, currently the ranklimit option doesn't work properly, as the player's rpc_info is unreliable and there's still no public stats system which could be accessed for the info (unlike tmn:classic), but I'm still working on it...

prog
cyclist
cyclist
Posts: 35
Joined: 08 Aug 2006 16:37
Owned TM-games: tmn tmu

Re: [A/R2.0] Enhanced Karma plugin

Post by prog » 06 May 2008 17:52

Hi

I sent you a private message but i didn't get the plugin:(
Could you please send me your stuff?!
Thank you!

nocturne
solid chaser
solid chaser
Posts: 1390
Joined: 08 Jun 2007 18:48
Owned TM-games: all
Contact:

Re: [A/R2.0] Enhanced Karma plugin

Post by nocturne » 06 May 2008 18:58

Ah, sry... saw your pm, but forgot to get it to you.

I'll send it now... Also, I have a 'fix' for the aseco 'player class' that should get the rank limiting working, but I haven't tested it out yet. Once that's done, I'll republish the download link on here.

nocturne
solid chaser
solid chaser
Posts: 1390
Joined: 08 Jun 2007 18:48
Owned TM-games: all
Contact:

Re: [A/R2.0] Enhanced Karma plugin

Post by nocturne » 07 May 2008 02:05

Alright, I finished up the new version, and posted the link to the zip file at the top of the post...

prog
cyclist
cyclist
Posts: 35
Joined: 08 Aug 2006 16:37
Owned TM-games: tmn tmu

Re: [A/R2.0] Enhanced Karma plugin

Post by prog » 09 May 2008 20:02

Hi

I think i found a bug :roll:
Since I installed your plugin, after the race I missing the good|bad|undecided panel above the chat window. The fufi karma widget is disappear too and players couldn't vote for maps under the chat time (excluding /++ /--). The vote popup is enabled. Any idea? I like your plugin, but if there is no solution for this problem i'm afraid I must uninstall your plugin :(

nocturne
solid chaser
solid chaser
Posts: 1390
Joined: 08 Jun 2007 18:48
Owned TM-games: all
Contact:

Re: [A/R2.0] Enhanced Karma plugin

Post by nocturne » 10 May 2008 03:50

I'll double check it, but the way I coded it up was to not display the rasp karma popup at all to players who have not met the requirements to vote. As far as Fufi's plugin goes, it should be using the default KarmaVote function, though it might have changed in recent releases. I'm no coder, though, and am prone to many mistakes, so I'll double check everything later (I'm thinking a wrong login string in the endrace function, in the ranklimit check)..

prog
cyclist
cyclist
Posts: 35
Joined: 08 Aug 2006 16:37
Owned TM-games: tmn tmu

Re: [A/R2.0] Enhanced Karma plugin

Post by prog » 10 May 2008 06:45

thank you :3
I forgot to mention that the ranklimit is disabled on my server. When I checked, all of the requirements met the players. I tried with a new account too, but it doesn't works.

Thank in advance

nocturne
solid chaser
solid chaser
Posts: 1390
Joined: 08 Jun 2007 18:48
Owned TM-games: all
Contact:

Re: [A/R2.0] Enhanced Karma plugin

Post by nocturne » 03 Jun 2008 19:30

Sorry for not uploading the fixed version sooner, but...

Version 1.03 is available in the first post. Instead of creating a loop to disable the vote_popup display for players not meeting the set conditions, it'll just display for all players -- and display the notification if karmavote conditions are not met. Perhaps I'll re-integrate it in the future, but for the time being aseco doesn't seem to be able to handle all the player info requests when determining whether to show the popup.

Post Reply