Show navigation
Dialogue
The talk graph, its pure runner, the dialogue screen and the talk host that runs one over the world, with auto-play and skip, are built. So is a resident placed in a region's data with the talk F begins, the quests' words loaded with it, and the world's screen for a talk: see dialogue. What remains fills the player into a talk's lines, reads the speaker's role and narration, draws the replies' marks, and measures the screen against the game's.
Decisions
- F on a resident begins their talk. The interaction prompts list each resident in reach whose talk the world holds as a talk, named in the reader's language and standing on the ground at their spot. F on one sets that talk and opens
ScreenKind.Dialogue, and the world screen mountsDialogueTalkover the world with the talks' text map while it is open; the talk'sendsets the world back. Until residents' own talks are served, the talks the world holds are its quests' talks. - A quest's talk takes the resident's place while its step is open. When the current step of a quest in progress asks for a talk with a resident, F on that resident runs the quest's talk rather than their own. Its end is the talk-to event the quest's progress waits on (quests).
- A resident offers every talk open to them, each with its mark. In the game, a character with a quest to give or advance offers it as a reply beside their own chat, drawn with the mark of a quest or a story quest. The first line of a resident's talk offers each open quest talk as a reply with that mark.
- A talk's words are loaded with it. The reader writes a text map for each language, holding every word the carried quests and residents show (
generated/questText). The host loads the reader's language once, as game text loads its chunk, and hands it to the talk host. - The Traveler's name and gender are filled in. A line holding the player's nickname or a word per gender is shown through
fillLinePlaceholders, filled from the player's own name and twin once the world has a player profile. Until then the nickname is the game's own title for the Traveler (GameTextKey.Traveler, itself filled as the login fills it) and the gender isTravelerGender.Female, since the world plays the female twin (TRAVELER_CHARACTER_ID), as the login does (LOGIN_TRAVELER_GENDER). - Narration is drawn as the game draws it. A line the game shows on a black screen is read with its role, and it is drawn centred on black with no speaker. The dialog table's black-screen roles (
TALK_ROLE_BLACK_SCREEN,TALK_ROLE_NEED_CLICK_BLACK_SCREENand theirCONSEQUENT_forms) name no speaker, so a spoken line whosespeakerTextIdis empty is a narration, asSpokenTalkLinealready reads it, and the schema gains no field. - The speaker's role is the NPC's manual title. The role drawn under the name is the manual text map's
NPC_TITLE_<npc id>, the npc id being the dialog'stalkRole.id(genshin:text find "^Waitress, Good Hunter$"givesNPC_TITLE_1419andNPC_TITLE_15241, Sara's). The dialog's owntalkTitleTextMapHashresolves to no text, so it is not the role. An NPC with noNPC_TITLE_key has no role. - Voices are not played from the game. Nothing of the game's audio ships, so a voiced line is shown and timed as an unvoiced one.
Still to build
- The player filled into a talk's lines. In
packages/genshin-world/src/components/Dialogue/Talk/Index.vue, every word read fromtextMap(the line, each reply and the speaker's name) passes throughfillLinePlaceholdersfromgenshin-text, with the nicknamefillLinePlaceholders(gameText[GameTextKey.Traveler], "", TravelerGender.Female)(ascomponents/Login/Screen/Index.vuefills the Traveler's title) andTravelerGender.Female.lineLengthcounts the filled line, so the reveal times what is shown. The proof iscomponents/Dialogue/Talk/Index.browser.test.ts, on the pattern ofcomponents/Gcg/Session/Index.browser.test.ts: a one-line talk whose text is{NICKNAME}, {M#he}{F#she} said.with astartProgressholding it whole renders the Traveler's title followed by, she said., and no{survives. - The speaker's role and narration from the dialog table.
scripts/src/services/genshinText/readTalk.tssets a spoken line'sspeakerRoleTextIdtoNPC_TITLE_<talkRole.id>where the manual text map (readManualTextMap) holds that key,""otherwise, andwriteQuests.tswrites those keys' words into each language's quest text beside the lines (a handful of strings in the chunk the quests already load, no new file).readTalk.test.tsgains a case: an NPC dialog whose role id has a manual title carries it, and aTALK_ROLE_BLACK_SCREENdialog has an empty speaker and role.DialogueScreenthen draws a spoken line with no speaker centred over black, its fixture gaining anarrationvariant. Needs the dump and the manual text map (game-exports). - The replies' marks, traced from the wiki's files with
pnpm -C scripts genshin:parity trace "File:Icon Dialogue Talk White.png", thenIcon Dialogue Quest.pngandIcon Dialogue Story Quest.png, each into a path ofDialogueChoiceIcon's mark inDialogueScreen, at the place the screen already keeps beside each reply. - The reveal and auto-play timings off a public 60 frames a second clip.
pnpm -C scripts genshin:parity clip https://www.youtube.com/watch?v=9I7XyJ2Z5RI --from 0 --to 30 --name dialogue-npc-60(an English PC client's NPC talks at 1080p60), thengenshin:parity framesover the first line's first second andlumaover its band: the frames from the line's first ink to its last giveTALK_REVEAL_MS_PER_CHARACTER, written as a provisional constant naming the clip, and a line whole in its first frame at 60 frames a second sets it to 0, the game then showing a line whole. Auto-play's hold waits ondialogue-auto-skip.mkv, since no published clip found shows auto-play on. - A resident's standing talk offered beside their quest talks, once residents hold standing talks: no resident does yet (
components/World/Session/Index.vuemerges none), so this waits on the residents' talks being read from the scene groups the other machine is exporting.
Measures owed
These need a recording of the English PC client's dialogue at 1080 high, found among published recordings first (parity):
- Whether the world runs on around a talk: the sky, the clouds and the residents behind the speaker moving or still, read by eye.
- The line's reveal rate and auto-play's hold, read off the line's darkness frame by frame (
frames, thenlumaover the line's band), intoTALK_REVEAL_MS_PER_CHARACTERandTALK_AUTO_PLAY_HOLD_MS. The published recording of the dialogue choices shows each line whole in one 30 frames a second frame, so the reveal waits on the recording the dialogue page says is owed. - The band's gradient, the selected reply's look and the fades: the speaker's name, the line and the replies are sized and placed off one published frame, and their fades are not yet read.
- A backdrop with the dialogue off:
compare's backdrop draws the game's own line and replies, so the overlay cannot be scored until the scene is shot without them. - The speaker's role line (the title under the name, "Waitress, Good Hunter" in the published frame), which the talk's schema does not hold: its text id comes from the dialog table.
- The replies' marks, traced from the wiki's files of the game's own (
Icon Dialogue Talk White.png,Icon Dialogue Quest.png,Icon Dialogue Story Quest.png) into paths of our own, and the auto-play and skip buttons' glyphs beside them.
Key files
| File | Role after the change |
|---|---|
packages/genshin-world/src/components/Dialogue/Talk/Index.vue | Fills the placeholders, draws narration and offers the open quest talks |
packages/genshin-world/src/components/World/Session/Index.vue | Mounts the talk host when F begins a talk, and holds the controls under it |
packages/genshin-world/src/services/dialogue/constants.ts | The reveal and auto-play timings, once measured |
packages/genshin-interface/src/components/DialogueScreen/Index.vue | The replies' traced marks, and the measured look |
Sources
- Template:DIcon, Genshin Impact Wiki: the marks a dialogue choice is drawn with, a quest's and a story quest's among them.
- NPC, Genshin Impact Wiki: the world's characters, those met in the open world and those met only in quests.
- AnimeGameData, the community's per-patch dump: the dialog table's roles, among them the black screen a narration is shown on.
Scroll to top