Manual:Zone Manual/The Room Section/Climbing

From DikuMUD Wiki
< Manual:Zone Manual‎ | The Room Section
Revision as of 06:20, 15 November 2026 by Agent-mud (talk | contribs) (checked against the current code (wiki review 2026-11-15))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Climbing

Some ways can't be walked, only climbed: a cliff, a rope, a tree, a steep wall. This page shows how to make such an exit, and what happens to a player who fails the climb. The climb command itself is in basemove.zon; for the player's side see help climb.

A climbable exit

Set EX_CLIMB on the exit, and give it a difficulty:

up open {EX_CLIMB} difficulty 25 to ledge;

A player who just types up gets "Alas, you must climb to go that way."; they have to type climb up (or climb and one of the exit's keywords). A climb costs 6 endurance, and a player needs at least 10 to try. NPCs that walk can't use the exit either.

difficulty (0 to 250, default 0) is how hard the climb is: the player's climbing skill and dexterity are checked against it (see Skills). Being drunk makes it harder.

Falling

A player who fails the climb falls. Where to depends on the room they are climbing from:

  • If the room has an exit with EX_FALL_THIS_WAY, they fall out through that exit into the next room. If that room has an EX_FALL_THIS_WAY exit too, they keep falling, room after room, until they reach a room without one (or the exit is closed, or would lead back to where the fall began). There they land "with a loud splat".
  • If it has none, they fall where they are and land in the same room.

While falling a player can't do anything else.

So on a cliff you put EX_FALL_THIS_WAY on the way down, in every room on the cliff:

ledge
title "On a narrow ledge"
descr
"The ledge is barely wide enough to stand on. The cliff goes on up, and
far below you can see the beach."
movement SECT_MOUNTAIN

up open {EX_CLIMB} difficulty 40 to cliff_top;
down open {EX_CLIMB, EX_FALL_THIS_WAY} difficulty 25 to beach;
end

A player who fails to climb up from the ledge falls down to the beach, and so does one who fails to climb down. The climbing exits don't need to be the falling exit. A rope bridge across a pit:

rope_bridge
title "On a rope bridge"
descr
"A rope bridge sways over a deep pit. It goes on east and west."

east open {EX_CLIMB} difficulty 10 to rope_east;
west open {EX_CLIMB} difficulty 10 to rope_west;
down open {EX_CLIMB, EX_FALL_THIS_WAY} difficulty 0 to the_pit;
end

Fail to climb east or west, and you fall down into the pit.

Damage

The fall does its damage once, on landing. The worse the climb failed, the more it hurts: 5 hit points for every 10 points the skill check failed by. A room can change the 5 with an extra named $climb_ and the direction, whose number is the damage per 10 points of failure:

extra {"$climb_down"} {1} ""

On the ledge above, this makes a failed climb down hurt only a fifth as much. The extra is read in the room the player climbs from, for the direction they climb in. gremlin.zon has a cliff built this way.

Leftovers

  • climb@function in function.zon is an older way of making climbable rooms. It no longer does anything; use EX_CLIMB.
  • The CLIMB_NAMES_ONLY and CLIMB_NOT_IN_EXITS flags described in wmacros.h belonged to it and are commented out.

Back to The Room Section.