Jump to content
The Dark Mod Forums

View Stealth Score during gameplay?


kcghost
 Share

Recommended Posts

Ok, now playing with this a bit more (with the latest beta) ... and pretty well every time I'm seen briefly (for no longer than a second or so) the guards go into full alert (even notifying colleagues) ... but the alert score remains all zeros.  Getting a bit sad about this :(

Link to comment
Share on other sites

Can try this on TDM 2.01?

The change that affects this was added in 1.08 so if it can be reproduced in 2.01 then it has been with us since then.

It may be that the search changes in 2.03 made it harder to tell since the alerted AI would just stand in formation and corner the player in that version.

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Obviously the solution will be to set the player's visibility to zero upon map launch or savegame load instead of defaulting to 0.5 or whatever it currently is; or even save the light-gem level in the save files.

{ 0 | 🞵 } = funk_tastic

My missions:           Stand-alone                                                      Duncan Lynch series                              

                                      Down and Out on Newford Road              the Factory Heist

                                                                                                  A House Call

                              

Link to comment
Share on other sites

9 hours ago, thebigh said:

Obviously the solution will be to set the player's visibility to zero upon map launch or savegame load instead of defaulting to 0.5 or whatever it currently is; or even save the light-gem level in the save files.

Correct me if I'm wrong, but it sounds like you are revering to this issue, which I think is something else entirely:

On 2/10/2022 at 3:13 AM, AluminumHaste said:

When you quickload from a situation where you're in complete brightness into a situation where you're in complete darkness, the player is still fully lit for several frames and AI spot you before you go back to properly lit.

Link to comment
Share on other sites

Yes, but IIUC the two issues seem interrelated in some way.

Obviously when you save your game while in deep shadow you shouldn't load to find yourself momentarily glowing while the game calculates that you are in fact in pitch blackness. If anything it ought to default to zero visibility.

{ 0 | 🞵 } = funk_tastic

My missions:           Stand-alone                                                      Duncan Lynch series                              

                                      Down and Out on Newford Road              the Factory Heist

                                                                                                  A House Call

                              

Link to comment
Share on other sites

Well, there is one thing that might join these issues. The lightem capture phase has been notoriously vulnerable to environmental factors. In particular, screen capture like OBS, FRAPS, or ShadowPlay have been known to cause lightgem issues.

Can either or both issue be reproduced when no screen capture tech is active?

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

I can assure everyone that I have no screen capture technology of any kind installed, and stealth score problem is very clear for me.

I feel pretty certain that the steal score issue (BUG 5888) and the issue mentioned by @thebigh are unrelated.  I'd prefer we discuss issues arising from using the stealth stats script on this thread.

Could some more people please try and reproduce the issue I'm reporting?  Just stand in the light long enough to get fully spotted, but no longer (I'm using "Hardcore" vision, so it doesn't take long).  You should see the guards go into full searching mode with no impact on your stealth score!

Link to comment
Share on other sites

  • 4 months later...
On 1/29/2022 at 3:09 PM, Araneidae said:

stealth.jpg

 

Edit:

Never mind, it's probably "loot stealth stats" that I just downloaded.

 

That image, what addon is that?

I say this after having downloaded kcghost's script, completely reworked it so that it works, and then downloaded Dragofer's script, and only gotten presented with a scroll in the top left.

I want that addon in that image, discrete, and down in the bottom right. Who made that? Where can I download it? I've been searching like a madman for that addon for hours.

 

Edited by Nort
Link to comment
Share on other sites

Okay, I'm testing the bug now. I am jumping around in front of a woman on a far up balcony, sporting a lantern so that she can see me. I briefly got a "1" on Searches, but half a second later it went down to "0" again! ...and even though the lady is then screaming for somebody to save her, and I'm making as much noises-in-the-dark for her as possible, there is no alert, and all my ghost stats remain at 0.

...so something is removing searches from the "numberTimesAISearched" variable!

