[MECH] Fortification - Redstone defenses and tools [BukkitDev]

Discussion in 'Archived: Plugin Releases' started by Rogueleader89, Aug 6, 2011.

  1. Offline

    Rogueleader89

    Important Note:

    This thread is largely outdated as I restart this plugin and move most of the information on it to a much more nicely formatted wiki. For latest info see the patch notes on the bukkitdev page (though the descriptions below will provide you with the basics of the most commonly used mechanisms).

    Also note that if you want to reach me about this plugin, bukkitdev is a much better place to do so.


    Download:
    BukkitDev: http://dev.bukkit.org/bukkit-mods/fortification/

    This plugin uses the vault plugin for permissions and economy (without, it defaults to everything usable by everyone, teleblock shields bypassable by ops). Also (optionally) uses the Factions plugin for faction-based filters on some redstone devices or (optionally) towny for the same purpose.

    To steal my old description from the hmod page (with some updates, again, sorry, out of date, working on it):

    This is a redstone focused plugin aimed at leveling the playing field in pvp by providing defenders with the tools necessary to mount a proper defense. This being said, many of the features I am adding can serve non-combat purposes as well.


    What's in this plugin?

    As of v0.7 it adds flame turrets, sensors, trap doors, send signs, teleblock shields, chest shields and various other redstone based devices to minecraft (all of which are listed/explained below).

    [​IMG]

    Turrets

    Flame Turret

    You can make a flame turret if you have the permission "fortification.turret.flame".
    To do so place a sign on the block type defined in config (netherrack, id 87 by default).
    The first line must read "Flame" (no quotes, not case sensitive)
    second line is "[Turret]" (again not case sensitive and no quotes)

    When the sign is provided with power (via redstone) and the ground on the opposite side of the netherrack is level, fire shall appear up to 5 spaces (or whatever you define in the config under flame-turret-range) out from the netherrack (fire will not pass through solid blocks and can not appear in midair).


    Web Turret

    You can make a web turret if you have the permission "fortification.turret.web". To do so place a sign on the block type defined in the config (default is lightstone). Works just like the flame turret except the first line is "Web" (no quotes, not case sensitive). Unlike flame turrets, web turrets do not fire in a line. They fire a shot centered at the web turret length, 9 web total is placed around this spot. The web vanishes after a set amount of time (default 10 seconds, adjustable in config file).

    Arrow Turret

    You can make an arrow turret if you have the permission "fortification.turret.arrow". To do so place a sign on the block type defined in the config (defaultly this is set to 0, meaning it works with all block types). Works the same as the flame turret and the web turret except that the first line reads "arrow", "default", or is left blank (no quotes, not case sensitive). Arrow turrets fire in a (relatively) straight path from the side of the block opposite that of the arrow turret sign.

    Sensors

    You can make a sensor if you have the fortification.sensor permission.
    To do so place a sign on a block of your choice, with the first line of text being the type of filter you want on the sensor (blank = default), and the second line being "[Sensor]" (without quotes, not case sensitive) and a lever on the opposite end of that block. Now, in the case of the default sensor, when someone passes within 8 (or the length defined in the config file) blocks infront of the sensor it will detect their presence and activate the lever (and thus turn on any redstone near it). Filters can be applied to sensors to change how they detect people.

    Sensor Filters:
    playerdetect - Sensor detects only the two people listed on the 3rd and 4th lines of the sign.
    playerignore - Detects everyone except the two people listed on the 3rd and 4th lines of the sign.
    factiondetect - Detects people in the factions whose faction tags are on lines 3 and 4 of the sign (Requires factions plugin.)
    factionignore - Detects everyone except the people in the factions whose tags are on lines 3 and 4 of the sign (Requires faction plugin.)
    itemdetect - Detects people who are carrying an item with the id specified on line 3 or 4 of the sign.
    itemignore - Triggers if the detected player does not have the item listed on line 3 or line 4.
    weapondetect - Detects people who are carrying weapons (sword or bow).
    weaponignore -Detects people who are not carrying weapons.
    tooldetect - Detects people who are carrying tools (pick, shovel, axe, or shears)
    toolignore - Detects people who are not carrying tools.
    areaAlert - Detects everyone and broadcasts their display name and their location to everyone within a configurable radius around the sensor.
    factionalert - Detects everyone except people within the factions listed on line 3 and 4 and broadcasts the name of the person detected and their location to everyone within the factions listed on the 3rd and 4th lines.

    For a full list of sensor types ingame, type "/sensor". For more info on a specific type, type "/sensor type". (This also works for turrets, but its kind of pointless since there is only one turret type right now).

    Trap Doors

    You can make a trap door if you have the fortification.trapdoor permission.

    To do so place a wall sign with [Trapdoor] on the second line (case insensitive) on a block of the type you would like the trap door to remove(/replace if you have it set to replace blocks in fortification.properties (defaults to false)).
    On the first line put the length you would like the trapdoor to span (must be an integer greater than 0 and less than or equal to the maximum defined in fortification.properties, defaults to 4).
    From here you just have to provide power to the sign, power will remove blocks of the type the sign is on out to the length you set. If you have replace-trapdoor-blocks-on-power-off set to true it will replace all air (id 0) within the set length with the block type the sign is on when the redstone is powered off.

    Send Signs

    placing [Send (direction)], where (direction) = the first letter of a compass direction ([Send N] for instance or [Send U] for up, D for down), will, upon receiving redstone power, send text from one sign to another (one sign in the direction you are sending, one sign in the opposite direction, text that is sent is text which is on the same line that [Send] is on on the send sign, can have [Send] on multiple lines).

    For instance, if you had a setup like the below (will replace with pictures later :p)

    |South Sign 1 | | [Send N] | | North Sign 1|

    and the send sign (middle) recieved power, the sign to the south (South Sign 1) would have its next transmitted to the sign to the north (North Sign 1), so that the north sign would then read "South Sign 1". Options in the properties file include whether or not you can send commands via send signs (looks for [ ], thus compatible with craftbook as well as other commands in fortification, also checks for AllDo: PlayerDo: and ServerDo: signs from signcommands), whether or not the original text is erased, and whether or not sent text can overwrite existing text. Command permission is fortification.sendsign

    Message Signs
    The first line of the sign is the name of the person you want to send a message to. The second line is [Message]. The third and fourth lines are the message you want to send. When redstone power is recieved the message on the third and fourth lines is sent to the person on the first line. Command permission is fortification.msgsign

    Shields
    You can make a teleblock shield if you have the command permission fortification.shield.teleblock

    As their name suggests, teleblock shields prevent teleportation within a set range around the teleblock shield (configurable in fortification.properties). This prevents both teleporting in and out. It effects everyone except people who have the fortification.ignoreteleblock command permission or are an op. By default, teleblock shields must be built on obsidian.


    You can make a chest shield if you have the command permission fortification.shield.chest

    Chest shields detect chest use within a set radius around them (configurable within the config file, default 5). They are set up much like sensors with a lever on the opposite side of the chest shield sign. There are three varients of chest shields: chest, playerchest, and factionchest. Playerchest shields ignore the people listed on lines 3 & 4 of the shield sign, factionchest ignores people in the factions listed on lines 3 & 4 (requires faction plugin). Note that these do not prevent use of chests, they merely trigger redstone when someone tries to use so that you can set off traps/combine with message signs/whatever.

    Config Options (open)

    sensor-range: range of sensors, width is always 3.
    chest-shield-id: the block id required for a chest shield
    trap-door-range: range of trap doors
    send-sign-search-distance: range of send signs
    send-signs-remove-original-text: whether or not sent text is lost at source
    send-overwrites-existing-text: whether or not sent text overrides existing text
    allow-command-sends: whether or not commands using [] are sent.
    flameturret-block-id: block id of flameturrets (0 = any block allowed)
    chest-shield-range: radius of chest shield detection.
    send-overwrites-commands: whether or not sent text overrides [] commands.
    teleblock-string: message given on teleportation being blocked
    replace-trapdoor-blocks-on-power-off: whether trapdoor signs toggle blocks on/off or just remove them
    teleblock-shield-range: Radius of teleblock effect of teleblock shields
    allowed-trapdoor-blocks: set the block ids usable with trapdoors
    flameturret-range: range of flame turret fire
    teleblock-shield-block-Id: Required block id for teleblocks (0 = any block allowed)
    webturret-block-id: Required block id for web turrets (0 = any block allowed)
    webturret-range: Range at which web turrets fire
    web-dissipation-time: Time in seconds before web from turrets disappears
    arrowturret-block-id: required block id of arrow turrets (0 = any block allowed)
    sensor-broadcast-dist: distance the alert from an areaAlert sensor is broadcasted.
    msg-builder-only: If true, message signs force their creator's name on to the first line and factionalert sensors require that the creator is either a part of or an ally to the factions listed on lines 3 and 4.
    #If you have an economy plugin + Register the configuration options below allow you to set #the cost of individual mechanisms. If you lack either or the cost is set to 0 the mechanism #will be free.
    webturret-cost: 0.0
    flameturret-cost: 0.0
    sensor-cost: 0.0
    chestshield-cost: 0.0
    teleblockshield-cost: 0.0
    sendsign-cost: 0.0
    equalsign-cost: 0.0
    trapdoor-cost: 0.0
    arrowturret-cost: 0.0

    Planned Future Updates (open)

    Prevent a single message sign from spamming a player constantly with text.
    Add command that allows player to mute all messages from message signs.
    Add support for sending messages from message signs to all members of a faction.
    Create new type of send sign that exchanges/flips text between two signs (so s1 becomes s2 and s2 becomes s1)
    Add ability to move strings from one line of a sign to a different line on another sign, for instance "[Send N3] would send the string on the line the send sign is on to line 3 on a sign to the north.
    Add device that can detect the destruction of nearby blocks and activate redstone when they are destroyed.
    Add optional fuel/ammunition costs to turrets
    Add area health regen signs w/filters and ammunition requirement (shield type)
    Add new sensor types (multi-directional, radius detect, more filter options (such as mob filters))
    Advanced sensors that can send name of detected player to another sign or display it for use with send signs.
    Ammunition/item use system for turrets/shields.
    String transmitter/reciever, to send text from sign to sign at a great distance.

    Turret types to add:
    Multi-directional turrets, place block ontop of turret block, fires out in all user chosen directions
    Floor traps - turrets that come up from the floor and fire once when redstone triggered.



    Feel free to drop me a line, I am always open for more suggestions for new features.
     
    MuttsNuts and olimoli123 like this.
  2. Offline

    PlatinSturm

    jay! waited for this!
     
  3. Offline

    Sethimine

    Wow, am I second one?

    Well some bugs so far: Command not found for /sensor and /trapdoor

    EDIT: How do you make a teleblock shield?
     
  4. Offline

    Rogueleader89

    on a sign place "teleblock" (without quotes) on the first line and [shield] on the second. Note that the sign needs to be placed on the block type defined in the config (defaultly this is obsidian, if the type is set to 0 it should work on any block type), and yeah I'll work on getting the commands fixed here shortly, probably a simple oversight somewhere.
     
  5. Offline

    swift_fox24

    When can we expect a new version? What about a BOSEconomy and iConomy support system? Charge players to create these fortifications?
     
    Last edited by a moderator: Nov 13, 2016
  6. Offline

    Bseagull

    Looks cool but i don't think i will need it for my server... but nice work anyway!
     
  7. Offline

    Rogueleader89

    Caught up in summer finals this week, should have a new version after those are done (probably this coming weekend/early next week), I can certainly look into supporting economy plugins if there is interest, haven't looked much into that yet though as I don't use any on my own server.
     
  8. Offline

    WeaverOfLies

    !!! Been waiting for this since the Hmod version. Thank you! :D
     
  9. Offline

    SvenDub

    I can't create a flame turret.
    I get an error about permissions:
    Error message (open)
    18:11:57 [SEVERE] Could not pass event SIGN_CHANGE to Fortification
    java.lang.NoClassDefFoundError: com/nijiko/permissions/PermissionHandler
    at bukkitdev.Rogueleader89.fortification.FortificationListener.onSignChange(FortificationListener.java:2209)
    at org.bukkit.plugin.java.JavaPluginLoader$33.execute(JavaPluginLoader.java:469)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:994)
    at net.minecraft.server.Packet130UpdateSign.a(SourceFile:41)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:89)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:460)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:369)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.ClassNotFoundException: com.nijiko.permissions.PermissionHandler
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:36)
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:24)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 12 more

    What are the right permissions for this plugin? I have:
    fortification.turret: true
    fortification.flameturret: true
     
  10. Offline

    Rogueleader89

    permission for a flame turret is fortification.turret.flame, updated the first post to reflect this.

    The error is odd though.. I'll have to look more into that, what version of permissions are you using?
     
  11. Offline

    QWW

    Are you making 1060?
     
  12. Offline

    Mando501

    1060 seems to break sensors - the lever moves but no power is given.
     
  13. Offline

    Rogueleader89

    updated to 0.7

    Changelog:
    • Chest, Playerchest, and Factionchest shields added. (which trigger redstone on chest use)
    • BOSEconomy support added
    • Web turrets added (I'm still playing with these, considering making the range more configurable ingame by the player such as how trapdoors are)
    I was unaware of sensor issues with 1060 at the time of updating this, so they may or may not be fixed in this version. I'll check them shortly and update with a fix soon if they are broken.

    EDIT: checked sensors, seem to be working with 1060 on my server, if you experience further issues with them provide as much info on the problem as possible.
     
  14. Offline

    kymotsujason

    hey, you may need to update the link, on my minecraft server it says its 0.6 still.
     
  15. Offline

    QWW

    Thank you! Time to win the war! :D
     
  16. Offline

    SvenDub

    I'm using PermissionsBukkit, newest version
     
  17. Offline

    O'Zone

    I have a problem with plugin start:
     
  18. Offline

    Zerkhan

    Oh my god ... You really had to have the idea to create a plugin like this!
    It's stupid on my server, I can not make it work, let me explain.

    Orders plugin is not recognized,
    then I am the Admin server. Then I can not run the panels.

    I use the 1060 version Bükk.
    I did not change the configuration of the plugin.

    Error starting:
    [​IMG]

    Error Closure:
    [​IMG]
     
  19. Offline

    Rogueleader89

    No support for bukkit's built in permissions yet, this is running off of the old aptly named Permissions plugin that predated bukkit's built in permission system. I'll be adding support for bukkit's new system in a future version (probably 0.8 or 0.9 depending on how some of the next things go).

    Just checked the download again, it seems to be the right version, but here's an alternate link just incase:
    http://dl.dropbox.com/u/17471830/Fortification.jar

    @O'Zone - try 0.7 and see if it fixes, otherwise I need to know if you are running permissions or BOSEconomy as those sections of code you're getting errors on are related to checks to see if they are running or not.

    @Zerkhan - looks like the same issue as O'Zone's, try 0.7, report back if you are running permissions or BOSEconomy. Not sure what the Orders plugin is or what panels are..
     
  20. Offline

    Deathfromace

    @Rogueleader89

    So far the turret traps work for me as an OP but teleblock and message ones sends an error saying "Could not pass event SIGN_CHANGE to Fortification"
     
  21. Great to see it back!

    Could you add iConomy support please?
     
  22. Offline

    olimoli123

  23. Offline

    Rogueleader89

    Next thing on my list. Meant to have it with this release but I figured people would like a new version with what I had rather than waiting a bit longer for iconomy as well.

    @Deathfromance I'll look into it, in the meantime if you see this before I get it fixed provide the full error as it gives those ever useful lines of code that need fixing generally.
     
  24. Offline

    Deathfromace

    Sadly that was all the console gave me and I am unsure how I would get more of the error. If it helps I am doing this all without permissions because I like my server to have things everyone can use. Maybe the default of those going to everyone without permissions detected is messed up? If not then if I can find how to get the full error I will.

    My members are bringing up the same error in console when trying to do the web turret.
     
  25. Any way to make Web turrets to not be String farms? Perhaps some protection on the web that appears so it can't be broken?
     
  26. Offline

    Deathfromace

    @Rogueleader89

    I am getting more of an error now when trying to do the message sign
    [​IMG]
     
  27. Offline

    Codex Arcanum

    Maybe just interfere so they don't drop the string, otherwise they would keep you stuck for a really long time.
     
  28. Are you still planning to update/fix this plugin?

    Could I request source otherwise please :)
     
  29. Offline

    Rogueleader89

    yes i'm still working on this, just got caught up in real life stuff and other such things. Source is in the jar though regardless.
     

Share This Page