Page 1 of 1

A basic treasure chest solution

Posted: Mon Nov 12, 2012 9:56 am
by akroma222
Hi All,

I thought I would share this - it is my improvised treasure chest (re-textured and re-iconned wooden box - with a twist)
Here is how I am handling it - the chest is set at 60.0kg - so if you find the chest and need to run away quickly (because of a trap or monster..) then you can pick it up with the mouse cursor and keep it there. This simulates the idea that your party can grab it and go. BUT - if you want to look through the chest - by putting in the inventory and right clicking to open and inspect the loot - your party will not be able to move from that space (as 60kgs should halt party movement through over-encumbrance, unless your champs are running around the dungeon naked or something)... also they can still turn to see if danger is coming, but to move they must take the loot and ditch the chest.... simulating the idea that not one of your champions can simply pick up the chest and look through it while running around....

Here is a link to the treasure chest - pics/model/texture and icon-atlas (altered version of the main game atlas):
http://ge.tt/3gpISNR

Here are the material and item scripts:
SpoilerShow

Code: Select all

-------------------------for materials.lua
defineMaterial{
	name = "treasure_chest",
	diffuseMap = "mod_assets/textures/treasure_chest2_dif.tga",
	specularMap = "assets/textures/items/wooden_box_spec.tga",
	doubleSided = false,
	lighting = true,
	alphaTest = false,
	blendMode = "Opaque",
	textureAddressMode = "Wrap",
	glossiness = 20,
	depthBias = 0,
}
------------------------for items.lua>
defineObject{
	name = "treasure_chest",
	class = "Item",
	uiName = "Treasure Chest",
	model = "mod_assets/models/treasure_chest.fbx",
	gfxAtlas = "mod_assets/textures/items-altered2.tga",
	gfxIndex = 83,
	weight = 60.0,
	container = true,
	containerType = "chest",
	capacity = 10,
}
Unfortunately, the way the texture is wrapped around the model, it was quite difficult to get the chest model without locks all around it (but I did manage)... as it is, the gold banding is all over other parts of the model (which does not look too bad) ... if anyone has a better solution to this texture/model dilemma I would very much like to know of it ;)

**also, I found that if I increased the capacity of the chest to 12 (instead of 10) it would crash the game... just so you know

Let me know what you think... :)

Re: A basic treasure chest solution

Posted: Mon Nov 12, 2012 12:26 pm
by Neikun
I was pondering this idea as well.
I know in NetHack, I couldn't figure out how to open the chest without putting it in my inventory first.

Re: A basic treasure chest solution

Posted: Mon Nov 12, 2012 1:13 pm
by AmiDARK
You can maybe simply make the objects available in the chest appear on the ground near the chest ?