Of course my level is a little special. (There is no inside or outside of it, according to the engine, so it's probably just one massive leak - lol.)

 

Edited by Nort
Link to comment
Share on other sites

The scores get even weirder on my second try:

I got "Suspicions 1" at first, for several seconds, and then Searches went up to 1 too.

...but then Searches and Score, went down to zero again. ...so this probably means that ghosting players can be seen in levels, and still get a zero score if they're lucky, if these are the values they're based on.
Are you sure that "numberTimesAISearched" isn't actually treated like it should be named "flagIsCurrentlySearching"?

(There is no way to complete my custom level yet. This is just what I'm observing in the custom loot bar.)

 

Update

These scores are just going up and down all the time, and often they settle at all zeroes after a while!

...and no matter how I try, I can't get a single Sighting score! ...at least in my special level where everything is pitch black, and the lantern (and the glowing marble walls) is the only lightsource. She will act as if she does see me, but the score won't count that as an actual sighting.

If you need it for bugtesting, I can attach this map to a post, but only if you need it for bugtesting.

 

Update

It's funny when I read through this page, and just see lots of disbelief. As usual I have to be the one to tell you that something is seriously wrong here, and that you should look into it - at least bother to take a glance at what Araneidae is telling you. This invalidates ghost scores that people worked really hard to get.

Edited by Nort
Link to comment
Share on other sites

...and Araneidae, I really like this plugin, so if there's anything specific that I can do to help you, let me know. If you've found some more reliable score script functions that you want me to experiment with, I'm happy to do it. Try look into how the score is determined at the end of the map. Where is that code? I want to take a look at it.

 

 

Link to comment
Share on other sites

On 1/1/2022 at 4:23 PM, Dragofer said:

I think that's a unique bug in that civilians spotting the player at close range don't count towards the stealth score. It's even got a ticket in the bugtracker.

All my experiments have been done, quite reliably, from a long distance away, but it did involve a noble woman and an armed wench.

 

Link to comment
Share on other sites

@Nort, I agree, the problem is nothing to do with civilians nor close range.  It's something to do with how the alert state escalates.  @Dragofer, do you still think it's just close range civilians?  It really is frustrating that this bug gets so little attention, in particular because it seems to go to the heart of TDM gameplay.

It certainly is a frustrating bug to work around, particularly when struggling for a perfect zero and apparently achieving it ... and then you find some guard with his sword out who must have spotted you from across the way.

I'm surprised how many missions seem to be amenable to a perfect zero, so I do wonder if the alert system has other breakages we've missed.

Link to comment
Share on other sites

3 hours ago, Araneidae said:

@Dragofer, do you still think it's just close range civilians?

No, just that it's been first reported in this context.

There was some reworking in TDM 2.05 to how stealth scores get reported for ticket 4002, which restricted which alerts get added to the stealth score. It seems the idea was to wait until the AI returns to alert 0 before deciding how much to add to the score, based on how high the AI alert went during that "alert cycle". The intention was to only count the highest alert stage, not every alert stage passed on the way. Maybe it culls too zealously.

This is the code block this concerns which I believe is called whenever a mission event occurs, which includes an AI's alert stage changing:

Spoiler
void CMissionData::MissionEvent
	(
		EComponentType CompType,
		SObjEntParms *EntDat1,
		SObjEntParms *EntDat2,
		bool bBoolArg
	)
{
	DM_LOG(LC_OBJECTIVES,LT_DEBUG)LOGSTRING("Objectives: Mission event called \r");
	SStat *pStat(NULL);
	bool bCompState;

	if( !EntDat1 )
	{
		// log error
		goto Quit;
	}

	// Update AI stats, don't add to stats if playerresponsible is false
	// Stats for KOs, kills, body found, item found
	if( ( CompType == COMP_KILL || CompType == COMP_KO
		|| CompType == COMP_AI_FIND_BODY || CompType == COMP_AI_FIND_ITEM
		|| CompType == COMP_ALERT ) && bBoolArg )
	{
		DM_LOG(LC_OBJECTIVES,LT_DEBUG)LOGSTRING("Objectives: Determined AI event \r");
		if( CompType == COMP_ALERT )
		{
			if( EntDat1->value > MAX_ALERTLEVELS )
			{
				// log error
				goto Quit;
			}
			// index in this array is determined by alert value
			pStat = &m_Stats.AIAlerts[ EntDat1->value ];

			// grayman #4002 - Decide which alert level to record for the stealth score.
			// If this new alert level is too close to a previous alert level,
			// then the previous alert needs to be removed.

			// This only applies if the new alert level is higher than EObservant.
			if ( EntDat1->bIsAI )
			{
				int alertLevel = EntDat1->value;
				if ( alertLevel > ai::EObservant )
				{
					idEntity* ent = gameLocal.FindEntity(EntDat1->name.c_str());
					if ( ent->IsType(idAI::Type) )
					{
						// Has this AI registered a previous alert at a lower level,
						// during this alert cycle? An alert cycle is where an AI rises
						// from Idle to something higher, then drops back down to idle.
						idAI *ai = static_cast<idAI*>(ent);
						int removeThisAlertLevel = ai->ExamineAlerts();
						if (removeThisAlertLevel > 0)
						{
							SStat *pStatPrevious = &m_Stats.AIAlerts[removeThisAlertLevel];
							// Subtract from all appropriate stats
							pStatPrevious->Overall--;
							pStatPrevious->ByTeam[EntDat1->team]--;
							pStatPrevious->ByType[EntDat1->type]--;
							pStatPrevious->ByInnocence[EntDat1->innocence]--;

							// Even though pStatPrevious->WhileAirborne might not be the same now
							// as it was when this previous alert was registered, don't worry about it. It isn't used.
						}
					}
				}
			}
		}

The ExamineAlerts() function, the outcome of which is used by the above code to decide whether to remove an alert from the score:

Spoiler
int idAI::ExamineAlerts()
{
	int numberOfAlerts = alertQueue.Num();
	int alertsProcessed = 0;
	idEntity* entityResponsible = NULL;
	int nextTime = 0;
	int nextAlertIndex;
	int result = 0;
	bool foundResult = false;

	while (( alertsProcessed < numberOfAlerts ) && !foundResult)
	{
		bool newEntity = true;

		for ( int i = 0 ; i < numberOfAlerts ; i++ )
		{
			EntityAlert *ea = &alertQueue[i];

			if ( ea->ignore )
			{
				continue;
			}

			if ( newEntity )
			{
				// This first entry represents the highest alert level the AI reached.

				entityResponsible = ea->entityResponsible.GetEntity(); // the entity we're currently processing
				nextTime = ea->timeAlerted;	 // alert time
				nextAlertIndex = ea->alertIndex; // alert index
				//ea->processed = true;
				newEntity = false;
				alertsProcessed++;
				continue;
			}

			idEntity* thisEntityResponsible = ea->entityResponsible.GetEntity();

			if ( thisEntityResponsible != entityResponsible )
			{
				continue; // this entry wasn't caused by the entity we're processing
			}

			ea->ignore = true;
			alertsProcessed++;

			int thisAlertIndex = ea->alertIndex;
			int thisTime = ea->timeAlerted;

			// What is the time difference between this entry
			// and the previous entry (which happens later in time, because the
			// later entries appear earlier in the queue)?

			int duration = nextTime - thisTime;
			float alertDuration; // the average amount of time spent at a particular alert level (atime1, atime2, atime3, atime4)

			switch ( thisAlertIndex )
			{
			case ai::EObservant:
				alertDuration = atime1;
				break;
			case ai::ESuspicious:
				alertDuration = atime2;
				break;
			case ai::ESearching:
				alertDuration = atime3;
				break;
			case ai::EAgitatedSearching:
			case ai::ECombat:
				alertDuration = atime4;
				break;
			default:
				alertDuration = 100000.0f; // should never be here
				break;
			}

			alertDuration *= 1000 * 0.5f; // use half the average duration and convert to ms

			if ( alertDuration > 10000.0f ) // suggested by demagogue
			{
				alertDuration = 10000.f;
			}

			// If the latest alert is too close to the previous alert, we should remove
			// the stats for the previous alert.

			if ( duration < alertDuration )
			{
				result = thisAlertIndex;
				foundResult = true;
				break;
			}

			// set up for reading the next entry

			nextTime = thisTime;
			nextAlertIndex = thisAlertIndex;
		}
	}

 

So from what I read so far it seems older alert stages during an alert cycle get deleted if a new alert stage is reached within a certain timeframe. The timeframe should correspond to half the average amount of time the AI spends at an alert stage as defined in its spawnargs.

Another possibility is that the variable AIAlerts from MissionStatistics.h isn't updated correctly.

Link to comment
Share on other sites

The only times I saw alerts manifesting and then disappearing is when a guard becomes immediately more alert. For example, I get 1 suspicion, which quickly drops back to 0, because the guard actually saw me, and now I have 1 search. Seems to be working as intended.

Link to comment
Share on other sites

2 minutes ago, marbleman said:

The only times I saw alerts manifesting and then disappearing is when a guard becomes immediately more alert. For example, I get 1 suspicion, which quickly drops back to 0, because the guard actually saw me, and now I have 1 search. Seems to be working as intended.

It can't possibly be intended when you have a panicked civilian screaming for help, while there are no alerts, and the stealth score has reset back to zero. It seems I have to keep experimenting and reporting these occurences in detail, until you guys get it.

Link to comment
Share on other sites

1 hour ago, Nort said:

It seems I have to keep experimenting and reporting these occurences in detail, until you guys get it.

Araneidae has already documented this and you seem to have misunderstood what marbleman wrote.

Link to comment
Share on other sites

  • 4 weeks later...

Please could I beg for some attention to this bug.  My latest experiences are with Chronicles of Skulduggery 0 and 1, very playable with supreme ghosting rules (zero alerts, no dousing of lights), except most of the secrets in CoS0 (and hence many of the optional objectives) are well beyond me.

  • Playing CoS0 I picked up the optional stealth objective fairly late in the game.  I had a perfect zero alert score, and there were no unaccounted for alerted guards, yet I instantly failed the object on picking it up.
  • Playing CoS1 (Pearls and Swine) just now, got spotted and failed the optional stealth objective ... and yet my stealth score remains a perfect zero.

What's going on here?  It's clear that there is some "spotted" state that isn't reflected in the stealth score, and this sucks.

Honestly, this is spoiling my enjoyment of the game.

Edited by Araneidae
Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share


  • Recent Status Updates

    • STiFU

      Anyone here clocking in some times in Neon Light?
      · 0 replies
    • JackFarmer

      Boris Johnson's resignation does not change the fact that Australia is home to 29 million kangaroos and Wales has a population of just over three million.

      If the Australian kangaroos were to invade Wales, one resident would have to fight almost ten kangaroos at a time.
      · 8 replies
    • peter_spy

      Deathloop – what a mess of a game. I'd love to see a post-mortem on it some day. I hope Arkane is doing okay though.
      · 27 replies
    • OrbWeaver

      I like house-cleaning and taking out the trash.
      · 3 replies
    • STiFU

      Be honest: Who of you have actually finished Cuphead? This game is freaking tough! It might even be harder than Sekiro. Dark Souls is a joke in comparison to Cuphead! :-D 
      · 8 replies
×
×
  • Create New...