Page 1 of 6

[Mod] Achievements [2.3] [awards] – UI support, more awards

PostPosted: Fri Feb 22, 2013 19:09
by rubenwardy
Image


This mod adds achievements to Minetest. Use /awards to see your awards.

Download - Browse the Code

License: LGPL 2.1 or later.
Dependencies: none.

+ Developer feature list and to do list

PostPosted: Fri Feb 22, 2013 19:26
by PilzAdam
Might be helpful: https://gist.github.com/PilzAdam/4540471
I would also add a function "give_achievement". Mods could use this on every callback, so achievements like "Taking damage" can also be created.

PostPosted: Fri Feb 22, 2013 19:31
by Likwid H-Craft
Well done rubenwardy, :) now what the Testing start!

Hey you think I can make this work for my Portaltest?

PostPosted: Fri Feb 22, 2013 21:32
by KingSmarty
So you actually have to do the achievments first right? Because there are no values (? sorry i'm from Germany donn't no how to spell value)

PostPosted: Fri Feb 22, 2013 21:55
by tom_blue
Achievement Get: Close Call
Go all the way down to half a heart and survive

PostPosted: Fri Feb 22, 2013 22:46
by Mito551
KingSmarty wrote:So you actually have to do the achievments first right? Because there are no values (? sorry i'm from Germany donn't no how to spell value)


value is the correct spelling

tom_blue wrote:Achievement Get: Close Call
Go all the way down to half a heart and survive


lol

PostPosted: Fri Feb 22, 2013 23:51
by Josh
Achievment Get: You Hacker You!
Use /giveme air

PostPosted: Sat Feb 23, 2013 00:25
by Likwid H-Craft
Tested Appove:Sky is the limt. (Minetest Achievment Get title)
Build a house tall as the sky limt.

PostPosted: Sat Feb 23, 2013 09:30
by rubenwardy
KingSmarty wrote:So you actually have to do the achievments first right? Because there are no values (? sorry i'm from Germany donn't no how to spell value)


There are currently only two achievements:

--> First Mese Find (digging a mesE)

--> Foundations (placing a brick)

PostPosted: Sat Feb 23, 2013 10:22
by Gambit
Likwid H-Craft wrote:Tested Appove:Sky is the limt. (Minetest Achievment Get title)
Build a house tall as the sky limt.


What constitutes as a house in this mod? Also there is no limit! D;

rubenwardy wrote:There are currently only two achievements:

--> First Mese Find (digging a mesE)

--> Foundations (placing a brick)


Those are kinda easy. Achievements should be challenging like I said. What about those ideas Chinchow and I laid out in the other thread?

My Ideas for Achievements:
  • "Lumber Jack" - Cutting 100 tree blocks.
  • "Light It Up" - Place 100 torches.
  • "Survivalist" - Survive the world without the use of Chest or Furnace for 50 day cycles.


Chinchow's Ideas for Achievements:
  • Lasted 50 days without dying=Living Life
  • Collected 10 lava buckets=Get it while its hot!
  • Mined 10000 stone=Massive miner
  • Mined 1000 stone=Adequate Miner
  • Mined 100 stone=Mini Miner
  • Mined 10 stone=Just entered the mine

A "Foundation" shouldn't be laying down a brick. It should be something like: Flattening a 100x100 of land.

Achievements should make players sweat for once.

PostPosted: Sat Feb 23, 2013 11:18
by rubenwardy
The ones I created were just for testing if the code works.

I will add all of these eventually.

PostPosted: Sat Feb 23, 2013 11:53
by Linxx
Gambit wrote:
Likwid H-Craft wrote:Tested Appove:Sky is the limt. (Minetest Achievment Get title)
Build a house tall as the sky limt.


What constitutes as a house in this mod? Also there is no limit! D;

rubenwardy wrote:There are currently only two achievements:

--> First Mese Find (digging a mesE)

--> Foundations (placing a brick)


Those are kinda easy. Achievements should be challenging like I said. What about those ideas Chinchow and I laid out in the other thread?

My Ideas for Achievements:
  • "Lumber Jack" - Cutting 100 tree blocks.
  • "Light It Up" - Place 100 torches.
  • "Survivalist" - Survive the world without the use of Chest or Furnace for 50 day cycles.


Chinchow's Ideas for Achievements:
  • Lasted 50 days without dying=Living Life
  • Collected 10 lava buckets=Get it while its hot!
  • Mined 10000 stone=Massive miner
  • Mined 1000 stone=Adequate Miner
  • Mined 100 stone=Mini Miner
  • Mined 10 stone=Just entered the mine

A "Foundation" shouldn't be laying down a brick. It should be something like: Flattening a 100x100 of land.

Achievements should make players sweat for once.
the achivements sounds nice and al but aren't they a bit... too much they look more like a chore they require a lot and not a really good reward... i mean completionists might like it but the rest might not since it asks too much...

PostPosted: Sat Feb 23, 2013 12:05
by rubenwardy
[h]Version 0.1 Release[/h]

I have done enough to release it as 0.1

To register an achievement, a mod can call:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
awards.register_achievement("award_mesefind",{
     title = "First Mese Find",
     description = "Found some Mese!",
     trigger={
          type="dig",  --award is given when
          node="default:mese", --this type of node has been dug
          target=1, --this number of times
     },
})

PostPosted: Sat Feb 23, 2013 12:30
by BZab
Maybe sb could build website, on which player's achivements could be... collected(?)/showed(?)

"Ace of spades" - dig 6666 dirt nodes using wooden spade

PostPosted: Sat Feb 23, 2013 12:51
by Likwid H-Craft
I think that a cool idea BZab, but having a site, keep track of everything, it will need a custom html and all.

