Page 1 of 1

how to?[SOLVED]

PostPosted: Thu Mar 03, 2016 17:11
by azekill_DIABLO
How to use give_initial_stuff please?

Re: how to?

PostPosted: Thu Mar 03, 2016 17:20
by oleastre
If you just want to get the default items in your inventory while using minetes game, you just need to add the following line in your`minetest.conf file:

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
give_initial_stuff = true

Re: how to?

PostPosted: Fri Mar 04, 2016 11:47
by azekill_DIABLO
ah, it's so simple? thanks!

Re: how to?

PostPosted: Fri Mar 04, 2016 17:31
by azekill_DIABLO
I don't have that in my folder i have
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
minetest.register_on_newplayer(function(player)
   --print("on_newplayer")
   if minetest.setting_getbool("give_initial_stuff") then
      minetest.log("action", "Giving initial stuff to player "..player:get_player_name())
      player:get_inventory():add_item('main', 'default:pick_mese')
      player:get_inventory():add_item('main', 'default:torch 99')
      player:get_inventory():add_item('main', 'default:axe_mese')
      player:get_inventory():add_item('main', 'default:shovel_mese')
      player:get_inventory():add_item('main', 'default:cobble 99')
   end
end)



i already modified 1 or 2 things :) like the items name

Re: how to?

PostPosted: Fri Mar 04, 2016 18:21
by Gael de Sailly
No, do not modify here. You should have a file called "minetest.conf" in the main folder of Minetest, not in the mod. And that's in this file that you should add "give_initial_stuff = true".

If you want to restore the initial code in init.lua, it's here.

Re: how to?

PostPosted: Sat Mar 05, 2016 11:15
by azekill_DIABLO
thanks