Skip to main content

Interacting with walls

The world · Walls and doors · InfWallSpecialType

In brief​

A wall reference can carry a decoration and an interaction type, which decide what happens when the player clicks on the wall or uses the keyboard command. A decoration that runs a script sends an event to the block's script, which decides the effect. A stuck door is opened by force: the strongest character who can act tries, with a chance that grows with strength, from 5 % to 60 %.

Positions are written [XX:YY], column then row, both counted from 00; the block index is YY × 32 + XX.

Decorations and interactions​

A wall reference can select a decoration and an InfWallSpecialType, which decides what happens when the player interacts with that wall, for example by clicking on it. For a decoration that runs a script, the game first checks that the interaction reaches the decoration, then sends BLOCK_EVENT_WALL_DECORATION to the block's script, which decides the effect. This event is a BlockEventMask value, not a wall property. There is no dedicated "hidden button" flag in this path: a decoration that is hard to see behaves like any other.1

Forcing a door​

A stuck door is a wall whose reference has INF_WALL_SPECIAL_FORCE_DOOR. The maps place three: [08:03] on level 2, [15:13] on level 7 and [12:20] on level 8, all of reference 51. Level 9 also gives reference 51 this type and level 8 reference 52, but no map or script puts them on a wall. A click must fall on the wall in front, the rectangle (40, 16)–(136, 88) of the view; another click is left to the rest of the game. The keyboard command, and a flying object that reaches the handler, skip this test.

The chance to force a stuck door by the best strength in the party, from 0 to 18 and more: 1d20 must be at most 1, 1, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 10, 11, 12, that is from 5 % at strength 0 or 1 to 60 % at 18 and more.
The best strength alone decides: from 5 % to 60 %, with no limit on the number of attempts.
strongest = none
for each character slot, first to last:
if present, conscious, and neither paralyzed nor petrified:
if strongest is none or strength(slot) >= strength(strongest):
strongest = slot
if strongest is none: stop # no message, see below
if 1d20 <= chance[min(strength(strongest), 18)]:
print "You force the door." # text colour 4
faces of the door = 8 if the face holds reference 51, otherwise 18
open the door
else:
print "You try to force the door but fail." # text colour 6
Strength0, 123, 45, 67, 89, 1011, 1213, 1415161718 or more
1d20 at most123456789101112
Chance5%10%15%20%25%30%35%40%45%50%55%60%

Only the best strength counts. No other character helps, exceptional strength adds nothing, and nothing limits the number of attempts. Reference 8 is a closed door of the level's first door graphic and 18 of its second: once forced, the door is an ordinary door. Until then a rising door is drawn slightly raised (doors).2

Anomaly

Bug. When no character can try, the game formats "You are not capable of forcing the door." into a text buffer and never prints it; the two other outcomes print directly. The attempt ends with nothing on the screen (inferred: not observed in play). A faithful reimplementation shows no message. (ANOMALY-140)

Anomaly

Bug. The comparison between two characters adds an exceptional strength to both strengths, taken from the character already kept on both sides, so it cancels. Hence the rule above: the highest strength, the last slot on a tie. The chance depends on strength alone, so this changes nothing in play. A faithful reimplementation may simply take the highest strength. (ANOMALY-141)

Sources​

Locations refer to the game executable reference; comparative sources are listed in the technical references.

Footnotes​

  1. Wall-click hit test, wall-click dispatchers and the record runner. Comparative source: REF-SCUMM-010. ↩

  2. Force a door, its chances, the record runner and the built-in references. ↩