Mob HIDE affect shows (hiding) but gives no cover
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 38/100
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
/6affects 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_SEEonly 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:
- 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) calldo_hidefor a mob. - 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from returnoftheshadow/RotS_Live
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
returnoftheshadow/RotS_Live#521 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
returnoftheshadow/RotS_Live#485 ·
Maintainers usually reply within 1 day
-
Remove dead object refresh code (check_inventory_proto and friends)Possibly taken @drelidan7 claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
returnoftheshadow/RotS_Live#414 ·
Maintainers usually reply within 1 day
-
purge <player> idle-saves the immortal instead of the playerPossibly taken @bskalpavrukshab25-sketch claimed this 12 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 92/100
returnoftheshadow/RotS_Live#411 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
returnoftheshadow/RotS_Live#410 · 2 comments ·
Maintainers usually reply within 1 day
All issues in returnoftheshadow/RotS_Live
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
ROCm/FastFlowLM#887 ·
Maintainers usually reply within 1 day
-
bug medium priority openmp tokenizer wrong result
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
good first issue invalid
Difficulty 1/5 Under an hour Newbie friendliness 72/100
DanielJerolm/gpcc#74 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
patrick-hudson/put.gd-desktop#808 ·
Maintainers usually reply within 1 day
-
DPI change is not fully handled in the cascading window on WindowsPossibly taken @yukawa claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 4 days