mcdungeon icon indicating copy to clipboard operation
mcdungeon copied to clipboard

PhatLoots support (feature req)

Open sshipway opened this issue 8 years ago • 3 comments

(From Catreina in the forum: http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-tools/1261253-mcdungeon-v0-15-0?page=100#c1992 )

PhatLoots appears to need a list of chest coordinates for all chests of a certain level in a single file. It then links the file to a generation table. The chest itself should be empty (apart from special items relating to the dungeon itself, such as flyers, maps, holy handgrenade, etc)

The text file could be called "plugins/PhatLoots/chests/$dungeon_name - Tier $tier"

Content is one line per chest, eg

worldname'x'y'z
world'103'4'2030
world'107'4'2026

Since all the chest locations are kept anyway, it would be relatively easy to dump this at the end of generation, either to the PhatLoots folder (if it exists) or to the same folder as the mcdungeon cache files.

sshipway avatar Apr 04 '16 02:04 sshipway

One issue I did not post about in the forum thread - chests that have maps (if no map cache world is provided) and shop advertising should be noted or otherwise excluded, because I do not know (yet) how PhatLoots would deal with a chest already having inventory. I can check on that specifically tonight

Catreina avatar Apr 05 '16 07:04 Catreina

Do you have a link to the the specification of this file? Or is this something you are proposing PhatLoots support?

JiFish avatar Apr 05 '16 09:04 JiFish

The location that PhatLoots saves its chest configurations in is in the "plugins\PhatLoots\Chests" folder, under the name of the PhatLoot it is linked to. The only time a chest is in the named file in that folder is if a PhatLoot is linked to a chest at those coordinates.

For example, a chest exists in world "world" at 37,97,122 and a PhatLoot is created named "Phat" - the chest will not be touched until "plugins\PhatLoots\Chests\Phat.txt" contains the line "world'37'97'122"

With this said, the only thing that can (or even should, I think) be done to allow mods like PhatLoots to use it is to export a simple text file (per named dungeon I think) with the coordinates of each chests location

There is no actual specification for the file that I could find. I had to figure the format out by creating chests and modifying them manually.

Catreina avatar Apr 05 '16 10:04 Catreina