Arcade point system

Started by dwd2000, January 25, 2015, 11:12:11 PM

Previous topic - Next topic

0 Members and 4 Guests are viewing this topic.

dwd2000

Hi folks:
Before Jeza disappeared, he was working on a points system for the arcade.
A player got so many points for top score, so many for second, and again for third.
Players were ranked by points, and not just high scores.
It would actually be possible for someone without the most high scores to be ranked higher.
I had the hack on my computer, but it was 2 or 3 hard drives ago.

Does anyone have the hack so we can try to make it work?

Speaking of Jeza, does anyone know why he's not online any more?
30 years ago I was young and foolish. Now, I'm just young.

Skhilled

Quote from: dwd2000 on January 25, 2015, 11:12:11 PM
Hi folks:
Before Jeza disappeared, he was working on a points system for the arcade.
A player got so many points for top score, so many for second, and again for third.
Players were ranked by points, and not just high scores.
It would actually be possible for someone without the most high scores to be ranked higher.
I had the hack on my computer, but it was 2 or 3 hard drives ago.

Does anyone have the hack so we can try to make it work?
Well, I used to have a copy but deleted it from my hd maybe 2 years ago while cleaning out old programs. What Jeza created worked off of a SMF Points mod (I forget the actual name of the mod) created my Daniel13 (or was it 14 or 15?). Anyway, Daniel dropped the points mod and had left SMF. Without the points mod being updated anymore, Jeza dropped support for his arcade points mod.

So, if you want to do it you'll have to update a points mod like the outdated one here:

http://custom.simplemachines.org/mods/index.php?mod=1741

wmd2005 may still have a copy of it and may be willing to help. He's now Lead Customizer at SMF.

Then, you'll have to create your own mod for the arcade. Yeah, a lot of work. LOL

Quote from: dwd2000 on January 25, 2015, 11:12:11 PM
Speaking of Jeza, does anyone know why he's not online any more?

He had RL problems and dropped off the grid... I hope he is OK.

dwd2000

Found the old point system script. :)      (attached)

It obviously doesn't work "as is", but might if I took the time to do all the manual changes.

If anyone here would like to tackle it, it might be of value to someone other than me.
30 years ago I was young and foolish. Now, I'm just young.

Skhilled

Like I mentioned, you'll need to get the SMF points mod working first...if I remember correctly. Then Jeza's arcade addon needs to be fixed to work with it.

Both predate the SMF hooks system that is now in place, I believe. So, you'll probably need a lot of code rewriting. I'm not experienced enough to do that and is why I suggested you talk to wmd2005. Or maybe Underdog may wish to help but I do know he's quite busy.

EDIT: Just for the heck of it I tried to install it and almost half of it gave "Test Failed" for the files and it couldn't even find /Themes/default/style.css which has been moved to /Themes/default/css/style.css. A lot of SMF coding was moved around to other files and it seems the arcade coding and files has changed to the point it cannot find most of the coding in the arcade files themselves.

I'm thinking a total rewrite is in order...or a lot of work is needed.

dwd2000

I got the same errors when I tried to install it too.  :(

I may have time to work on it a bit.
Jeza and I had it working a while back on our test sites, and didn't need the points mod, so this maybe a separate script.

Anyone else interested in it?
30 years ago I was young and foolish. Now, I'm just young.

Skhilled

You are probably right and i'm thinking of somwthing else that used the points mod.

dwd2000

Got it working with WAMP,  SMF 2.0.9, the Emulator, manual edits and a few four letter words.

One problem I can't quite figure out is that the "Leaderboard" is just showing code, rather than the actual leaderboard.

30 years ago I was young and foolish. Now, I'm just young.

Skhilled

Coding and four letter words go hand and hand.  :hah:

Something is not closed properly...

EDIT: I did a quick search of the code and the code showing is in JezaList.Template.php at the beginning. You probably did not close something properly in used improper nesting.

dwd2000

Actually, the only coding I did was the manual edits when installing it.
Damn it Jim...I'm a tweaker, not a coder.  :rofl1:
30 years ago I was young and foolish. Now, I'm just young.

Skhilled

LOL! I've been so busy with making this lasagna earlier that I've been getting everything all wrong today. LOL

Code only shows onscreen when something is not closed properly or maybe put in the wrong place.

This file is no longer in the right place:

./Themes/default/style.css - it is now in ./Themes/default/css/style.css

That tells me the code was written before SMF 2.0 Final because that is when that particular change took place. So, the many errrors may be because of the many coding changes to SMF and the Arcade when SMF 2.0 went final. Which means the points system possibly needs to be rewritten or have those parts of the coding changed.

And I've got a ton of errors tring to install it. I didn't try to fix them, just want to see how many there were.

Skhilled

OK, I took a look at the first "Test Failed" I got. It is for /Sources/ArcadeList.php. In the first image below, the points code is looking for:

$txt['arcade_guest']

But as you can see in the 2nd image, the arcade coding has changed to:

$txt['guest']

So, you would need to change all instances of the points system code to:

$txt['guest'] - to match the arcade's coding changes.

Keep in mind that is only one issue...there are many others, I assume. This still does not explain the onscreen coding you are getting but does point out one of the many possible problems with this old code.

Skhilled

Ok, found out the file path in install.xml is wrong for the /Themes directory. In the file it is:

<file name="$themes_dir/default/index.template.php"> - for instance. When it should be:

<file name="$themedir/default/index.template.php">

All instances in install.xml need to be changed to reflect this...

EDIT: Disregard the above...  :baghead:

I compared one of Underdog's install.xml files with the one from points to make sure the paths were correct after installing it a few times and getting the same errors.  ???

The install.xml files had old incorrect paths and is why some of the code was not installing properly. There are still some edits where the code is there and it should work but it doesn't install it correctly and gives Test Failed's but I can't figure out why atm.

Anyways, here's what I fixed so far but it's still not right.

dwd2000

Quote from: Skhilled on March 15, 2015, 07:12:42 AM
OK, I took a look at the first "Test Failed" I got. It is for /Sources/ArcadeList.php. In the first image below, the points code is looking for:

$txt['arcade_guest']

But as you can see in the 2nd image, the arcade coding has changed to:

$txt['guest']

So, you would need to change all instances of the points system code to:

$txt['guest'] - to match the arcade's coding changes.

Keep in mind that is only one issue...there are many others, I assume. This still does not explain the onscreen coding you are getting but does point out one of the many possible problems with this old code.


Already found this. :)

There was also one for the menu and a couple more.
It said "Couldn't find file", for the CSS, so I skipped it, hoping it wouldn't be much of a problem.

As for the different versions of SMF, I emulated the the install to compensate.
Just don't ask me to remember the emulated versions, but I did find the info within the install files.
30 years ago I was young and foolish. Now, I'm just young.

dwd2000

Quote from: Skhilled on March 15, 2015, 06:53:06 AM

This file is no longer in the right place:

./Themes/default/style.css - it is now in ./Themes/default/css/style.css


Actually, there is no "style.css". (index.css though)
There's an "arcade.css" in the CSS folder, so I added the code to that.
30 years ago I was young and foolish. Now, I'm just young.

Skhilled

Yes, I meant to post that too yesterday but was busy and forgot. Anyhoo, I changed the install file to index.css instead. I totally forgot about arcade.css. LOL