[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

    Rogueleader89

    Looks like I missed some old permissions stuff, I'll see if I can't get a fix out this next weekend (unfortunately a busy week for me).

    @Ikarirain thats a great idea, sensor filters are fairly easy to add as well, I'll make a note to add it in the next update.
     
  3. Offline

    Rappolt

    Oddly, it doesn't shoot the flame turret to the South, I haven't tried the other turrets though...
     
  4. Offline

    sayhisam1

    hey, can you make sensors that detect in a radius too? not only in a straight line
     
  5. Offline

    bobacadodl

    Does this plugin work with craftbook/falsebook? I quickly installed this plugin onto my server and I also have the falsebook plugin. I haven't done extensive testing yet, but the flame and web turrets didnt seem to work. The arrow turret DID work
     
  6. Offline

    Rogueleader89

    It should work fine with craftbook/falsebook (running craftbook on my own server), just getting some time again to put towards this to fix up what bugs have cropped up if you want to provide some basic info on the issue (bukkit/server version, are you running the new mc 1.0 build (1529?) or 1337? Any errors?).
     
  7. Offline

    bobacadodl

    I think the errors are due to craftbook also manipulating the netherrack and glowstone blocks. Let me try changing the block ids in the config and ill let you know if that works.
    (running 1.8.1 minecraft and 1337 bukkit)
     
  8. Offline

    Rogueleader89

    Update:
    0.8.4
    • Updated to support recent builds of factions (warning, builds older then 1.6 will likely not work with this version of the plugin)
    • Fixed permissions issues and removed support for old permissions plugin (must use superperms now)
    • Added EnemyDetect and AllyDetect filters for sensors, which detect the enemies or allies of the factions/nations listed on the last two lines of the sign.
    thanks to @Ikarirain for the ideas behind the new sensor filters.

    @dezzicky2 this should fix your issues with turrets and sensors related to permissions that you posted earlier
    @bobacadodl did you figure out whether or not it was a plugin conflict causing problems with turrets for you?
     
  9. Offline

    DonSuey

    Hey there,

    got this one:
    Code:
    2011-12-11 22:05:37 [SEVERE] Error occurred while enabling Fortification v0.8.4 (Is it up to date?): com/massivecraft/factions/iface/RelationParticipator
    java.lang.NoClassDefFoundError: com/massivecraft/factions/iface/RelationParticipator
        at bukkitdev.Rogueleader89.fortification.Fortification.onEnable(Fortification.java:199)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:188)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:968)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:280)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:186)
        at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:169)
        at net.minecraft.server.MinecraftServer.t(MinecraftServer.java:348)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:335)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:165)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:399)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
    Caused by: java.lang.ClassNotFoundException: com.massivecraft.factions.iface.RelationParticipator
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        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(ClassLoader.java:423)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
        ... 11 more
    
    I'm new in inserting plugins into a server, so forgive me if it's a noobish problem ... ;-)
     
  10. Offline

    Sithnian

    I'm getting the same error as DonSuey is. Also, my turrets aren't working. I take it that my turrets aren't working becuase of the error. (Obvious, maybe? I don't know, not familiar with Java)
     
  11. Offline

    Rogueleader89

    yeah that error is definitely stopping turrets from working, do either you or @DonSuey use the factions plugin along with this? And if so what version since it appears to be related to something there (I'm guessing you don't and its an error on my end, but just to be safe...).
     
  12. Offline

    bobacadodl

    @Rogueleader89
    Yes, it was a plugin conflict causing these errors for me. (falsebook)
    It was because falsebook adds its own features when netherrack and glowstone are powered by redstone, causing it not to work. I haven't tested yet, but changing the block ids in the fortifications config file should solve this problem for anyone else wondering.
     
  13. Offline

    Sithnian

    No, I (don't know about DonSuey) am not using the factions plugin.
     
  14. Offline

    DonSuey

    no, i don't have any factions plugin. just using the "War"-Plugin, PvP. but it's also not working without War so i don't think that tbhis is the problem. don't have any other plugin.
     
  15. Offline

    arachan

    Hello, I have the same error as @DonSuey. I have no factions plugin, Permissions 3.1.6, and the turrets don't seem to work. I get the error whenever I reload this plugin. Am running bukkit 1602. Thanks.
     
  16. Offline

    Tulips

    can you make it work for no permissions? the newer permissions i can't seem to get to work without making myself perm admin then people cud login as me and get free gear, or if u know that plugin where u /register i'll be fine but i can't find that plugin
     
  17. Same error here:

    Code:
    2011-12-15 21:15:06 [SEVERE] Error occurred while enabling Fortification v0.8.4 (Is it up to date?): com/massivecraft/factions/iface/RelationParticipator
    java.lang.NoClassDefFoundError: com/massivecraft/factions/iface/RelationParticipator
        at bukkitdev.Rogueleader89.fortification.Fortification.onEnable(Fortification.java:199)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:188)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:968)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:280)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:186)
        at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:169)
        at net.minecraft.server.MinecraftServer.t(MinecraftServer.java:348)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:335)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:165)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:399)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
    Caused by: java.lang.ClassNotFoundException: com.massivecraft.factions.iface.RelationParticipator
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        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(ClassLoader.java:306)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
        ... 11 more
    Factions isn't installed, but Towny.
    There's a problem inside your "onEnable" Part.
    I think you forgot to check if Factions really is installed when activating Factiona-Features.
     
  18. Offline

    Rogueleader89

    yeah I've been working on the error since the first postings of it, thing is, that is being checked, the place it points to doesn't have anything needing factions running (it points to the main mechanic listener which only uses factions in one spot which has not changed at all and properly checks it), which is why this fix is coming so slowly... at a bit of a loss as to what the problem is exactly.
     
  19. Offline

    Knight Hawk3

    I like this!
     
  20. Offline

    imagnuson501

    Amazing!
    One request, could you add a factions filter to the Teleblock Shield?
    One that would allow certain Factions to teleport?
    :)[cake]
     
  21. Offline

    Kirb

    Any update on that error? Getting it as well.
     
  22. Offline

    Rogueleader89

    still working on finding the source of the problem. In the meantime, here is a temporary version for anyone not running factions (if you have the factions plugin, don't download this!) that should fix the issue (though not solve the problem on my end unfortunately)

    http://dl.dropbox.com/u/17471830/FortificationTemp.jar

    @imagnuson501 sounds like a decent idea, I'll look into it after i figure out this error.
     
  23. Offline

    Kirb

    Thanks!
     
  24. Offline

    Zeon0909

    Does it work with MC 1.0.0 and the latest craftbukkit?

    Z

    EDIT: Yes it does, just need the temp fix and it works.

    However, no one apart from OPs can make any of the items (turrets, sensors etc) and we're not using permissions.

    Apart from OPing everyone, how can we make it so that everyone can make any of the items?

    Thanks,

    Z
     
  25. Offline

    deathnote1029

    Hey rogueleader, is there any update on the error? i'd love to be able to use this as players use to love using it :D
    hope you haven't abadoned this project, it's one of those plugins that are definately hard to come by, if someone else forked it, it just wouldn't be the same, keep up the good work man :D, hopefully your able to figure it out :)
     
  26. Offline

    Rogueleader89

    Just busy with other things (and no ideal solution to the error unfortunately, but solved for now at least).

    New version up now (two actually since i failed to miss something silly on first upload....)
    0.8.5.1 Changelog
    * Fixed error on startup for people using Factions plugin
    * Removed Register support and added Vault support
    * Added new config option for people who are not running a permissions plugin (setting permissions to false lets everyone use everything).
    * Temporarily removed allydetect and enemydetect sensor filters for factions users (towny versions still work fine).
    *Temporarily removed factionalert signs (towny versions still work fine)

    AllyDetect and EnemyDetect sensors for factions users was the issue for everyone else as far as i can tell. Not sure why this was or how to fix it so they work without causing the issue, so for now they are just disabled. Same reason factionalert is disabled.
     
  27. Offline

    deathnote1029

    Thank you ;D! ill test it now to see if its all good, keep up the awesome work man :)
     
  28. Offline

    Domochevsky

    Hm, a question if i may: How exactly does one use the ITEMIGNORE function of sensors? The signs keep popping off when i use the following things in line 3 or 4, complaining that line 3/4 needs to be a integer id of a item:

    7
    ID 7
    [7]

    Do held blocks not count as items? (I tried it with 314, the gold helmet, as well, but that popped off too.)

    Also: I can't help but notice that mobs keep running in front of fortifications without triggering the sensor (set to ignore a specific player only). Is that intended?

    Somewhat related: Arrow turrets shoot from somewhere above them, meaning that if there's a block on top of the turret it will get caught and not shoot. This also means that one can stand safely in front of the turret, since the arrows go over your head. (which also makes it a tad difficult to set up a sensor with enough range to make use of this and still conceal the whole setup somehow.)

    I know dispensers are easier to use than these blocks, but those have the problem that they don't rotate properly when pasted in with WorldEdit. :/
     
  29. Offline

    Rogueleader89

    an itemignore sensor would look like this:

    itemignore
    [sensor]
    7


    EDIT: Okay, it looks like something odd has happened since i last checked the coding in the valid input check on this sensor type, fixing it now for the next version.
    EDIT2: Found the issue, silly mistake on my part, surprised it hasn't been caught earlier. Essentially it is looking for something on both line 3 and line 4, so if you put an id on both of them it works fine, so temporary work around would be to put the same id on both lines, I'll see if i can fix it to work okay with just one line though for next release. In other news, it seems to detect held blocks just fine

    The above example would trigger redstone if the player was not carrying bedrock. Held blocks should count here as well as general items in the inventory (though stuff in an extended inventory such as that provided by plugins like spoutbackpack would not be detected), so if they are not detecting held items reply back and i'll get a fix in for the next release.

    As to mobs with sensors, it is intended that they do not trigger them since I originally designed the plugin for my pvp server, I've considered making specific filters that would make mobs trigger them but there hasn't really been any demand for them since (in the past) craftbook had ics that covered mob detection just fine, now that craftbook is basically gone though I may look into it if there is interest.

    And arrow turrets... well in short, they need work in general, I am aware of several issues with them and they were largely neglected due to equivalents within craftbook and of course dispensors, they are something I will be fixing up in the future (either this next release or the one after is likely to be general bug fixes and recoding to take advantage of various api changes since a lot of the older code hasn't changed since I ported the plugin over from hmod)
     
  30. Offline

    Domochevsky

    Mhm, highly interesting, that. :)

    I tested it out and you're right, putting 7 into both slots correctly reacts to carrying/not carrying a piece of bedrock. Both carried blocks (bedrock) and items (gold helmet) are recognized.

    I support the notion of adding a mob-related filter. Maybe make it part of PLAYERIGNORE/DETECT? (That is, specific or all mobs counting as a certain player name.)

    Oh yeah, something else i noticed: Connecting a SENSOR directly with a TURRET (lever -> sign) does nothing. Only if there's at least one piece of redstone inbetween does it do something.

    Image:
    Fort_1.png
     
  31. Offline

    Rogueleader89

    yeah this has to do with the bukkit api, the turrets react on redstone change, triggering the levers via data value changes doesn't trigger the onredstonechange listener (but does still provide power to redstone). Its possible i may fix this by bypassing the bukkit api in a future release, but its fairly low on the priority list right now.

    Also fixed the itemdetect/ignore sensors last night, might try to get a smaller release out tomorrow.
     

Share This Page