Repository navigation
Stealth: guards, knife kills, hostages and the scav chop shop - #545
Merged
Merged
Conversation
…n view of every guard's sight Guards with nobody else noticed say a line, look round for a few seconds and go back to their route after killing or downing their target. Hits from a second attacker during a fight are remembered. Wary now fades after three minutes with nothing new. Admins can show the sight of every guard on their level at once. The notice map moves off the blackboard, whose qdel sweep runtimed on it.
The ally check walked get_line(), which takes one turf per step. A shot at an angle clips turfs beside that line, so a gunner fired past a guard standing next to its target and hit him. The check now walks every turf the straight line passes through.
…er 60 s The ? fills as a guard notices you and only you see it. Alert is a red ! for everyone; it drains while the guard has lost you, then turns into a yellow ? that drains over the search. Drawn on the guard, so never through walls, and above the lighting so it reads in the dark. Built only with a player nearby. Wary now fades after 60 seconds with nothing new.
Standing marks sit 6 px higher and follow the head's height offset; a lying guard's mark clears its body. No own ? shows in the moment after a search ends.
Guards walk back to their route or post after a chase instead of turning sentry, in legs when it is far. Only being carried to another level or map region makes a sentry; a guard that can't get back waits and retries. The AI stays fully awake while any living player is on the level, the scan runs from planning instead of the behaviour queue, and long walks are no longer cancelled every step. An alert guard still notices others and turns on someone clearly nearer or on whoever hits it, at most once every few seconds. A glimpse while searching is an alert. Notice is capped, and only what it sees now decides its state. The candidate cap counts only those it can perceive. A box that moves at its shoulder or bumps it is noticed. Blasts, fire, gas and stuns with nobody to blame send it and nearby friends searching. Cuffs, syringes, the strip menu and thrown items count as touches. The head mark exists only while the scan runs, so it clears on cuffs, stuns and player control. A player in the body gets no reactions.
…witch, box, blast, cuffs
…nocks, glass, doors, bodies, shouts and radios Guards react to noise as a group. A small noise sends one guard to look, a second at the same spot two, a third everyone; a guard that never comes back is missed. Gunfire, blasts and screams send the nearest few running while sentries hold. Suppressed guns are heard only close by and in the open. Running is heard and walking is not, by tg's own footstep rules, and running no longer makes you easier to see. Guards who see or feel someone shout for help; lookouts carry an earpiece and call it in after three seconds unless they are dropped, jammed or EMPed first. A guard that heard something shows a grey ?. No sound ever gives a guard a target. Adds the Stealth Noise admin verb and a noise view.
…ets, a window, a locked door, carpet and plating
…sing guard, alarms, shouts, radios, and real shots, throws, knocks, falls, emotes and blasts
Guards switch a belt seclite on in the dark and whenever they are on edge; an EMP cuts it out. A body found mid-search is called out, a quick volley from one spot counts as one noise, and sentries keep facing their post.
…the dark, and stop flickering lights Point-blank sight within 2 tiles in the cone is an alert on that look, with a quick look between scans; 3-4 tiles fill three times faster. The close radius behind a guard needs light that isn't its own beam. A guard's own spot is judged without any guard seclites. No missing-friend line over a reported body. An AI-switched light is re-laid as a turn would. Diagonal AI steps cost what a player's do. The test room's east room gets a floor light in the middle.
… drop them, a matte knife backstabs, and their seclites can be looted
Stepping on broken glass or a dropped bulb makes a small noise guards go to look at, even at a walk. Every door a player opens or shuts makes a small noise, and a guard who sees one move goes to look unless one of its own is beside it; a door that keeps moving is only looked at twice in three minutes. Guard skill comes from a green, yellow or red profile picked by the den's zone, a mapper var or an admin action; yellow is the old tuning. A gunner now steps back two tiles to shoot open a locked locker, since a gun beside one only bashes it.
…rn, walk their patrols and don't snap-spot right after turning
tg's light setters don't rebuild a COMPLEX_LIGHT source, so the hidden lamp never emitted. Call update_light() when it switches or changes range.
…s post mid-timing
…dd a back hatch, let sentries step toward small noises
…scav pass fool them by stage, they stop and ask for the pass, and weapons, running, bodies and known faces blow it
… a jungle planet there, clears the ground and loads the stealth test room, and drops the admin outside in a mortal playtest kit
Scav guards inherit combat sense against stun weapons from the trooper type, but the stealth AI's own planning list never ran it. It plans after a guard finds its target and before it arms, as in the base human NPC AI.
The test polled each guard's behaviours every tick, and a guard's open lands inside one tick, so it could count no opener while the locker was opened.
A point-blank shot at the head lands on another body part about one time in fourteen, so the d45 head-shot tests failed now and then. Their guards carry tg's designated-target trait, which turns the roll off.
- Noise reads planet air read-only, so a heard noise never gives a planetary turf its own gas mix. - Thin air shortens how far noises and running steps carry, by tg's own pressure scaling for players. - Explosions carry as far as tg plays them to players, by blast size. - A door is the guards' own only when a free, standing guard works it; a guard merely beside it hears and sees it. Only a machinery door shutting by itself is excused after a guard opened it. - Dug up or replanted foliage is no cover; someone holding a hostage in front of them is not hidden by cover. - A guard's own slip makes no thud for its friends. - Cover steps, rustles and the emote noise pre-check only run where a stealth group lives. - Mobs tg plays no footsteps for make none for guards; a glass a bartender slides doesn't count as smashing. - Replace a pointer to a private notes file with the reason inline.
…ove after a hold-up fights instead of deciding to surrender again
…d; standoffs react to third parties, slams and fire; tighter drop-it words; no mumble with a cut throat
- A den camera sees through a full scav disguise for the same reasons a guard does (a weapon out, a hostage, a fallen guard dragged or carried), judged through the den's own guards. - A living den guard's red chrome eyes burn out when they are taken out. - The chrome vault notes its den's zone once the site is on the overmap, so opening it elsewhere later pays the right zone. - The scav den planet verb holds its one slot from the zone prompt until the build ends, so two runs can't both build a planet. - Guard radio calls reach only earpieces on the same site as the call, as the spoken radio does. - A multitool on a guard earpiece says it is stuck on one channel instead of an empty "tuned to". - A level activator deleted any way drops off its level and resets that level's AI. - The hearing tests' gravity goes through the test tidy-up; the d45 ordinary-person case checks its hit; new tests for pellet grouping, a buckled hostage, an EMP'd camera coming back and the siren loop.
…d tg's blast reach
… the dark, unseen attackers - Out-cold guards note no harm; only felt harm reaches friends, and only friends that see the guard or hear the spot through walls. - Harm a standing-off guard can't name ends the standoff as a blow from the holder does. - A stealth guard charges a stun shooter only while it has them in view. - NPCs in cuffs or out cold are no intruders (same rule as the den cameras). - Bodies inside the close radius need light (and eyes beyond adjacent). - A disguise stop the guard never gets within reading range of gives up after 8 s. - A guard fighting someone it never saw names nobody and learns no face; a dead guard's pass names nobody.
# Conflicts: # voidcrew/modules/unit_tests/_unit_tests.dm
# Conflicts: # voidcrew/modules/unit_tests/_unit_tests.dm
# Conflicts: # voidcrew/modules/unit_tests/_unit_tests.dm
…medbeams, syringe or chem guns
Jackriip
marked this pull request as ready for review
November 22, 2026 02:13
MrCat15352
pushed a commit
to SOLARIUM-Collective/Solarium-Voidcrew
that referenced
this pull request
Nov 30, 2026
Stealth: guards, knife kills, hostages and the scav chop shop (cherry picked from commit 30ca467)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human NPC guards that see, hear and talk to each other. A crew can sneak past them, knife them from behind, choke one out, hold one up at gunpoint or take one hostage. In this PR they man the scav chop shop, a space ruin that only admins can load for now. The outpost security in #537 is built on them.
Damage, crits, wounds, grabs, cuffs, stuns and death are all tg's own, and work the same on players and NPCs. The guards only decide what they notice and what they do about it.
Guards
Sight
?over a guard means it noticed something and is coming to look. A red!means it has seen you.Hearing
Patrols
Disguises
Taking guards out
Hits. A hit on a guard that hasn't seen you is more likely to crit, more so to the head. This only works on guards.
Head shots. A shot to the head of an unaware guard does what the round can do against his helmet, from a burst skull down to a knockout.
Knives. Any sharp knife from behind opens the throat of a guard that hasn't seen you, on the click. On anyone else from behind, or on someone helpless, aim at the head: there's a short hold first, and moving or turning breaks it.
Cut throats. The cut is tg's throat slit, so a helmet or armour plating under the skin stops it. The victim drops for a moment, clutching his throat.
Hand over the mouth. With an empty hand, grab a guard who hasn't seen you from behind, aimed at the mouth. He can't shout or radio, and you hold him in front of you. Then:
A sealed helmet keeps your hand off.
For everyone, players and NPCs:
Hold-ups and hostages
Scav chop shop
A rare space ruin: a scav crew's den dug into a hollow rock. It has patrols, sweeping wall cameras and a boss who holds the vault pass.
It isn't sold or placed in rounds yet. Admins can load it on a jungle planet with Stealth: Scav Den Planet (Debug).
Admins
New Debug verbs:
Force Z-Level Active wakes the AI on a level with no player on it, and lets it go when the level is unloaded.
Images
The knife from behind: the grab, the cut and the blood thrown forward.
The scav chop shop: guard posts, patrol stops, camera sweeps and a way in from each airlock.
Upstream files touched
code/modules/projectiles/gun.dm: tg's slow mouth shot runs only when you shoot yourself or the shot is an execution. MarkedVOIDCREW EDIT.code/game/objects/items/knives.dm: a combat knife dropped from the mouth of a body being deleted doesn't try to cut it. MarkedVOIDCREW EDIT.Compiles with 0 errors and 0 warnings. The final build hasn't been playtested yet.