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

Methacrylon
New member
Posts: 3
Joined: Sun Jun 03, 2018 11:15

Re: [Mod] Achievements [3.1.0] [awards] – Rewritten, Sorting

by Methacrylon » Post

Yes, I can do that. Just let me know how I can do a PR (I never did it before x) )

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 [3.1.0] [awards] – Rewritten, Sorting

by rubenwardy » Post

3.2.0 released!

New Features

Added support for groups in triggers
Added award difficulty multipler - used to make Dig 1x Nyancat below Dig 10 dirt in awards list

Bug Fixes

Fixed convert_data crash when craft data is missing (heavygale)

Misc

Rewrote documentation
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

EdShouldBeInBed
Member
Posts: 48
Joined: Sun Feb 22, 2015 16:03
In-game: EdShdBInBed

Re: [Mod] Achievements [3.2.0] [awards] – group support

by EdShouldBeInBed » Post

Rubenwardy, would there be a way to tie an achievement to giving players an item? IE, they place ten Quarries, they get a technic world anchor (random idea, not intended use case). I know there was a quest mod in development, but I'm not sure if it's still active.
I'm a writer who tinkers with code on occasion. I play minetest when insomnia makes the writing hard.

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 [3.2.0] [awards] – group support

by rubenwardy » Post

Yes, awards can have prizes - items the player is given when they unlock the award
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
BuckarooBanzay
Member
Posts: 435
Joined: Tue Apr 24, 2018 05:58
GitHub: BuckarooBanzay
IRC: BuckarooBanzai
In-game: BuckarooBanzai

Re: [Mod] Achievements [3.2.0] [awards] – group support

by BuckarooBanzay » Post

EdShouldBeInBed wrote:Rubenwardy, would there be a way to tie an achievement to giving players an item? IE, they place ten Quarries, they get a technic world anchor (random idea, not intended use case). I know there was a quest mod in development, but I'm not sure if it's still active.
You mean: viewtopic.php?f=11&t=20125?
¯\_(ツ)_/¯ Not active here anymore, contact me on the minetest discord, irc, lemmy or github (for programming issues)

User avatar
Linuxdirk
Member
Posts: 3216
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] Achievements [3.2.0] [awards] – group support

by Linuxdirk » Post

Is there an on_use counter? A player needs to use a defined tool X times to get the achievement.

User avatar
davidthecreator
Member
Posts: 452
Joined: Mon Aug 18, 2014 19:48
GitHub: daviddoesminetest
In-game: DavidDoesMinetest
Location: Lithuania

Re: [Mod] Achievements [2.3] [awards] – UI support, more awa

by davidthecreator » Post

christoferlevich wrote:
rubenwardy wrote:See prizes, it allows you to give items
So I see it - I've looked and test it - but I am failing to properly activate prizes :(
Did you try something like:


awards.register_award("awards_awdname", {
title = S("title"),
prizes = {
"mod:item 1",
},

description = S("do something."),
icon = "mod_texture.png^awards_level1.png",
background = "awards_bg_mining.png",
difficulty = 69,
trigger = {
type = "dig",
node = "mod:some_block",
target = 1337
}
})


worked for me...

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 [3.2.0] [awards] – group support

by rubenwardy » Post

Linuxdirk wrote:Is there an on_use counter? A player needs to use a defined tool X times to get the achievement.
Not yet, but that could be added. It's very easy to add new trigger types, less than 10 lines in most cases :)

This may be an exception, however. It might be worth combing this and the eat trigger instead, and add support for multiple totals, in order to save space / reduce redundancy. So to check for food eating, you'd use the `use` trigger type with the `food` total or alike. Or simpler just uses of `group:food` instead of multiple totals, and automatically add that group to foods, idk

Edit: it's potentially difficult to find out if a particular item has an on_use which does an eat, so not so sure about this.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
poikilos
Member
Posts: 67
Joined: Thu Feb 18, 2016 13:45
GitHub: Poikilos
In-game: Poikilos

Re: [Mod] Achievements [2.3] [awards] – UI support, more awa

by poikilos » Post

xisd wrote:Hi, I made 2 new PR for the french translation. One for the translated strings and the other with formspec adjustment because french strings are longer.
(I actually did that some time ago but it was messy and I made a mistake on github that caused me to re-fork re-edit, and re-PR, so that was finally a good thing)

I also made a small mod to add a node "awards board" to open the awards window when clicked.
https://github.com/xisd/awards_board
(That was originally a fork but now it is a separate mod dependent to this one)
I have preserved this at https://gitlab.com/poikilos/awards_board since xisd is no longer on GitHub. I also pm'd him so I'll post again if he provides a new link.
:edit: xisd got back to me. Since xisd has reposted the repo to https://framagit.org/xisd-minetest/awards_board so I deleted my copy from GitLab (also since GitLab hadn't implemented e-mail anonymization yet).
Last edited by poikilos on Tue Mar 12, 2019 19:56, edited 1 time in total.

User avatar
Linuxdirk
Member
Posts: 3216
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] Achievements [3.2.0] [awards] – group support

by Linuxdirk » Post

rubenwardy wrote:Edit: it's potentially difficult to find out if a particular item has an on_use which does an eat, so not so sure about this.
So better create a counter for that and increment it in the tool's on_use code?

Chiantos
Member
Posts: 377
Joined: Sun Jan 15, 2017 09:04

Re: [Mod] Achievements [3.2.0] [awards] – group support

by Chiantos » Post

