Inactive [WGEN] BananaMaze v0.2 - An infinite dungeon maze to explore [1000]

Discussion in 'Inactive/Unsupported Plugins' started by Nightgunner5, Jul 13, 2011.

  1. Offline

    Nightgunner5

    BananaMaze - An infinite dungeon maze to explore!
    Version: v0.2
    Contributors: (In order of first appearance) PassivePicasso, codename_B, Nightgunner5, SpaceManiac

    Exploring caves in Minecraft is fun and all, but it's an untouched world - only you have ever been there (at least in pre-1.8) and there are no awesome ruins. Sure, the nether is awesome, but you might be looking for somewhere a little cooler.

    BananaMaze creates an infinite dungeon of ruins that you can explore as much as you want. There are even some torches left over from the previous explorers. Just be careful of the ceiling - it's a bit leaky.

    Also, if you want the texture pack used in the screenshots, it's free, courtesy of the Painterly pack.

    Installation:
    If you just want a dungeon world and you already have a way to teleport into it, just install the plugin normally. There is no configuration.
    If you want to make your default world a dungeon world or you want multiple dungeons, add the following to your bukkit.yml:
    Code:
    worlds:
        world: # This is for the default world
             generator: BananaMaze
        dungeon_2: # Add an extra dungeon
             generator: BananaMaze
    Screenshots
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]

    Features:
    • Infinite
    • Plug-and-play
    • GLaDOS emergency shutdown and cake dispensary
    • Torches come standard
    • Explosives used in generation process
    • Pools of water, lava, or root beer
    • Unpatched ceiling (slightly worn)
    • Crumbling walls
    • Pumpkins, Jack-O-Lanterns, and spider webs give a Halloween feel
    • Chests full of goodies
    Download - Contribute - Source

    Changelog:
    Version 0.2
    • Added chests
    • Added pumpkins and Jack-O-Lanterns
    • Added moss generator
    • Added spider webs
    Version 0.1.1 (69 downloads)
    • Bugfix from SpaceManiac
    Version 0.1 (5 downloads)
    • Initial release
     
    5z2z and undeadmach1ne like this.
  2. Offline

    sharkck

    Nobody that is running a server would want to make this their default world... read my post above on how I fixed the problem of not being able to get to it on a multiplayer server.
     
  3. Offline

    TheTennessee

    They might if it only replaced the bottom few layers with this. I could see replacing the bottom of your world with this being pretty awesome. You dig down deep enough and hit the dungeon world. Actually, that could be a pretty awesome option in here. Of course, the only thing then is, you'd probably want to make rock formations (stone) with ore in them if you did that. Otherwise, that's a TON of resources you are losing by doing that.
     
  4. Offline

    Zalastri

    +1 @Nightgunner5 This is a great idea... maybe make the terrain gen normally except for the bottom 30 tiles which would be dungeon. Maybe you could use that new pheonix terrain gen mod if you don't feel like making your own normal world generator.
     
  5. Offline

    morizuki

    ei there.. XD i just wanna know what are all the blocks here so i know what i can block from destroying so they won't cheat or something..
     
  6. Offline

    TheTennessee

    Don't block destruction. This is one thing I had to not do as well. The problem is, the rooms can be up to two blocks different in height, making it impossible to jump into the next room. You pretty much HAVE to be able to destroy blocks to make yourself a little stairway into the next room.
     
  7. Offline

    meiskam

    Nightgunner5, will you please add a message in the console log when this plugin is loading with the name and version number of the plugin
     
  8. Offline

    seriestoo2

    Wouldn't there be a problem with the multi-world travel, because items don't go back and forth? So any items found in chests wouldn't transfer back anyways? Or am I wrong?
     
  9. Offline

    undeadmach1ne

    spent some time rebuilding my test server worlds/portal/inception links and played with this plugin a bit more last night. is there any chance you could make it so the roof is the top of the world? right now there is a bunch of sky above and most of the monsters seem to spawn up there, leaving the dungeon pretty empty, and making inception style links not make any sense (dig to the deepest part of a map and suddenly be falling through the sky and landing on the roof of the dungeon). if the roof was the top of the world it would also allow for more room below for more layers of dungeon :) (though i dont know how possible that is).
     
  10. Offline

    locutus

    I second this. More layers!
     
  11. Offline

    TheElite4

    This is not working, stops generating right after a few and just gens normally.

    I use,

    • Multiverse
    • WormHoles
    Neither set to manage this world. Plugin manages it. Sphereworld works without issue and is setup the same way. Issue is ONLY with this world it seems, is PheonixTerrainMod known to break this?
     
  12. Offline

    Alestance

    Do you intend on adding multiple floors? There is a LOT of empty space above the room you start on and it'd be interesting to have multiple floors with decreasing levels of light but more serious loot as you ascend.
     
  13. Offline

    Koutacles

    Fixing the empty space with more rooms would be awesome, especially if you added in stairs/ladders. Rooms that are randomly entirely filled with lava/water would also keep things interesting.

    You wouldn't have to restrict breaking if it was all surrounded by a border of bedrock across all but the top.
     
  14. Offline

    Chomps

    This is pretty cool, gonna download it and test it out...
    Could you add on the original post whether or not it's a complete world? (As in, does it even contain trees?)
     
  15. Offline

    undeadmach1ne

    add something like this to your bukkit.yml (in the root of your server):
    Code:
    worlds:
        dungeon:
            generator: BananaMaze
    where 'dungeon' is the name of your world you want it to make, and 'bananamaze' is the name of the plugin you are using for world gen (of the specified world)...for example, here is mine, set up to use the other wgen plugins these guys make:

    Code:
    worlds:
        caketown:
            generator: BananaCakeTown
        apocalypse:
            generator: Bananapocalypse
        dungeon:
            generator: BananaMaze
    this creates 'caketown' apocalypse' and 'dungeon' worlds to my server which i can teleport to using multiverse, or portal to with creative gates, or inception to with that plugin...i just quickly tested dungeon to make sure it never generated normal land and it doesnt seem to for me (i use 'blink' plugin to go to the roof and just held rclick down and blinked for a few mins in the same direction at high speed and only saw dungeon).

    note that sphereworld does not work in this setup and is best to not include in bukkit.yml. i think the author is rewriting it to use the new wgen stuff that was recently introduced into bukkit...but it still works the way it always has (for me at least).
     
  16. Offline

    TheTennessee

    Sphere world generates all at once I believe. It has a finite space. I had the same issue, but then removed it from worldwarp, which is how I originally got there. Now I just use stargate to get there and have removed it from worldwarp, and it works fine.
     
  17. Offline

    TheElite4

    Yah i got it fixed days ago by doing just that, thanks though.
     
  18. Offline

    undeadmach1ne

    lol no problem. sorry i was 'late' :p
     
  19. Offline

    Chomps

    There are too many holes in the ceiling, it's as bright as day inside.
     
  20. Offline

    WhosDaMan

    My dungeon is generating as normal land. I can't get it to stop. I have world, world_nether, and dungeon. I use multiverse. NO this is not the problem of "generating a dungeon and THEN normal land" it is ONLY normal land.
     
  21. Offline

    Aidan Moseley

    It seems that when i shift click on items from a generated chest to quickly pick up the item it causes them to disappear.

    EDIT: its actually any item generated in the chest shift clicking causes them to disappear i.e shift clicking to put back in a chest after manually places in inventory will cause the item to disappear.

    EDIT: also just picked up a pork chop and using it does not use up the pork chop but still heals, and armor is destroyed in one hit.
     
  22. Offline

    TheTennessee

    I think you need to update to the latest version or something. That was a bug I was getting in the previous version.
     
  23. Offline

    locutus

    I'm of half a mind to Develop a mazeworld plugin. I realize thats pretty similar to whats going on here, so I wanted to ask you first, to avoid duplicate projects, and get feedback from others interested in dungeon generation. This sin't a high priority for me, and I won't get to it for a couple of weeks at least, as my plate is full, but I'd to know what people think. Maybe I should make a separate plugin, maybe I should add to this. Maybe there's a third option.

    I intend to use Life rules to create levels. Specifically, S1234/B3 , which creates interesting little passages. I would detect things like blinkers, open spaces, and especially those pesky little diagonal passages, and replace those features with things like hidden passages, lava pits, traps, hiddenspawners, and stairways to levels above and below. I intend that there be 5-10 levels stacked, possibly with normal world above, and To give it a closed in feel, I'm figuring on replacing each life cell with 7x7x7, heavily seeded with obsidian to prevent easily cutting straight through. , and I would probably include optional things like hostile preciousstone configurations. Some things I would definitely liek to include that BananMaze does are random torches, worldgen explosions, and chests.

    I think I'd be interested in extending such a system to being able to handle any tile based dungeon generation algorithm, at any block ratio. Imagine dungeons with 2x2x2 or 5x5x5 tiles. I've played quite a few roguelike games, and I've implemented a number of thier algorithms. It would relatively easy for a developer to add a new tile based dungeon generation algorithm, possibly even with multilevel rooms.

    I'm imagining a method to banish a player to a random point in the labyrinth(with distance limits and checks for a path to the center), with a compass pointing to the center, where I leave it up to the admin to place a way out. I personally will probably use inception and the roots of a multiworld Yggdrasil to let players out. I also imagine using custom difficulty and otherblocks to make this a real challenge to players

    Please keep in mind that I'm just thinking about it. I'm not committed to coding something like this, and even if I were, it wouldn't be for a few weeks.

    What do you think? Fork? Join BananaMaze as a dev? Start on my own from scratch? I'd like to hear from the interested parties: Codename_B and the admins who run BananaMaze on thier servers.
     
  24. Figured I'd post my modified version of this I run on my server. It's called AncientCave. (Lufia II anyone?)
    it's mostly the same, but has some bugfixes, a config file and different rewards in the chests (I'll work on adding custom rewards loaded from the config)

    http://www.megaupload.com/?d=I2YE6ZVL

    Config File:
    Code:
    world-name: Dungeon
    boom-chance: 65    //these explosions help shape the world as chunks are generated.
    big-boom-chance: 35  //there will be could not pass entity expload event errors
    huge-boom-chance: 12 //the original BananaMaze had them too, I think it's a [URL='http://leaky.bukkit.org/issues/1178']bukkit bug.[/URL]
    web-chance: 30
    web-corner-chance: 20
    torch-chance: 50
    ruins-chance: 60
    max-ruins: 6
    lava-chance: 10
    pool-chance: 30
    mossy-chance: 90
    pumkin-chance: 70
    pumkin-lit-chance: 60
    grass-chance: 40  /adds grass randomly on the floor
    other-block-chance: 20  //right now this is a gold block, I plan to make it configurable
    glowstone-chance: 40 //I added random glowstone
    rare-loot-chance: 30
    chance-of-chest: 20
    chance-of-spawner: 20  //chance of mob spawner, currently they're all pig spawners.  I'll get on that.
    ceiling-height: 60 //it looks cooler with tall ceilings.  plan to try and add multiple levels eventually
    Current chest rewards (will make this customizable eventually)
    Code:
        public static final Material[] REWARD_MATERIALS = new Material[] {
            Material.GLOWSTONE, Material.SOUL_SAND,
            Material.SPONGE, Material.CLAY,
            Material.NETHERRACK, Material.SULPHUR,
            Material.CLAY_BRICK, Material.IRON_INGOT,
            Material.GOLD_INGOT, Material.ARROW,
            Material.STRING,  Material.BONE,
            Material.SUGAR_CANE,
            Material.IRON_PICKAXE, Material.IRON_SWORD,
            Material.DIAMOND_SWORD,
            Material.CHAINMAIL_BOOTS, Material.CHAINMAIL_CHESTPLATE,
            Material.CHAINMAIL_HELMET, Material.CHAINMAIL_LEGGINGS,
            Material.BUCKET, Material.WOOD_SWORD, Material.STONE_PICKAXE,
            Material.STONE_SWORD, Material.GOLD_PICKAXE, Material.GOLD_SWORD,
            Material.LEATHER_CHESTPLATE,
            Material.LEATHER_HELMET, Material.LEATHER_LEGGINGS,
            Material.IRON_BOOTS, Material.IRON_CHESTPLATE,
            Material.IRON_HELMET, Material.IRON_LEGGINGS,
            Material.SUGAR, Material.APPLE,
            Material.RAW_FISH, Material.COOKED_FISH, Material.PORK,
            Material.GRILLED_PORK, Material.DIAMOND };
    public static final Material[] RARE_REWARDS = new Material[] {
            Material.COMPASS, Material.SADDLE,
            Material.DIAMOND_PICKAXE, Material.DIAMOND_SWORD,
            Material.DIAMOND_CHESTPLATE,
            Material.DIAMOND_HELMET, Material.DIAMOND_LEGGINGS,
            Material.DIAMOND_BOOTS, Material.GOLD_BLOCK,
            Material.CAKE, Material.COOKIE, Material.GREEN_RECORD, Material.GOLD_RECORD,
            Material.GOLDEN_APPLE, Material.TNT, Material.FISHING_ROD };
    public static int[] REWARD_AMOUNTS = {
            32, 32,
            5, 12,
            32, 6,
            12, 15,
            10, 64,
            32,  16,
            32,
            1, 1,
            1,
            1, 1,
            1, 1,
            1, 1, 1,
            1,1, 1,
            1,
            1, 1,
            1,1,
            1, 1,
            1, 1,
            1, 1, 1,
            1,1};
    
    Edit: By the way, there's no human-error checking. If you set the ceiling-height too high or whatever, it will likely crash.

    Wow, you sound like you know what you're talking about. Dooooo it! I'd say just make your own thread, yours seems like it will be different enough from BananaMaze.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 17, 2016
  25. Offline

    Shocks

    I am having an issue with Breaking Items, should I just run that "non-Dev" guy's version, or is there going to be a fix for it soon?
     
  26. Offline

    cidiantoby

    Id like to make a request... Can you make it so the chests full of goodies restack those goodies?
     
  27. Offline

    undeadmach1ne

    that version seems to work fine for me...
     
  28. The version I posted fixes that. If all goes as planned tomorrow I'm going to post a version with configurable chest loot.
     
  29. Thanks this is awesome
     
  30. Offline

    Yahtze

    @heylookoverthere

    I'm curious as to what part of the code you had to change to eliminate the breaking tools bug, or if you could post your source as well, I'm adding my own features to it as well, but cannot for the life of me figure out the breaking items thing.

    Also, when trying to generate a map with your version, it stops at 20% and errors out. Will retrieve exact error in a moment

    How do we set it up in the bukkit.yml ? Same as bananamaze? only AncientCave instead ?
     
  31. The existing line is

    Code:
                        chest.getInventory().setItem(
                                random.nextInt(chest.getInventory().getSize()),
                                new ItemStack(list[random.nextInt(list.length)]));
    that last in my code is:

    new ItemStack(normLoot.get(p),normAmt.get(p),dmg));

    The important part being that I'm specifying an amount and the short dmg which =0


    Should be, yeah.

    I keep getting annoying NPE's while trying to load custom loot from a loot.yml file by loading lists of integers. My job has been keeping me busy preventing me from tracking them down, I'm sure it's something stupid. Here's the chestpopulator code, maybe one of you will spot my error easily. Otherwise I'll try to over it tonight. There's never enough time in the day.

    Code:
    import java.io.File;
    import java.io.IOException;
    import java.util.ArrayList;
    import java.util.List;
    import java.util.Random;
    
    import org.bukkit.Chunk;
    import org.bukkit.ChunkSnapshot;
    import org.bukkit.Material;
    import org.bukkit.World;
    import org.bukkit.block.Block;
    import org.bukkit.block.BlockFace;
    import org.bukkit.block.Chest;
    import org.bukkit.generator.BlockPopulator;
    import org.bukkit.inventory.ItemStack;
    import org.bukkit.util.config.Configuration;
    
    public class ChestPopulator extends BlockPopulator {
        public int CHANCE_OF_CHEST = 20;
        public static final Material CHEST_MATERIAL = Material.CHEST;
        public static final Material FLOOR_MATERIAL = Material.STONE;
        public static final int[] CHANCES = new int[] { 1, 20, 40, 69, 100 };
        public int RARE_REWARD_CHANCE = 20;
    
        int maxID=398;
    
        public List<Material> normLoot = new ArrayList<Material>();
        public List<Integer> normAmt = new ArrayList<Integer>();
        public List<Integer> rareAmt = new ArrayList<Integer>();
        public List<Material> rareLoot = new ArrayList<Material>();
    
        public ChestPopulator(Configuration configFile){
            RARE_REWARD_CHANCE = configFile.getInt("rare-loot-chance", 30);
            CHANCE_OF_CHEST = configFile.getInt("chance-of-chest", 20);
            File file =new File("plugins/AncientCave/", "loot.yml");
            Configuration chestFile = new Configuration(file);
            if (!file.exists()) {
                try {
                        file.createNewFile();
                    } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                    }
                defaultLoot();
            }
            if(!getItemLists(chestFile)){ }//defaultlists!}
        }
    
        public boolean getItemLists(Configuration con)
        {
            con.load();
            List<Integer> ids = con.getIntList("items", null);
            List<Integer> amts = con.getIntList("item-amounts",null);
            List<Integer> rids = con.getIntList("rare-items",null);
            List<Integer> ramts = con.getIntList("rare-item-amounts",null);
            //todo- pad out amounts with 1's until amts.size==items.size(), in cast they don't add amounts for all items.
            //test print lists?
            if ((ids==null) || (rids==null) || (amts==null) ||(ramts==null))
            {
                defaultLoot();
                return false;
            }
    
            for (int id=0;id<ids.size();id++)
            {
                int q=ids.get(id);
                if (q<1)
                {
                    q=1;
                }
                if (q>maxID)
                {
                    q=1;
                }
                normLoot.add(Material.getMaterial(ids.get(id)));
                int p=amts.get(id);
                if (p<1)
                {
                    p=1;
                }
                if (p>64)
                {
                    p=1;
                }
                normAmt.add(amts.get(id));
            }
    
            for (int rid=0;rid<rids.size();rid++)
            {
                int q=rids.get(rid);
                if (q<1)
                {
                    q=1;
                }
                if (q>maxID)
                {
                    q=1;
                }
    
                rareLoot.add(Material.getMaterial(q));
    
                int p=ramts.get(rid);
                if (p<1)
                {
                    p=1;
                }
                if (p>64)
                {
                    p=1;
                }
                rareAmt.add(p);
            }
    
            return true;
        }
    
        public void defaultLoot()
        {
            normLoot.clear();
            normAmt.clear();
            rareLoot.clear();
            rareAmt.clear();
    
            normLoot.add(Material.APPLE);
            rareLoot.add(Material.GOLDEN_APPLE);
            normAmt.add(1);
            rareAmt.add(1);
    
            normLoot.add(Material.APPLE);
            rareLoot.add(Material.GOLDEN_APPLE);
            normAmt.add(1);
            rareAmt.add(1);
        }
    
        @Override
        public void populate(World world, Random random, Chunk source) {
            if (random.nextInt(100) < CHANCE_OF_CHEST) {
                ChunkSnapshot snapshot = source.getChunkSnapshot();
                int x = 1 + random.nextInt(14);
                int z = 1 + random.nextInt(14);
                int y = snapshot.getHighestBlockYAt(x, z);
    
                Block block = source.getBlock(x, y, z);
                if (block.getRelative(BlockFace.DOWN).getType() == FLOOR_MATERIAL) {
                    block.setType(CHEST_MATERIAL);
                    Chest chest = (Chest) block.getState();
    
                    int count = 0;
                    for (int chance : CHANCES) {
                        if (random.nextInt(100) < chance) {
                            break;
                        }
                        count++;
                    }
                    if((normLoot==null) || (rareLoot==null) || (normAmt==null) || (rareAmt==null))
                    {
                        defaultLoot();
                    }
    
                    if((normLoot.size()<1) || (normAmt.size()<1) || (rareLoot.size()<1) || (rareAmt.size()<1))
                    {
                        defaultLoot();
                    }
                    short dmg = 0;
                    for (; count > 0; count--) {
                        boolean rare = random.nextInt(100) <RARE_REWARD_CHANCE ? true
                                : false;
                        if (rare) {
                            int q = random.nextInt(rareLoot.size());
                            chest.getInventory().setItem(
                                    random.nextInt(chest.getInventory().getSize()),
                                    new ItemStack(rareLoot.get(q),rareAmt.get(q),dmg));
                        } else {
                            int p = random.nextInt(normLoot.size());
                            chest.getInventory().setItem(
                                    random.nextInt(chest.getInventory().getSize()),
                                    new ItemStack(normLoot.get(p),normAmt.get(p),dmg));
                        }
    
                    }
    
                    chest.update();
                }
            }
        }
    }
    
     

Share This Page