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

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

User avatar
Evergreen
Member
 
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
Location: A forest in the midwest
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
Moderator
 
Posts: 5494
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
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
Moderator
 
Posts: 5494
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
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
 

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

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

User avatar
jp
Member
 
Posts: 707
Joined: Wed Dec 18, 2013 09:03
Location: France
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.
[Mods] Crafting GuideSpectator ModeX-Decor[+]
[Maps] New York CityMinecraft Imported Maps
[Textures] PixelBOX Reloaded

Like my stuff? Consider donating.
 

User avatar
rubenwardy
Moderator
 
Posts: 5494
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
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
Location: On earth
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
Moderator
 
Posts: 5494
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
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
Location: On earth
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
Moderator
 
Posts: 5494
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
 

User avatar
Minetestforfun
Member
 
Posts: 936
Joined: Tue Aug 05, 2014 14:09
Location: On earth
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
Moderator
 
Posts: 5494
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
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
Location: On earth
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: 1084
Joined: Sat Apr 18, 2015 15:50
Location: Somewhere in the Universe, on a weird planet called Earth/
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
 

User avatar
LNJ
Member
 
Posts: 245
Joined: Tue Sep 23, 2014 16:02
Location: Germany
GitHub: LNJ2
IRC: LNJ2GO
In-game: LNJ

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

by LNJ » Tue Mar 29, 2016 10:11

Which license have got the textures?
Storage Drawers - The simplest item storage method in Minetest | My Minetest Modding Tutorials (German) | #ComeToTheDuckSide - we have privacy! | diaspora* - The free and decentralized alternative to facebook and twitter!
Please inform me of all grammar / spelling issues in my posts! - I want to improve my English skills. :)
 

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

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

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

by rubenwardy » Fri Jul 29, 2016 15:42

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

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

by rubenwardy » Fri Jul 29, 2016 16:44

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: 755
Joined: Fri May 06, 2011 08:49
Location: Austria
GitHub: cHyper-0815OL
IRC: cHyper
In-game: cHyper

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

by cHyper » Fri Jul 29, 2016 19:56

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

PreviousNext

Return to Mod Releases



Who is online

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