Skip to content
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

Use snippets instead of static responses in dialogs #76102

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Uwuewsky
Copy link
Contributor

@Uwuewsky Uwuewsky commented Sep 1, 2024

Summary

Infrastructure "Replace some player responses with snippets"

Purpose of change

We have a category of snippets for player responses that end a dialogue. But they were rarely used. It would be convenient to have all these typical responces in one place.

Describe the solution

Replace static answers in TALK_NONE and TALK_DONE with snippets.

Snippets are now split into multiple files and several new categories.
talk_tags.json now contains only small snippets.

  • new <wpunc> - same as <punc>, but the snippets have weight instead of equal probability

talk_tags_avatar.json contains the player's responses.

  • <end_talking_bye>, <end_talking_later>, <end_talking_leave>, <end_talking_nevermind>, <end_talking_later_follower> - the corresponding snippets and replaced text are sorted into these categories

talk_tags_line.json contains snippets with full sentences.

  • new <lets_go> snippet

Describe alternatives you've considered

Testing

I looked through all the changes in this PR, as for me all the replacements look correct. The game also did not give any errors when loading with data verification.
talk1
talk2
talk3
talk4
talk5
talk6
talk7
talk8
talk9

Additional context

@github-actions github-actions bot added NPC / Factions NPCs, AI, Speech, Factions, Ownership [JSON] Changes (can be) made in JSON Missions Quests and missions Items: Food / Vitamins Comestibles and drinks Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Sep 1, 2024
@GuardianDll
Copy link
Member

just heads up, we try to not make PRs bigger than 500 strings, because they are barely reviewable. Is it possible for you to divide it?

@Uwuewsky
Copy link
Contributor Author

Uwuewsky commented Sep 1, 2024

I know, my bad. But is there any point in breaking the PR into several parts if the work is already done? Isn't it better to break it here into smaller commits (~300 lines)?

If this is still needed, I will break it into several parts, just let me know

(for now I've split the commits into smaller ones vvvvv)

@GuardianDll
Copy link
Member

it's not about making separate commits, it's about merger being able to read the PR in one go

@Uwuewsky
Copy link
Contributor Author

Uwuewsky commented Sep 1, 2024

Okay, I thought the merger would look at reviews from other participants.

Then I'll split it into ~4 PRs later. Although the first one will still be big due to copy-pasting pieces from a monolithic talk_tags, nothing can be done about it I think.

Copy link
Contributor

github-actions bot commented Sep 2, 2024

Spell checker encountered unrecognized words in the in-game text added in this pull request. See below for details.

Click to expand
  • aaaaand nope
  • not happenin' chief

This alert is automatically generated. You can simply disregard if this is inaccurate, or (optionally) you can also add the new words to tools/spell_checker/dictionary.txt so they will not trigger an alert next time.

Hints for adding a new word to the dictionary
  • If the word is normally in all lowercase, such as the noun word or the verb does, add it in its lower-case form; if the word is a proper noun, such as the surname George, add it in its initial-caps form; if the word is an acronym or has special letter case, such as the acronym CDDA or the unit mW, add it by preserving the case of all the letters. A word in the dictionary will also match its initial-caps form (if the word is in all lowercase) and all-uppercase form, so a word should be added to the dictionary in its normal letter case even if used in a different letter case in a sentence.
  • For a word to be added to the dictionary, it should either be a real, properly-spelled modern American English word, a foreign loan word (including romanized foreign names), or a foreign or made-up word that is used consistently and commonly enough in the game. Intentional misspelling (including eye dialect) of a word should not be added unless it has become a common terminology in the game, because while someone may have a legitimate use for it, another person may spell it that way accidentally.

@Uwuewsky
Copy link
Contributor Author

Uwuewsky commented Sep 2, 2024

Done.

@Uwuewsky Uwuewsky marked this pull request as ready for review September 2, 2024 02:09
@github-actions github-actions bot added <Documentation> Design documents, internal info, guides and help. [Markdown] Markdown issues and PRs labels Sep 2, 2024
@GuardianDll
Copy link
Member

this one also needed the test restarted
image

@GuardianDll GuardianDll closed this Sep 5, 2024
@GuardianDll GuardianDll reopened this Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style <Documentation> Design documents, internal info, guides and help. Items: Food / Vitamins Comestibles and drinks [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions [Markdown] Markdown issues and PRs Missions Quests and missions NPC / Factions NPCs, AI, Speech, Factions, Ownership
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants