[BETA] Tetris MOD v2.0

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
User avatar
LaZeR
Registered User
Posts: 671
Joined: Sat Jun 29, 2002 8:38 pm
Contact:

Post by LaZeR »

Uhoh, I just encountered a very bad bug. Seems everytime I enter:

Administration - Online Activities - Configuration

Even to just look at the settings and NOT press a button in there or change a thing, all my members lose -20 Gold for no reason 8O :cry:

EDIT: Okay, this is going to sound extremely weird but I just discovered a sorta workaround to this. If you enter this "Configuration" area and even if not choosing to do anything, you must press the PAYDAY button each and every time in this Admin screen or the problem above will occur. Doing this just seems to retain all user's GOLD. Hrmm, something seems to be working a bit backwards here though :?: Something is obviously making a call to delete the allowance if/when an admin goes into configuration and does nothing :?

To the user reporting slow speed or lag in game - Make sure your browser's cache settings are on "Automatically" refresh and not each visit or otherwise!
Napoleon
Registered User
Posts: 413
Joined: Thu Jul 18, 2002 11:31 am

Post by Napoleon »

Iron-Monkey wrote: I have 2 questions:

1. Is there anyway that you can make this work on the laptop? I am using it on the laptop but cannot move the pieces because it only has the arrow keys and even when I pressed on the number keys on the top of my keyboard, it does not do anything. On the desktop computer I was able to play because it has the number key pad.

2. How come the game is so slow. I have a decent computer with 650 Mhz Pentium 3 with 256 kb of RAM and 8 MB of video graphic card.


In the next update I could include some letter key commands for laptops, but I have no way to test this on a laptop. I originally wanted to use the arrow keys but that made the game scroll off the screen. LOL! As for the slow down, LaZeR and DarkWolf found out how to fix that, its up in the Mini-FAQ now plus in the post from LaZeR. ;)
Last edited by Napoleon on Fri Nov 01, 2002 9:28 am, edited 1 time in total.
Napoleon
Registered User
Posts: 413
Joined: Thu Jul 18, 2002 11:31 am

Post by Napoleon »

LaZeR wrote: Uhoh, I just encountered a very bad bug. Seems everytime I enter:

Administration - Online Activities - Configuration

Even to just look at the settings and NOT press a button in there or change a thing, all my members lose -20 Gold for no reason 8O :cry:

EDIT: Okay, this is going to sound extremely weird but I just discovered a sorta workaround to this. If you enter this "Configuration" area and even if not choosing to do anything, you must press the PAYDAY button each and every time in this Admin screen or the problem above will occur. Doing this just seems to retain all user's GOLD. Hrmm, something seems to be working a bit backwards here though :?: Something is obviously making a call to delete the allowance if/when an admin goes into configuration and does nothing :?

To the user reporting slow speed or lag in game - Make sure your browser's cache settings are on "Automatically" refresh and not each visit or otherwise!


ACK! Thats not good, I'll try to fix that tonight, maybe sometime tomorrow. Darn bugz! :?

EDIT : Fix for this bug is on page two in this forum.
Last edited by Napoleon on Fri Nov 01, 2002 6:34 am, edited 1 time in total.
User avatar
LaZeR
Registered User
Posts: 671
Joined: Sat Jun 29, 2002 8:38 pm
Contact:

Post by LaZeR »

Oops, now another one :oops: Everytime I play a game and go back to memberlist to check my user's gold, I now see it deducts -25 gold from everyone else when I complete my game :o

EDIT: Ouch! Now I realize it is also deducting with every click around the forum. -Must be something with the code in index.php, note I put this bit in both portal.php and forum.php as with my portal that is how index is split but this shouldn't be the problem as it does it whether I click to portal OR forum (-25 to everyone) :oops:

