Achievements Reloaded
Achievements - made by Lolmewn
What does this plugin do?
This plugin allows you to add additional achievements to the game. This plugin requries my other plugin, Stats, to work.
Using this plugin, you can add achievements to the game, and add rewards to them. Whenever a player gets an achievement, you can let commands run, give them money and/or items, and much more using the API this plugin will have.
How do I install this?
Download the latest file from the files page and put it in your plugins folder.
Configuring the plugin
config.yml
There's nothing much to configure here yet. You can toggle whether or not it auto-updates, but that's about it.
achievements.yml
This is where you will store all your achievements. An achievement must have the following layout:
<id> name: YourAchievementName goals: - Stat <amount> <TOTAL or the variables belonging to this Stat> - another one?
The rest of the things is pretty self-explanatory. Once I have time, I will write down a good how-to-write achievements page.
Stats
These are the available Stats:
Stat | Description | Variables |
---|---|---|
Block_break | All broken blocks with their Datavalues | itemId itemData breaking |
Block_place | All placed blocks with their Datavalues | itemId itemData breaking |
Death | All deaths with their causes | cause entity(boolean, true is safest) |
Kill | All kills with their causes | type |
Move | Walking, sailing, riding a train, on the back of a pig or by horse. | type (0=walk, 1=boat, 2=train, 3=pig, 4=pig in train, 5=horse) |
Playtime | Time played in seconds | |
Arrows | Arrows shot | |
Xp_gained | Total XP gained | |
Joins | Total times joined | |
Fish_catched | Total fish Caught | |
Damage_taken | Total damage taken | |
Times_kicked | Total times kicked | |
Tools_broken | Total Tools broken | |
Eggs_thrown | Total eggs thrown | |
Items_crafted | Total items crafted | |
Omnomnom | Total times had a snack | |
On_fire | Total times being on fire | |
Words_said | Total words said | |
Commandsdone | Total commands done | |
Votes | Total times voted for the server (uses Votifier) | |
Worldchange | Total times worlds changed | |
Bucketfill | Total buckets filled | |
Bucketempty | Total buckets emptied | |
Bedenter | Total times bed entered | |
Itemdrops | Total times items dropped | |
Itempickups | Total times items picked up | |
Teleports | Total times teleported | |
Shear | Total times sheared | |
Lastjoin | The time the player joined the server last | |
Lastleave | The time the player left the server last |
Want to use a Stat that uses variables? You have to specify either the variables or use 'TOTAL'.
Variables with StatTypes
Some Stats have variables. A good example is Block_break, it has the variables <blockId> <blockData> and <breaking>.
If you want to have a goal where a player must break 5 blue wool blocks, the goal would be
- Block_break 5 35 3 true
If the block has no special blockData (e.g. there's only one type of it), use 0 as blockData. Example:
- Block_break 20 1 0 true
This means break 20 stone blocks.
Examples for the other special Stats:
- Block_place 5 TOTAL - Move 1000 1 #move 1000 blocks with transport type 1 (boat) - Kill 10 Zombie - Death 3 Creeper
The format always is - Stat Amount Total|Variables|<empty>
Item Rewards
The way Item Rewards are written down is somewhat difficult. Basically, you should write it down as
items: <itemId>.<itemData>,<amount>;<itemId>.<itemData>,amount;... etc. items: 35.3,10;1,10 items: 1,20
Note that the itemData doesn't have to be specified
The itemID obvioulsy is the ID the item has (which you can find a full list of here), the itemData is also on that list, and the amount.. well, duhh.
The first example gives you 10 colored wool, and 10 stone. The second example gives you 20 stone.
Example achievements.yml
You can find an example right here. When writing new achievements, I suggest you grab this page and see what all the options do.
Commands and permissions
Command | Permission | Description |
---|---|---|
/ach | achievements.view.self | Check out your progress |
/ach player <player> | achievements.view.others | Check out someone elses progress |
/ach reload | achievements.reload | Saves all players and reloads all achievements |
/ach page <page> | achievements.view.self | Check out page <page> of your progress |
/ach <achievement> | Check out what the achievement is all about |
Development builds
Development builds of this project can be acquired at the provided continuous integration server.
These builds have not been approved by the BukkitDev staff. Use them at your own risk, they may or may not work at all.
Development builds for Stats can be found at my CI, over at http://ci.lolmewn.nl/job/Achievements/.
Source
Want to help develop, or simply view what makes this plugin run?
Visit my bitbucket!
Metrics
This plugin utilises Hidendra's plugin metrics system, which means that the following information is collected and sent to mcstats.org:
- A unique identifier
- The server's version of Java
- Whether the server is in offline or online mode
- The plugin's version
- The server's version
- The OS version/name and architecture
- The core count for the CPU
- The number of players online
- The Metrics version
If you wish to disable this feature (/me cries), you can do so by opt-ing out, which you can do in the config file under /plugins/PluginMetrics/
Auto-updater
This plugin has a built-in auto-updater, which connects to BukkitDev to check for updates. If you, for some reason, wish to disable this process, you can do so by setting 'update' to false in the plugins' settings file.
IRC Support
You can find me (and possibly, when I'm around, support) in my IRC channel #Lolmewn on irc.esper.net - See you there!
Can I use this plugin to activate a command once achieved a stat, so I could promote a player up the Group Manager Scale. I would need to pass the username into the command too. /manuadd {username} rank2
Lolmewn, what maxlehot1234 said about /achievements reload is not even a suggestions.. That's a must have... It's annoying restarting the server every time a change is made to the achievements file.
@CustomForms
Commands are not even tested yet, I'm surprised there's a bar at all haha
As for it resetting, please make a ticket, if one doesn't exist already.
@maxlehot1234
Please make a ticket for suggestions :)
@TheSigler49
Yep, they're just for looks. Have absolutely nothing to do with the actual achievements. Note though, that these numbers are unique, and if there's ever an achievement with the same id, all people that already completed the old achievement are marked as having the new achievement completed too.
The numbers in the config, they are just there for looks right? You don't have to do all the achievments in order right?
Also, can you have the signs so you have the variable <player> in which if I look at it, it shows my stats but if someone else looks at it it shows their stats. I think this would be amazing.
Can you add: /achievements reload command??
Because, i need to restart my server everytime i change the achievements files :(
Each time I log back into my server it says that I complete the challenges each time. Seems like each log in it just redoes the onComplete and Rewards. Build #22
Going to assume the same for this plugin?
Also, just for future development. http://prntscr.com/2f1bup Progress bar no workie? you should be able to do /achievements <name> and get info about it
Otherwise, great plugin and I really love it.
We need to restart the server everytime i want to change the acheievements or config file? I use 0.8 version
@iveldesigns
It doesn't? :o hmm. Guess I'll have to test better :P
@blindsamson
Please make a ticket for this suggestion so I don't forget
This plugin is great. There's only one more thing i'm looking for, to be able to reset a players achievements or a specific achievement through a command. What I'm trying to do is, when a player dies, their stats and achievements are reset and they have to start all over again.
awesome. i'll give it a shot.
any considerations for my FB idea? I can help with the FB bits and storage. I'm just not a java dev and really don't want to pick up a new stack if i can help it.
edit i tried the latest dev build and still no sql table(s) are created. I assume it should be Stats_achievements ?
@iveldesigns
Looks like the code enabling mysql wasn't pushed; it is now.
@iveldesigns
Hmm, guess it doesn't work yet then :P
As for file size, no. Admins shouldn't care. But me, as BukkitDev staff, know what a pain it is to check 200kB (or more) extra could when it's only used for something really small.
re mysql: in that case, i'm not seeing the tables be created even with a full restart of the server.
Are you saying file size of the jar? is that really a concern for admins? (i'm a fairly new server admin, so maybe i'm not aware of the potential issues)
@iveldesigns
It gets the connection through the Stats API, that's why it's not configurable.
@iveldesigns
Not very sure how I would add Twitter/Facebook support, as adding support for that would mean a huge increase in file size (Which I'm trying to avoid, Stats is big enough as-is).
Random thought here, and I'm thinking through the implementation.
I would love to have the functionality that would allow, upon obtaining an achievement, for a FB action and / or tweet to be posted. Something like "I just earned the TestAchievement badge on the <server_name> Minecraft server!"
The obvious hold up is how would a player auth with FB? If a server is using Stats, you have a player record in the db, and you can click links in game, so would it be possible for a user to click a formed link in game that would trigger the needed FB auth bits in a web browser, saving the keys to the stats_player db record? Would there need to be a FB FanPage setup for the server? Lots of questions, but I think it could be a really interesting plugin that could help grow player run servers user bases.
Do you think there is any place for something like this within Achievements or a side plugin? Better yet, do you have any interest in something like this? :)
I'm very anxious to give mysql support a try, so I pulled from the dev builds. However, I don't see anywhere in the configs where to set the mysql connection information.
also, our server is new and would be more than willing to help you test with live players. let me know if you need any info from us.
Thanks!
Latest dev-builds have MySQL-support. Not quite tested though... after all, it is a dev-build.
@Ripper76
I see :) Could you make tickets for these idea's?
This plugin is very cool! Good job. I think you should add permissions like "achievments.[achievmentsID]". So people without the permission can't accomplish them. And admins will be able to make a easy promotion system.
And a broadcast system can be usefull, to announce the accomplishment of certain achievment in global chat. =)
@About7Deaths
lel
Ha, I am fairly sure I gave you the idea for this plugin awhile back. I'm not mad, I'm just saying...