[Mod] myitemchest [myitemchest]

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

[Mod] myitemchest [myitemchest]

by Don » Sat Oct 10, 2015 03:26

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: 2980
Joined: Sun Sep 09, 2012 17:31

Re: [Mod]myitemchest[myitemchest]

by Sokomine » Thu Oct 15, 2015 03:38

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: 1641
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: [Mod]myitemchest[myitemchest]

by Don » Thu Oct 15, 2015 04:08

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: 1641
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: [Mod]myitemchest[myitemchest]

by Don » Fri Oct 16, 2015 15:26

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
 

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

Re: [Mod]myitemchest[myitemchest]

by Hybrid Dog » Sat Nov 07, 2015 19:30

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: 1641
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: [Mod]myitemchest[myitemchest]

by Don » Sat Nov 07, 2015 23:35

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
 

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

Re: [Mod]myitemchest[myitemchest]

by Hybrid Dog » Sun Nov 08, 2015 09:40

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: 1641
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: [Mod]myitemchest[myitemchest]

by Don » Sun Nov 08, 2015 14:12

@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: 1641
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: [Mod]myitemchest[myitemchest]

by Don » Sun Nov 15, 2015 05:45

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

Re: [Mod] myitemchest [myitemchest]

by gabo.xandre » Sun Jan 17, 2016 02:36

I'm definitely trying this out!
 

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

Re: [Mod] myitemchest [myitemchest]

by Don » Sun Jan 17, 2016 03:06

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: 32
Joined: Tue Dec 22, 2015 05:04
IRC: Emperor_Genshin
In-game: Emperor_Genshin - Genshin

Re: [Mod] myitemchest [myitemchest]

by emperor_genshin » Sat Jan 23, 2016 01:01

Nice work on the item chest mod Don, I will try this out :)
Minetest Modder
Server Wanderer

Signature
"I have no words that would do justice to the atrocities you commit to the English language, as well as your continued assaults on the concepts of basic literacy and logical reasoning."

_Tom Gioconda
 

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

Re: [Mod] myitemchest [myitemchest]

by Don » Sun Apr 03, 2016 03:31

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
 


Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 11 guests

cron