Page 1 of 1

Chests in dungeons?

PostPosted: Sat Mar 29, 2014 01:21
by mcfan
I was looking for the code for the dungeon spawning so I could make a chest with random stuff spawn in it? Can someone help me?

PostPosted: Sat Mar 29, 2014 01:36
by minermoder27
The mapgen code, including dungeons, is in C / C++ and hard to change

EDIT:
The code that generates dungeons is in C++ / C, but you could make a mod that added a different type of dungeon

PostPosted: Sat Mar 29, 2014 09:35
by Topywo
celeron55 made a dungeon mod. This is the link to the most recent version (11 months old)

https://github.com/celeron55/dungeon


This is the original release (in one of his blogs):

http://c55.me/blog/?m=201207

PostPosted: Sat Mar 29, 2014 11:57
by mcfan
So if I want to add Chests, I would make another lua and place it in that folder?

PostPosted: Sat Mar 29, 2014 13:13
by Sokomine
Topywo wrote:celeron55 made a dungeon mod. This is the link to the most recent version (11 months old)

Seems that's an extract of mobf, with more place for the dungeon masters. The relevant code for the vaults the DMs love to live in can be found in mobf.

My random_buildings mod also has a routine for filling a chest with random items. There's also a tresture chest in either gloopores or glooptest that adds random treasure chests to the map.

Having something inside those dungeons created by mapgen might be nice. Looking for cobble and mossy cobble at mapgen time and placing a chest would not be very difficult to do - but what else could be found inside those dungeons?

PostPosted: Sat Mar 29, 2014 13:55
by mcfan
So are you saying that this is possible?

PostPosted: Sat Mar 29, 2014 14:33
by Sokomine
mcfan wrote:So are you saying that this is possible?

There are already several mods that do something similar. It's certainly possible.

How about if you think about what else might fit into a dungeon to make them more intresting? Perhaps you might build a few sample ones. Just chests sounds boring.

PostPosted: Sat Mar 29, 2014 14:35
by CraigyDavi
mcfan wrote:So are you saying that this is possible?


The "hungry games" game has what you are looking for. https://github.com/Splizard/hungry_games/blob/master/mods/random_chests/init.lua

PostPosted: Sat Mar 29, 2014 15:44
by Linxx
Hybrid Dog wrote:http://en.wikipedia.org/wiki/Dungeon
I think wooden chests in dungeons would be unrealistic.
Why should anyone had given items stored in a chest to the people jailed there?

they could have suplies for the guards

PostPosted: Sat Mar 29, 2014 17:08
by mcfan
CraigyDavi wrote:
mcfan wrote:So are you saying that this is possible?


The "hungry games" game has what you are looking for. https://github.com/Splizard/hungry_games/blob/master/mods/random_chests/init.lua




I could use that for a minez like game. Nice. But I'm still looking to make chests spawn in dungeons.

PostPosted: Tue Apr 01, 2014 12:00
by mcfan
CraigyDavi wrote:
mcfan wrote:So are you saying that this is possible?


The "hungry games" game has what you are looking for. https://github.com/Splizard/hungry_games/blob/master/mods/random_chests/init.lua



Can I take this and place a special type of chest that will refill periodically and won't refill other chests that people might have placed? And is there a way I can prevent chests from spawning randomly?