Players to have initial items?

Post Reply
MykieDoesStuff
Member
Posts: 136
Joined: Sat Aug 16, 2014 02:44

Players to have initial items?

by MykieDoesStuff » Post

How do I make the players who join the server first time to have initial items?
For fast response... send me a PM

MykieDoesStuff
Member
Posts: 136
Joined: Sat Aug 16, 2014 02:44

Re: Players to have initial items? *SOLVED*

by MykieDoesStuff » Post

Neeeever mind.. found it..

Code: Select all

minetest.register_on_newplayer(function(player)
	print("[minimal] giving initial stuff to player")
	player:get_inventory():add_item('main', 'default:pick_stone')
	player:get_inventory():add_item('main', 'default:torch 99')
	player:get_inventory():add_item('main', 'default:cobble 99')
	player:get_inventory():add_item('main', 'default:wood 99')
	player:get_inventory():add_item('main', 'default:axe_steel')
	player:get_inventory():add_item('main', 'default:shovel_steel')
	player:get_inventory():add_item('main', 'default:pick_wood')
	player:get_inventory():add_item('main', 'default:pick_steel')
	player:get_inventory():add_item('main', 'default:pick_mese')
	player:get_inventory():add_item('main', 'default:mese 99')
	player:get_inventory():add_item('main', 'default:water_source 99')
	player:get_inventory():add_item('main', 'experimental:tester_tool_1')
end)
For fast response... send me a PM

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

Re: Players to have initial items?

by rubenwardy » Post

Don't do that, instead use the give_initial_stuff mod.

Set these in minetest.conf

Code: Select all

give_initial_stuff = true
initial_stuff = default:pick_steel,default:axe_steel,default:shovel_steel,default:torch 99,default:cobble 99
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

MykieDoesStuff
Member
Posts: 136
Joined: Sat Aug 16, 2014 02:44

Re: Players to have initial items?

by MykieDoesStuff » Post

rubenwardy wrote:Don't do that, instead use the give_initial_stuff mod.

Set these in minetest.conf

Code: Select all

give_initial_stuff = true
initial_stuff = default:pick_steel,default:axe_steel,default:shovel_steel,default:torch 99,default:cobble 99
oo... alright thanks! I'll change that.
For fast response... send me a PM

MissDejavu
New member
Posts: 9
Joined: Thu May 31, 2018 15:06

Re: Players to have initial items?

by MissDejavu » Post

Hi,
I have searched for a bit now and haven't really found an answer.
Does anybody know if there is a possibility or a mod to give the player modified items?
I would like to provide a book with text (background story) when the player joins the server for the first time...I know about the give initial stuff method but I don't see how I can add modified items. I also found the thread about the Minecraft Guidebook which would be a similar concept, but the links don't work anymore..

EDIT: Found the topic for this question! :)

User avatar
ManElevation
Member
Posts: 896
Joined: Tue Aug 02, 2016 22:04
GitHub: ManElevation
IRC: ManElevation
In-game: ManElevation
Location: Madrid,Spain

Re: Players to have initial items?

by ManElevation » Post

MissDejavu wrote:Hi,
I have searched for a bit now and haven't really found an answer.
Does anybody know if there is a possibility or a mod to give the player modified items?
I would like to provide a book with text (background story) when the player joins the server for the first time...I know about the give initial stuff method but I don't see how I can add modified items. I also found the thread about the Minecraft Guidebook which would be a similar concept, but the links don't work anymore..

EDIT: Found the topic for this question! :)
Made this for you, should be easy to modify to put the story you want.
i think this is exactly what you need, need anything else just ask me
https://github.com/ManElevation/playerguide

So what this mod does is that when a new player joins the game it gives them a book with text in it, you can change the text in local playerguide_Tab_Text_1= "text" for space you can just use \n like i did so it would be easier for you to modify.
is this what u needed?
My Public Mods! Discord: Rottweiler Games#3368

Post Reply

Who is online

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