Deleted message
Last edited by Chiantos on Mon Sep 30, 2019 06:04, edited 1 time in total.

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 [3.2.0] [awards] – group support

by rubenwardy » Post

Yes, you could register a trigger to do this. I don't think it should be included with awards though
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
Wuzzy
Member
Posts: 4778
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Re: [Mod] Achievements [3.2.0] [awards] – group support

by Wuzzy » Post

You could request the makers of protection mods to add such achievements in their mod by optionally depending on the Achievements mod.

The Achievements mod is extensible, after all. I have added some achievements for some of my own mods as well (e.g. Orienteering, Easy Vending Machines, …).

hexYeah
New member
Posts: 8
Joined: Wed Dec 12, 2018 02:09
In-game: hexYeah

Re: [Mod] Achievements [3.2.0] [awards] – group support

by hexYeah » Post

awesome thank you !

User avatar
Lone_Wolf
Member
Posts: 2575
Joined: Sun Apr 09, 2017 05:50
GitHub: LoneWolfHT
IRC: LandarVargan
In-game: LandarVargan

Re: [Mod] Achievements [3.2.0] [awards] – group support

by Lone_Wolf » Post

Could you add support for taking items in a recipe from a custom inventory list? Or is this already a feature and I missed it?
My ContentDB -|- Working on CaptureTheFlag -|- Minetest Forums Dark Theme!! (You need it)

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 [3.2.0] [awards] – group support

by rubenwardy » Post

Lone_Wolf wrote:Could you add support for taking items in a recipe from a custom inventory list? Or is this already a feature and I missed it?
It's possible to register your own trigger types

Code: Select all

awards.register_trigger("custom_take", {
	type = "counted_key",
	progress = "@1/@2 taken",
	auto_description = { "Take: @2", "Take: @1×@2" },
	auto_description_total = { "Take @1 items.", "Take @1 items." },
	get_key = function(self, def)
		return minetest.registered_aliases[def.trigger.item] or def.trigger.item
	end,
	key_is_item = true,
})

minetest.register_on_something_inventory(function(pos, player, stack)
	awards.notify_custom_take(player, stack:get_name(), stack:get_count())
end)
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
Lone_Wolf
Member
Posts: 2575
Joined: Sun Apr 09, 2017 05:50
GitHub: LoneWolfHT
IRC: LandarVargan
In-game: LandarVargan

Re: [Mod] Achievements [3.2.0] [awards] – group support

by Lone_Wolf » Post

rubenwardy wrote:
Lone_Wolf wrote:Could you add support for taking items in a recipe from a custom inventory list? Or is this already a feature and I missed it?
It's possible to register your own trigger types

Code: Select all

awards.register_trigger("custom_take", {
	type = "counted_key",
	progress = "@1/@2 taken",
	auto_description = { "Take: @2", "Take: @1×@2" },
	auto_description_total = { "Take @1 items.", "Take @1 items." },
	get_key = function(self, def)
		return minetest.registered_aliases[def.trigger.item] or def.trigger.item
	end,
	key_is_item = true,
})

minetest.register_on_something_inventory(function(pos, player, stack)
	awards.notify_custom_take(player, stack:get_name(), stack:get_count())
end)
Whoops. I seem to have posted in the wrong topic. I've been using both this mod and your crafting one in a game I'm working on. Must have confused the names somehow.
I'll move my question to the correct topic. Sorry for wasting your time
My ContentDB -|- Working on CaptureTheFlag -|- Minetest Forums Dark Theme!! (You need it)

makayabou
New member
Posts: 1
Joined: Mon Feb 04, 2019 21:08
GitHub: makayabou
In-game: makayabou

Re: [Mod] Achievements [3.2.0] [awards] – group support

by makayabou » Post

Hello,
first thing, thanks for all your work on minetest, it's a great pedagogical tool that we use in workshops with children.
Is it possible to selectively enable|disable specific awards for a player?
If not, would you give me a hint to try to patch it?
Thank you !

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

Re: [Mod] Achievements [3.2.0] [awards] – group support

by sirrobzeroone » Post

Sort of replacing my post after forum down time.

Image

Added award images for each of the current awards and made some very minor tweaks to the code to support 32x32px images rather than 16x16px.

Pull request created - https://github.com/rubenwardy/awards/pull/77
Attachments
awards_example.png
awards_example.png (159.63 KiB) Viewed 1408 times

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

Re: [Mod] Achievements [3.2.0] [awards] – group support

by texmex » Post

Those award images are brilliant.

u34

Re: [Mod] Achievements [3.2.0] [awards] – group support

by u34 » Post

texmex wrote:Those award images are brilliant.
me tooooo.. greatttt idea! small logos for achievements!! so long

OSS : when its done ;-)

User avatar
Wuzzy
Member
Posts: 4778
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Re: [Mod] Achievements [3.2.0] [awards] – group support

by Wuzzy » Post

I'm … I'm impressed.

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

Re: [Mod] Achievements [3.2.0] [awards] – group support

by texmex » Post

Can you become our new artist in residence, sirrobzeroone? :)

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: [Mod] Achievements [3.2.0] [awards] – group support

by runs » Post

Oh i did not know about this mod. I will use it.

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: [Mod] Achievements [3.2.0] [awards] – group support

by runs » Post

How to create a custom trigger?

Specifically how can I construct the on_register callback?
awards.register_on_TRIGGERTYPE(func(player, data))

Any idea?

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 11 guests