Starbound

Starbound

1,592 ratings
Automatic Doors
8
6
   
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://steamproxy.net/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://steamproxy.net/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! - http://steamproxy.net/sharedfiles/filedetails/?id=732096973
NPC Killer - http://steamproxy.net/sharedfiles/filedetails/?id=761746889
No Heal and Fooditem Drop - http://steamproxy.net/sharedfiles/filedetails/?id=764533110
Pipes flow - http://steamproxy.net/sharedfiles/filedetails/?id=745399025
bk3k Blocks and Objects - http://steamproxy.net/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
338 Comments
Bottinator22 26 Sep @ 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 @ 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 @ 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.
Mechanos 25 Aug, 2023 @ 8:38pm 
Alternatively, if there's a way I could have this mod not close the doors behind me, that would work just as well.

(I did notice the "Basic customization" pinned discussion, but I'm using this in a modpack that downloads from the workshop, so editing the mod just for myself would defeat the purpose)
Mechanos 25 Aug, 2023 @ 8:25pm 
Apologies if this has been asked before. Is there any way to make this work for pets? The issue I'm running into is.. I'll be exploring some random town or dungeon with doors in it. Every time I walk through, I slam the door behind me. Crew I have with me are able to open the doors if they need. But my monster pet gets stuck behind the door. When this doesn't happen often, it's no big deal.. he'll eventually teleport out, or I can manually get him out with the pokeball. But in large areas with many doors, this gets really annoying lol. Have any advice?
lornlynx  [author] 28 May, 2023 @ 5:04am 
Ye, that can work if you are lucky *thumbsup*
๖ۣۜNightlingTheFemboy 28 May, 2023 @ 2:20am 
Ok i managed to fix it, just had to re-place down the doors.
๖ۣۜNightlingTheFemboy 28 May, 2023 @ 2:11am 
I subscribed to a mod that slowed hunger and then after I went to restart the game, this mod suddenly stopped working. Coincidence?