Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
v3arcade reduce scores to keep arcade competitive Details »»
v3arcade reduce scores to keep arcade competitive
Version: 1.02, by bairy bairy is offline
Developer Last Online: Jul 2023 Show Printable Version Email this Page

Version: 3.5.5 Rating:
Released: 08-24-2006 Last Update: 10-08-2006 Installs: 31
Additional Files  
No support by the author.

After my arcade had been installed for while I found that all the high scores were practically unbeatable.
I wanted a way to make them beatable again.

I thought about the possibility of just removing the top 5 high scores, but that wouldn't be fair on the winners.
I thought about resetting all the scores but that wouldn't be fair on any of the players.
Then I came to a perfect compromise: Reduce the scores. All the ranks are kept in tact but the high scores are achievable again. As a bonus, it increases competitiveness when the previous top scorers get beaten.

It's all done by a single cron job.

Upload arcadescores.php to /includes/cron
Set a new scheduled task. This one runs on the first of each month:
Day of week: *
Day of month: 1
Hour: 0
Minute: 4
Log: up to you
Filename: ./includes/cron/arcadescores.php

By default the scores are reduced by 15%. If you want to change this percentage, change the 15 to whatever you like on lines 11, 15 and 19 of the script.

Important note: This script will reduce the scores by 15% each time you run it manually or on cron. That means if you install it and want to play around with it, you might want to make a backup of the arcade_games, arcade_sessions and arcade_news tables.

Version 1.01
- Updated to account for games that have reverse scoring
- Now includes table_prefix
- Made the change percentage easier to change

Version 1.02
- Fixed a tiny bug I created in 1.01: If you had no reverse-scoring games it errored.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 10-07-2006, 02:09 PM
bairy bairy is offline
 
Join Date: Oct 2005
Posts: 184
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Breaker
great mod/idea... just one problem though. I haven't looked at the code yet, but it appears that all this does is lower the score which is great for all games but ones with reverse scoring which will, over time make it impossible to beat the scores
Oops. You're right, it will.

I'll update it later today or tomorrow so that it lowers normal games and raises reversed games.
I'll also add the table prefix in *slaps wrist*
Reply With Quote
  #13  
Old 10-07-2006, 03:30 PM
bairy bairy is offline
 
Join Date: Oct 2005
Posts: 184
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Version 1.01
- Updated to account for games that have reverse scoring.
- Now includes table_prefix
- Made the change percentage easier to change.

To upgrade, just replace the includes/cron/arcadereducescores.php with the new one.

Version 1.02 (released very shortly after 1.01)
- Fixed a tiny bug I created in 1.01: If you had no reverse-scoring games it errored.
Reply With Quote
  #14  
Old 10-07-2006, 03:46 PM
Blittz Blittz is offline
 
Join Date: Feb 2005
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
Database error in vBulletin 3.6.1:

Invalid SQL:

	UPDATE arcade_games SET highscore = CEIL(highscore - ((highscore / 100) * 15)) WHERE gameid NOT IN ();

MySQL Error  : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
Error Number : 1064
I just downloaded and installed the script, it seems that $reversegames never got populated, and caused that error.

also... just a tiny suggestion.. put some comments in, at least containing the version number so people know if they have the latest, and perhaps a reminder of where to go to get any updates, etc... Also give yourself credit!
Reply With Quote
  #15  
Old 10-07-2006, 04:29 PM
bairy bairy is offline
 
Join Date: Oct 2005
Posts: 184
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You know when I uploaded it I just had this hunch something was gonna error. And yes, I forgot to test without any reversed games.

Sorted, tested and reuploaded.

With the comments, I've dropped in the version and thread number, good idea
Reply With Quote
  #16  
Old 10-07-2006, 04:31 PM
Blittz Blittz is offline
 
Join Date: Feb 2005
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ding! yup that fixed it, yay! Thanks again for a usefull script.
Reply With Quote
  #17  
Old 10-08-2006, 10:18 PM
lazydesis lazydesis is offline
 
Join Date: Sep 2006
Posts: 234
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

u named the file as arcadereducescores.php while the previous file was arcadescores.php

u might want to change the code for the cron or rename the file
Reply With Quote
  #18  
Old 10-09-2006, 08:07 AM
bairy bairy is offline
 
Join Date: Oct 2005
Posts: 184
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oops. Thanks! Renamed the upload.
Reply With Quote
  #19  
Old 02-03-2007, 11:39 AM
WhyDoesItMatter WhyDoesItMatter is offline
 
Join Date: Mar 2006
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Could never get this to work properly.. seems to want to run 3 times instead of once for some weird season.
Reply With Quote
  #20  
Old 04-06-2007, 06:04 AM
Deadly Assassin's Avatar
Deadly Assassin Deadly Assassin is offline
 
Join Date: Aug 2006
Location: VbAnswers.com
Posts: 222
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works like a charm, cheers m8 :up:
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:41 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04540 seconds
  • Memory Usage 2,290KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete