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

User avatar
minermoder27
Member
 
Posts: 127
Joined: Wed Nov 20, 2013 23:24
GitHub: ZNixian
In-game: minermoder27

Re: [Mod] Achievements [0.4] [awards] - awards menu

by minermoder27 » Mon May 05, 2014 20:42

I have some code that can display awards in a tree, and can find that code for you if you like
 

User avatar
Calinou
Member
 
Posts: 3124
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou

Re: [Mod] Achievements [0.4] [awards] - awards menu

by Calinou » Tue May 06, 2014 09:21

Carbone implemented this mod, with added achievements and fixes, feel free to take the changes.

https://github.com/Calinou/carbone/tree ... ods/awards
 

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

Re: [Mod] Achievements [0.4] [awards] - awards menu

by 4aiman » Tue May 06, 2014 22:11

rubenwardy wrote:
4aiman wrote:Neat :)
Any chance prerequisites would be shown?


A progress bar will be added in the next version, but the description should explain what to do.


What I've meant is a way to show a map of achievements of some sort. Like in my version one have to have "Upgrade2" to be able to receive "Upgrade3".

rubenwardy wrote:
kaeza wrote:Request: Use HUD instead of Formspecs.
Suppose you are struggling with a vombie, or worse, a DM, and you place your 100th torch...


When I made this mod, there were no such things as HUD elements. But I will add them soon.

Noooo!!! That'll ruin my fork!!!....
Just kidding, I owe you big time.
I'll be glad to see this develop.

Does your custom triggers support timer-triggered events?
What I mean is the ability to create achievement that'll be unlocked ANYTIME a modder want. Say, I pick up an uranium lump. I't MY duty to start the timer. But is it possible to give an award for a player when MY timer hits some time I have chosen?
Can I use smth like give_award(player, 'Hulk SmAaAAaaaSh!!!')?
Like having some item in the inventory, say, uranium, would)
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: [Mod] Achievements [0.4] [awards] - awards menu

by rubenwardy » Wed May 07, 2014 07:56

4aiman wrote:What I've meant is a way to show a map of achievements of some sort. Like in my version one have to have "Upgrade2" to be able to receive "Upgrade3".


Oh, I see. That is an interesting idea. Currently, you can unlock any achievement as long as you fullfil the requirements. I can functionality that only unlocks an award when a specified set of awards are all unlocked.

For example:
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_mine3",{
   title = S("Hardened Miner"),
   description = S("You have dug 1000 stone blocks"),
   icon = "miniminer.png",
   background = "bg_mining.png",
   requires = {"award_mine1", "award_mine2"},
   trigger = {
      type = "dig",
      node = "default:stone",
      target = 1000
   }
})


As for displaying this, the awards could be grouped together and only the newest/best awards shown. Or it could be in a tree view like the mod manager. Or it could be in a graphical tree, but that would be hard to do.

4aiman wrote:Does your custom triggers support timer-triggered events?
What I mean is the ability to create achievement that'll be unlocked ANYTIME a modder want. Say, I pick up an uranium lump. I't MY duty to start the timer. But is it possible to give an award for a player when MY timer hits some time I have chosen?
Can I use smth like give_award(player, 'Hulk SmAaAAaaaSh!!!')?
Like having some item in the inventory, say, uranium, would)


You can use:

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.give_achievement(name, award)


Where name is the player name, and award is the achievement name. This allows you to register your own triggers.

Also, in order to register table triggers, you can use this: https://github.com/rubenwardy/awards/bl ... pi.lua#L76
The code explains it in a comment.

A table trigger:

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
trigger = {
   type = "place",
   node = "default:torch",
   target = 100
}
 

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

Re: [Mod] Achievements [0.4] [awards] - awards menu

by 4aiman » Wed May 07, 2014 10:49

Aha.. Thanks!
Now I can throw my version away :)

Showing the last one achieved sounds good for me. This way achievements may be not just a list of, well, achievements, but some sort of help to distinguish different ranks:
killed 1 mob = awarded "Soldier"
killed 10 mobs = awarded "Lieutenant"
killed 100 mobs = you're a "General"
killed 1000 mobs = you're a "Commander-in-Chief"
Or smth like this.

Just one more little question: I've looked through the code and feel unsure about this:
Say, I want to add on_craft trigger...
There's no such type of triggers. So, table ones won't do. Am I to use awards.give_achievement() wrapped by my code in my mod?

Other than this, I have to try this new version to be able to ask the right questions for anything else I'm not sure about, I guess.
Great work, rubenwardy! Regards!
 

Amaz
Member
 
Posts: 328
Joined: Wed May 08, 2013 08:26
GitHub: Amaz1
IRC: Amaz
In-game: Amaz

Re: [Mod] Achievements [0.4] [awards] - awards menu

by Amaz » Sat May 17, 2014 21:42

