Page 1 of 1

[Mod] myitemchest [myitemchest]

PostPosted: Sat Oct 10, 2015 03:26
by Don
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.

Re: [Mod]myitemchest[myitemchest]

PostPosted: Thu Oct 15, 2015 03:38
by Sokomine
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?

Re: [Mod]myitemchest[myitemchest]

PostPosted: Thu Oct 15, 2015 04:08
by Don
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.

Re: [Mod]myitemchest[myitemchest]

PostPosted: Fri Oct 16, 2015 15:26
by Don
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.

Re: [Mod]myitemchest[myitemchest]

PostPosted: Sat Nov 07, 2015 19:30
by Hybrid Dog
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.

Re: [Mod]myitemchest[myitemchest]

PostPosted: Sat Nov 07, 2015 23:35
by Don
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

Re: [Mod]myitemchest[myitemchest]

PostPosted: Sun Nov 08, 2015 09:40
by Hybrid Dog
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

Re: [Mod]myitemchest[myitemchest]

PostPosted: Sun Nov 08, 2015 14:12
by Don
@Hybrid Dog - I merged your pull request. Thanks for that. it pops out a lot smoother with set velocity.

Re: [Mod]myitemchest[myitemchest]

PostPosted: Sun Nov 15, 2015 05:45
by Don
Update - I made a better texture for the chest.

Image

Re: [Mod] myitemchest [myitemchest]

PostPosted: Sun Jan 17, 2016 02:36
by gabo.xandre
I'm definitely trying this out!

Re: [Mod] myitemchest [myitemchest]

PostPosted: Sun Jan 17, 2016 03:06
by Don
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.

Re: [Mod] myitemchest [myitemchest]

PostPosted: Sat Jan 23, 2016 01:01
by emperor_genshin
Nice work on the item chest mod Don, I will try this out :)

Re: [Mod] myitemchest [myitemchest]

PostPosted: Sun Apr 03, 2016 03:31
by Don
Update - just a bit of code cleanup

Re: [Mod] myitemchest [myitemchest]

PostPosted: Fri May 26, 2017 13:12
by texmex
This is a nice mod. Could it be made to use the harmonize visually with the new visibly open chests introduced in .4.16?

Re: [Mod] myitemchest [myitemchest]

PostPosted: Fri May 26, 2017 15:35
by Andrey01
awesome model!