[FUN/MISC] Cavein - Stone and Dirt have a chance to cave-in as gravel and sand. v0.3 [740]

Discussion in 'Inactive/Unsupported Plugins' started by JoeJoeMcBean, Apr 11, 2011.

     
  1. Offline

    JoeJoeMcBean

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Cavein - Stone and Dirt have a chance to cave-in as gravel or sand.
    Version: v0.3
    Uses Permissions (Tested with v2.7 Phoenix).
    Honors WorldGuard regions (Tested with 5.0-alpha10).

    * UPGRADE NOTE: Delete your cavein.config file (or plugin/cavein folder) to have it rebuilt with new config settings, or add worldguard_allowed_regions=
    I recommend a clean install.

    Description:
    Want to add some additional difficulty to survival and mining? This plugin will transform stone and dirt to gravel and sand around the player causing a cave-in (and possible suffocation from the fallen blocks) based on the percentage chance in the config file. WorldGuard can be used to protect regions from cave-in's.

    The default settings are for a 1% chance of a cave-in which will collapse any stone or dirt in a 3 block radius around the last broken block that has up to 6 open air above it. All WorldGuard regions are protected by default. (Configurable)

    For example: If you are in a small pocket cave and break a block, the open spaces (air) will be checked from the Y-position of the last broken block upwards for each block in a radius around it. Any stone or dirt above these open spaces will be converted to gravel or sand and will then fall down.

    Download jar here (or from the attached file below):
    cavein.jar

    Installation:
    Copy the cavein.jar file to your plugins directory. The plugin will create the plugins/cavein folder and the cavein.config with default settings.

    Features:
    Honors WorldGuard regions, can set which regions allow cave-in's
    Set the percentage chance for a cave-in to occur (0-100%).
    Set the radius around the player to be affected.
    Set the height of the cave-in.
    Reconfigure settings in game (temporary, uses config file on restart!)
    Source included in the jar.

    Commands:

    /cavein - Show help
    /cavein set <property> <value> -set a property (chance, maxheight, radius)
    /cavein view -view current settings

    Permissions:

    cavein.user.*
    cavein.user.enabled -Enables cavein's for this user/group
    cavein.user.view -View the current settings
    cavein.admin.*
    cavein.admin.set -Set config properties

    TODO:

    Increased chance of cave-in based on depth (configurable)
    Scaffolding cave-in prevention (configurable)

    Changelog:

    Version 0.3
    Added WorldGuard region support
    Condensed 'caveinchance' to 'chance' for the /cavein set <property>
    Version 0.2
    Added Permissions support
    Added set <property> and view commands
    Version 0.1
    Release
    neogeek23, Netu and MisanthropX like this.
  2.  
  3. Offline

    RazorFlint

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Hmmm Look's Good.
    Possibly a tool To select areas to use this plugin? Could Be good for Escape Games/ Dungeons.
  4. Offline

    JoeJoeMcBean

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Great idea, thanks for the feedback.
    I think I'll add a 'regionname' to the config and have it check for a WorldGuard region with that same name for the next updated version. I have a few more plugins I'm wrapping up now about to release as well.
  5. Offline

    davr

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    How does the % work, if I set it to 1%, does that mean a cavein will happen roughly every 100 blocks I break? That seems a little too often to me. Can I change it to smaller, like 0.1% maybe? Otherwise is a cool idea, can't wait to spring this on my players! muahaha
  6. Offline

    JoeJoeMcBean

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    The short answer is yes you can use a smaller non whole number percent like 0.1%

    This is basically the check to see if a cave-in occurs.
    math.random will provide a decimal number between 0 and 1 and the config setting will be divided by 100 (so a 1% would be .01, or in your case .01% would be .001).

    Side Note:
    Glad you hear you want to give your players a surprise :)
    I'll have another plugin out shortly (next day or so)- zombieattack! This allows zombies to break blocks when targetting a player... no more hiding in sand, dirt homes, or what ever you configure as breakable... lol!
  7. Offline

    MineralMC

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Absolutely love this idea, although I do request that you host it somewhere other than the attachment system; I rarely have my browser downstairs logged into bukkit and it was a bit of an pain to pop upstairs to get the plugin. I'll host you, if you like. I've got a fileserver over in Germany that I can give you an FTP account for, if you like?
  8. Offline

    JoeJoeMcBean

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Thanks for the feedback MineralMC and FTP offer.

    I've hosted the file externally now.
  9. Offline

    MineralMC

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I have to say this, otherwise I'm going to get lynched by an angry hoard - mediafire has been having some issues as of late, a mirror that isn't rapidshare or hotfile may not be a bad idea. (or even a 'mirror' in the sense of the original attachment method, just so people have an alternative)

    Also, I've done some testing and this seems to work flawlessly. Only tried 90% chance to make sure it was working correctly, currently set to 0.01% chance - no way to test this reliably.
  10. Offline

    JoeJoeMcBean

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Right on thanks for the info and testing. I'll look into some hosting alternatives if I hear/see issues, and I'll re-attach as an alternative (like you mentioned).
  11. Offline

    MisanthropX

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    oh this sounds so tasty and intersting.
    Our server requires that miners have to add planks and logs aside tunnels and caves.
    Are you able to add something like lower chance to cave-in if there is plank protecting the area? :X
    I have no Idea how hard this is to do, but I am so much interested in this! :O

    Also I want the whole server to be caved in, at least, if you extract ore from a cave, it has chance that it caves in if you havn't supported the cave with logs and planks
    *tons of likes*
    Love you sir
  12. Offline

    Zalastri

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Yeah, seriously. The idea of requiring scaffolding is -awesome-.
  13. Offline

    Nytemare3701

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Request: Some method of determining if something is a cave or a building. I collapsed 2 houses >.<
  14. Offline

    MineralMC

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    That one shouldn't be too complicated, since houses will be player-placed blocks; those naturally generated aren't. Perhaps player-placed blocks can be tagged to be exempt from this?
  15. Offline

    Nytemare3701

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Possibly, although that runs the risk of breaking things like placed schematics from WorldEdit.
  16. Offline

    Iceciro

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    This is implausibly cool, and if you can have the wooden beams protect against nearby cave-ins I will be your best friend forever.
  17. Offline

    MaltheF

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    how does this work, ive changed the chance to a 100 to test it out, but i still havent got any 'caveins'
  18. Offline

    JoeJoeMcBean

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    That would be because I uploaded the wrong file. Should be fixed now.
    Thanks for the follow up!
  19. Offline

    JoeJoeMcBean

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I'll take a look into region support, scaffolding, and increased chance of cave-in based on depth (configurable).

    @Nytemare3701 , Maybe I could make a check to not cave-in above sea-level (y:65)? Or use WorldGuard regions to protect?

    @MisanthropX , @Iceciro , @Zalastri , Any thoughts on how you would like to see scaffolding work? Maybe a ratio system like x number of logs and y number of planks per z number of air?
  20. Offline

    neogeek23

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Can we see permissions on this so some sets of players have to worry about this and other don't?
  21. Offline

    JoeJoeMcBean

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    You bet. I'll add that to the todo list.
    neogeek23 likes this.
  22. Offline

    neogeek23

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    That'd be awesome! I really look forward to this addition :)
  23. Offline

    Phaedrus

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    this sounds fun. the risks of a cave in are very real when mining, great that it can now be reflected in game.
  24. Offline

    Nytemare3701

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Sea level won't be the same on my server. We are in the process of lowering the entire map into the void to get extra build space. :)
  25. Offline

    JoeJoeMcBean

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    lol yeah I guess that could be a problem. I'll stick with WG regions. I'll get started on changes for this plugin. I've been working on joerep the last few days getting it polished up.
  26. Offline

    Nytemare3701

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Could you support Residence regions as well? We don't use WG regions for anything.
  27. Offline

    JoeJoeMcBean

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I'll take a peek at the residence code. I like Residence and would love to support it. Good thought, thanks.
  28. Offline

    JoeJoeMcBean

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
  29. Offline

    neogeek23

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    <3 my hero!
  30. Offline

    JoeJoeMcBean

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    @RazorFlint v0.3 Added WorldGuard region support.

    @Everyone else - Still looking for ideas on how scaffolding should work.
  31. Offline

    Ruinheart

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Maybe you can use a similar code for the scaffolding as the leaf decay? though instead of decaying it falls?

Share This Page