EDIT #2: Ok, seems I made an important find relating to BOTH problems of my user's gold subtracting at entering Admin-Activities-Config AND browsing forums. I switched Payday from "daily" to "weekly" and have gone back and forth thru these described triggers and so far its not stealing gold :lol: , so just maybe there is a buglet in the "daily" setup for allowance - payday :roll: :?:
User avatar
LaZeR
Registered User
Posts: 671
Joined: Sat Jun 29, 2002 8:38 pm
Contact:

Post by LaZeR »

:?: regarding the Signature Charge System. As noted, it tabulates the given gold needed on the "Payday" per user to allow the sig to display or not so I was thinking when I press [Payday] , should this not do the calculation then and bump off the user'(s) sig below the selected figure or must one wait till the actual Payday cycle as per daily, weekly, ect... setting to test this feature :?: If supposed to also do the check when manually hitting [Payday] then this feature is not working properly :?
Napoleon
Registered User
Posts: 413
Joined: Thu Jul 18, 2002 11:31 am

Post by Napoleon »

Okay I think I found the bug which is in the payday management routine found in the index.php. Open that up and find :

Code: Select all

$today = date("d");
and change it to :

Code: Select all

$today = date("j");
Next find :

Code: Select all

if ($gkdata < $today || $today == 1)
And change it to :

Code: Select all

if (($gkdata < $today) && ($gkdata != $today))
Next find :

Code: Select all

 ( ($board_config['allowance_payday'] == 'monthly') && ($today == 1) )
And change it to :

Code: Select all

 ( ($board_config['allowance_payday'] == 'monthly') && ($today == 30) )
Now anyone who nows how php werks {Apparently not me. :oops: } can tell that since $today is the First, in code terms 1 Then pay each user on payday... everytime the hit the index. LOL! Also when using the date function with "d" would return 01 instead of 1 so on a first install $gkdata would == 0 which in php is lesser than 01. Hope this fixed it, I'm still running through the code looking for any other bugz to squash and I'll be here most of the night if anyone else wants to help out or get help installing this MOD. :)
Napoleon
Registered User
Posts: 413
Joined: Thu Jul 18, 2002 11:31 am

Post by Napoleon »

LaZeR wrote: :?: regarding the Signature Charge System. As noted, it tabulates the given gold needed on the "Payday" per user to allow the sig to display or not so I was thinking when I press [Payday] , should this not do the calculation then and bump off the user'(s) sig below the selected figure or must one wait till the actual Payday cycle as per daily, weekly, ect... setting to test this feature :?: If supposed to also do the check when manually hitting [Payday] then this feature is not working properly :?


It's supposed to check if the user has enough for a sig anytime they're sig is display. If they don't have enough tokens then their sig isn't displayed.

Each payday the sig charge is deducted from the allowance amount. If the Admin doesn't want to use the sig charge then leave it at 0 so nothing will get deducted on payday. This way all users get charged once on payday and not overcharged everytime they use a signature. ;) Although you do have a point of it charging users everytime the admin hits payday. Perhaps a "charge sig users" button? This would keep the payday and sig charges sperate.
Iron-Monkey
Registered User
Posts: 284
Joined: Sat Nov 17, 2001 12:18 am
Location: California, USA

Post by Iron-Monkey »

Hi,

I like a little clarification.

I looked at the installation instructions and found that a lot of places you said that you don't need to add certain section if you already have the points mod installed.

Well, I do have the points mod installed and was wondering how this game will use my points system. I see that it uses the variable money so is that compatible with the points?
Napoleon
Registered User
Posts: 413
Joined: Thu Jul 18, 2002 11:31 am

Post by Napoleon »

Iron-Monkey wrote: Hi,

I like a little clarification.

I looked at the installation instructions and found that a lot of places you said that you don't need to add certain section if you already have the points mod installed.

Well, I do have the points mod installed and was wondering how this game will use my points system. I see that it uses the variable money so is that compatible with the points?


Yup, in the activity.php file it'll check to see if the Point System has been toggled on, if so then it'll add and charge from the user_point field instead of the user_money field.
User avatar
LaZeR
Registered User
Posts: 671
Joined: Sat Jun 29, 2002 8:38 pm
Contact:

Post by LaZeR »

