Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Mob HIDE affect shows (hiding) but gives no cover

Open
#396 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
cpp
Domain
backend

Research direction

Start in src/db.cpp near line 1961, where the /6 affects are copied onto the mob as flags, and compare with the hide score in src/utility.cpp near line 1667, where CAN_SEE checks it. Check how do_hide in src/ranger.cpp (around line 731) sets the score, since the report says that is the only path that gives a mob cover. The issue leaves open whether to set cover at load or stop offering HIDE in the editor, so settle that with a maintainer before editing. Done means a HIDE mob is either hidden from viewers without see-hidden or the editor no longer offers the affect.

Written by the indexing model from the issue text.

Description

Summary

A mob given the HIDE affect in the mob editor (/6) shows "(hiding)" to everyone, but everyone can see it. The flag gives it no hide score, and the score is what decides who sees a hidden character.

Found by reading the code while reviewing mob program 32 (new ranger program). Not yet reproduced in game.

Where

On release-frodo at 1090598:

  • Load: the /6 affects are copied onto the mob as flags (src/db.cpp:1961). The hide score (specials.hide_value, GET_HIDING) is not set, so it stays 0.
  • The tag: "(hiding)" is shown when the HIDE flag is set (src/act_info.cpp:616).
  • Who can see it: CAN_SEE only hides a character whose hide score is above 0 and above the viewer's see-hidden (src/utility.cpp:1667). The flag is not checked.

Only two things give a mob a hide score:

  1. Finishing a hide (do_hide, src/ranger.cpp:731). Nothing on the standard mob turn hides a mob; only the ranger programs (15, mob_ranger, and 32, mob_ranger_new) call do_hide for a mob.
  2. Sneaking into a room with the SNEAK affect (snuck_in, src/ranger.cpp:1878).

Result

  • HIDE alone: the mob shows "(hiding)" and everyone sees it, until it attacks or something else clears the flag.
  • HIDE and SNEAK: the same at load. It only gets real cover after it moves and its sneak roll succeeds on arrival, so a mob that never moves (SENTINEL) never gets cover.
  • A ranger program: works; the program hides the mob itself.

Expected

A mob built with the HIDE affect is actually hidden when it loads, or the editor does not offer an affect that does nothing. Which of these is right is a design call.

Notes

  • Stock behaviour for every mob, not specific to one program.
Dominant language
C++
Stars
3
Forks
4
Avg merge
18h 36m
Merged PRs (30d)
87

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from returnoftheshadow/RotS_Live

All issues in returnoftheshadow/RotS_Live

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.