Jump to content

[Mod] Powered Doors And Hatches


three08

Recommended Posts

Power doors, hatches and drawbridge for A17 b208

 

This mod requires SDX

 

Updated for a17

I'll add the release notes as soon as I get the chance. In the mean time check the mod.xml file for details.

 

Download Link (A17b208)

 

Requires SDX 0.7.3

 

Drawbridge demo:

 

 

 

Powered Doors And Hatches For A16.2

 

Adds 4 powered doors that automatically open when powered.

 

v2.0.1 Update notes

  • I haven't tested this version on a server yet.
  • This update brings back the auto open and close. This version can do everything the last 2 could do.
  • Controlled by a powered block placed 2 blocks directly above or bellow the door, this must be one of the 2 included door control relays.
  • If both are powered, both will act as power inputs so you can use 2 triggers.
  • Automatically opens the door when powered and closes when not powered.
  • Has a xml setting to turn auto trigger off.
  • Alot has changed, if updating make a backup of your map first.
  • You can now only power your doors with a "Door Control Relay" or a "Concrete Door Control", each require 5 power.

 

XML Options

  • Added: Auto open/close option to xml, all doors are set to auto trigger.
  • Added: Option to xml for top and bottom power input locations, the value is how many blocks above or bellow the door the input will be placed. Default is 2 for both so the top location has changed but you can change it back in the xml.
  • Added: Option to xml to toggle auto trigger on/off
  • Added: Option to xml for 4 power inputs. This is off by default. If on the extra inputs will be 1 block above and bellow the other 2 inputs.
  • Added: Option to xml for the doors to Close when powered and open when unpowered. This is turned off by default on all doors. Only works if AutoTrigger is set also set to true.
  • Added: Option to xml for animation speed, this is really just here for another mod that requires the door to close faster. 1 is normal speed.
     

 

Download Link

 

Demo:

 

Setup:

[video=youtube_share;z16VUunQr3I]

 

 

 

v1.0 Links and Info - SP Only

 

 


  • Version 2.0 - Working on servers
     
    Setup can be a little tricky at first so read the notes and check the video to see how I set mine up. This is a WIP, if you come across any issues let me know. This version uses a whole new way of accessing the power system so there could well be issues I haven't come across yet, make regular backups just in case anything goes wrong. If all goes well I should be able to use this system to get all my powered mods running on servers.
     
    v2.0 Release Notes:
    • Takes 2 power inputs.
    • This version works on servers.
    • Acts like a normal secure door, only it needs power to operate.
    • The door gets its power from 2 nearby relays, as long as at least 1 of these relays is powered the door can operate.
    • A relay must be placed in at least 1 of these 2 locations, 1 block directly above the door and/or 2 blocks directly bellow the door. (You can place just 1 if you want)
    • You can only use standard wire relays or the new concrete covered relays.
    • Hatches are removed for now since the inputs cant be above and bellow without blocking the hatch. I'll do a update for that soon.
    • I haven't done much testing with what happens if you put other powered stuff in those locations.(Nothing should happen)
    • This is not compatible with v1.0 and I have no idea what will happen if you try to load this into a world that was using v1.0
    • Change the block numbers to something your not using, I left them black.
    • Make a backup before installing.

 

Download Link v2.0

 

[*]Adds 4 powered doors an 1 powered hatch.

[*]Opens when powered on and closes when powered off.

[*]Use sensors, pressure plates, switches or timers to open and close the door.

[*]I'm still trying to work out a way of connecting 2 sensors to the door, for now pressure plates are the best option.

[*]The demo just shows a few ways to activate them, it only shows the jail door. I'll do a better video soon,

 

Included Doors:

  • Vault Hatch
  • Vault Door
  • Jail Door
  • Iron Door
  • Garage Door
  • Includes a recipe for each one

 

Notes for modders:

  • You can use this class to power any of the vanilla doors and it should work on any modded door models that have the standard Animator in them, just copy one of the included doors from the xml and change the custom icon and extends property to v1 of the the door you want to use.
  • The block you extend can't have a downgrade block if you want the model for the higher versions model just add the model as another property.
  • You must add them as a new block, don't just change the classes on the vanilla doors.

 

Download Link v1.0

 

Click here for instructions on setting up SDX for Alpha 16

 

 

 

 

Link to comment
Share on other sites

Has anyone tried this on a server? Let me know if you do.

 

I like, TFP should add this to the vanilla game too :D

 

EDIT: What about the drawbridge and elevator?

The vanilla code reads the door tags so there's hope. It wont work on my elevator but it might work on the test one in vanilla xml, I'll try it and get back to you. I haven't been able to get it working with the drawbridge yet but it will be added if I can get it to work.

Link to comment
Share on other sites

Yeah, the door triggers are set up so that powering the door sends the open trigger and turning the power off sends the close trigger. When I finalize all the code for this mod I'll put in a option in to reverse this so its normally open and closes on power-up. I've been playing around with the sensors to try and make them rotate 360 degrees. So far the best I can come up with is to leave a empty space above the door and mount a modded sensor with 180 degrees rotation sideways so it can see both sides of the door. The pressure plates work really well too but they have no restrictions so zed can walk straight in. Whats really needed is a relay that will take 2 or more power inputs so a sensor can be mounted on both sides of the door.

 

