Forum

> > CS2D > Scripts > [RELEASED] Achievements and Statistics Script
Forums overviewCS2D overview Scripts overviewLog in to reply

English [RELEASED] Achievements and Statistics Script

262 replies
Page
To the start Previous 1 2 3 413 14 Next To the start

Poll Poll

Do you like the idea of the script?

Only registered users are allowed to vote
No, it is nothing new
4.17% (3)
Yes
95.83% (69)
72 votes cast

old Idea

DaisukeOno
User Off Offline

Quote
Long time ago, i have same idea like this, everybody know i am newbie scripter, so i can't make this. Keep this job, good.

old Re: [RELEASED] Achievements and Statistics Script

TheBosS_
User Off Offline

Quote
There's a small bug in the statistics thingy. (in all of the Top Players menus)



As you can see that I am Player with the USGN 35744 (rank 4). Rank 3 has the exact statistics and the USGN as mine but a different name. This name is in every Top Players menu.

old Re: [RELEASED] Achievements and Statistics Script

VaiN
User Off Offline

Quote
Hello, Simonas, really like the GUI design. I'd be very interested to learn more about how you created that.

My Rewards scripts hosted last year has pretty much all of this including achievements, but no fancy GUI to show it off. Any chance Rewards may have been an influence in creating this?

I greatly prefer my OOP implementation over hooks though, as it's all integrated. Couple examples:
1
2
users[id]:stats():add_kill()
users[id]:ach().flag_cap:increment()
OOP makes this type of system much easier to manage. But I can understand using hooks for adding onto an existing system more easily.

Regarding adding hook functions, I find it more convenient to allow in-line functions. For example I use a custom system for CS2D hooks that allows me to do the following:
1
2
3
hook.add("second",priority,function()
	-- do something
end)
Everything else is handled automatically by the hook system. Just food for thought.

As a side note, Rewards will be returning most likely early next year once I finish up the Shop script. I would love to add an interface like this, it would be epic.

Keep up the good work, looks great.

old Re: [RELEASED] Achievements and Statistics Script

SQ
Moderator Off Offline

Quote
VaiN has written
Any chance Rewards may have been an influence in creating this?


I do not play CS2D that much, I looked though File Archive and haven't seen anything similar to that. Though I had idea for ages. This script will include Achievements, leaderboard and graph statistics as well. Those are more advanced features that I left for next week.

VaiN has written
I greatly prefer my OOP implementation over hooks though, as it's all integrated. Couple examples:
Code:
1
2
users[id]:stats():add_kill()
users[id]:ach().flag_cap:increment()

Regarding adding hook functions, I find it more convenient to allow in-line functions. For example I use a custom system for CS2D hooks that allows me to do the following:

1
2
3
hook.add("second",priority,function()
     -- do something
end)

I have mentioned this kind of methods already in the thread before. My system already featuring this and even a little bit more.

So far I had enough of these functions to implement about 30 stats:
1
2
3
4
5
6
7
8
9
AddFunction(hook,func) - basically same as addHook func(id)
AddGlobalFunction(hook,func) - func()
AddRemove(hook,func)
AddValue("value")
IncreaseValue(id,"value")
GetValue(id,"value")
AddStats("Sniper Kills", path_of_Image, 
function_that_returns_value_in_menu,
function_that_is_used_to_compare_values_in_top_lists)

Sniper kills statistics implementation for example:
More >


This is the list of all statistics available so far.
More >


I could also upload script that handles UI pretty well. Just I would need a list of features. And yet I don't know if people would use that.

and some improvements.
IMG:https://s7.postimg.org/gppdjnxvf/puns.png
edited 6×, last 28.10.15 10:36:57 am

old Re: [RELEASED] Achievements and Statistics Script

Infinite Rain
Reviewer Off Offline

Quote
This project looks very clean and properly coded (I assumed so by looking through the examples you have posted.) I wish you best of luck in that. It's very nice seeing someone creating good projects for this game. I really wish it had more players though.

Just a personal question. Weren't you really busy? How do you find time for that?

old Re: [RELEASED] Achievements and Statistics Script

SQ
Moderator Off Offline

Quote
To be honest I have never been so busy in my life at the moment. But that's the reason I'm doing this. Otherwise I would go crazy, this is more like chill project for me. I really do this project fast and have all the code in mind already.
To the start Previous 1 2 3 413 14 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview