Inactive [EDIT/MECH/WGEN] WorldFeatures v2.0 - Randomly Generate .Schematics [1337]

Discussion in 'Inactive/Unsupported Plugins' started by dkramer, Sep 3, 2011.

  1. Offline

    dkramer

    Here is the Bukkit-Dev link.
    WorldFeatures, A Plugin Inspired by this Reddit post.
    Version: 2.0
    Plugin name by tmcaffeine :D
    (Please donate here if you like what I do. This is my only job.)

    Description:
    You will need WorldEdit.jar in your plugins folder for this to work. Save .schematics to your Created folder in-game or download someone else's .schematics to be generated randomly when new chunks are formed. Each has its own customizable chance to spawn.​
    Permissions:
    • WorldFeatures.commands
    This permission allows the player to use every command. Use this wisely.

    Commands:
    /wf <name>​
    Creates a schematic named <name> of the selected cuboid. A cuboid can be selected by holding seeds or a customized item.​
    /wf copy <name>​
    Copies and pastes this created schematic from your Created folder into the ToUse world folder of the world you are in. Your world will automatically start generating this structure without needing a reset.​
    Download:
    Static link for bukkituptodate: http://dl.dropbox.com/u/36326695/WorldFeatures.jar
    Show Spoiler

    Installation:
    Insert WorldFeatures.jar into your plugins folder.

    Customizing:
    After starting up the server for the first time, a WorldFeatures folder will be made. Inside this will be three things:​
    • The "Created" folder - this is where the schematics you create in-game will go to.
    • The "ToUse" folder - this is where you can place yours or someone else's created schematics. Inside, you will need to create folders that have names of the worlds you want schematics to spawn in. Every .schematic needs a matching .yml. This is explained below.
    • "Settings.yml" This is explained below.
    The Settings.yml has 2 things right now:
    • wandID - number - what should be held when selecting a cuboid for a schematic?
    • chunkchance - number between 1 and 100 - chance is explained below.

    Individual .ymls for schematics
    Show Spoiler

    Each schematic needs its own .yml in the ToUse folder (it should be named <schematicname>.yml). If you are loading a .schematic from elsewhere, copy and paste any .yml and change its name. In each .yml should be these things:
    • min/max - the minimum and maximum height the structure can spawn at if "place" is set to "anywhere"
    • chance - When a chunk is loaded, it checks the chance of the chunk to generate something (by chunkchance in the Settings.yml). If it can, it runs through all the schematics and checks this number for each one. If multiple structures are chosen to generate on one chunk, it will randomly choose one of them to be generated. This means that this "chance" is relative and not an exact amount.
    • maxspawns - the maximum amount of times this .schematic can spawn
    • basement - if you have blocks that should be below-ground, this is the number of vertical blocks you want underground, so if I had a building of 30 blocks high, and I only wanted 10 to be above-ground, I would put '20' as the "basement".
    • biome - can be "none" or any of these values:
      • DESERT
      • EXTREME_HILLS
      • FOREST
      • OCEAN
      • PLAINS
      • RAINFOREST
      • RIVER
      • SAVANNA
      • SEASONAL_FOREST
      • SHRUBLAND
      • SWAMPLAND
      • TAIGA
      • TUNDRA
    • randomrotate - should this schematic randomly rotate? Default is true.
    • place can be set to any of these values:
    1. ground - the schematic will stick to the ground and not spawn over water
    2. anywhere - it can spawn anywhere within the .yml range of min and max
    3. air - it will only spawn in the air
    4. underground - it can only spawn underground
    ToDo:
    • Find bugs
    Changelog:
    2.0:​
    • biome options: see above for details
    • Multiworld support: a different folder with names of the worlds you want schematics to spawn in should be in your ToUse folder now, and the schematics and their .ymls will go in this folder, example: plugins/WorldFeatures/ToUse/WORLD_NAME/
    • rewrote a lot of code for readability and efficiency
    • more information is put in the .yml
    1.82: added the permissions to the plugin.yml​
    1.81: added in the "basement" feature​
    Show Spoiler
    Show Spoiler

    1.8:​
    • can't spawn on leaves
    • adding in rotation screwed up the spawning, but don't worry, I fixed it now!
    • option for limited number of spawns for each schematic
    • more error checks
    • more efficient code
    1.7:​
    • Performance improvements
    • added "underground" to the place list
    • The schematics now randomly rotate when being placed!
    1.6:​
    • Fixed it so that structures cannot spawn if they are too high up
    • Removed the accidental debugging code that spammed the output *oops*
    • added "air" to the place list - if a schematic's appropriate .yml is set to this, it will only spawn in the air
    1.5:​
    • .schematic files are now fully supported and are the only means of saving and loading structures
    • the file system is different. Read above for information^
    • it performs a lot better now
    1.1:​
    • Loading a schematic not from RAM is now a lot faster.
    • Schematics set to "ground" can no longer spawn over water
    1.05: Fixed an error where a chunk decided not to generate a structure and throw an exception
    1.0: Release


    Supports .schematics now!

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

    BioRage

    Brilliant,


    I didn't read it all, but, does it spawn underground?
     
  3. Offline

    dkramer

    That is one of four options right now:
    1. ground - the schematic will stick to the ground and not spawn over water
    2. anywhere - it can spawn anywhere within the .yml range of min and max
    3. air - it will only spawn in the air
    4. underground - it can only spawn underground
     
  4. Offline

    undeadmach1ne

    this looks awesome. lots of cool ideas popped into my head for this :) i have a question about the underground option though. say i wanted some buildings to spawn underground occasionally...if i just made a building and saved the .schematic in MCEdit, would that building just spawn in solid rock underground? would the plugin try to fit it into a natural cave? or should i actually build it inside a cave or a 'bubble' of air blocks in MCEdit?
     
  5. Offline

    dkramer

    @undeadmach1ne
    Thanks!

    You would need to make a bubble yourself since it would spawn in rock, or you could make some sort of smooth stone cave around it to make it look natural.

    If you want it to spawn underground only some of the time, make two .schematics in your ToUse folder with different .yml configurations so one is "underground" and one is "ground" (you probably already thought about doing this though).
     
  6. Offline

    undeadmach1ne

    cool thanks for the info :) looking forward to trying this out (hopefully get some time tonight).
     
  7. Offline

    halley

    Love the idea. Needs "floating" (still-water under air cuboid, using 'basement' value for amount of water draft), "sunken" (soil surface under still-water, using 'basement' for soil amount), "underwater" (solid still-water cuboid), and "lava" (still-lava under air) for locations to spawn.

    Actually, having thought about the kinds of features I'd want to put, it would be best if you could just make certain "must have this material on the bottom, and this material on the top" situations. air-over-sand for whale bones, netherrack-over-air or stone-over-air for cave stalactites, etc.

    Sorry for three posts in a row, but why does it depend on a custom wand, when it also requires WorldEdit on the server? Can you not find the WorldEdit wand/selection?

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

    dkramer

    @halley
    Great ideas: I'll be sure to look into adding them.

    On the custom wand: I put it in before I supported .schematics/WorldEdit, so I will see if I can support its wand some time
     
  9. Offline

    Hojop25

    Would they spawn in already generated chunks? Say I had a town, would there be fear if it spawning in that town? Or do they only spawn in new chunks? I would imagine that is how.
     
  10. Offline

    dkramer

    They only spawn in new chunks :D
     
  11. Offline

    justforgarbage

    Great stuff!
    But, are there some packs of shematics with appropriate WE yml files published yet?
     
  12. Offline

    dkramer

    hmm, I don't think so :(
     
  13. Offline

    justforgarbage

    No one gathered any yet on own server who would be willing to upload ToUse, either?
     
  14. Offline

    sfxworks

    So this is basically what bo2's do in PTM? I like it. Course I already made a converter...guess I could make it go both ways >.>
     
  15. Offline

    dkramer

    I didn't know that PTM could do this when I started development on this plugin :D, but yeah, it works similarly.
     
  16. Offline

    natedogith1

    There should be a way to enable/disable it in certain worlds.
     
  17. Offline

    dkramer

    oooh good idea. When I eventually release a big update, this will be in there
     
  18. God I hate "here", "this", "that", "there" links... just saying :p
     
  19. Offline

    nathanaelps

    Mmm. Tasty. I really like the green-haired halley's suggestion of "this block at base, that block at top". Delish.

    Though I'd love to see a biome-specific option as well, so it would only spawn (say) the Jawa sand-crawler in a desert biome, and fallen trees only in rainforest biomes, and snowmen only in grassy desert biomes. (Hah! And you thought I'd say "arctic biomes" or something obvious like that! I am SO DEVIOUS!)

    Or even just have humidity-and-water min and max, so the sandcrawler would only be in low-humidity, high-temperature, while the fallen trees would only be in high-humidity, high-temperature. I don't know how the biome code works, but either way would give the same results, I think.

    Also, using the WorldEdit wand: Great idea. Also using the WorldEdit schematics directory, but that might start stepping on toes. I don't know.

    Also also, when I use WorldEdit's '//regen', will this 'remember' where it spawned in things before, or will it randomly decide to put something new in a regenerated chunk?
     
  20. Offline

    dkramer

    I have no idea, really. It spawns the .schematics using WorldEdit's API, but I do not know if things like that would be supported, sorry. If someone wants to add in these features, I'll stick the source code in the thread since I'm developing other things at the moment.
     
  21. Offline

    undeadmach1ne

    i wouldnt mind poking around at it :)
     
  22. Offline

    dkramer

    There you go, it's up.
     
    undeadmach1ne likes this.
  23. Offline

    MindDefect

    Love this plugin. I know it might be useless to request anymore features since you are working on other plugins instead.... but wondering if there could be an added option, that would probably be in the schematic's given .yml, to make every block from it indestructible/protected, so say diamond blocks or anything else from it can't be looted for easy resources in survival based servers. And also to add an option so any chests/furnaces that spawn as part of the actual schematic could be emptied of any items in their inventory (along with making them indestructible as well of course..).

    Don't know though if this would be a huge pain to implement, but anyways thanks for making this plugin.
     
  24. Offline

    dkramer

    @MindDefect
    Thank you! I've tried to look into hooking into a protection plugin before, but I could not figure it out :[
     
  25. Offline

    DragonSupremacy

    I assume this works in getting more strongholds to pop up in a world, provided there are .schematics for it?
     
  26. Offline

    dkramer

    Yes, that would work!
     
  27. Offline

    DragonSupremacy

    Cool beans.

    Any chance there is a site where people can share .schematics for their servers?
     
  28. Offline

    gameswereus

    Does this work with 1.8?
     
  29. Offline

    dkramer

    yessir
     
  30. Offline

    gameswereus

    Sorry, I didn't have time to check myself! I'm not usually so lazy :p
     
  31. Offline

    Werzieq

    AWSOME!!!!
     
    dkramer likes this.

Share This Page