Does anyone else have a sdx server and is willing to do a quick test for me. So far I cant get any modded powered blocks to work on the sdx server even standard xml mods. All I need you to do is add a exact copy of any one of the powered blocks from vanilla into a sdx server and tell me if you can connect power to it.

Link to comment
Share on other sites

@Three08 - The sliding glass door works fine on our SDX server. All the vanilla powered objects seem to work under SDX as well.

 

I do get the message in the log serverside when placing your door, im guessing its just your debug message:

 

2017-07-20 13:25:20 Log OnBlockEntityTransformBeforeActivated

2017-07-20 13:25:20 Log Script will be added (OnBlockEntityTransformBeforeActivated)

2017-07-20 13:25:25 Log Block Power Is Off (tileEntityPoweredBlock NULL)

 

 

If you want access to the server, just let me know

Link to comment
Share on other sites

Its good to know its working on a server, thanks. That means I'm doing something wrong in the server setup. I left a little debugging in until I get the hang of the power system, so the debugs are nothing to worry about as long everything's working ok.

Link to comment
Share on other sites

@Three08 - The sliding glass door works fine on our SDX server. All the vanilla powered objects seem to work under SDX as well.

 

Hmm, I finally got my test server running locally. For me the glass door hooks up and works, but it keeps working when the power is off as long as its still hooked up. Is it doing that on your server? These ones are only updating the on/off state on reload.

Link to comment
Share on other sites

Hmm, I finally got my test server running locally. For me the glass door hooks up and works, but it keeps working when the power is off as long as its still hooked up. Is it doing that on your server? These ones are only updating the on/off state on reload.

 

Yes, it also keeps working after the power is turned off on our server. I tested with relays and switches in between as well, and it always keeps running until the wire is removed from the glassdoors. I have not tried the other doortypes on our server. Will load them next build.

Link to comment
Share on other sites

Version 2.0 Update - Working on servers

 

Setup can be a little tricky at first so read the notes and check the video to see how I set mine up. This is a WIP, if you come across any issues let me know. This version uses a whole new way of accessing the power system so there could well be issues I haven't come across yet, make regular backups just in case anything goes wrong. If all goes well I should be able to use this system to get all my powered mods running on servers.

 

v2.0 Release Notes:

  • Takes 2 power inputs.
  • This version works on servers.
  • Acts like a normal secure door, only it needs power to operate.
  • The door gets its power from 2 nearby relays, as long as at least 1 of these relays is powered the door can operate.
  • A relay must be placed in at least 1 of these 2 locations, 1 block directly above the door and/or 2 blocks directly bellow the door. (You can place just 1 if you want)
  • You can only use standard wire relays or the new concrete covered relays.
  • Hatches are removed for now since the inputs cant be above and bellow without blocking the hatch. I'll do a update for that soon.
  • I haven't done much testing with what happens if you put other powered stuff in those locations.(Nothing should happen)
  • This is not compatible with v1.0 and I have no idea what will happen if you try to load this into a world that was using v1.0
  • Change the block numbers to something your not using, I left them black.
  • Make a backup before installing.

 

Download Link v2.0

 

v2.0 Setup Demo:

[video=youtube_share;z16VUunQr3I]

Link to comment
Share on other sites

hey cool work and works fine so far......but the doors have no more the "auto opening" mod ? only by pressing the "e" button to open ?

For now yes, but once I work it all out I'll do a xml option to have auto open and close like they used to.

Link to comment
Share on other sites

  • 2 weeks later...

v2.0.1 Update notes

  • This update brings back the auto open and close.
  • Controlled by a powered block placed 2 blocks directly above or bellow the door, this must be one of the 2 included door control relays.
  • If both are powered, both will act as power inputs so you can use 2 triggers.
  • Automatically opens the door when powered and closes when not powered.
  • Has a xml setting to turn auto trigger off.
  • Alot has changed, if updating make a backup of your map first.
  • You can now only power your doors with a "Door Control Relay" or a "Concrete Door Control", each require 5 power.

 

XML Options

  • Added: Auto open/close option to xml, all doors are set to auto trigger.
  • Added: Option to xml for top and bottom power input locations, the value is how many blocks above or bellow the door the input will be placed. Default is 2 for both so the top location has changed but you can change it back in the xml.
  • Added: Option to xml to toggle auto trigger on/off
  • Added: Option to xml for 4 power inputs. This is off by default. If on the extra inputs will be 1 block above and bellow the other 2 inputs.
  • Added: Option to xml for the doors to Close when powered and open when unpowered. This is turned off by default on all doors. Only works if AutoTrigger is set also set to true.
  • Added: Option to xml for animation speed, this is really just here for another mod that requires the door to close faster. 1 is normal speed.
     

 

Download Link

Link to comment
Share on other sites

  • 1 month later...
  • 1 year later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...