Dungeon Loot Modification - Proposed Fix/Tweak

Discussion in 'Suggestion Box Archives' started by azoundria, Jun 1, 2016.

?

What Would Be Your Preference?

Dungeon Chests Are Left Vanilla (Reverse Aikar's Changes) 4 vote(s) 18.2%
Dungeon Chests Are Completely Unbreakable (Present State) 6 vote(s) 27.3%
Dungeon Chests Can Still Be Broken (As Vanilla) And Will Reappear In The Same Place After 3-7 Days 12 vote(s) 54.5%
  1. I want to understand this better.

    At the very least, you must store that the chest was opened and when, to set that timer. Do chests have an inherent data structure for that?

    In addition, you also mentioned you are tracking on a per-chest basis which accounts and even IPs have opened that chest in the past (to prevent the same player opening them multiple times)? I am not looking for any details here but the assumption is that extra data also needs to be stored.

    I had assumed that there would be a database of chests somewhere which tracked the timers to add new items and a lookup was done whenever a chest was opened, however you are telling me that this chest itself contains the data.

    However, if I think I understand better, you have created a new entity internally, an extension of a normal chest, maybe we can call it 'RespawnLootChest', which is like a regular chest but stores additional data, ie the timer, history, and etc... This new entity is saved in the world data along with other entities like regular chests.

    If that's how it works, this might be a simple workaround:
    1) When the chest is broken, an entity which is an extension of bedrock is created at the bottom of the world (height 0) over top of an existing bedrock. This entity contains a copy of all the data, and otherwise acts like bedrock.
    2) When the chunk is reloaded, that entity does the check and recreates the chest, copying the data back over.
  2. Yes the data is stored in the chest itself.

    Creating an entirely new Tile Entity just to store data like this is a massive new area we are not looking to explore.... There would need to be so much development and testing to support it, and then we would also then have to setup timer concepts to LOOK for these place holders to regenerate.

    Thats a lot of work for so little of a change.

    The way it works now is the game processes the fill code on interaction, we hook into that to determine should the server fill the chest or not.

    All data is stored with the chest itself.

    Yes its possible to do all this, but we have much bigger fish to fry.
  3. Moral of the story if you don't want anyone else to get loot from the chest you found, make sure you destroy the chest too.
  4. I believe loot chests can no longer be destroyed, which is what the OP doesn't like because the loot chests may get in the way of building.