Starbound

Starbound

1,660 ratings
Automatic Doors
9
7
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
49.931 KB
22 Jul, 2016 @ 3:12pm
29 Sep, 2021 @ 8:31am
30 Change Notes ( view )

Subscribe to download
Automatic Doors

Description
Makes all doors open and close automatically!

Last update: v3.9 -fixed Outpost doors (again. I hope...)

Regarding Outpost Doors: The devs have seemingly made automatic opening an innnate feature of the door-code now, but only the Outpost doors have it activated. I tried to backwards-fit the code to our modded doorcode, but the differences are now so great that some things don't work together, which is why Outpost doors may not work. I have decided to rewrite the code using the new door code, as otherwise things will get only messier. I have to add a few featuers that their code is still lacking, and will upload a new clean version once I have it done.

You come home from a hard and hefty farming day, and then there is it. The door. Doesn't it bother you to ever press that E button open it? Fear no more, citizen, for convenience is here!

This mod makes all doors in the game (all that rely onto doors.lua actually) automatic. This means you'll be able to just walk straight forward against a door and it will open and close without your consent!
Though you should probably be careful when there are monsters at your door, as you will open the door now when you come too close...
It also open automatically ONLY for players, NPCs still have to use doors manually and monsters still can't open them.
Though NPCs also close the doors automatically behind them now, which means that you no longer have to worry that monsters might slip into your house! (Though it is not 100% foolproof if a monster stands right next to the door when the NPC opens it)
Doors should also behave as normal doors when they are locked or wired, wiring a door disables automatic mode while dewiring one enables it again.
If a door behaves funky after you downloaded a new version, walk through it and away from it once and see that the NPCs do the same, also be sure to reload your game!

In case of issues: If you are getting stuck, like in a mission, you can open the chat and type "/admin" followed by "/settileprotection 0 false". This allows you to destroy blocks. Set it to true again after you got through the faulty door so you don't lose the experience. And report the issue to me :)


It is highly recommended that you use the NPC's Aren't Stupid! mod: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=731644566
It revamps NPC AI so they can actually use horizontal doors without getting stuck in a loop. Most issues regarding NPC's can be solved by using this mod!

Should you have ghost doors in your ship, you can use this handy mod to remove them: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=755391531


Also if you recognize any bugs, or have any wishes or future ideas, please feel free to report them to me (us rather), I will try to fix them then.

Discuss the mod here: http://community.playstarbound.com/index.php?threads/automatic-doors.74792/

Credit: bigthanks to healthire for some minor help and especially to bk3k for updating it to 1.0 and greatly updating the code!

Our other mods:
Give me Cotton! - https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=732096973
NPC Killer - https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=761746889
No Heal and Fooditem Drop - https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=764533110
Pipes flow - https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=745399025
bk3k Blocks and Objects - https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=757860462
Popular Discussions View All (3)
6
15 Sep, 2016 @ 10:13pm
PINNED: For modders - more than just automatic doors
bk3000
0
17 Mar, 2021 @ 1:14pm
PINNED: Basic customization (e.g. detection radius)
lornlynx
343 Comments
爱笑的佐巴扬 19 Feb @ 5:50am 
This mod seems to cause the elevator in the space station to fall
lornlynx  [author] 31 Dec, 2024 @ 8:43am 
@Bottinator22 yes, it scans for entities and only when it finds a player it opens. Could be added as an exception, or if i ever come to it as a setting
VariableVixen 23 Dec, 2024 @ 6:26pm 
I don't think I can change it myself, because I'm playing with some friends, and they'd need a copy too. But if the vanilla spawning command will work, then I can at least use those doors in my own builds, as long as they'll stay open until all players and NPCs move away.
bk3000  [author] 18 Dec, 2024 @ 11:26am 
@VariableVixen
Either by making sure it finds no valid target by type, or with setting the radius to 0, it should do what you want. If you know how to spawn custom objects (vanilla item spawning command), you could make custom doors that do what you want.
"queryOpenRadius" : 0

There are other things you can change, if you look at the top pinned thread above.
VariableVixen 14 Dec, 2024 @ 9:01pm 
I would like to request a feature: automatic door closing without automatic door opening . My initial idea is that the existing mechanism could mostly be reused, so that when no valid scan target is near an open door it will close, but doors will only open when a player or NPC does so manually (or via wire signal). I would personally use this in my own base, so that the full space within rooms I build is "available" without opening the door out.
Bottinator22 26 Sep, 2024 @ 8:33am 
Looking at your code, it seems I should probably switch my drones to using openDoor instead for opening doors, since this mod doesn't expect non-players to interact with doors
Bottinator22 26 Sep, 2024 @ 8:28am 
It has come to my attention that this mod causes issues with my Support Drones mod, where they open/close doors repeatedly.
My Support Drones mod handles doors this way:
- Drone pathfinder finds a wall and detects it to be a door (via hasCapability("door"))
- Drone, while following the path, checks if the door is closed (via hasCapability("closedDoor")
- If it finds a closed door in its path, it will open it (via calling onInteraction with object {source={mcontroller.facingDirection()}}
The drones are monsters.
I haven't looked at your code, but it might be unable to perceive the possibility of a monster opening a door.
Or it needs an entity id in the table passed to onInteraction. (The data provided by the drone for that call is incomplete)
bk3000  [author] 23 Apr, 2024 @ 3:29pm 
@KrayZ RoarC
This is so if your traveling at a good speed (hover bikes or techs), you shouldn't crash into doors.

You can custom spawn your doors though: see the pinned threads?
KrayZ RoarC 25 Nov, 2023 @ 11:42am 
the door open to far away from me, i mean it could by the touch of the player idk.. cause when i don't even want it to open and i'm standing really backed away and it still opens is boring ' - '
lornlynx  [author] 4 Sep, 2023 @ 6:42am 
@Mechanos: I wanted to add customisation options easily available for players since ages together with a full rewrite, but never had the time nor drive for it.
But should I ever come to it, be sure that these requests are on the bucket list.