[INACTIVE][FUN] HigherExplosives v2.0 - Configurable multiworld explosion control [860]

Discussion in 'Inactive/Unsupported Plugins' started by toadmess, Feb 26, 2011.

  1. Offline


    HigherExplosives - multi world control of explosions (size, player/creature/terrain/item damage, % items dropped, and TNT fuse duration and permissions support):

    Version: v2.0

    With some simple tweaking to the automatically created config.yml file, you can individually change the TNT, creeper, or fireball explosions for all worlds, or tailor specific worlds.
    The configuration is fairly flexible, so with some more determined configuration there are a myriad different worlds with exotic explosion qualities that can be crafted. :)

    It was compiled and tested against CraftBukkit version 860 (recommended build).

    • Control the size of explosions for TNT, creepers and ghast fireballs.
    • Control the percentage of dropped items (called yield) from the destroyed blocks, from no items dropped through to one item dropped per destroyed block.
    • The yield of every different block type can be individually configured if so desired.
    • Optional prevention of terrain damage
    • Multiple world configurations
    • Allows configuration of different blast radii, with different probabilities for each being chosen
    • Allows configuration of different player damage (optionally with different probabilities for each being chosen)
    • Allows configuration of different creature damage (optionally with different probabilities for each being chosen)
    • Item damage can be configured (optionally with different probabilities for each being chosen)
    • Fuse length of TNT can be tweaked.
    • Some simple control over which areas the modified explosions will happen in
    • TNT triggered by redstone, fire, explosion, or by a player's hand can be configured separately
    • The triggering of TNT can be prevented (either generally, or specifically for fire, explosion, hand, or redstone)
    • Permissions support for TNT triggered by hand. Any number of different configurations for players with certain permissions and/or groups can be applied.
    • Charged creeper's explosions can be configured

    The v2.0 HigherExplosives.jar is at https://github.com/downloads/toadmess/HigherExplosives/HigherExplosives.jar

    In case there are problems with v2.0, the older v1.7 HigherExplosives.jar is still available from https://github.com/downloads/toadmess/HigherExplosives/HigherExplosives1.7.jar

    The source code (changes are most welcome) is at https://github.com/toadmess/HigherExplosives/


    Straight out the box this will double the size of TNT explosions. No configuration required, just drop the HigherExplosives.jar in the plugins directory.

    Known issues:
    Show Spoiler

    • If you set the yield too high, the server will lag a lot whilst trying to rotate all of the items left in the crater.
    • If the radiusMultiplier is much less than 1, I think the client is rendering the explosions as normal, but then corrects itself a moment afterwards when it hears about what really happened from the server. This has a kind of double-take effect.
    • If the radiusMultiplier is set too high, the shape of the terrain damage takes on a kind of streaking or criss-crossing effect. I think this is to do with the way minecraft creates the explosions (http://www.minecraftwiki.net/wiki/Explosion).

    Example Configuration:

    For full configuration details check out the README file at https://github.com/toadmess/HigherExplosives/tree/v2.0

    Meanwhile, here's a contrived example configuration that covers most of the simpler features, together with an explanation below it:
    Show Spoiler

            yield: 0.15
            radiusMultiplier: 2.0
            preventTerrainDamage: true
                    x: 500
                    z: 500
                    x: -500
                    z: -500
                    playerDamageMultiplier: 2.0
                    itemDamageMultiplier: 0.0
                    fire: false
                    creatureDamageMultiplier: 2.0
                        - {chance: 0.25, value: 0.3}
                        - {chance: 0.25, value: 1.5}
                        - {chance: 0.5, value: 1.0}
                        - {chance: 0.5, value: 0.0}
                        - {chance: 0.5, value: 1.0}
                    yield: 0.0
                        2: 0.8  # Grass
                        3: 0.8  # Dirt
                        12: 0.8 # Sand
    version: '2.0'
    debugConfig: true
    In this example config, the size of TNT explosions are doubled and the number of items they drop is set at 15%. This would by applied by default in all worlds except the world named "world_nether" and the world named "wildwest".

    In the world named "world_nether", TNT explosions will have a normal blast radius and yield, but nearby items will be impervious to them. Whilst they don't damage items, TNT explosions in the nether will be twice as damaging to players when exploding, but creatures will take damage as normal.

    By default, creepers will not damage terrain in a 1000x1000 square area around 0,0. They will however still damage creatures and players as normal. Outside of the safety area, the terrain will be damaged as normal by Creepers. This applies to all worlds with this example configuration because no other world has a specific configuration for the Creeper entity.

    Ghast fireballs in the "world_nether" world will not cause fire but will be twice as damaging to other creatures. They'll damage players as normal fireballs do. Fireball explosions in any other world will be left unmodified.

    In the wildwest world, TNT is flakey and unreliable. 50% of the time TNT will explode immediately without any fuse. The sizes of the TNT explosions will also vary, with half of them being normal, a quarter being very small, and a quarter being fairly large.

    Creeper explosions in the wildwest will cause destroyed grass, dirt and sand blocks to drop items 80% of the time. All other destroyed blocks will drop nothing.

    To check if the plugin is reading the configuration correctly, you can add a "debugConfig: true" property. It defaults to false if it's not in the config file.

    Show Spoiler

    Version 2.0
    • Nested configurations allow completely different behaviour for TNT depending on whether it was activated by fire, player, redstone, or some other explosion.
    • Permissions plugin support. Allows any number of configurations to be applied when a player's hand triggers a TNT block, so long as the player has the necessary permission and/or belongs to the necessary group.
    • Charged creepers can now be specifically configured with the "creeperCharged" nested configuration.
    Version 1.7
    • The yield of specific block types can now be individually configured via the "yieldSpecific" property.
    • Renamed the "trialTNTFuseMultiplier" config property to "tntFuseMultiplier"
    • Massive internal restructuring of the code. Should be more lean and mean.
    Version 1.6

    • (Experimental) TNT fuse durations can be configured via the "trialTNTFuseMultipler" property.
    • Item damage can be configured via the "itemDamageMultiplier" property
    Version 1.5.1

    • Now detects the MiningTNT plugin and works with it (specifically the yield values)
    • Checks for cancelled events, so it plays a little nicer with other plugins that cancel an event.

    Any dontations are not necessary, but are certainly appreciated! All the money goes to charity (currently going to Doctors Without Borders) except for the very occasional beer which will go to me :)
  2. Offline


    Awesome! Just what I was looking for, keep up the good work 8]
  3. How would i do this? That would be ok however a simpler command would be nicer...
  4. Offline


    I shall test.

    Holy crap thats awesome!
  5. Offline


    One other thing you must remember when editing a yml files is that you can NOT use the tab key. All indents are 4 spaces and you must use the space bar to make the indents, otherwise the yaml parser will not load it and you will get errors.
  6. Offline


    For those who wonder, it still works fine with bukkit 766, the newest RB.
  7. Offline


    Yeh it does seem to work fine.
  8. Offline


    @toadmess Since Minecraft SMP does not seem to properly support the larger explosion for supercharged creepers, do you think you could include a feature for those of us who are just fine with the current explosion sizes of creepers/TNT but want a supercharged creeper to actually function properly?
  9. Offline


    This mod is really good, just what I have been looking for.

    It would probobly be a bit of work. But could you let us udjust the yeild for individual blocks.

    Eg. Drops from all ores. 10% drops from cobble and dirt, 50% for everything else.
  10. Offline


    I would like to second the previous poster request in allowing configured drop percentages for the type of block.

    As an example:

    Stone drops cobble only 10% of the time, dirt 25% of the time, gravel 10% of the time, other blocks 100% of the time.

    Right now, I have every block drop 100% of the time but it's a pain running around collecting all of the cobblestone. :)
  11. Offline


    Good point! Yes, it definitely would be good to configure these explosions.

    I'll try to get experimental support for this out in version 1.7 in the next 3 days, but it might slip to version 1.8.
    It's a bit tricky to test though, so you'd have to let me know if it works! :)

    @Sparky20 @Pantheis
    Three people have asked for this now, so I'll look to getting it in at some stage, probably in version 1.8, or 1.9. Have you looked at the MiningTNT plugin to see if it can do what you want?

    I've recently escaped from some crushing workload, so am hoping to get cracking with development again. In the next 3 days, relevant gods willing, will be version 1.7.
    The only new features for 1.7 will be support for specific configs for TNT triggered in different ways, e.g. triggered by redstone, triggered by player, triggered by fire, etc.
    But 1.7 includes a major internal restructure of the code, which beyond optimisations, should also make future features easier to develop.

    Future features planned for version 1.8 (unless they can be put in 1.7 in time):
    - Charged creeper configs
    - Permissions support. Different configs for TNT triggered by players with some named permission.
    - Permissions support. Different configs for Creepers' explosions when creepers are triggered by players with different permissions. i.e. The player that the creeper is attacking is the player that triggered the creeper.

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


    Alright, thank you. I have looked at MiningTNT and it can't be configured to do what I want. I can use it to configure which block types I want to destroy and which ones I want to be immune, but there are a number of issues with it.

    First, it ruins chained explosions due to limitations/bugs in the addon. The second is that I don't want to limit block types that can be blown up. I want to blow up everything, but have a configurable percentage per block type in terms of drop rate. I want stone to only drop 25% and have the rest of the cobble just blown up, but I want all ores to drop 100%, if that makes sense.

    I think the best addon to put that feature into would be this one. :)
  13. Offline


    Makes perfect sense - I'd actually love to have exactly that on my own server.

    In terms of config, I'd see this as looking something like:

            yield: 0.1  # Yield chance for all blocks which aren't mentioned in the specificYield
                1: 0.25   # Stone
                14: 1.0   # Gold ore
                15: 1.0   # Iron ore
                16: 1.0   # Coal ore
                21: 1.0   # Lapis lazuli ore
                56: 1.0   # Diamond ore
                73: 1.0   # Redstone ore
                73: 1.0   # Glowing redstone ore (hmm)
                89: 1.0   # Glowstone
    Where the numbers are the block IDs taken from http://www.minecraftwiki.net/wiki/Data_Values

    Please let me know if you see any room for improvement.
  14. Offline


    That looks absolutely perfect. I would literally jump with glee to have the ability to configure things like that.
  15. Offline


    :) Great, because it's in version 1.7 that I've just uploaded now.

    Version 1.7 now available for download. It has two main changes:
    - "trialTNTFuseMultiplier" is now called just "tntFuseMultiplier"
    - the "yieldSpecific" property allows different yields to be configured for different block types

    This version has had a huge internal restructure, so please do let me know about any bugs!

    I'm still working on player triggered TNT configs, permissions configs, and charged creeper configs. These look likely to come in the next release.

    The different configs for TNT triggered by explosions, redstone, and fire is proving more substantial a change than I had anticipated, but I'm still working on it.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 10, 2016
    Pantheis likes this.
  16. Offline


    Awesome, thanks a bunch!
  17. Offline


    There seems to be a bug with 1.7's specific yield in relation to stone.

    I've tested the specific yield and it works great for things like dirt, sand, sandstone and gravel. With stone, no matter if I configure stone or cobblestone to drop 0.0, it still drops 100% (the default yield I've set). I think it might have something to do with how blowing up stone creates cobblestone blocks.

    Setting both stone and cobblestone (1: and 4:) to 0.0 seemed to do the trick. Weird.
  18. Offline


    Just tried this out with MC 1.6.6 and CB 818 but can't seem to reproduce it. I even tried placing down stone blocks that were cooked cobble.

    Were they completely natural stone blocks, or were they put in with a world editor?
    I'm wondering if your stone configuration wasn't being picked for some reason as it sounds like it was just ignored. I tried putting in "01: 0.0" and it suddenly gets ignored. If you send me your config.yml I can see if the value is being picked up correctly. Or if you add the "debugConfig: true" property then you can see the yieldSpecific values the plugin reads in.

    Alternatively, I can add a debug config option to output copious logging of all the block IDs destroyed in explosions and their tweaked yields. Would this help do you think?
  19. Offline


    Given that I was somewhat distracted when playing around with the config, it is entirely possible I was putting in "01" instead of "1" for stone.

    Here is my config.yml file. The blocks I was destroying were just natural server generated stone. I'm a bit busy at the moment but I'll try just having stone listed later today to test it just to triple check. I'll also enable the debugConfig and see what shows up if that fails. I guess if all else fails, adding that copious logging option might help track things down.

            yield: 1.0
                1: 0.0 # Stone
                4: 0.0 # Cobblestone
                2: 0.0 # Grass
                3: 0.0 # Dirt
                12: 0.1 # Sand
                13: 0.0 # Gravel
            radiusMultiplier: 1.0
            itemDamageMultiplier: 0.0
    version: '1.7'
  20. Offline


    Thanks for the config and details.
    I just tried it out and it all looks ok. All of the yields are being read in as you'd expect, according to the debugConfig logging. After removing the cobblestone line, it still seems to work in game.

    Hopefully it was just a ghost bug, but do please let me know if you see it again though! :)
  21. Offline


    The latest server build 860 now lets the "fire" property work for the existing version 1.7. I just tried it on TNT explosions and it works nicely. :)

    I know it has been ages since I said different TNT trigger configs and permissions support would be ready. I'm still testing things and getting the last pieces in place, but it looks set to be available this coming weekend.
    Internally it's radically different, so when making it available, it'll be called version 2.0. Version 1.7 will be left available for download as the stable version.

    If anyone's interested, to give an idea of where it's heading with the permissions and TNT triggers, here's an example of a TNT config in version 2.0:
    Show Spoiler

            tntFuseMultiplier: 0.0 # Default unless explicitly overidden in a trigger specific config
            tntPrimeByHand:        # Disallow everyone to trigger TNT by hand
                tntPrimePrevented: true
                yield: 0.0
                - 'wrath.of.god'
                    radiusMultiplier: 10
                - 'miner.ore'
                    - 15: 1.0  # Iron ore
                    - 16: 1.0  # Coal ore
                    - 14: 1.0  # Gold ore
                    - 56: 1.0  # Diamond ore, etc.
                - 'miner.quarry'
                    - 1: 1.0   # Stone
                    - 13: 1.0  # Gravel
                    - 24: 1.0  # Sandstone
                    - 82: 1.0  # Clay
                - 'bomb.disposal'
                    - {chance: 0.5, value: 0.0}
                    - {chance: 0.5, value: 5.0}
                - 'impotent'
                    tntPrimePrevented: true
            tntPrimeByFire:        # Configure the fuse duration to be unpredictable in fires
                - {chance: 0.5, value: 0.0}
                - {chance: 0.5, value: 1.0}
            tntPrimeByRedstone:    # Configure a more controlled blast
                radiusMultiplier: 2.0
                playerDamageMultiplier: 0.25
            tntPrimeByExplosion:   # Not yet supported, sorry.
  22. tntPrimeByHand:
    tntPrimePrevented: true

    Does not stop TNT from going off when hitting it with hand. Just turns it into a normal blast. Would be nice if nothing happened or you could even break the block and pick it back up again.
  23. Offline


    Sorry, the tntPrimeByHand and tntPrimePrevented properties will only be available from version 2.0 onwards. Which will be this weekend hopefully. I was just posting an example of what the config was probably going to look like in the upcoming version.

    In version 2.0 with your config, the TNT will just do nothing and remain unprimed and unbroken.
  24. Offline


    I love this mod! Thank you so much for making it. It eliminates the need for WorldGuard (since I don't use regions), plus all the cool random and larger/smaller explosions are awesome!
  25. Offline


    Can you tell me if it make sound when it explose and does it destroy the block and replace them after (like essentials) or it do not destroy block at all?

  26. Very eagerly awaiting 2.0, any chance of a developer version? :)
  27. Offline


    hmm can I have a config of, TNT and creeper not destyong a grass?
  28. Offline


    Thank you kindly, that made my day :)

    Sure, have a look to https://github.com/toadmess/HigherExplosives/tree/master/deploy and grab the .jar file from there. It should support all of the different trigger configurations, including "tntPrimeByExplosion".
    The only thing that's missing at the moment is support for permissions based configs - I'll get that in tomorrow.

    Have a look to post #96 for an example configuration.

    One thing to keep in mind is that each of the trigger configs will inherit any config property from the main TNT config. If you add "debugConfig: true" to the bottom of your config.yml file then you should see how the plugin is reading all the properties.

    Please do let me know of any bugs!

    Hi Alesana,

    I'm guessing you mean the "preventTerrainDamage" property? If so, then yes it should be making sounds when it explodes. If it doesn't, then it's a bug that creeped in recently that I'm not aware of.

    I've not used Essentials. This plugin will work with Bukkit's support for cancelling the destruction of the blocks in an explosion. That means that the blocks are not actually destroyed on the server side. However, the client does tend to show explosions and then correct itself shortly afterwards when the server tells it that the explosion didn't even happen.

    Not sure if that answers your question..

    There is currently only a coarse level of control over which blocks are destroyed in a blast - i.e. either all the blocks that the Minecraft code thinks should be destroyed in the blast, or none at all (the "preventTerrainDamage" config).

    Is it something that you would like to do - making specific block types indestructible? I can put it on the future feature list if so.
    I can think of a reasonably easy way to implement it, by leaving all grass blocks untouched. It might end up with some strange explosions though - e.g. the grass is left alone on the floor, but all the dirt and stone beneath the grass has been destroyed.

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


    like this.. when the creeper explode, anything within 3x3x3 will be damage by explosion except dirt and grass
  30. Offline


    Sure, I've added it to the list of future things to add.
    I'll probably call it "preventTerrainDamageSpecific" and follow a similar style as the "yieldSpecific" property.

    Version 2.0 is now feature complete and you can try it out with the .jar file from https://github.com/toadmess/HigherExplosives/tree/master/deploy

    The only thing left to do before it's available at the usual download URL is the documentation. I'll try to write that up tomorrow and then have it all released before going on holiday for a week.

    Version 2.0 includes:
    • different configs for TNT activated by fire, redstone, explosions, or by a player's hand
    • prevention of TNT activation (this can be general, or specific to individual trigger types like fire, hand, redstone etc.)
    • permissions and group based configurations for TNT triggered by a player's hand
    • charged creeper configs :)

    The last example config was wrong in various different ways, but here's a better one that should get you started.

    Show Spoiler

            playerDamageMultiplier: 0.0 # All sub configs will inherit this property unless overridden
                yield: 0.0  # Any permissions based configs will inherit this property too
                # Follows with an ordered list of extra configs for players with specific permissions/groups
                # If a player has both the 'miner.ore' permission and is in the 'bomb.disposal' group, then
                # just the 'bomb.disposal' config is applied, but it will inherit all the properties from the
                # 'miner.ore' config.
                - withPermission: 'miner.ore'  # Only active for players with the "miner.org" permission node
                  useConfig:       # Always drops ore blocks
                          15: 1.0  # Iron ore
                          16: 1.0  # Coal ore
                          14: 1.0  # Gold ore
                          56: 1.0  # Diamond ore, etc.
                - withGroup: 'bomb.disposal'     # Only active for players in the "bomb.disposal" group
                  useConfig:       # TNT can be unpredictable and dangerous for these players
                      - {chance: 0.2, value: 0.0}
                      - {chance: 0.8, value: 4.0}
                      playerDamageMultiplier: 1.0 # This overrides the inherited property
            tntPrimeByRedstone:  # Make careful detonation with redstone produce bigger blasts and explode instantly
                tntFuseMultiplier: 0.0
                radiusMultiplier: 2.0
            tntPrimeByFire:   # Disable TNT detonation by fire
                tntPrimePrevented: true
            tntPrimeByExplosion:   # Disable TNT detonation by explosion (though the TNT block will be destroyed)
                tntPrimePrevented: true
                fire: true   # Charged creepers spray fire everywhere!
    version: '2.0'
    debugConfig: true

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


    Quick question:
    In turning off environment damage, should that also be stopping my TNT from causing chain explosions? And if so, could that be changed in a future update to possibly allow it?

    My server attempt:
    I am trying to allow users to use TNT as they please for PVP and defensive purposes without them destroying everything on the server. Currently I have it set so TNT is normal, just doesn't blow up blocks. (preventTerrainDamage: true)

    However, I'd like for the TNT to still cause chain explosions in case they, say, want to make a pressure pad blow up an entire hallway. I'm going to look for the mining plugin to do this for now, but I think it would be a great addition without stepping on any toes.

Share This Page