Thanks for clearing that up, I'll plug that code change in shortly and toggle back to daily and test. Just curious as to the "Point system". I do have this running on my board ofcourse but as I said earlier I went back thru and just did all the code so as to use the allowance system for this mod as opposed to my points system. Am I still in conflict to the fact that the points system mod is installed OR do I understand correctly that is long as I chose the correct toggle in "Admin-Activities-Config" and turn off points and just toggle on the "allowance", I should be ok :?:
Iron-Monkey
Registered User
Posts: 284
Joined: Sat Nov 17, 2001 12:18 am
Location: California, USA

Post by Iron-Monkey »

If I already have the points mod, which files do I need to edit?

Are these the only files that I need to edit?

memberlist.php
constants.php
page_header.php
usercp_viewprofile.php
lang_main.php
memberlist_body.tpl
profile_view_body.tpl
overall_header.tpl

Also, if I don't have any type of rank mod, then I don't have to edit the following files right?

admin_ranks.php
rank_list_body.tpl
rank_edit_body.tpl
Napoleon
Registered User
Posts: 413
Joined: Thu Jul 18, 2002 11:31 am

Post by Napoleon »

LaZeR wrote: Thanks for clearing that up, I'll plug that code change in shortly and toggle back to daily and test. Just curious as to the "Point system". I do have this running on my board ofcourse but as I said earlier I went back thru and just did all the code so as to use the allowance system for this mod as opposed to my points system. Am I still in conflict to the fact that the points system mod is installed OR do I understand correctly that is long as I chose the correct toggle in "Admin-Activities-Config" and turn off points and just toggle on the "allowance", I should be ok :?:


You should be fine. It was designed not to conflict with the Point System MOD. I've tested the Allowance system with and without the Point system and it ran fine. You could also modify the point system to use the Allowance system by changing user_points to user_money and vice versa with the Point System.
Napoleon
Registered User
Posts: 413
Joined: Thu Jul 18, 2002 11:31 am

Post by Napoleon »

Iron-Monkey wrote: If I already have the points mod, which files do I need to edit?

Are these the only files that I need to edit?

memberlist.php
constants.php
page_header.php
usercp_viewprofile.php
lang_main.php
memberlist_body.tpl
profile_view_body.tpl
overall_header.tpl


yup.
Iron-Monkey wrote: Also, if I don't have any type of rank mod, then I don't have to edit the following files right?

admin_ranks.php
rank_list_body.tpl
rank_edit_body.tpl

These you do have to edit if you want to use the rank rewards. It will let you modify how much a user gets per rank.
User avatar
LaZeR
Registered User
Posts: 671
Joined: Sat Jun 29, 2002 8:38 pm
Contact:

Post by LaZeR »

Just a followup, I made the index.php changes (well in my case since I run a portal they are in my forum.php and portal.php), anywho, this seems to have solved the mysterious GOLD deletion problems upon hitting pages, ect... so far. Now, I'm still mystified as to why the setting for the SIG which I have at 50 required Gold seems to not be doin a thing. I purposely logged on with my Bot User - Amy and had her play tetris and lose to drag her gold down to 35. I even made a post while I was logged in with Amy and her sig continues to show (albiet a little line of text but still her sig), so I logged back in under my account and got her posting herself and sure enough the sig ofcourse still shows but she only has 35 gold (well under the minimum setting for 50) and since I tested both ways via BOT response and logged in manual posting with her I would think this has nothing to do with the fact she is a bot but rather something not working with this feature :? Hope that made sense I just confused myself. Maybe I'll drag down my Gold below the sig threshold and test on myself but does this SIG Allowance effect an Admin anyhows :?:
Napoleon
Registered User
Posts: 413
Joined: Thu Jul 18, 2002 11:31 am

Post by Napoleon »

LaZeR wrote: ... does this SIG Allowance effect an Admin anyhows :?:

Hmmm I think I over looked a line when making the install.txt. brb....
Locked

Return to “[2.0.x] MODs in Development”