Stats & Achievements
This Project is currently abandoned (and probably will forever be). See here for a alternative plugin
2-in-1 Stats and Achievements
This plugin logs various player activity as stats in a MySQL or SQLite database. With the integrated achievement system it is possible to award players when they reached a predefined target.
Features
- Logs block, mob, pvp and miscellaneous player statistics very detailled
- Logs also crafting statistics when spout is installed
- Integrated achievements system
- New database format which is more performant than older databases
- Integrated time delay to reduce server load and the number of SQL queries
- Planned web stats system
- Compatible with every Bukkit version since 1.1-R4
Tools
- You can convert older databases using our utility: http://89.144.25.51:8888/convert.php
- Achievements generator (will be extended soon): http://plugins.maniacraft.de/SaAPlugin/achgen
Requirements
- Vault (Permissions)
- Spout (if you want to get crafting stats)
Commands
- /stats help - General Help
- /stats [<player>] - Shows your stats or stats by <player>.
- /stats block [<player>] <block>[:<data>] - Shows stats for <block>.
- /stats pvp [<player>] [<player2>] - Shows PVP stats.
- /stats mob [<player>] [<mob>] - Shows mob damage stats.
- /achievements help - General Help
- /achievements [<player>] - Shows your obtained achievements or achievements obtained by <player>.
- /achievements list [<page>] - Lists all available achievements.
- /achievements admin add <name> <description> <category> <block> <data> <value> <command> - Adds a new achievement.
- /achievements admin remove <id> - Removes the achievement <id>.
- /achievements admin convert - Convert old achievements.
Achievement Commands
- /give <block>[:<data>] [<amount>] - gives the player the item <block> <data>
- All commands available on your server. Example (Essentials warp): /warp darkroom %player%
Permissions
Permission | Description |
---|---|
stats.show.blocks.own | Show own block stats |
stats.show.blocks.other | Show block stats by others |
stats.show.pvp.own | Show own pvp stats |
stats.show.pvp.other | Show pvp stats by others |
stats.show.mob.own | Show own mob stats |
stats.show.mob.other | Show mob stats by others |
stats.overview.own | Show your overview |
stats.overview.other | Show overview by others |
stats.receive | Log stats at all (for example not for Guests) |
achievements.receive | Gives achievements at all (for example not for Guests) |
achievements.admin.remove | Admin Command Remove |
achievements.admin.add | Admin Command Add |
achievements.admin.convert | Admin Command Convert achievements from old DB |
achievements.list | List all achievements |
achievements.show.own | Show obtained achievements |
achievements.show.other | Show achievements obtained by others |
Config
general: language: en # Language (Available: en/de, other languages can be added in plugins/StatsAndAchievements/lang/) update-delay: 30 # The time interval in seconds how often the stats will be updated in the database (Default and recommended: 30) achievements: true # Activating and deactivating Achievements text_color: '&6' # Color of command texts (1st color) data_color: '&7' # Color of data output (2nd color) debug: false # Debug output (Default and recommended: false) database: type: mysql # Database type, either mysql or sqlite table_prefix: '' # Table prefix to save stats of more than one server in a single database host: localhost # Only MySQL: Database server (Default: localhost) port: 3306 # Only MySQL: Database server port (MySQL default 3306) database: minecraft # Only MySQL: Database name user: root # Only MySQL: Database user password: stats123 # Only MySQL: Database password DisabledWorlds: # In this worlds the stats will be deactivated - disabledworld1 - creative listeners: blockStats: true # Block related stats brewingStats: true # Brewing related stats (maybe bugged) craftingStats: true # Crafting related stats (maybe bugged) enchantingStats: true # Enchanting related stats (maybe bugged) entityStats: true # Entity related stats playerStats: true # Player related stats (Your really should NOT disable this or you'll break everything!) playerMoveStats: true # Player move stats (if you experience lags you should set this to false) vehicleStats: true # Vehicle related stats
Language file formating
{br} - Line break &[0-f] - Color codes (http://img109.imageshack.us/img109/4334/mccolors.png) %[A-Z0-9]% - Internal variables, don't supposed to be translated!
Seems every 12 hours or so the server becomes very laggy (even on local network) and eventually locks up entirely. I have increased the update delay and will let you know if it fixes it.
@ManiacTwister
approved, nice it works with the detailed announcements (saa 1.7) !!!
Thanksfor your work !
A final question for today: Can you build a reload function, so i can edit/reload achievements without restarting the whole server (same as sockenklaus "/reloadach" ?
Nero
Hey! I saw you were going to make a web interface?
I made this a while ago (server is out but people really enjoyed it), it synchronised with stats and achievements, also with the given description and everything.
http://www.tinyurl.com/achievementhiscores
You should not open in Internet Explorer!
What do you think? :D
Cheers! Martijn
EDIT: Basically I added the following: - Icons for achievements - Grouping them into custom groups, I chose Easy-Medium-Hard-Master - Writing webpages per person from the achievements data (lay-out by html, js and css) - Also a general hiscores page - Easy to add custom data (like my own name with 1 achievement) - Configurable number of minimum achievements (I chose 10) - Easy collecting of any piece of data (like total achievements, number of achievements for a certain person in a specific category ('Hard') etc.)
LASTLOGOUT doesn't seem to update. I have a web interface that shows the stats and right now its setup as if LASTLOGIN > LASTLOGOUT it displays the player as "currently online" which works great except no one gets updated with a logout timestamp :(
http://nervesocket.com/minecraft and click on stats
If you click on the playername it shows more stats I'm giong to be working on the table relationships for showing the players achievements on that page too.
Posted a ticket :) any help would be much appreciated :D LOVE this plugin... not sure why there isn't more downloads :\
@Gidedin
@PainKNero
Added %achievement% (=achievement name) and %achievement_id% (=achievement id) in "achievements.notifyachwidget"(<
new message, you have to add this to your languagefile if you use a custom one.) and "achievements.notifychat"@wattzy
You can disable the notifications and stats in creative mode now.
@PainKNero
Unfortunately it's hard-coded, so at the moment only the player name is available in the language file.
Hopefully ManiacTwister will change or allow more customisation options for notifications in the future, hint hint :)
@wattzy
Thanks for the hint with the language file !
Now i have try to personalize the "%player% got an achievement" , just want to describe the achievement (like the dialogue in the old one from sockenklaus), i try the variable %id% and %name%, but it doesn't works :(
Any idea to get a message like "player got achievement Ironman IV" ?
(And i want to give items for achievements, so i cant use the command field in achievements table for that. Or can i use multiple commands in that field ?)
THIS plugin needs a better description, everything seems to by foggy :(
@wattzy
I'll try that when I get home :-)
I wish I can remove the '%player% has been rewarded' message. It's annoying as I already use the command to broadcast a message to Server with the Achievement Name (I use it as a Trophy System :P).
If it works, thank you very much :D
@PainKNero
You're welcome :-)
I did that on my database along with many other triggers to control Dates and times :)
@Maniac
Can you add the option to disable Stats & Achievements @Gamemode 1?
Sometimes me and other Mods enter on GameMode 1 to test some issues or add new things and that mess up with the Database =/
@Galzen
The 'can't find bundle warning', is just that. It's a warning, nothing adverse is going to happen with it.
However if you want to get rid of that warning or perhaps want to customise your notification messages that you get from this plugin, like I did, then what you have to do is the following.
This also works for any other languages people may like. Just change the en bit to whatever you will create. e.g. SaPlugin_fr.properties for french, just remember to change the config file setting to fr as well, or it won't work
Customise each of these to your own preferences.
I changed my 'achievements.notifychat' one because I was having issues with the prefix colour setting of the config file. So I forced the colour in this file instead and turned off the prefix. So in game it displays correctly.
Now don't ask me what most of these do or mean, they should be self explanatory. Otherwise, I have no idea. You're better off asking ManicTwister.
I do know that anything between %..% are the plugins variables of some sort.
I hope this helps people. :)
@Gidedin
approved !
I have the same problem with "can't find bundle for base name SaAPlugin, locale en"
Everybody has the permissions (bpermissions) and the new achievements are not showed in game, only the olds achievements are (if I edit an old one, the modification is shown in game), so nobody can get these achievements, even if I restart the stats . I activated debug mode and I got nothing interesting in the log :
2012-04-12 01:59:23 [INFO] [StatsAndAchievements] Enabling StatsAndAchievements v1.6 2012-04-12 01:59:23 [WARNING] Can't find bundle for base name SaAPlugin, locale en 2012-04-12 01:59:23 [INFO] [StatsAndAchievements] Enabled Achievements! 2012-04-12 01:59:23 [INFO] [StatsAndAchievements] Updated table shema to version 1.6 2012-04-12 01:59:23 [INFO] StatsAndAchievements v1.6 enabled! 2012-04-12 01:59:24 [INFO] [StatsAndAchievements] Update task execution time: 1107.761ms
@ManiacTwister
There is a way to record Starve / Fall damage?
I have a Player of the Week point that is based on the data that is got in the previous week, but I can't manage to record Fall and Starve Damage.
I only get normal deaths, like: Killed by Zombie, Skeleton and so on and a strange Death Data 3. I've five of that but.. what is it?
Data Code 3 is Arrow so... I don't know what to do =x
@oman95891
Did you upgraded to the last version? Everything is working fine here. I don't have many players online but no problems so far.
@Ferkswe
That code is from a MySQL Trigger on the Players Table.
Creating that will make the MySQL check for the PLAYTIME value every time the Plugins make an update in that table. If the PLAYTIME exceeds the time frame from a normal person (Right, 15k days playing the game?) it'll automatically update the table to the latest value.
You probably don't need that in the last version of the Plugin anyway, have you updated it?
The plugin itself shows no error on the console, but ingame you notice a HUGE error (it may just be for me)
Peoples time's seem way off. People who have played less than an hour instantly have 38 hours.
I, the server owner, managed to get -377466 hours of gameplay.
Idk whats going on, but if you could help that would be appreciated :D
(just an idea: could it be something to do with settting time with commandbook, /time day or /time night)
@Gidedin
I have no clue what you are rambling on about. :S
@ManiacTwister
I don't even use Achievements. It's stats that aren't working properly. It might be due to our 23 mb MySql database.
Also, this was the command i was looking for. mysql -u <user name> -p <database> < dump.sql
Version 1.5: When you check achieved achievements, /achievements 2 shows from number 2 and down instead of number 8, and so on
@ManiacTwister
Can you tell me how to make Crafting stats to be recorded? I've installed the SpoutPlugin #1090. There is anything specific to do?
@Ferkswe
To convert old achievements the command is "/achievements admin convert", but for this you need a already converted table imported in your database. Yep, the Server is currently down, due to hardware defect, but because of the easter holidays i dont think it will be fixed before tuesday, sorry.
@Ferkswe
Not yet as I can see. But you can fix that by adding this trigger on your DB:
It'll do something very simple: if the new PLAYTIME that is being updated in the database if over 1 Billion, it'll set to it's current state + 1 second + 10%. So the play still get something. Probably not that much, but it's something.
You can remove that boost be removing the '* 1.1' from the query.
To change the name of the trigger, change the 'TEST_TIME_UPDATE' to something you want.
@PainKNero
Ok. Here is a few steps that can solve your problem.
Let's test with this:
If you want to focus on a player only, do this: