[Mod] Awards / Achievements [3.2.0] [awards]

User avatar
hoodedice
Member
Posts: 1374
Joined: Sat Jul 06, 2013 06:33
GitHub: hoodedice
IRC: hoodedice
In-game: hoodedice
Location: world
Contact:

by hoodedice » Post

I am in need of a system that can give an achievement on_player_location. Can you do that, rubenwardy?
7:42 PM - Bauglio: I think if you go to staples you could steal firmware from a fax machine that would run better than win10 does on any platform
7:42 PM - Bauglio: so fudge the stable build
7:43 PM - Bauglio: get the staple build

User avatar
rubenwardy
Moderator
Posts: 6969
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

by rubenwardy » Post

The easy way would be to implement support in privareas for this mod.

The longer way would to be to write a new trigger for on_player_location.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
hoodedice
Member
Posts: 1374
Joined: Sat Jul 06, 2013 06:33
GitHub: hoodedice
IRC: hoodedice
In-game: hoodedice
Location: world
Contact:

by hoodedice » Post

rubenwardy wrote:The easy way would be to implement support in privareas for this mod.

The longer way would to be to write a new trigger for on_player_location.
If only I knew how exactly to implement that...
7:42 PM - Bauglio: I think if you go to staples you could steal firmware from a fax machine that would run better than win10 does on any platform
7:42 PM - Bauglio: so fudge the stable build
7:43 PM - Bauglio: get the staple build

User avatar
BrunoMine
Member
Posts: 1082
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine
Location: SP-Brasil
Contact:

by BrunoMine » Post

I believe that you should create a prettier interface. Something like a book of adventure, in which the player can see a description of their duties. Only acro would be a good idea.
My small square universe under construction ... Minemacro
Comunidade Minetest Brasil
www.minetestbrasil.com

1704626
Member
Posts: 87
Joined: Thu Jan 02, 2014 22:52
Location: mushroom biome

by 1704626 » Post

U SHOULD ADD CUTCENES TO THIS MOD
PS DID U HEAR ABOUT THE RE ADDED DUNGEON MASTER U SHOULD MAKE A ACHIEVEMENT FOR SLAYING IT
Just Call Me Numbers

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

by 4aiman » Post

I made this while being absent.

User avatar
rubenwardy
Moderator
Posts: 6969
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: [Mod] Achievements [0.3] [awards]

by rubenwardy » Post

0.4 Released

Image

This is the first half of my coding sprint. Tomorrow I will release more changes.

New Features
  • Awards menu listing all awards.
New Awards
  • Join a server.
  • First Word - use the chat to talk to other players.
API Changes
  • Added on chat trigger.
  • Added on join trigger.
  • Added support for secret mods (hidden in awards list until unlocked).
  • Added support for creating triggers outside the mod.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

robotest
Member
Posts: 11
Joined: Tue Jul 23, 2013 00:12

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

by robotest » Post

I get this error when i try to click on another achievement in the list:

Code: Select all

21:10:03: ERROR[main]: ServerError: ...minetest-0.4.9\bin\..\games\robotest\mods\awards/api.lua:415: attempt to call field 'explode_textlist_event' (a nil value)
21:10:03: ERROR[main]: stack traceback:
21:10:03: ERROR[main]: 	...minetest-0.4.9\bin\..\games\robotest\mods\awards/api.lua:415: in function <...minetest-0.4.9\bin\..\games\robotest\mods\awards/api.lua:406>
21:10:03: ERROR[main]: 	...st-0.4.7\minetest-0.4.9\bin\..\builtin/misc_register.lua:330: in function <...st-0.4.7\minetest-0.4.9\bin\..\builtin/misc_register.lua:318>

bajanhgk
Member
Posts: 75
Joined: Sun Apr 06, 2014 16:31
In-game: bajanhgk
Location: The World Of Darkness

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

by bajanhgk » Post

rubenwardy wrote:First mese find - dig 1 mese
Just a Loner In the Winds which Blow Endlessly towards Death

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

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

by 4aiman » Post

Neat :)
Any chance prerequisites would be shown?

User avatar
Krock
Developer
Posts: 4648
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

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

by Krock » Post

robotest wrote:I get this error when i try to click on another achievement in the list:

Code: Select all

21:10:03: ERROR[main]: ServerError: ...minetest-0.4.9\bin\..\games\robotest\mods\awards/api.lua:415: attempt to call field 'explode_textlist_event' (a nil value)
21:10:03: ERROR[main]: stack traceback:
21:10:03: ERROR[main]: 	...minetest-0.4.9\bin\..\games\robotest\mods\awards/api.lua:415: in function <...minetest-0.4.9\bin\..\games\robotest\mods\awards/api.lua:406>
21:10:03: ERROR[main]: 	...st-0.4.7\minetest-0.4.9\bin\..\builtin/misc_register.lua:330: in function <...st-0.4.7\minetest-0.4.9\bin\..\builtin/misc_register.lua:318>
viewtopic.php?p=140109#p140109

EDIT: I invested my 1000th post for you!
Last edited by Krock on Sat May 03, 2014 17:46, edited 1 time in total.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
rubenwardy
Moderator
Posts: 6969
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

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

by rubenwardy » Post

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.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
kaeza
Moderator
Posts: 2162
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza
Location: Montevideo, Uruguay
Contact:

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

by kaeza » Post

Request: Use HUD instead of Formspecs.
Suppose you are struggling with a vombie, or worse, a DM, and you place your 100th torch...
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal

User avatar
webdesigner97
Member
Posts: 1328
Joined: Mon Jul 30, 2012 19:16
GitHub: webD97
IRC: webdesigner97
In-game: webdesigner97
Location: Cologne, Germany
Contact:

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

by webdesigner97 » Post

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...
Achievement unlocked: "But I was reading this form!" - Die while reading a formspec :D

User avatar
rubenwardy
Moderator
Posts: 6969
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

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

by rubenwardy » Post

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.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

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

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

by minermoder27 » Post

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

User avatar
Calinou
Moderator
Posts: 3169
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou
Location: Troyes, France
Contact:

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

by Calinou » Post

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 » Post

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
Moderator
Posts: 6969
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

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

by rubenwardy » Post

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:

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:

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:

Code: Select all

trigger = {
	type = "place",
	node = "default:torch",
	target = 100
}
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

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

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

by 4aiman » Post

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: 354
Joined: Wed May 08, 2013 08:26
GitHub: Amaz1
IRC: Amaz
In-game: Amaz

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

by Amaz » Post

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
Moderator
Posts: 6969
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

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

by rubenwardy » Post

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:

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.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
Pitriss
Member
Posts: 254
Joined: Mon Aug 05, 2013 17:09
GitHub: Pitriss
IRC: pitriss
In-game: pitriss
Location: Czech republic, Bohumin

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

by Pitriss » Post

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 » Post

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 » Post

fix this its not working

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 13 guests