PostPosted: Sat Feb 23, 2013 12:56
by rubenwardy
BZab wrote:Maybe sb could build website, on which player's achivements could be... collected(?)/showed(?)


I might do something like this in the near future, but I think it would be better if I just worked on the mod for now, and make it perfect. Plus I have "minetest extensions" to work on

Likwid H-Craft wrote:I think that a cool idea BZab, but having a site, keep track of everything, it will need a custom html and all.


"custom html" is not that hard, when making Minetest websites I use minetest.net's html.

It is the server side php that is the problem.

PostPosted: Sat Feb 23, 2013 13:01
by Likwid H-Craft
So what I program ruben to make my own, or change?

PostPosted: Sat Feb 23, 2013 13:04
by rubenwardy
Likwid H-Craft wrote:So what I program ruben to make my own, or change?


All the current achievements are coded in init.lua

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
awards.register_achievement("award_mesefind",{
     title = "First Mese Find",
     description = "Found some Mese!",
     trigger={
          type="dig",  --award is given when
          node="default:mese", --this type of node has been dug
          target=1, --this number of times
     },
})

PostPosted: Sat Feb 23, 2013 13:09
by Likwid H-Craft
what about the other file? or is it fine how is...Well ok then use init.

Oh and next there should be imgs... maybe for 0.2 or 0.5

PostPosted: Sat Feb 23, 2013 13:11
by jojoa1997
I just had an awsome idea
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
awards.register_achievement("award_mesefind",{
     title = "First Mese Find",
     description = "Cheater!",
     trigger={
          type="dig",  --award is given when
          node="air", --this type of node has been dug
          target=1, --this number of times
     },
})

PostPosted: Sat Feb 23, 2013 13:15
by rubenwardy
Likwid H-Craft wrote:what about the other file? or is it fine how is...Well ok then use init.

Oh and next there should be imgs... maybe for 0.2 or 0.5


If you want to add an image, add

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
image = "name",


after

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
description = "Found some Mese!",


There is no way to render the images on the screen, but when there is, image="name" will be used.

http://forum.minetest.net/viewtopic.php?id=4168

PostPosted: Sat Feb 23, 2013 14:47
by rubenwardy
I have added some "real" achievements

  • "Lumber Jack" - Cutting 100 tree blocks.
  • "Light It Up" - Place 100 torches.
  • "Master Miner" - Mined 10000 stone
  • "Hardened Miner" - Mined 1000 stone
  • "Mini Miner" - Mined 100 stone
  • "Just entered the mine" - Mined 10 stone

and deleted the foundation achievement

PostPosted: Sat Feb 23, 2013 15:06
by Likwid H-Craft
Yeah only if we, can make a hidden craft achievement, form making a item, that don't show in list, but I think we can't yet.

PostPosted: Sat Feb 23, 2013 15:15
by rubenwardy
[h]Version 0.2 Released[/h]

API additions

  • onDeath counter

Added achievements:

  • "Lumber Jack" - Cutting 100 tree blocks.
  • "Light It Up" - Place 100 torches.
  • "Master Miner" - Mined 10000 stone
  • "Hardened Miner" - Mined 1000 stone
  • "Mini Miner" - Mined 100 stone
  • "Just entered the mine" - Mined 10 stone
  • "First death" - die once

PostPosted: Sat Feb 23, 2013 15:36
by Likwid H-Craft
Some I did :)

[h]Fire Achievements 0.1[/h]

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
-- First Fire
awards.register_achievement("award_fire1",{
    title = "First Fire",
    description = "You have start yours first fire.",
    trigger={
        type="place",
        node="fire:basic_flame",
        target=1,
    },
})

-- 100 Fire Starter
awards.register_achievement("award_fire2",{
    title = "100 Fire Starter",
    description = "You have started 100 fires...BURN!",
    trigger={
        type="place",
        node="fire:basic_flame",
        target=100,
    },
})

-- Set the world on Fire.
awards.register_achievement("award_fire3",{
    title = "Set the world on Fire.",
    description = "You have started 1000000000 fires...BURN BABY BURN!",
    trigger={
        type="place",
        node="fire:basic_flame",
        target=1000000000,
    },
})


Only if there was way, can make it when water placed and take out fire, will give you a Achievement.

PostPosted: Sat Feb 23, 2013 16:00
by rubenwardy
Likwid H-Craft wrote:Some I did :)

[h]Fire Achievements 0.1[/h]

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
...


Only if there was way, can make it when water placed and take out fire, will give you a Achievement.


None of the achievements you gave would work as the player can not dig or craft fire:basic_flame

PostPosted: Sat Feb 23, 2013 16:31
by Likwid H-Craft
That why, I made a, you can craft fire:basic_flame, with the default_scorched_stuff

PostPosted: Sat Feb 23, 2013 17:02
by rubenwardy
[h]Achievements Added[/h]

  • "omg, nyan cat!" - find a nyan cat
  • "You're a witch!" - burn to death in a fire

PostPosted: Sat Feb 23, 2013 17:50
by Chinchow
Is there a craft counter? Like how many things you've crafted

PostPosted: Sun Feb 24, 2013 00:39
by Gambit
Linxx wrote:the achivements sounds nice and al but aren't they a bit... too much they look more like a chore they require a lot and not a really good reward... i mean completionists might like it but the rest might not since it asks too much...


There suppose to be chores. You don't get a college degree without working hard.

I've mention before in the old days of gaming; awards weren't given to you on a silver platter like they do today. They were difficult to accomplish. And it's those difficult task what makes those games remember-able.

I know pc gamers like being spoiled with simple task and such, but the harder the achievements, the longer the game can be.