trefoilknot on 14/12/2018 at 03:22
In my current mission, there are a some rooms that are meant to be entered in a subtle way (e.g., window, vent shaft, etc...), but then can be easily exited (i.e., main door out of the room).
While this is yields a natural flow from a game-play perspective, a lot of the implementation ends up feeling quite contrived. For example, (1) doors opened by a lever or button inside the room; or (2) there's a key to the room locked inside the room.
Both of these work just fine (and are pretty common in FMs). But it bugs me. In most situations, this just doesn't make sense. Why would there only be a lever on one side of the bedroom door (why does it even use a lever to begin with)? Like seriously, how do they go to bed? And how many people leave their spare office key... in their office?
I think a much more natural way to go would be one-way doors. Doors which are unlocked and frobbable to a player on the inside, but locked and/or unfrobbable to a player on the outside. These are ubiquitous in real life.
My question is two-fold:
First, what's the best way to do it? I've had moderate success using room brush triggers an bounds triggers (separately---two different attempts). It's about 95% successful when I'm not trying to break it. But when I *want* to break it, I can do weird things like leaning into the door, or approaching from really oblique angles, and typically within 10 seconds of frobbing, voila. Is there a better, more taffer-proof way to go about it?
Second, *should* I do this? I'm not aware of any prior FMs doing this. I could see it being frustrating if a player knows that they're just on the other side of a door which they already know they don't have a key to. They might not even test it from the other side. Furthermore, using one way doors, once you close the door behind yourself, you're back to square one. If you need to get back inside that room, you have to go the long way around...
What do you all think?
Unna Oertdottir on 14/12/2018 at 10:08
In Grimrock Reloaded, I put Frobinert on a door which has some planks in front of it. Removing the planks also removed FrobInert from the door.
Similar things has been done in other FMs. A shelf/board is blocking a door/window which has FrobInert metaproperty. Removing the barricade removes FrobInert.
Yandros on 14/12/2018 at 11:34
I think this may be one of those cases where good gameplay and not frustrating the player need to trump MUH REALISM.
ZylonBane on 14/12/2018 at 17:28
Many real-life secure doors are in fact opened by pressing a button, so it's not unrealistic at all.
Any type of one-way doors in someone's bedroom would be super weird though. That's all on you.
trefoilknot on 14/12/2018 at 20:45
...this is a very common type of bedroom door...? Not sure what you're on about...
My bedroom door will open from within when “locked” but won't open from outside when locked (without a key). Same with my office, my apartment, my guest bedroom, and every hotel room I've ever been in. There's some variation in whether opening from the inside also unlocks the door (as is the case for most bedrooms, but not most offices or hotel rooms).
@Yandros, I agree--I would never prioritize realism over gameplay. But I'm not sure which one would be better from a gameplay standpoint...
Yandros on 15/12/2018 at 03:41
Within the context of ZB's security door example, his comment about it being odd for a bedroom makes sense. However now that you've pointed out other real-world scenarios like a hotel room door, I see where you're coming from now. I think it may take players off guard initially, though, but I wouldn't let that deter you from implementing it if it works within your story.
Implementing it... a roombrush trigger is more reliable than a bounds trigger, and also if you are working in TG where there is no TrigOBBPlayer script (that is T2 only), then you're almost forced to go the roombrush trigger route. As long as the trigger brush is completely inside the room, I don't see an easy way to exploit or cheat around it. Can you give more detail on the setup you tried with roombrushes that still had a rate of failure?
vfig on 15/12/2018 at 13:24
The least player-confusing way to do a one-way door is, to have some in-game reason why it's only openable from one side, like Unna's example. Something that the player actively removes and then the door works like an ordinary door. It doesn't have to be illogical: maybe a vase has fallen off the cabinet that's beside the door (I blame the cat), that the player picks up and then the door can open (inward) again. Or maybe the door has seven padlocks on the inside, and the paranoid owner of the place is the skeleton lying on the bed, the padlock key still clutched in his hand. Okay, that last one's pretty irrational, if not illogical :cheeky:
But anyway, the thought of a fire-door like door that can only be pushed open, not pulled, was interesting. I don't know if it will suit your needs at all, but I decided to try writing a squirrel script for a one-way door. Drop this on a locked spinny door, and it'll open without a key from the inside, but still require a key from the outside.
Code:
class OneWayDoor extends SqRootScript
{
// Script for a door that can only be opened from the inside when
// it is locked. The inside is the side that the door opens away
// from. Only works on rotating doors, that rotate around Z axis.
// If the door is not locked, it'll open from either side.
// -- vfig 2018-12-15
function OnFrobWorldEnd() {
if ((Door.GetDoorState(self) == eDoorStatus.kDoorClosed)
&& Property.Possessed(self, "RotDoor")
&& (message().Frobber == Object.Named("Player"))
&& Locked.IsLocked(self))
{
local playerPos = Object.Position(message().Frobber);
local localPlayerPos = Object.WorldToObject(self, playerPos);
// Most doors are North-South oriented, but some
// (like SecretDoor4x8) are East-West oriented, so
// we need to account for that.
local physBox = Property.Get(self, "PhysDims", "Size");
local northSouth = (physBox.x >= physBox.y);
local localOpenDirection = (northSouth ? vector(0, 1, 0) : vector(-1, 0, 0));
local clockwise = Property.Get(self, "RotDoor", "Clockwise?");
if (clockwise) {
localOpenDirection = -localOpenDirection;
}
// Finally, find out if the player is on the "inside" of the door.
local playerOnInside = (localPlayerPos.Dot(localOpenDirection) < 0);
if (playerOnInside) {
Door.OpenDoor(self);
// Cancel the message so the StdDoor script
// doesn't play a "locked" sound.
BlockMessage();
}
}
}
}
trefoilknot on 15/12/2018 at 16:02
Wow Andy, this is great, thanks! This looks like it will work better than my prior approaches. I'll give it a spin this week.
I'm still undecided on whether to do it or not. The context is office doors, so it would feel perfectly natural. (I don't even think it's legal for an office door *not* to allow egress from within, in most countries). But still, throwing new mechanics in without warning is dicey...
Maybe I'll just mention in the readme file that some doors only open from one side—everyone will read that before playing, right...? Lol
ps I still owe you a test of the other script you wrote for me. It's near the top of my to-do list!
Also, after re-reading ZBs comment, I'm legitimately concerned that he has a bedroom that he can lock people inside. Both creepy, and very much in violation of fire codes. Either that or he's never seen a lockable bedroom door. *shrug*
vfig on 15/12/2018 at 17:02
Quote Posted by trefoilknot
But still, throwing new mechanics in without warning is dicey...
If you do it as a one-off, for sure. But if you use it consistently, and it's easy to learn and consistent from the way things look, there's no problem.
Quote:
Also, after re-reading ZBs comment, I'm legitimately concerned that he has a bedroom that he can lock people inside. Both creepy, and very much in violation of fire codes. Either that or he's never seen a lockable bedroom door. *shrug*
As it happens, my bedroom door has a bolt... on the outside :eek:
(Given that the door otherwise doesn't lock at all, opens into the bedroom, and the bolt is at the top of the door, I suppose some previous tenant wanted to be able to stop their cat or dog or toddlers from getting in there while they were elsewhere in the flat.)
trefoilknot on 15/12/2018 at 18:50
I won't tell the fire marshall ;)