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
  #2  
Old 08-27-2006, 12:47 AM
MissKalunji's Avatar
MissKalunji MissKalunji is offline
 
Join Date: Aug 2003
Location: Canada
Posts: 2,845
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i dont get it !?!?
Reply With Quote
  #3  
Old 08-27-2006, 07:50 AM
bairy bairy is offline
 
Join Date: Oct 2005
Posts: 184
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Once a month (or whenever the cron is run), all the scores that people have acheived are reduced by 15%
Reply With Quote
  #4  
Old 08-27-2006, 03:17 PM
HuntrCkr HuntrCkr is offline
 
Join Date: Nov 2005
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Excellent mod! I installed this on my arcade and it works flawless. Great work.
Reply With Quote
  #5  
Old 08-27-2006, 09:02 PM
MissKalunji's Avatar
MissKalunji MissKalunji is offline
 
Join Date: Aug 2003
Location: Canada
Posts: 2,845
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by bairy
Once a month (or whenever the cron is run), all the scores that people have acheived are reduced by 15%

ohhh smart move!

Thanks
Reply With Quote
  #6  
Old 08-30-2006, 03:56 PM
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Posts: 3,832
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the hack! I'll install it right away...
Reply With Quote
  #7  
Old 10-06-2006, 10:04 PM
Breaker's Avatar
Breaker Breaker is offline
 
Join Date: Jan 2002
Location: Derby, UK
Posts: 184
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #8  
Old 10-07-2006, 01:58 AM
lazydesis lazydesis is offline
 
Join Date: Sep 2006
Posts: 234
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i get this error ...and have no clue why

Database error in vBulletin 3.6.1:

Quote:
Invalid SQL:

UPDATE arcade_games SET highscore = CEIL(highscore - ((highscore / 100) * 15));

MySQL Error : Table 'lazyindi_comm.arcade_games' doesn't exist
Reply With Quote
  #9  
Old 10-07-2006, 03:53 AM
lazydesis lazydesis is offline
 
Join Date: Sep 2006
Posts: 234
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great hack thanx meanwhile
Reply With Quote
  #10  
Old 10-07-2006, 03:53 AM
lazydesis lazydesis is offline
 
Join Date: Sep 2006
Posts: 234
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

juz realised in the arcadescores.php
instead of
Code:
$vbulletin->db->query_write("
	UPDATE arcade_games SET highscore = CEIL(highscore - ((highscore / 100) * 15))
u need to have
Code:
$vbulletin->db->query_write("
	UPDATE forum_arcade_games SET highscore = CEIL(highscore - ((highscore / 100) * 15))
or watever they have there for the prefix
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 01:07 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.04911 seconds
  • Memory Usage 2,290KB
  • Queries Executed 23 (?)
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
  • (2)bbcode_code
  • (2)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