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

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

  1. Offline


    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.

    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).



    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.


    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

    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


    Awesome dude glad to see this is still being developed. My server players have so much fun with it.
  3. Offline


    can get the trap door and all but the trouble turret to work but can anyone get the sensors, sheilds and signs to work? not sure if its just me or if there being a pain to
  4. Offline


    Sorry for the delayed response, I'm not having any issues on my own server with sensors or shields, haven't tested send signs (I assume you mean send signs though?) since the recent bukkit 1.2.5R2 build, but they were working right in 1.2.5R1. My best suggestion is that you recheck how you have the mechanisms set up, often the issue is forgetting a lever or mistyping into a sign. Also if your shield issue is with teleblocks, note that the fortification.* permission currently allows you to bypass teleblocks (this is fixed in the next version, 0.9).
  5. Offline



    I installed the plugin, build up a arrow and flame turret, but when I want to trigger it by taking the redstone I get some weird long errors in my console. Help me out please I would love stuff like that :(
  6. Offline


    Oh I guess its because ive got 1.2.5 R4, Mate upgrade it to 1.2.5 please! PLEASE!
  7. Offline



    1) How are turrets destroyed?
    2) And can they be destroyed by enemy factions if the Factions plugin is being used?
  8. Offline


    Destroying the sign or the block the sign is on (which also destroys the sign), destroys the turret. As to whether they can be destroyed with factions or not, that depends on your faction protection settings, generally speaking, if you can destroy a sign or a block in an enemy faction you can destroy a turret.
  9. Offline


    I'm using CB 1.3.1-R2.0, Java 1.7u7 and bPermissions 1.9.18, and it seems like the plugin is compatible. Plugin does not interact with redstone torches but does with levers.

    - Flame Turret: Verified to Work
    - Web Turret: Verified to Work
    - Arrow Turret: Verified to Work
    - Sensors: Kinda works, does not set off adjacent redstone, /sensor command does not exist.
    - Trap Doors: Verified to Work
    - Equal Signs: Could not make work (maybe user error)
    - Send Signs: Could not make work (maybe user error)
    - Message Signs: Verified to Work
    - Shields: Could not make work (maybe user error)

    The generated config file was empty and any attempt to load a config where it does not like the value/format, it erases it completely. Through trial-n-error, I found that the below config file will allow the plugin to load it without errors:
    Show config.yml (open)

    sensor-range: 5
    trap-door-range: 5
    send-sign-search-distance: 5
    send-signs-remove-original-text: true
    send-overwrites-existing-text: true
    allow-command-sends: true
    flameturret-block-id: 0
    chest-shield-range: 5
    send-overwrites-commands: true
    teleblock-string: All your base are belong to us
    replace-trapdoor-blocks-on-power-off: true
    teleblock-shield-range: 5
    flameturret-range: 5
    teleblock-shield-block-Id: 0
    webturret-block-id: 0
    webturret-range: 5
    web-dissipation-time: 5
    arrowturret-block-id: 0
    sensor-broadcast-dist: 5
    msg-builder-only: false
    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

    I did notice the following error in the console:
    Show Console Error (open)

    2012-09-09 18:33:42 [SEVERE] Could not pass event BlockBreakEvent to Fortification
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:332)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462)
        at net.minecraft.server.ItemInWorldManager.breakBlock(ItemInWorldManager.java:278)
        at net.minecraft.server.ItemInWorldManager.dig(ItemInWorldManager.java:177)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:546)
        at net.minecraft.server.Packet14BlockDig.handle(SourceFile:46)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:276)
        at net.minecraft.server.NetServerHandler.d(NetServerHandler.java:109)
        at net.minecraft.server.ServerConnection.b(SourceFile:35)
        at net.minecraft.server.DedicatedServerConnection.b(SourceFile:30)
        at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:581)
        at net.minecraft.server.DedicatedServer.q(DedicatedServer.java:212)
        at net.minecraft.server.MinecraftServer.p(MinecraftServer.java:474)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:406)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:539)
    Caused by: java.lang.ClassCastException: org.bukkit.craftbukkit.block.CraftBlock cannot be cast to org.bukkit.block.Sign
        at bukkitdev.Rogueleader89.fortification.FortificationListener.onBlockBreak(FortificationListener.java:321)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:330)
        ... 16 more

  10. Offline


    Hadn't noticed the sensor issue thanks, I suppose my next question is if you are using the alpha 0.9 build on bukkitdev (where I have largely moved this mod) or the 0.8.7 build? On a fixes/updates note, this plugin has kind of been put on hold for me, I've had a lot of things in life to deal with recently, updates are still coming but at a much slower pace, I'll see if I can't get a build up that fixes the config issues though in the near future.
  11. Offline


    Sorry, thought I had included that info. I tested it with version 0.9 which I got from the bukkitdev site.
  12. Offline


    Alright, sorry for the long hiatus, had to deal with insane amounts of stuff, but now my free time is returning and I'm getting this up to date and adding/fixing features.

    On that note, I've released a new build onto bukkitdev that updates the 0.9 alpha 2 build to work with the latest versions of everything (still has the same bugs alpha 2 had though, sorry, will be fixed up a lot in the coming weeks)

    So currently the plan is to finish adding the 0.9 features into a non-alpha build within the month of June and then go forward and finish all of the final intended v1.0 features while adding some good ideas from you guys and some of my own thoughts along the way. Please note that I will be checking bukkitdev a ton more than these forums, as such if you have questions, problems, or other concerns I highly suggest you ask me there for a timely response.

Share This Page