» Fri Jun 24, 2011 1:39 pm
I don't think that containers should respawn on their own, ever. Instead, the flags for respawn should be attached to creatures/NPCs.
Here's the way I'd do it -
First - dungeons are outfitted with an assortment of containers - everything from sacks to boss chests.
The player approaches a dungeon. The game checks and determines that that dungeon is occupied, and by what it's occupied. It determines how many of what type of creatures there are - for instance, bandits. It comes up with some number of regular bandits plus one boss. It places all of the bandits in the dungeon, just as it would have in Oblivion. It determines what kind of armor and weapons they have - again just as it would have in Oblivion. But while it's doing that, it also checks for a flag for spawning containers. Say - the normal bandits all spawn food and basic equipment - lockpicks, torches, what-have-you - one of them is slightly higher leveled and spawns minor treasure, and the boss spawns phat loot. Then the game finds sacks and barrels and such and spawns food and supplies in them, finds the nearest chest to the slightly higher leveled bandit and spawns some minor treasure in it and finds the boss chest and spawns phat loot in it.
You end up with whatever treasure and other equipment and supplies make sense for the creatures that are there, in quantities that make sense for the creatures that are there, and the containers ONLY "respawn" if creatures are there. They never respawn entirely on their own.
This runs into a bit of a complication if one, for instance, kills all the bandits in a dungeon, then moves in. Personally, I think that there should be a chance that if you're gone too long, other bandits will move in. The problem would be that if they do, they'd spawn new stuff in the containers. That could make sense - they found your stuff and sold it - but it probably wouldn't go over very well with some players. So I'm still pondering that aspect of it.