[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


    WOOOOOOOO, thats nice!
    A super hiroshima creeper world would be just awsome.
  3. Offline


    Very nice , thankyou for this one
    works great
  4. Offline


    Great plugin to have. Could you possibly also add configuration so that these "explosions" only happen below ground, let's say, below layer 50?
  5. Offline


    Thanks for the warm responses, I appreciate it. :)

    I fixed a ridiculous bug that made every explosion twice as big regardless of the configuration. Should have tested it after what I thought was a straight forward clean up of the code.

    Juze: It may be possible to shift the entity's location at the point of explosion. Do you need an absolute position, or just want to offset down a bit? Also, out of interest, why do you want to move them?

    I noticed the client seems to show the explosion as it believes it should be and then corrects itself after it realises nothing happened on the server. This is most noticable if you turn the explosion multiplier down to 0.

    anon: Heheh, sorry about the configuration bug. Didn't mean to make the creepers quite so over-active. Now that you mention it though, it might be nice to have per-world settings for this stuff.. So you could go through a portal to some complete hell world!
  6. Offline


    I'd just want to tweak this so that explosions are big but only work underground. :p
  7. Toadmess, Juze means have an "altitude" parameter (eg:50) so that explosions above it are normal, but below it can be as epic as u like, to preserve surface towns etc. Not moving anything.
  8. Offline

    Soul Reaper

    interesting, would make for some really lol moments :D

    can you add this to craftbukkituptodate?
  9. Offline


    CorumAnime: Ah got it now thanks! Yes, no problem, I can code up some optional allowed bounds for the epicentre of the explosion tonight. Any explosion outside of those bounds would be left as normal and untouched.

    You'd still need to be careful that the explosions' radiusMultiplier wouldn't be so ludricrously large that the blast would go too high up of course. But then, the server would probably choke if it's way too large or yields way too many item drops.

    I can probably add a radius limiter that would make sure the explosion is downsized if it's too close to the edge of the allowed bounds. Let me know if that's important and I can get it in there sometime during the week.
    --- merged: Feb 27, 2011 6:16 PM ---
    Soul Reaper:
    Sure, I'll have a look into it during the week and add it in there if it's straightforward.
  10. Offline


    If you could give this multiworld support that would be awesome. By that I mean, control explosion dynamics per world. Then anon's super Hiroshima creeper world could be someplace my users could visit if they feel like a challenge.
  11. Offline


    Hey Krispy. Yes, I really like the idea. :)
    I'll code it up some evening this week.
    I was thinking that other worlds (that differ from the default) could be configured along the lines of:

                yield: 0.2
                    radiusMultiplier: 2.0
                    fire: true
    ..where "nuclearCreeper" would be the name of the world that has different dynamics.
    --- merged: Feb 28, 2011 12:12 AM ---
    It was already on CraftBukkitUpToDate's list before I got to it. They move fast!
    --- merged: Feb 28, 2011 12:19 AM ---
    Version 1.2 has some very simple area control in it. There's an example of configuring a max altitude in the README file linked at the start of the thread.

    I don't think it yet does exactly what you want though. It's possible to set a ceiling limit of 50, set of a TNT with a huge blast radius at altitude 49 and obliterate a whole load of blocks above 50 still.

    What it needs is a further configuration parameter like "limitRadiusWithBounds: true" so a TNT nuke placed at altitude 49 will have it's blast radius limited to just 1 block. A damp squid if you're too close to one of the bounds, but it saves the towns above from being nuked.
  12. Offline

    Soul Reaper

    You just need to post a static link on its thread, author takes care of rest :)
  13. Offline


    Well, I'm not setting it too big, so it's fine. :) It suits my needs now!
  14. Offline


    Is Minecraft really so bad programmed? Try this: set yield to 1.0 and TNT Multiplier to 6.0
    The Blocks lying on the ground cause a MASSIVE LAG... would really be nice if you could turn off the rotation of the blocks.. the minecraft devs should implement this..
  15. Offline


    Noticed this too - it's a shame it has been missed. I'll keep an eye out for possibilities for suppressing the rotation.
    --- merged: Mar 1, 2011 8:21 PM ---
    There's support for multiple worlds if you wanted to create your super Hiroshima creeper world :)
  16. Offline


    This plugin is really funny, thanks for that.

    One sugestion, make a random togable blast radius. A creeper explode, it has a chance of like 50% of a normal blast, 40% of double blast, 9% of triple blast, 1% of ten times blast. It would be nice, and would add the element of suprise. It would also create some unexpected self killing tnt :D
  17. Offline


    Yes, that's a nice idea, I like the surprise element! I'll code it up just as soon as I figure out how to express that easily in the config.
    --- merged: Mar 1, 2011 8:34 PM ---
    ..or the occasional TNT that turns out to just be a damp squib. Yes, liking this more and more.
  18. Offline


    Thanks toadmess! This is turning out to be pretty great.
  19. After the last Plugin-Update I get a error, i use Build 468:
    22:38:57 [SCHWERWIEGEND] null (Is it up to date?)
    at toadmess.explosives.ExplodingListener.<init>(ExplodingListener.java:49)
    at toadmess.explosives.HEMain.regExplodingListener(HEMain.java:56)
    at toadmess.explosives.HEMain.onEnable(HEMain.java:40)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:117)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:419)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:187)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:80)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:61)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
    at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
  20. Offline


    Mind telling me what I'm doing wrong?

    Attached Files:

  21. Offline


    Many thanks for the stacktrace! It took me right to my stupid mistake, which is fixed in version 1.3.1.
    --- merged: Mar 1, 2011 10:18 PM ---
    Manged to reproduce it with the exact configuration you had.
    Surprisingly, there needs to be a space in the "debugConfig:true" or the Yaml parser freaks.

    To fix it, just change "debugConfig:true" to "debugConfig: true".
    Oh, and download version 1.3.1 becuase I messed up 1.3, sorry.
  22. Now it works fine. Thank you for the really fast fix.
  23. Offline


    Dammit still errors

    Attached Files:

  24. Offline


    It still looks like the format doesn't quite conform to how the YAML parser expects it.

    You didn't include your latest configuration in error4.txt, but from the looks of that error, you have a problem on line 4 of your configuration.

    I would guess that you have that 0.8 value on the line after the "yield" property, but it is indented before the "yield:".
    Try indenting it so it's further to the right of the "yield:" property, or try putting it on the same line like " yield: 0.8".

    Alternatively, try this config:
        yield: 0.8
            radiusMultiplier: 2.0
            fire: true
            radiusMultiplier: 1.0
            fire: false
            radiusMultiplier: 5.0
            fire: false
    version: 1.3.1
    debugConfig: true
    If you get it working.. be careful that a yield of 80% may cause some server lag when those huge fireball explosions go off, because there'll be loads of items. The minecraft server doesn't perform very well with great numbers of rotating items sadly.
  25. Offline


    You know what would make this plugin the proverbial shit? If creeper/ghast explosion sizes could be randomized from "poof" to "holy crap that one must of been eatin' his Wheaties!" Is something like that possible in the foreseeable future?
  26. Offline


    Heheh, definitely! :) aehoooo mentioned this a few days ago too. I'm hoping to get a release out this weekend.
    --- merged: Mar 5, 2011 2:32 AM ---
    Version 1.4 now has support for configuring chances for different blast radii. For example:

                - {chance: 0.15, value: 2.0}
                - {chance: 0.80, value: 1.0}
                - {chance: 0.05, value: 0.0}
    ..would make creepers explode normally 80% of the time, go "poof" 5% of the time, and go "holy crap that one must have been eatin' his Wheaties!" 15% of the time.

    Have fun! (I have :))
  27. Offline




    The OP was a little difficult to understand, for me, when it came to what the 'yield' value actually does. It took trial and error to find out that a larger yield = more blocks returned with 1.0 being all blocks returned. When reading the OP, I thought the opposite was true. "percentage of blocks destroyed" when, for me, a larger number was the percentage of blocks returned.
  28. Offline


    Ah yes, that's confusing, thanks for letting me know. I'll tweak it a bit.
  29. Offline


    Thankyou for this, great plugin it is very useful and a lot of fun with the random blast radious, Creepers are no longer an easy kill haha
    your work is much appreciated
  30. Offline


    Superb, as an admin that runs a server that uses a LOT of TNT, this should help spice up my multiverse.

    Now here's a thought:
    Unexploded TNT does not currently use its durability value.
    Plugins like wildgrass use the data value on grass blocks for an ancillary effect.
    Modifying a block's durability value above zero will in face display a visible bar on the block in your hotbar.

    Imagine, if you will, a stack of TNT in your hand. You left click. Your stack loses one block. However the top of the stack now has a durability bar of 0.1.

    You place this block. You detonate it. It explodes with the force of two blocks. You are impressed. You left click ten times. The bar on your TNT is now green.

    Green is good.

    You detonate this block, leaving a crater ten times larger than that of lesser TNT blocks.

    You die.

    It was totally worth it.

Share This Page