-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Perceptions framework refinements #604
Comments
Current idea is to:
|
In G1 npc also react inaccurate (or rather do not react) on same |
Both cases should be fixed now, by 42770ae One other case I'm not sure about is G1 script:
If player takes item, |
With senses=0 a lot of passive percs if not all could be triggered. In
I know comments are sometimes wrong/outdated but here it would support the testing results.
This was introduced in 47c552a to fix npc waking up while sneaking. What was working was using walkmode instead of bodystate. This prevents sending perc if e.g. opening a chest. - if(ev.groundSounds>0 && isPlayer() && (bodyStateMasked()!=BodyState::BS_SNEAK))
+ if(ev.groundSounds>0 && isPlayer() && (wlkMode&WalkBit::WM_Sneak)!=WalkBit::WM_Sneak)
world().sendPassivePerc(*this,*this,*this,PERC_ASSESSQUIETSOUND);
From testing: When just walking around item was never valid making function return early. If dropping something item refers to it. |
Hm, G1-scripts? Can find this lines, for some reason. Do you know what |
G2 scripts, comments after
Asked that myself too. Found explanation by Ikarus creator some time ago:
As I understand it: What's handled in
When I tested with smell sense only at Harald location AssessPlayer function triggered for thief guild npcs and Gritta in Thorben's house. See sense only should behave how you described, has to be in viewing angle + visibility. |
Found a better explanation in G2-scripts: //
// PERCEPTIONS ( ACTIVE )
//
CONST INT PERC_ASSESSPLAYER = 1;
CONST INT PERC_ASSESSENEMY = 2;
CONST INT PERC_ASSESSFIGHTER = 3;
CONST INT PERC_ASSESSBODY = 4;
CONST INT PERC_ASSESSITEM = 5;
...
//
// PERCEPTIONS ( PASSIVE )
//
CONST INT PERC_ASSESSMURDER = 6;
// all else |
Two things observed during testing: Npcs wake up if player is picking a lock in sneak mode. Could be resolved by the mentioned above, use walkmode instead of bodystate for sneak testing. AssessEnterRoom not sent while sneaking is incorrect. Test case can be house behind Zuris. Guard reacts on enter if sneaking. Openend #618 which fixes a bug that prevented this test case from working in OpenGothic. |
Followup to discussing here: #589
Relevant videos:
https://github.com/Try/OpenGothic/assets/100468436/2d1c819b-b7b0-4162-b3ff-2080be5a8623
This behavior observed by @thokkat, with
.senses = 0
, overridden in Perception.d.In OpenGothic, entering building already emits
PERC_ASSESSENTERROOM
andPERC_ASSESSQUIETSOUND
is wired to ground-sounds, and then feed into senses-framework atWorldObjects::tick
. Naturally those perc's are emitted only by player.The text was updated successfully, but these errors were encountered: