Inactive [MECH] PorteCoulissante - Easy and realistic portcullises

Discussion in 'Inactive/Unsupported Plugins' started by Captain Chaos, Mar 6, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    Captain Chaos

    ****************************************************************************************
    PorteCoulissante moved to BukkitDev!

    PorteCoulissante has moved to BukkitDev! I will no longer be updating this thread, please use the BukkitDev page to keep track of developments, download the plugin and source code, read how to configure it and other details, etc.
    ****************************************************************************************

    PorteCoulissante - The easy and realistic portcullis plugin:

    Build redstone powered portcullises, without using commands! This is my first ever Minecraft plugin, so please be gentle! I needed a project for my first plugin, and I've always wanted a working portcullis in my town gate, so I decided to write this. I subsequently discovered that there already is a portcullis plugin (which is why I named mine after the French word that the word portcullis was derived from), but I think mine has enough distinguishing features to be useful.

    Download the latest release from the BukkitDev page.

    Also check out the new sister plugin, RetractableBridge, which does basically the same thing, only horizontally.

    Features:
    • It doesn't use commands. Just build the portcullis and it will work.
    • Stateless, i.e. it does not have to save anything on the server.
    • It's redstone powered, giving you flexibility in controlling it.
    • It is realistic. The portcullis does not disappear, but moves up and down just like a real one would.
    Usage:
    • Build the portcullis itself by stacking rows of fences (wood or iron), at least two wide and two high.
    • Build the wall around it to contain it. Leave enough empty space above the portcullis to allow it to go as high as you want it to go.
    • Power the portcullis by powering one of the blocks adjacent to it on either side, by attaching a lever or redstone dust. For now, the power has to come from the side.
    • The result should look something like this:
    [​IMG]
    • When the block is powered, the portcullis will start moving upwards, and will keep going until it hits something and can't go any further. It moves slowly, since a portcullis is heavy!
    • Important: make sure that when it is in the up position, it is still in contact with a powered block (the same one, or a different one).
    • When the power goes off, the portcullis will drop down (a lot faster than it went up).
    • Decorate the gate by building walls in front of and behind the portcullis to cover the empty space and to make it appear the portcullis is moving in a groove. Of course you can make it look any way you want! Here is an example:
    [​IMG]

    Hints and tips:
    • The portcullis can be any size you want, as long as it is at least two blocks wide and two blocks high. It must be rectangular though, and have no holes. If the portcullis breaks, it won't move any more until you repair it.
    • Try to make the empty space above the portcullis one block less high than the portcullis itself (like in the first picture above). That way, you only need to power one block (the one in the middle on either side), since that block will always be in contact with the portcullis.
    • Of course the empty space can be even smaller, if you want. The portcullis only has to go up two blocks to let people through, or three if you want the passage to be a little less claustrophobic.
    • The portcullis will go through (and hold back) water and lava, so you can make water gates and water or lava traps with them.
    More information:

    For download links, source code, configuration information and change logs, please see the BukkitDev page:

    http://dev.bukkit.org/server-mods/portecoulissante/
     
  2. Offline

    Captain Chaos

    @Draco157: aha, interesting. The only plugin which you and Greylocke have in common is Permissions. Would you mind trying to see if it works if you temporarily disable the Permissions plugin? And if that doesn't work, disabling all plugins?
     
  3. Offline

    Draco157

    yeah i'll try it out now
    [MERGETIME="1299692471"][/MERGETIME]
    Same thing still happens even if it is the only pluggin running some of the gates will stop working
     
  4. Offline

    Captain Chaos

    I've been experimenting, and I've identified one clear bug: if the portcullis is moving when you log out (and there are no other players near), it breaks when you next log in and try to move it. What happens is that the chunks get unloaded immediately, but the portcullis still keeps moving, and the chunk cache gets somehow out of synch.

    @Draco157: could it be that the gates that stopped working (when mine was the only plugin that was running) were moving at the moment you logged out? @Greylocke: might this also explain some of the breakdowns you were seeing?

    @DirktheJerk: that's great to hear! I notice no Permissions plugin in your list. Is that correct?
     
  5. Offline

    Greylocke

    Have you tried teleporting nearby? From my testing the other evening, that seemed to always result in a broken gate.

    Last night I setup a portcullis test area with 3 gates: a 2x2 that travels up 3, a 2x3 that travels 2, and a 4x4 that travels 3. I made a timer that runs 8 seconds on/3 seconds off to operate the doors.
    [​IMG]

    The first lockup was just after I had finished the timer, 2x3 and 4x4 doors. The 2x3 was hooked up to the timer and the 4x4 was connected to a lever. As I was working, the small door was doing its auto up/down thing, and I'd occasionally run over to the large door and flip the lever. This time, the door went up, but wouldn't come down. Looking over at the smaller door, it was now stopped too, even though the timer was still cycling. I restarted the server and started testing dropping/breaking blocks in the area, but the door continued to work. I then setup the 2x2 door and hooked all 3 to the timer. All three doors cycled up&down every 11 seconds for over two hours while I did the usual kind of things. Never failed once. I wish it would have -- would've made testing much easier.

    So... after running nonstop for over 500 cycles, I figure that whatever gave me problems in the past must no longer be a problem now, since it used to lock up fairly quickly. I proceed to my NetherGate testing and go wander the multiverse for awhile. When I get back to my world, I notice that the big door is in the UP position and not moving. Looking around, I see this:
    [​IMG]
    Initially it was just one section of fence that had blown through the top of the frame, but the gate is still cycling and with each cycle it added one more section above until I had what looked like a tall ladder kind of thing.

    So... my guess is that something in the chunk update/save/reload process is messing with the gate logic. The 'blown through' frame was unique in that it had an additional redstone connection at the top to maintain contact when the 2x2 gate raised up 3 spaces. It seems like the gate tried to stay connected at both redstone points, with a humorous but negative outcome. Knowing how the plugin actual works, does this jive with your code?
     
  6. Offline

    ChrisX930

    Nice Plugin, but the Fence-Gate wouldn't come down, back to earth >_>'...
     
  7. Offline

    Draco157

    No i never logged out while they were moving at the moment both of my gates are not working and stuck down, the first is built into my castle(there is a gap for the gate to go up although you cant see it) 2011-03-09_20.02.44.png
    and the second is a test gate i built to see if it would stay working if separate from everything else 2011-03-09_20.05.43.png
     
  8. Offline

    ChrisX930

    NEED HELP
    Nice Plugin, but I've a problem.
    I can upper the gate, but i can't no lower the gate
     
  9. Offline

    Draco157

    Some of us are having that problem mate [​IMG]
     
  10. Offline

    ChrisX930

    Who can help us :(
     
  11. Offline

    Nijikokun

    Name your jar correctly please :D PorteCoulissante
     
  12. Offline

    Greylocke

    This plugin has only been out a couple days. Things that worked flawlessly in the lab always pickup a few bugs when they get released into the wild. The dev for this is figuring things out -- he'll get it fixed up.

    In the meantime, if there were a command like '/porte reset (world)' that would drop & resync all gates in the specified world, that'd be cool. [​IMG]
     
  13. Offline

    Draco157

    Creator is looking into dont worry :)
     
  14. Offline

    Captain Chaos

    How important is that? This is the Maven convention, which CraftBukkit seems to use also. CraftBukkit doesn't seem to care that the jar filename is.
    [MERGETIME="1299709297"][/MERGETIME]
    No need to shout! ;)

    Are you sure that when the portcullis is in the up position it is still in contact with a redstone powered block? If it won't go down at all that's probably your problem. It has to be able to notice the redstone turning off. If it stops working after a while it's probably this bug I'm looking in to...
     
  15. Offline

    DirktheJerk

    Alright, now that I am home and testing again, The gates are still working fine on my server.

    CB: 514

    Plugin list:
    BigBrother 1.6.3
    Dynmap o.13
    Essentialscore
    EssentialsBan
    EssentialsSpawn
    essentialsTele
    essentialsUpdate
    FakeMessage 0.3
    FakePermissions (part of Groupmanager)
    GroupManager 1.0 Alpha 3 (permissions plugin)
    iChat 2.10
    Jail 0.5.3
    MCDocs 5.2.2
    MinecartmaniaCore 1.02d
    MinecartmaniaStations 1.02b
    MinecartmaniaSignCommands 1.02a
    MinecartmaniaAdminControls 1.0
    MinecartmaniaChestControl 1.02
    Multiverse 1.5
    MyHome 1.9.2
    MyWarp 1.10.3
    portecoullisant 1.0.2
    ServerEvents 1.3 (updated for 1.3_1)
    spyer
    WorldEdit 4.0 Alpha 8
    WorldGuard 4.0 Alpha 1

    I will do some more extensive testing later on this evening and let you know how it all goes. But I just logged in to my server (which has been up for 57 hours at the moment), and the gates are still going up and down just fine.
     
  16. Offline

    ChrisX930

    Yes, the portcullis (in up position) is in contact with the redstone powered block.
    But nothing...
     
  17. Offline

    ThomasJ

  18. Offline

    Greylocke

    I know this doesn't really help get PC fixed or anything, but I thought it was really pretty funny and I had to share. I just checked my world's online map for the first time since doing all the gate testing last night. Here's my testing area -- notice anything odd about one of the portcullis frames? :eek:
    [​IMG]
    Yes, that is a mile-high fence sticking out of the top! Funny thing is that the Portcullis To Heaven isn't visible from the ground, but obviously it is there in the server somewhere...
     
  19. Offline

    Captain Chaos

    Actually, I think I've identified a bug in Bukkit which causes a lot of the trouble and may be the underlying cause of the bug you mentioned. It would explain things going wrong whenever you log out, or leave the area, or teleport away, etc. I've filed it as bug #553: http://leaky.bukkit.org/issues/553

    I've also released a new version (1.0.3), which is a bit more robust, and may clear up some of the trouble. But most of it I think is explained by the Bukkit bug, so we'll have to wait until that is fixed. Please try it out everyone, and let me know if it makes any problems go away.

    I can't reproduce the gate sticking at the top (when it's correctly wired and you're not leaving the area, etc.) at all myself, so I'm not yet sure what causes that. 1.0.3 also allows you to enable debug logging, which will be useful to get to the bottom of the top-sticking bug once the Bukkit bug is fixed.

    @Greylocke: that looks pretty funny, yeah... :)
     
  20. Offline

    ThomasJ

    That makes a lot of sense actually.

    I'll see if I can't find the time to compile bukkit with that fix later on if Dinnerbone doesn't beat me to it.
    My server quite quickly sees these kind of issues both with Minecart Mania and WormholeXtreme in addition to this plugin.

    [edit]
    Any chance you could add support for http://forums.bukkit.org/threads/ad...keep-your-server-plugins-up-to-date-400.5026/ ?

    And your download link still points to 1.0.2 btw :)
     
  21. Offline

    Captain Chaos

    Alright, I'll be very interested to know what you find!
    I'll look into it. All it seems to involve is sending the author the link to my plugin. Personally, I wouldn't want my plugins updating automatically, I like to stay in control and know what's being installed and why...
    Oops... :oops:

    Fixed! Thanks for pointing that out.
     
  22. Offline

    Draco157

    Cool will try out the new version

    It is a cool plugin by the way :D
     
  23. Offline

    Ygreg

    I have the same problem. The portculis works fine after a server reset. Then when I teleport to another place in the same world, or into a different world and back, it only moves up and gets stuck. It happens EVERY time I teleport.

    Version 1.03 didn't help.
     
  24. Offline

    Incendia

    Shouldn't the gate automatically drop if it's no longer in contact with a redstone-powered block? I mean it makes sense to me.
     
  25. Offline

    Greylocke

    I'm guessing that the change of state is what triggers the gate logic to move up or down. If the redstone is not adjacent, then the change of state would not be detected... so no movement.
     
  26. Offline

    Captain Chaos

    @Incendia: this was easier to implement, due to the way Bukkit works. I recommend to always make the empty space above the portcullis smaller than the portcullis itself. That way there are always at least two blocks (one on either side) which are always in contact with the gate, and if you power that block, it works exactly as you'd expect.

    @Ygreg: yeah, that's probably the Bukkit bug. Hopefully that will be fixed soon (mine is not the only plugin it's affecting...).
    [MERGETIME="1299783624"][/MERGETIME]
    Exactly. :)
     
  27. Offline

    ChrisX930

    I wan't to create a Gate with two Triggers,
    I would like to two switches the gate open and close, whether both switch on or off, or even on and off. The gate above, we can close the door and one of the switches (whatever) (and vice versa)

    (Thanks to Babylon Translator xD )
     
  28. Offline

    opiumskittles

    I'm using craftbukkit version 493. I have MineCartMania 1.03 and WorldEdit 4.1 installed.

    The gates go up, but will not go down for me. I also made sure that every block on the way up had power so that it would "know" when power was shut off. No luck.
     
  29. Offline

    Incendia

    Well what I meant was when you start moving the gate up, you... I dunno, I'm terrible at explanations:

    redstone var if there's redstone adjacent
    moving var if the gate is moving up (also store the number of ticks its moved up)

    as long as both are true, the gate moves up. If the redstone is no longer adjacent, then it moves back down until redstone is adjacent again, or until it reaches the reverse number of ticks it moved up (to prevent breakage by removing redstone after it's passed but before it moves back down)

    Like I said, I'm terrible at explanations :<
     
  30. Offline

    Greylocke

    If I understand you correctly, you want to have two buttons, one on each side of the gate. Either button will reverse the state of the gate -- if the gate is up, then either button will send it down, if the gate is down then either button will send it up.

    If that is true, then you need to link the two buttons and then send the output to a T-Flip Flop. The output of the T-Flip Flop will be connected to the gate. In the linked image, I'd suggest building the A type. Your buttons would connect at T and the connection to the gate is at Q. If you put the whole thing underground, be sure to dig yourself a nice big room for it that is NOT directly beneath the gate. Notice that the ins & outs are on the edges of the circuit. If you build it directly underground, your buttons & gate will be in the middle of the circuit and you'll have to find a way to get the signal out to the edges without interfering with the rest of the circuit.
     
  31. Offline

    ChrisX930

    Thank you, I'll try it :)
    But I don't really understand this Image "T-FlipFlop" ^^ Can you make a ingame screenshot for me? :3
     
Thread Status:
Not open for further replies.

Share This Page