[Mod] myitemchest [myitemchest]

Post Reply
User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

[Mod] myitemchest [myitemchest]

by Don » Post

myitemchest
Image

Depends - default
Download - myitemchest
Version 0.1.0 - myitemchest
Github - myitemchest
Licence - DWYWPL
____________________________________________________________________________________________

Myitemchest is a mod that spawns items when it is opened. I made this mode for a game I am working on and thought that it might be of interest to others. It might be great for adventure games where you can add new items as you go.

All it is is a chest that when opened it spawns items. Once you open it the first time it does not spawn any more items. The chest then becomes a useable unlocked chest. You right click to open the chest and then right click inside to open the formspec.

Version 0.1.0 does not have a usable chest. After first use it is nothing more than a decoration.

If you want to change the items it gives then modify the top section of init.lua. Instructions are in the file.

This is meant as a mod to help people with there game development and not meant as a mod for regular players.
Last edited by Don on Sun Apr 03, 2016 03:41, edited 2 times in total.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [Mod]myitemchest[myitemchest]

by Sokomine » Post

Nice idea. Players sometimes ask for chests that do open, and to actually show the item the chest contains is good. Perhaps you could add an option to put something back into the chest?
A list of my mods can be found here.

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: [Mod]myitemchest[myitemchest]

by Don » Post

Sokomine wrote:Nice idea. Players sometimes ask for chests that do open, and to actually show the item the chest contains is good. Perhaps you could add an option to put something back into the chest?
For the game I am making I made a chest that opens and has an inventory like a regular chest. I have to do a little more work on it and then I will make it a mod.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: [Mod]myitemchest[myitemchest]

by Don » Post

Update - The chest becomes a useable unlocked chest after the items spawn. Right click to open the chest and then right click inside to open the formspec. The chest will automatically close.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

User avatar
Hybrid Dog
Member
Posts: 2828
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: [Mod]myitemchest[myitemchest]

by Hybrid Dog » Post

You could make it look like the item jumps out of the chest after opening it instead of making it appear immediately.
Just spawn the item in the chest, open the chest and then use obj:moveto(upper_pos) to make it move out of it.
The other way round you could make it move back into it before closing it.

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: [Mod]myitemchest[myitemchest]

by Don » Post

Hybrid Dog wrote:You could make it look like the item jumps out of the chest after opening it instead of making it appear immediately.
Just spawn the item in the chest, open the chest and then use obj:moveto(upper_pos) to make it move out of it.
The other way round you could make it move back into it before closing it.
I think I did what you wanted. Can you try the github version and see? It looks neat to see them pop out of the chest like that. Nice idea.
https://github.com/DonBatman/myitemchest
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

User avatar
Hybrid Dog
Member
Posts: 2828
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: [Mod]myitemchest[myitemchest]

by Hybrid Dog » Post

Don wrote:I think I did what you wanted. Can you try the github version and see? It looks neat to see them pop out of the chest like that. Nice idea.
https://github.com/DonBatman/myitemchest
thanks

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: [Mod]myitemchest[myitemchest]

by Don » Post

@Hybrid Dog - I merged your pull request. Thanks for that. it pops out a lot smoother with set velocity.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: [Mod]myitemchest[myitemchest]

by Don » Post

Update - I made a better texture for the chest.

Image
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

User avatar
gabo.xandre
Member
Posts: 70
Joined: Sat Mar 15, 2014 12:54
GitHub: GaboXandre
IRC: GaboXandre
In-game: Gabo
Location: Argentina
Contact:

Re: [Mod] myitemchest [myitemchest]

by gabo.xandre » Post

I'm definitely trying this out!

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: [Mod] myitemchest [myitemchest]

by Don » Post

Gabo! Nice to hear from you.
Nice to see your interest in my mod. Barman is always grateful. Your server is awesome. Anyone who doesn't know Gabo's server check it out.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

User avatar
emperor_genshin
Member
Posts: 83
Joined: Tue Dec 22, 2015 05:04
GitHub: GenshinMT
IRC: Genshin
In-game: Genshin
Location: [REDACTED]
Contact:

Re: [Mod] myitemchest [myitemchest]

by emperor_genshin » Post

Nice work on the item chest mod Don, I will try this out :)
I'm just a individual who likes to make impressive things. | Current Mod: Dungeon Crawl Maker https://www.youtube.com/watch?v=c6g6H2kLBpg

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: [Mod] myitemchest [myitemchest]

by Don » Post

Update - just a bit of code cleanup
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

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

Re: [Mod] myitemchest [myitemchest]

by texmex » Post

This is a nice mod. Could it be made to use the harmonize visually with the new visibly open chests introduced in .4.16?

User avatar
Andrey01
Member
Posts: 2574
Joined: Wed Oct 19, 2016 15:18
GitHub: Andrey2470T
In-game: Andrey01
Location: Russia, Moscow

Re: [Mod] myitemchest [myitemchest]

by Andrey01 » Post

awesome model!

Post Reply

Who is online

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