[WGEN/RPG/MECH] ApocalypseCraft [Instances, Radiation, Realism, Perks, Factions, and more]

Discussion in 'WIP and Development Status' started by loganwm, Jun 26, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    codename_B

    Erm - I believe it is yes - let me extract the code for you.
    You're more than welcome to use anything you like/want from my code.
    Code:
    
        private ArrayList<Block> Currentsnakeblocks = new ArrayList<Block>();
    
                if (rnd.nextInt(10) == 5) {
                    int rx = rnd.nextInt(8);
                    int rz = rnd.nextInt(8);
                    int highesty = world.getHighestBlockYAt(rx, rz);
                    if (highesty < 1)
                        highesty = 32;
                    int ry = rnd.nextInt();
                    boolean isStone = false;
                    if(chunk.getBlock(rx, ry, rz).getType()==Material.STONE)
                        isStone=true;
                    startsnake(w, rnd, (chunk.getBlock(rx, ry, rz)));
                    ArrayList<Block> clonesnake = Currentsnakeblocks;
                    for (int i = 0; i < clonesnake.size(); i++) {
                        Block block = clonesnake.get(i);
                        Vector center = new BlockVector(block.getX(), block.getY(),
                                block.getZ());
                        int radius = 0;
                        if (block.getType() != Material.AIR) {
                            radius = rnd.nextInt(5);
                            for (int x = -radius; x <= radius; x++) {
                                for (int y = -radius; y <= radius; y++) {
                                    for (int z = -radius; z <= radius; z++) {
                                        Vector position = center.clone().add(
                                                new Vector(x, y, z));
    
                                        if (center.distance(position) <= radius + 0.5) {
                                            if (world.getBlockAt(
                                                    position.toLocation(world))
                                                    .getType() != Material.AIR)
                                                world.getBlockAt(
                                                        position.toLocation(world))
                                                        .setType(Material.AIR);
                                        }
                                    }
                                }
                            }
    
                            // new OrePopulator(chunk, 40, 20, 1, 4, 5, 2, 20, 3,
                            // 8);
    
                        }
                    }
                    Currentsnakeblocks.clear();
                    if(isStone)
                    createLavaLake(chunk.getBlock(rx, ry, rz), 5 + rnd.nextInt(10));
            }
    
        private void startsnake(World world, Random random, Block block) {
            if (Currentsnakeblocks.size() < 2000) {
                int blockX = block.getX();
                int blockY = block.getY();
                int blockZ = block.getZ();
                while (world.getBlockAt(blockX, blockY, blockZ).getTypeId() != 0) {
                    if (random.nextInt(20) == 5) {
                        blockY = blockY + 1;
                    } else if (world.getBlockAt(blockX, blockY + 2, blockZ)
                            .getTypeId() == 0) {
                        blockY = blockY + 2;
                    } else if (world.getBlockAt(blockX + 2, blockY, blockZ)
                            .getTypeId() == 0) {
                        blockX = blockX + 1;
                    } else if (world.getBlockAt(blockX - 2, blockY, blockZ)
                            .getTypeId() == 0) {
                        blockX = blockX - 1;
                    } else if (world.getBlockAt(blockX, blockY, blockZ + 2)
                            .getTypeId() == 0) {
                        blockZ = blockZ + 1;
                    } else if (world.getBlockAt(blockX, blockY, blockZ - 2)
                            .getTypeId() == 0) {
                        blockZ = blockZ - 1;
                    } else if (world.getBlockAt(blockX + 1, blockY, blockZ)
                            .getTypeId() == 0) {
                        blockX = blockX + 1;
    
                    } else if (world.getBlockAt(blockX - 1, blockY, blockZ)
                            .getTypeId() == 0) {
                        blockX = blockX - 1;
    
                    } else if (world.getBlockAt(blockX, blockY, blockZ + 1)
                            .getTypeId() == 0) {
                        blockZ = blockZ + 1;
    
                    } else if (world.getBlockAt(blockX, blockY, blockZ - 1)
                            .getTypeId() == 0) {
                        blockZ = blockZ - 1;
    
                    } else if (random.nextBoolean()) {
                        if (random.nextBoolean())
                            blockX = blockX + 1;
                        else
                            blockZ = blockZ + 1;
                    } else {
                        if (random.nextBoolean())
                            blockX = blockX - 1;
                        else
                            blockZ = blockZ - 1;
                    }
                    // if(Math.random()>0.995)
                    // startsnake(world,random,world.getBlockAt(blockX,blockY,blockZ));
                    if (world.getBlockAt(blockX, blockY, blockZ).getTypeId() != 0)
                        Currentsnakeblocks.add(world.getBlockAt(blockX, blockY,
                                blockZ));
                }
            }
        }
    
    
    Thats is it as is extracted from mine, need any help, just ask.
     
  2. Offline

    fullwall

    Codename_B - don't use world.getBlockAt(x,y,z).getTypeId() - it's a lot slower than simply using world.getBlockTypeIdAt().
     
  3. Offline

    codename_B

    Alright - I'll transmute my code.
     
  4. Offline

    loganwm

    I'm most likely going to call it a night a bit early tonight (Yes, I consider 3am early. I'm trying a new sleep schedule as of late, I sleep exclusively from 6am until noon to skip those dreadfully boring hours. Once I get my Paypal link up, the Fill My Bloodstream With Caffeine Foundation will gladly accept donations.)

    As far as tonight's build goes:
    • Factions work.
    • Groups work.
    • Group instances work.
    • Player condition data has been moved to the SQLite DB
    Tomorrow's agenda:
    • Consider addition of subterranean dimension
    • Consider addition of NPCs
    • Experiment with the procedural dungeon engine.
    • Move as much data as possible to the database.
    • Outline leveling structure, limitations, and potential ability to maintain multiple different characters.
    Edit: it's 5am. I decided to work on a quick test build of the Subterra Dimension:
    [​IMG]
    Visibility is poor, and I likely won't use the Nether Sky Style on the real thing (if I choose to even fully implement it), but the idea is that this world can be reached through randomly generated access hatches throughout the Wasteland, and it's a mineral rich massive cave with stalagmites, stalactites, and a toxic atmosphere.

    I'll explain more of the logistics later, but I'll say for now that if your faction has an engineer [a specific class build, one of which that I haven't mentioned yet], a secured access point, and the will to do so, you can set up a foothold in Subterra for resources.
     
  5. Offline

    skeletonofchaos

    This is by far the coolest plugin i have ever seen. Hurry please! Now could it be possible to have this plugin only affect one
    world? This way I could maintain the current basic world and have this for exploration?
     
  6. Offline

    Specops343

    Haha skeleton, I just saw your post about abandoned cities and was just going to link this to you.
     
  7. Offline

    skeletonofchaos

    Lol no i'm already watching this. Also for the abandoned cities plugin all i need to add is the actual buildings and then version 1.0 will be complete.
     
  8. Offline

    loganwm

    That was one of the first features that I implemented. All of mechanics changes are localized to the Wasteland. It would certainly be possible to run this mod parallel to any existing world on any existing server already.

    I'm trying to ensure that this plugin does not conflict with any other major plugins, so when I'm working on later pre-release builds, I'd definitely like to deploy this mod to a few existing servers with different plugin sets. So far, I'm pretty sure that nothing written so far should cause any issues, but I'm pretty sure that I'm nearing ~1500 lines of code, so I fully expect at least one strange, unforeseen conflict.

    Also, one of the biggest reasons that I'm hesitant about releasing the first release is that later releases (at least, later than the current stage) would pretty much require a full reset of the Wasteland for now, but we are nearing an alpha release.
     
  9. Offline

    Specops343

    Awesome! I really love the idea of this, and am already planning to do a world of my server with this!
     
  10. Offline

    skeletonofchaos

    I run a small dedicated server for me and my friends so I will do extensive testing on the alpha if you want. Also I'm starting on a mod to generate random abandoned cities. Do you want me to send the source to you? I know you were thinking of implementing this.
     
  11. Offline

    loganwm

    I typically prefer to use code that I've written almost exclusively, but if you can manage to put together something that's pretty great, then I would definitely consider it.

    I might be pretty much obligated to write my procedural town/structure code, however, to setup faction ownership capabilities.

    Also, I would be more than glad to put you on the testing list.
     
  12. Offline

    bruceweed

    When this is finally released as completed (in a sense), Will this be able to run on just 1 world? instead of having to run it on all worlds? If so I'll definitely be using this.
     
  13. Offline

    Specops343

    @loganwm I'd be willing to help test also ;)
     
  14. Offline

    loganwm

    Yes, all modifications made by the plugin will only effect the Wasteland world and perhaps the subterranean region if that's used.

    Edit: Also, SpecOps, I'll add you to the testers list.
     
  15. Offline

    dak393

    Ah would it be possible to get on the testing list as well this looks amazing :)
     
  16. Offline

    bruceweed

    A big question I have is, are all the features of this plugin only available on the wasteland world, or will they be able to go to another world that and use them regardless. I want to make it so players can't go from a normal world to the wastelands with items and things and in a sense "cheat the system" you know.
     
  17. Offline

    jtripled

    @loganwm

    I'm totally feeling as though making torches only last for x amount of time would make this plugin almost 827 times better. Haha, just a suggestion. Anyway, this mod looks great -- can't wait 'till I can try it out!
     
  18. Offline

    loganwm

    The more the merrier. I'll keep everyone posted on the first test build.

    As of this moment, they're pretty much entirely limited to the wasteland (to prevent interference with other plugins/worlds/et cetera. I've definitely taken into consideration the possibility of world hopping to gain items that would be invaluable in the Wasteland, but in the end I'll have to say that it's most likely the server administrator's responsibility to use a plugin like Multiverse to differentiate player inventories and prevent bringing items across prohibited dimensions.

    I would consider making torches burn out, but currently the only two truly effective lighting sources in Minecraft are torches and glowstone, and close proximity to glowstone has some adverse effects within the bounds of the Wasteland. In addition, tonight's update notes explain another reason for why torches won't burn out.

    Tonight's update notes:
    The word of the day is Scarcity. Crafting tables, furnaces, and beds will not be craftable (at least, not in the default settings.) I'll address why these changes were made below:

    • Beds - The ability to craft a bed anywhere allows the player almost limitless ability to heal and set spawn at any time. I want to make this a bit more challenging: Beds can only be obtained as an item either as a reward from an instance/quest or crafted through a character class that specializes in producing commodities. Beds will be found in motels, apartment buildings, houses, and other structures around the Wasteland naturally, and they cannot be picked back up once destroyed.
    • Crafting tables and Furnaces - Furnaces will be exclusively located in factories, and like beds, will not be able to be destroyed to be moved. It is in a faction's best interests to secure a factory for production since these structures provide an economic and tactical advantage. A faction with ownership over a factory can sell their produced items to other factions/players and effectively control the material assets of others in proximity. Factories will contain both furnaces and crafting tables and can be restored at a high economic cost if destroyed / damaged (in case some idiot decides to destroy/pick up the furnaces/tables.
    By limiting means of production and maintaining an economy which is based on a currency that must be transported in a player's inventory, the dynamics of the Wasteland change drastically. By not being a member of a faction, holding a factory can be an insurmountable task, which drives players to cooperate with or against each other. In addition, NPC guards will likely be added as purchasable assets to guard factories and other areas
    (Rules of engagement can be cycled with right click [Attack Non-Ally, Attack Provoker]

    For example, NPC Guards purchased by the BoS faction can be set to Attack Provoker and scattered around town settlements to prevent players from causing a stir and allow peaceful members of another faction which we'll call the FoA to enter the town. Now, guards inside the factory (and in close proximity to it) will likely be set to Attack Non-Ally settings which will actively help to prevent another faction from attempting a raid.

    There's more that I'd like to go into detail on, but I'm getting a cramp from typing on my laptop, and I think I'm going to catch a few hours of sleep shortly.
     
  19. Offline

    fullwall

    @loganwm - seriously, I cannot believe the level of awesome in this plugin. It already looks amazing, and you just keep making it better. Looking forward to release ;).
     
  20. Offline

    bruceweed

    Likewise I'm awaiting the release myself. This plugin is already (for the lack of a better word) epic. I know once it's fully released with everything I'll be adding it in.
     
  21. Offline

    skeletonofchaos

    Ok sorry I know I keep suggesting features, but what do you think about anvils? This way you could repair your tools with the appropriate items. It would add to the realism in my opinion and maybe only engineers could do this.
     
  22. Offline

    loganwm

    There's already a repair mechanism using Crafting Tables that I've worked out. I'm not familiar with what Anvils are in terms of Minecraft though. Can you describe them?

    And I'm currently working on the first revision of the town generator. I think that you'll all be pleasantly surprised.
     
  23. Offline

    Specops343

    @loganwm Mcmmo, for example, uses iron blocks as anvils.
     
  24. Offline

    fatmarley

    fridges has a simplistic anvil and the ironblock fridges might fit the style.
     
  25. Offline

    skeletonofchaos

    I have just recently made an anvil plugin (to be released shortly) mine works by having an iron block next to both fire and a chest filled with the necessary repair objects (iron for iron tools, gold for gold and so on).
     
  26. Offline

    loganwm

    [​IMG]
    This is a screen from a preliminary test of the structure populator code that I've been writing. Note that these structures don't have damage filters applied yet, and there's no code governing layout (They're scattered randomly for now.) There are other buildings not shown in this screenshot, but I figured I should give you all something since I won't be at my desk for the rest of the evening.

    It's my goal to write an algorithm for laying out logical cities tonight if I can manage to get away from my family that's in town.
     
  27. Offline

    bruceweed

    So just out of curiosity, what's the estimated release date?
     
  28. Offline

    loganwm

    I don't necessarilly want to put a date on this just yet because even after the map generator is finished, I still need to implement the entirety the RPG Mechanics. I'm aiming to begin testing within a week, but I'm not yet sure about the formal release. I've already accomplished a pretty substantial chunk of this project in the first week and a half due to sacrifice of sleep and Stargate Atlantis on Netflix.
     
  29. Offline

    Chronx6

    Well don't burn yourself out! I want to see it released and expanded and supported and so forth.
     
  30. Offline

    skeletonofchaos

    How long have you been working on this?
     
Thread Status:
Not open for further replies.

Share This Page