Have you thought about adding support for groups in various awards? For group:wood for one maybe?
And also, what about a craft award? And is their a way to add a way for killing mobs?
I could try to implement the first myself... Sorry for all of the requests!
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: [Mod] Achievements [0.4] [awards] - awards menu

by rubenwardy » Sun May 18, 2014 15:46

Amaz wrote:Have you thought about adding support for groups in various awards? For group:wood for one maybe?
And also, what about a craft award? And is their a way to add a way for killing mobs?
I could try to implement the first myself... Sorry for all of the requests!


I could do that. It would complicate the code. I might have to add a function like:

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.watch_node( group or itemname )


to save space in the recording tables. (Don't count if no awards use it).


About the mobs, you could add it. Not sure about the simple mobs or mobf side of it, though.
 

User avatar
Pitriss
Member
 
Posts: 253
Joined: Mon Aug 05, 2013 17:09
GitHub: Pitriss
IRC: pitriss
In-game: pitriss

Re: [Mod] Achievements [0.4] [awards] - awards menu

by Pitriss » Tue May 20, 2014 06:06

Maybe you can add archivements based on time online?
 

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

Re: [Mod] Achievements [0.4] [awards] - awards menu

by 4aiman » Tue May 20, 2014 07:46

Pitriss wrote:Maybe you can add archivements based on time online?

I think the best way is to depend on Rubenwardy's awards to do things like that.
How 'bout separating API from all achievements? I mean 2 separate mods in a single modpack.
Then the part with achievements only could use a few github pushes.
 

Thedarksoldier
New member
 
Posts: 8
Joined: Mon May 26, 2014 11:12
In-game: subham

Re: [Mod] Achievements [0.4] [awards] - awards menu

by Thedarksoldier » Mon May 26, 2014 12:09

fix this its not working
 

Thedarksoldier
New member
 
Posts: 8
Joined: Mon May 26, 2014 11:12
In-game: subham

Re: [Mod] Achievements [0.4] [awards] - awards menu

by Thedarksoldier » Mon May 26, 2014 12:24

pls fix this
 

User avatar
Evergreen
Member
 
Posts: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

Re: [Mod] Achievements [0.4] [awards] - awards menu

by Evergreen » Mon May 26, 2014 13:21

Thedarksoldier wrote:fix this its not working

Listen, how do you expect someone to fix something if you give no information as to what is wrong. Give us some info as to what is not working.
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: [Mod] Achievements [0.4] [awards] - awards menu

by rubenwardy » Mon May 26, 2014 15:22

Thedarksoldier wrote:fix this its not working


I can't fix anything if I do not know what is wrong

  • Does it crash?
    • Copy the last 20 lines of debug.txt into this topic
    • Explain what you were doing at the time
  • Does it just not work, no crashes?
    • Type /mods in to the chat, and look for "awards". If it is not there, then you have not installed it correctly.
    • If it is there, explain what it is not doing properly.
 

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

Re: [Mod] Achievements [0.4] [awards] - awards menu

by 4aiman » Wed May 28, 2014 08:05

Thedarksoldier wrote:fix this its not working

You're probably new here.
Please, post the console output after "Error from lua".
Also describe what isn't working in particular.
Regards!

Edit: How can I delete my message? Firefox's cache fooled me into thinking there were no answers...
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

0.5 Released!

by rubenwardy » Fri Sep 26, 2014 18:58

0.5 Released!


License has changed to GPL 3.0 or later.
  • Use HUD instead of formspec
  • Back port awards from Calinou's Carbone/Awards
  • Remove pointlessly easy awards or make them harder
  • Add API support for players receiving prizes, such as blocks and items, when unlocking awards (not currently used by any awards)

Image
Last edited by rubenwardy on Fri Sep 26, 2014 19:57, edited 7 times in total.
 

MaxPower
Member
 
Posts: 30
Joined: Wed Sep 24, 2014 17:25

Re: [Mod] Achievements [0.5] [awards] – HUD

by MaxPower » Fri Sep 26, 2014 19:27

Cool I was just mentioning it earlier today :D
https://forum.minetest.net/viewtopic.php?f=15&t=9033&start=100#p155616

Cheers
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: [Mod] Achievements [0.5] [awards] – HUD

by rubenwardy » Fri Sep 26, 2014 19:32

Calinou brought it to my attention, which is why I updated it.
 

MaxPower
Member
 
Posts: 30
Joined: Wed Sep 24, 2014 17:25

Re: [Mod] Achievements [0.5] [awards] – HUD

by MaxPower » Sat Sep 27, 2014 10:06

Work perfectly, thank you
 

User avatar
jp
Member
 
Posts: 705
Joined: Wed Dec 18, 2013 09:03
GitHub: kilbith

Re: [Mod] Achievements [0.5] [awards] – HUD

by jp » Sat Sep 27, 2014 18:27

Just an idea : a gift added in the invo on each achievement reached.

Examples :

- Dug 1.000 stones ("Miner Beginner") -> Mese Pickaxe.
- Dug 10.000 stones ("Pro Miner") -> Diamond Pickaxe.
- Dug 50.000 stones ("Legendary Miner") -> Diamond Block.

etc.

EDIT : already in the TODO, sorry.
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: [Mod] Achievements [0.5] [awards] – HUD

by rubenwardy » Sat Sep 27, 2014 20:52

Gift support has been added in 0.5. It is called prizes. No awards give prizes ATM, but it as simple as adding this to an award definition:

prizes = {"default:stone 99"}

Giving tools is quite a good idea.
 

MTDad
Member
 
Posts: 53
Joined: Fri Aug 29, 2014 05:38

Re: [Mod] Achievements [0.5] [awards] – HUD

by MTDad » Sat Sep 27, 2014 21:52

Thank you for this!
I think my kids are going to love this one. I'm already plugging in prizes for them to win.
 

User avatar
Minetestforfun
Member
 
Posts: 936
Joined: Tue Aug 05, 2014 14:09
GitHub: Darcidride
IRC: Darcidride + MinetestForFun
In-game: Darcidride + MinetestForFun

Re: [Mod] Achievements [0.5] [awards] – HUD

by Minetestforfun » Sun Sep 28, 2014 12:20

Hi rubenwardy,

Thank you for your mod and for your work with HUD,
i meet a syntax problem with the "prizes = {"default:stone 99"}" line,
Can you give me an example for a full award ?
Can i give other prizes like :
- "prizes = {"moreblocks:super_glow_glass"}
- "prizes = {"maptools:superapple"}
- etc...
?
 

MTDad
Member
 
Posts: 53
Joined: Fri Aug 29, 2014 05:38

Re: [Mod] Achievements [0.5] [awards] – HUD

by MTDad » Sun Sep 28, 2014 18:20

minetestforfun, don't forget the comma. I always forget the comma and have to go back after it fails to load.

For example I plugged " prizes = {"homedecor:trophy 1"}, " into the "dying spree" award. I think you can use anything you want from any mod you run, only trouble would come if you later disable a mod that had an item as a prize.
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: [Mod] Achievements [0.5] [awards] – HUD

by rubenwardy » Sun Sep 28, 2014 18:41

You can also give multiple items

prizes = {"default:stone 99", "default:mese", "default:nyancat"},
 

User avatar
Minetestforfun
Member
 
Posts: 936
Joined: Tue Aug 05, 2014 14:09
GitHub: Darcidride
IRC: Darcidride + MinetestForFun
In-game: Darcidride + MinetestForFun

Re: [Mod] Achievements [0.5] [awards] – HUD

by Minetestforfun » Sun Sep 28, 2014 19:26

Thank you for your answers, i had forget one comma, my bad :/...

for prizes, Items from other mods are possible ? (maptools / moreblocks / etc ?)
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: [Mod] Achievements [0.5] [awards] – HUD

by rubenwardy » Sun Sep 28, 2014 19:28

Any items can be used. It is just an item string/code.
 

User avatar
Minetestforfun
Member
 
Posts: 936
Joined: Tue Aug 05, 2014 14:09
GitHub: Darcidride
IRC: Darcidride + MinetestForFun
In-game: Darcidride + MinetestForFun

Re: [Mod] Achievements [0.5] [awards] – HUD

by Minetestforfun » Sun Sep 28, 2014 20:50

After many try, everything work for "default" prizes, but with prizes from this mods :
- prizes = {"moreblocks:super_glow_glass 5"},
- prizes = {"maptools:superapple"}
- prizes = {"maptools:superapple 2"}
- prizes = {"maptools:superapple 10"}
- prizes = {"bucket:bucket_water"}

It doesn't work, maybe my code isn't good ? Please, can you check ?
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: [Mod] Achievements [0.5] [awards] – HUD

by rubenwardy » Sun Sep 28, 2014 22:09

It uses the code copied from /giveme to do the prices. if you can do /giveme to those items, it should work.
 

User avatar
Minetestforfun
Member
 
Posts: 936
Joined: Tue Aug 05, 2014 14:09
GitHub: Darcidride
IRC: Darcidride + MinetestForFun
In-game: Darcidride + MinetestForFun

Re: [Mod] Achievements [0.5] [awards] – HUD

by Minetestforfun » Sun Sep 28, 2014 22:31

i can giveme this items but, it doesn't work with the mod awards...
"/giveme maptools:superapple 10" work fine...
 

im-poke
Member
 
Posts: 1042
Joined: Sat Apr 18, 2015 15:50
IRC: poke
In-game: poke

Re: [Mod] Achievements [0.5] [awards] – HUD

by im-poke » Tue Dec 22, 2015 19:07

noob
place 100000 blocks of leaf
ARE YOU A NYAN CAT?????
--ABJ
 

PreviousNext

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 15 guests

cron