UMDLARS / one_night_in_sf

A story game demonstrating why physical security is important and complex!
2 stars 2 forks source link

IT room door with keypad #39

Open pahp opened 1 year ago

pahp commented 1 year ago

There's supposed to be a door from the IT room to the server room that is locked but takes a numeric keypad.

Currently, there simply isn't a door to the server room from Office2.

It might be interesting to code some kind of keypad puzzle, so the player could technically brute force it and enter it, but that would require some kind of "enter 1234" verb or something.

Maybe it would be better to make it a magstripe reader, and lock the door to an object that is inaccessible in the game?

Not sure what the best way is to handle this.

spacehobo commented 1 year ago

Hibernated has a general series of puzzles where you need to enter numbers into various pieces of equipment, and it handles this via a type verb:

Verb 'type'  * -> TypeErr
             * special -> TypeErr
             * special 'on'/'into'/'in' -> TypeErr
             * special 'on'/'into'/'in' noun -> Type;

Then it has a single branch-and-check function for TypeSub (all setup stuff is mine, to avoid spoilers):

[ TypeSub;
  if (second = keypad) {
    if (noun == 242 && thedoor has locked) {
      give thedoor ~locked;
      "The keypad emits a cheery ~242 sighting!~ and the door unlocks.";
    }
    if (noun == 242 && thedoor hasn't locked)
      "The keypad chirps ~Another 242 sighting!  Of course, I already unlocked for you, but thanks!~";
    else "The keypad beeps unhappily, and nothing happens.";
  }
  else "That's not an object on which you can type anything.";
}

So yeah, it's kind of potato programming, but you can keep adding tests for second in TypeSub and handling situations based on the data entered and the state of the world model.

spacehobo commented 1 year ago

Oh yes, I almost forgot:

[ TypeErrSub;
  print "You will need to be more specific.  The type command wants you to provide a number or a string and an object to type it on.^^[type 1234 or ABCD on/into object]^";
  noun = false;
];
Saturn-99 commented 8 months ago

Did this get merged into the John Titor office puzzle? Can this issue be closed?

spacehobo commented 8 months ago

We have the type verb working on the vt242, but not yet on the keypad. I think this is one to assign to @pahp.

https://github.com/UMDLARS/one_night_in_sf/blob/main/untitledHeistGame.inf#L82-L94 ← This has all of the verb logic set up per the above comment. https://github.com/UMDLARS/one_night_in_sf/blob/main/untitledHeistGame.inf#L82-L94 ← This was how we decided to handle it in the vt242. We needed to use react_before because the terminal is second rather than noun. I probably should have done it similar to the Insert/Receive pair, but this works fine as it is.

So yeah, we could add tests for numbers in the keypad if that's meant to be a puzzle.

spacehobo commented 8 months ago

Was it perhaps meant to be a wear-pattern on the keys puzzle?

pahp commented 8 months ago

I think that our intent was that this is technically doable, but without any hints whatsoever. Like, it's functional, but that's not how you're supposed to solve it (you're supposed to use the plunger).

If we were going to use a wear pattern type puzzle, probably we'd want that to be an additional room. Here, I assume, there are four "shiny" keys on a 10-key pad, and they have to try the (4^4 = 256) possibilities to brute force it? Or, maybe you can only use each button once (once you push it in, it stays pushed in) so there are fewer options?

We aren't calling this an MVP right now... part of me thinks that maybe having a puzzle that appears (and is in fact) functional might actually distract players and cause them to grind. Thoughts?