I attached my NPC's house to mine so that they had access to both homes but they keep letting monsters in ): Is there a way to fix this?

6 Answers 6


This has also always bugged me in my first days of Terraria. NPC's are programmed to walk to the left and right, even if there are doors in the way.

What I always do is that I build the NPC building on top of my house, or floating 8 blocks above the ground, so that the mobs can't reach them. From there I connect my base to the NPC building using platforms. Or whatever kind of block you prefer.

Either way, you can't just tell the NPC's not to use doors, the only time that they don't use them is during the night.

  • +1, my NPC housing is just a floating apartment building with platforms for stairs.
    – kotekzot
    Commented Oct 12, 2013 at 15:39
  • 2
    Even at night, if their housing has more than one door, they will often leave one open. This gets mighty old mighty fast.
    – Fambida
    Commented Oct 12, 2013 at 22:30
  • From a suggested edit: "I had the guide open doors at night".
    – pppery
    Commented Oct 9, 2021 at 22:28

You can build a door from three active stone blocks (created from stone + wire) wired to a switch. Neither NPCs nor enemies can open those doors. This solution is obviously only available once you have the Mechanic and can build such mechanisms.

The whole mechanism is shown in this screenshot, though with an additional lava moat in front of the door to kill enemies.

enter image description here

The door in the state where you can walk through

enter image description here

The door in the solid state when it looks just like regular stone wall.

enter image description here


I usually compartmentalized my NPC's in individual rooms using platforms. As long as no door existed, the usually didn't go up and down the platforms to open doors.

NPC's also have a somewhat fixed distance from their home (1 or 2 screens distance) that they can move around.

In contrast with the wire/active stone solution, this is feasible from the start. Just don't have doors in their path.


I feel you... just got killed by the guide's aggressive door opening. I would recommend putting 1 block in front of the door at night, so they can't open it anymore.


I found out that the best way to stop them from opening doors is to build a base with a rope and then it connects the houses.


Simplest way i found was just to have a 2x3 deep hole in front of your doors to the base, then the npcs will all just be jumping in front of your doors instead of opening them.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .