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

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

pls fix this

User avatar
Evergreen
Member
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen
Location: A forest in the midwest
Contact:

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

by Evergreen » Post

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

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

by rubenwardy » Post

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

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

0.5 Released!

by rubenwardy » Post

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

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

Cheers

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

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

by rubenwardy » Post

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

Work perfectly, thank you

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

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

by jp » Post

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

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

by rubenwardy » Post

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

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: 940
Joined: Tue Aug 05, 2014 14:09
GitHub: MinetestForFun
IRC: MinetestForFun
In-game: MinetestForFun
Location: On earth
Contact:

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

by Minetestforfun » Post

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

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

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

by rubenwardy » Post

You can also give multiple items

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

User avatar
Minetestforfun
Member
Posts: 940
Joined: Tue Aug 05, 2014 14:09
GitHub: MinetestForFun
IRC: MinetestForFun
In-game: MinetestForFun
Location: On earth
Contact:

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

by Minetestforfun » Post

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

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

by rubenwardy » Post

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

User avatar
Minetestforfun
Member
Posts: 940
Joined: Tue Aug 05, 2014 14:09
GitHub: MinetestForFun
IRC: MinetestForFun
In-game: MinetestForFun
Location: On earth
Contact:

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

by Minetestforfun » Post

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

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

by rubenwardy » Post

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: 940
Joined: Tue Aug 05, 2014 14:09
GitHub: MinetestForFun
IRC: MinetestForFun
In-game: MinetestForFun
Location: On earth
Contact:

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

by Minetestforfun » Post

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

im-poke
Member
Posts: 1084
Joined: Sat Apr 18, 2015 15:50
IRC: poke
In-game: poke
Location: Somewhere in the Universe, on a weird planet called Earth/

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

by im-poke » Post

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

LNJ
Member
Posts: 251
Joined: Tue Sep 23, 2014 16:02
GitHub: lnjX
IRC: LNJ
In-game: LNJ
Location: Europe/Berlin

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

by LNJ » Post

Which license have got the textures?
Storage Drawers - The simplest item storage in Minetest

User avatar
azekill_DIABLO
Member
Posts: 7497
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

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

by azekill_DIABLO » Post

adding it to my subgame!

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

Re: [Mod] Achievements [2.0] [awards] – nicer API

by rubenwardy » Post

Awards 2.0 Released!

New Features
  • Craft trigger
  • 2 new secret awards
  • Add intlib support (no languages yet)
API
  • awards.register_api
  • Refactor awards.give_achievement, and rename to awards.unlock
  • register_on_unlock and on_unlock

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

Re: [Mod] Achievements [2.1] [awards] – nicer API

by rubenwardy » Post

Awards 2.1.1 Released!

Bug fixes
  • Fix exiting of awards.unlock if a prize is unknown
API
  • awards.run_trigger_callbacks
  • awards.increment_item_counter
It's now even easier to make triggers.

Example Trigger

Here is a trigger you could define in another mod:

Code: Select all

awards.register_trigger("punch", function(def)
	local tmp = {
		award  = def.name,
		node   = def.trigger.node,
		target = def.trigger.target
	}
	table.insert(awards.on.punch, tmp)
end)
minetest.register_on_punchnode(function(pos, node, puncher)
	if not puncher or not pos or not node or not puncher:get_player_name() or puncher:get_player_name()=="" then
		return
	end
	local data = awards.players[puncher:get_player_name()]

	-- Increment the punch counter for this node
	if not awards.increment_item_counter(data, "punch", node.name) then
		return
	end

	-- Check to see if any awards have been unlocked
	awards.run_trigger_callbacks(puncher, data, "punch", function(entry)
		if entry.node and entry.target then
			local tnodedug = string.split(entry.node, ":")
			local tmod = tnodedug[1]
			local titem = tnodedug[2]
			if not tmod or not titem or not data.punch[tmod] or not data.punch[tmod][titem] then
				-- table running failed!
			elseif data.punch[tmod][titem] > entry.target-1 then
				return entry.award
			end
		end
	end)
end)

User avatar
cHyper
Member
Posts: 866
Joined: Fri May 06, 2011 08:49
GitHub: cHyper-0815OL
IRC: cHyper
In-game: cHyper cHyper_0815
Location: Austria
Contact:

Re: [Mod] Achievements [2.1.1] [awards] – nicer API

by cHyper » Post

what about player data?
how can I see the information on the screen?

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 10 guests