Skip to content

Better circumstantial criteria for followup responses#275

Merged
Blixibon merged 1 commit into
mapbase-source:developfrom
Blixibon:mapbase/feature/response-followup-criteria-expansion
Feb 4, 2024
Merged

Better circumstantial criteria for followup responses#275
Blixibon merged 1 commit into
mapbase-source:developfrom
Blixibon:mapbase/feature/response-followup-criteria-expansion

Conversation

@Blixibon
Copy link
Copy Markdown
Member

@Blixibon Blixibon commented Jan 6, 2024

Adds the following criteria to followup responses:

  • dist_from_issuer — The distance to the issuer of the original response. This already existed on any type responses, but it will now exist for all followups.
  • is_speaking — Whether or not the person speaking the followup is already speaking.
  • followup_allowed_to_speak — Whether or not the speaker's AI would allow this followup to play as a regular response concept. This includes whether the speaker is already speaking.
  • followup_target_type — The method in which this speaker was selected for a followup response (i.e. whether it was specifically targeting the NPC, whether it was dispatched to all NPCs, or whether it was dispatched to one of any NPCs)

These criteria are meant to provide better control over when followups play in relation to HL2's existing speech AI without restricting the behavior that has existed since they were added.

Note that followup_allowed_to_speak currently only applies to entities derived from CAI_PlayerAlly.


PR Checklist

  • My PR follows all guidelines in the CONTRIBUTING.md file
  • My PR targets a develop branch OR targets another branch with a specific goal in mind

@Blixibon Blixibon force-pushed the mapbase/feature/response-followup-criteria-expansion branch from b2f9a5f to 70a4304 Compare January 6, 2024 19:57
@Blixibon Blixibon force-pushed the mapbase/feature/response-followup-criteria-expansion branch from 70a4304 to 4adab15 Compare January 6, 2024 22:20
{
CAI_AllySpeechManager * pSpeechManager = GetAllySpeechManager();
ConceptInfo_t * pInfo = pSpeechManager->GetConceptInfo( concept );
ConceptCategory_t category = SPEECH_PRIORITY; // Must be SPEECH_PRIORITY to get around semaphore
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do followups get around the semaphore?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can see below that if the follow up specifically targets this NPC, it ignores the semaphore. That makes sense. I wonder if there would ever be cases where designers would not want this to be the case? Like low priority followup responses

Copy link
Copy Markdown

@1upD 1upD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a comment but it was just a speculative question, this looks good to me

@Blixibon Blixibon merged commit 02f8109 into mapbase-source:develop Feb 4, 2024
@Blixibon Blixibon deleted the mapbase/feature/response-followup-criteria-expansion branch February 4, 2024 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants