Как установить картинки нпс в диалоге в stardew valley

Обновлено: 19.05.2024

На этой странице объясняется, как игра хранит текст диалога, его формат и как игра анализирует его. Это расширенное руководство для разработчиков модов.

Формат

Текст диалога может содержать маркеры и команды, которые управляют диалоговым окном, изменяют текст (например, переключаются между строками, зависящими от пола), вводят значения и т.д. Они анализируются с помощью класса Dialogue.

Портретные команды

Они задают портрет, отображаемый в диалоговом окне, для текущей строки диалога. Если команда "Портрет" отсутствует, используется нейтральный портрет.

Портреты пронумерованы слева направо сверху вниз, начиная с $0. Первые шесть портретов являются стандартными и могут быть идентифицированы по номеру (например, $2) или уникальному псевдониму (например, $s). У всех потенциальных супругов и многих других персонажей есть эти шесть портретов, но они не полностью соответствуют друг другу; например, Кэролайн имеет только четыре.

Номер Псевдоним Описание
$0 $k Нейтральный портрет.
$1 $h Счастливый портрет.
$2 $s Печальный портрет.
$3 $u Использует уникальный портрет. Отличается для каждого NPC: сердитая (Абигейл), во время игры в футбол (Алекс), сердитая (Кэролайн), больной (Губернатор), и т.д..
$4 $l Использует любовный портрет.
$5 $a Использует сердитый портрет.
$ <id> Индивидуальный портрет, выходящий за рамки стандартных шести.

Команды портрета должны быть в конце строки диалога:

Диалоговые команды

Пример вопроса

Чтобы понять, как работают $q, $r и $p, может быть полезен пример. Обратите внимание, как вы можете отформатировать сценарий, чтобы его было легче читать:

Приведенный выше диалог запускается в любую пятницу летом. NPC начинает с ответа, который всегда отображается: "Я думаю, что завтра пойду на пляж!"

Затем они задают вам вопрос.

$q запускает вопрос. 305/306 проверяет, задавался ли этот вопрос ранее, и если да, то он отправляет вас на ключ диалога beachquestion_followup. (Обратите внимание, что вы можете называть свои диалоги как угодно, что облегчает чтение.)

Далее приведены ответы, которые может дать игрок. Вы можете добавить любое количество $r строк; здесь у нас есть три:

Если вы скажете "да" (первый вариант), игра сохранит ID 305 как ответ, данный на этот вопрос. Далее, ваша дружба с этим NPC увеличивается на 15. beachquestion_yes указывает сценарию, какое продолжение диалогового ключа использовать в качестве ответа на ваш ответ.

Если вы скажете "нет" (второй и третий вариант), игра сохранит ID 306 как ответ, данный на этот вопрос, в зависимости от того, какой ответ вы дали, ваша дружба с NPC изменится либо на, 0, либо на, -10. Тогда будет использоваться либо beachquestion_sorry или beachquestion_no для продолжения диалога.

Теперь нам нужно создать диалоговые ключи для каждого ответа:

Следует отметить beachquestion_followup. Если игрок снова поговорит с NPC, $q 305/306 игра проверит, что на вопрос уже дан ответ, и вместо повторных вопросов, перейдет непосредственно к этому ключу.

$p 305 начинается переменная реакция, которая означает "если игрок выбрал "да", произнесите эту строку, иначе вместо этого произнесите эту строчку". Если игрок ответил "да", NPC отвечает радостно. OВ противном случае они скажут, что им нужно найти кого-то, кто пойдет с ними.

На следующий день есть еще один переменный ответ:

И снова первая строка (Пляж прекрасен. ) всегда появляется, когда игрок разговаривает с NPC, но следующая строка зависит от того, ответили ли они " да " накануне или нет.

Вот еще один пример из существующего файла диалога Хейли. Обратите внимание, что форматирование сценария сложнее для чтения, но игра способна обрабатывать и то, и другое.

  • Уход за растениями
  • Исследование пещер
  • Порыскать в своей комнате
  • Копание в поисках сокровищ

Команды замены

Команды замены будут заменены соответствующей строкой. Обратите внимание, что только @ работает в почтовых записях.

Команда Описание
@ Имя игрока.
Например: Hi there @!
%adj Случайное прилагательное. (Определено в StringsFromCSFiles.xnb)
%noun Случайное существительное. (Определено в StringsFromCSFiles.xnb)
%place Случайное название места. (Определено в StringsFromCSFiles.xnb)
%spouse Имя супруга игрока.
%name Случайно сгенерированное имя.
%firstnameletter Первая половина имени игрока (округленная в меньшую сторону), как Nat если имя игрока Natalie.
%time Текущее время.
%band Название группы Сэма и Себастьяна.
%book Название книги Эллиота.
%rival Случайное имя пола фермера из StringsFromCSFiles.xnb (ключи Utility.cs.5499 через Utility.cs.5560). Не будет соответствовать имени игрока.
%pet Имя домашнего животного игрока.
%farm Название фермы.
%favorite Любимое занятие игрока.
%kid1 Имя первого ребенка игрока.
%kid2 Имя второго ребенка игрока.

Значения

Игра использует эти предопределенные значения в некоторых диалогах.

Дни недели

Сезоны

Первый/последующий год

В некоторых случаях игра использует значение "первый/последующий год" для условий диалога. Возможны два следующих значения:

Значение Описание
1 Происходит в первый год.
2 Происходит в любой год после первого (не только 2-й год).

Установка:
1) Сначала установите основной мод с официальной странички.
2) Загрузите и распакуйте этот мод. Вы должны увидеть папку под названием [CP] Shiko NPC
3) Найдите папку Stardew Valley. Перейдите в раздел Stardew Valley > Mods
4) Перетащите папку [CP] Shiko NPC в Mods. Соглашайтесь на замену. Готово!

На скриншотах использован портрет Шико от zaira048: Shiko Portraits by zaira048

Перевод не идеален, так как мои знания английского не высоки. Но большинство диалогов всё равно будет приятно читать.
Если заметите ошибку, опечатку или баг, сообщите мне. Я обязательно исправлю.

Добавляет около 2500 новых строк диалога по всем 33 персонажам, которые имеют уровень сердца.
Для работы требуется Content Patcher.

Nexus requirements

Credits and distribution permission

  • Other user's assets All the assets in this file belong to the author, or are from free-to-use modder's resources
  • Upload permission You are not allowed to upload this file to other sites under any circumstances
  • Modification permission You are allowed to modify my files and release bug fixes or improve on the features so long as you credit me as the original creator
  • Conversion permission You are not allowed to convert this file to work on other games under any circumstances
  • Asset use permission You must get permission from me before you are allowed to use any of the assets in this file
  • Asset use permission in mods/files that are being sold You are not allowed to use assets from this file in any mods/files that are being sold, for money, on Steam Workshop or other platforms
  • Asset use permission in mods/files that earn donation points You are not allowed to earn Donation Points for your mods if they use my assets

Author notes

This author has not provided any additional notes regarding file permissions

File credits

This author has not credited anyone else in this file

Donation Points system

This mod is not opted-in to receive Donation Points

Совместим ли этот мод с другими диалоговыми модами?
Да. Если вы установите этот мод вместе с другим диалоговым модом, все диалоговые изменения будут реализованы. Исключение составляют случаи, когда два мода добавляют/заменяют/модифицируют один и тот же "слот" в коде.

Совместимо ли это в мультиплеере?
- Он полностью совместим в мультиплеере, даже если только у одного игрока установлен этот мод, а у других нет. (Игроки без мода не увидят новый диалог, конечно, но не должно быть никаких дополнительных ошибок производительности, которые возникают в результате установки этого мода в многопользовательской игре.)

Установка:
Требуется SMAPI и Content Patcher
1. Загрузите и распакуйте этот мод. Вы должны увидеть папку под названием [CP] Stardew Valley Dialogue Expansion.
2. Найдите папку Stardew Valley. Перейдите в раздел Stardew Valley > Mods.
3. Перетащите папку [CP] Stardew Valley Dialogue Expansion в Mods. Все сделано!

Перевод не идеален, так как мои знания английского не высоки. Но большинство диалогов всё равно будет приятно читать.
Если заметите ошибку, опечатку или баг, сообщите мне. Я обязательно исправлю.

Contrary to what it says above, users who have been granted my personal permission to use this mod's assets may also collect donation points on their mods.

File credits

Content Patcher version adapted by ParadigmNomad.
This mod was inspired by Seismothesaurus's "Extended Dialogue for Jodi and Kent" mod. No word-for-word text is re-purposed from it, however.
All text found in Stardew Valley's original files are property of ConcernedApe, a. k. a. Eric Barone.
All character personalities and likenesses are property of ConcernedApe, a. k. a. Eric Barone.
Alternate Bachlorette Version by WarAdvisor, IAmTheRed, & VileBeggar
Gender Neutral Farmer Version by Alfrinn

Donation Points system

This mod is opted-in to receive Donation Points

  • Spanish
  • Russian
  • Portuguese
  • Mandarin
  • Korean
  • German

Translations available on the Nexus

Language Name
Korean Author: jolifils21 Dialogue Expansion for All Friend-able Characters for Korean
Portuguese Author: Elyas More Dialogues - PORTUGUESE
Russian Author: Ghost3lboom Canon-Friendly Dialogue Expansion for All Friend-able Characters - Russian
Mandarin Author: oliverdaodao Canon-Friendly Dialogue Expansion for All Friend-able Characters--Simplified Chinese translation
Spanish Author: danirz Canon-Friendly Dialogue Expansion for All Friend-able Characters - Espanol
Korean Author: Forest Canon-Friendly Dialogue Expansion for Korea
German Author: Biiene_x3 German Non-Friendable Charackter

Version 2.0.2

  • Added dialogue for the new friendable NPC introduced in 1.5: standard dialogue, rainy day, and festivals

Version 2.0.0

  • Fully rewrote for Content Patcher 1.18
  • Fixes minor types in Leah & Penny's dialogue
  • Randomizes festival dialogue between Y1 (vanilla), Y2, & Y3 after Y4
  • Adds in translation files to the main file - excludes: German and Korean; includes: Spanish, Portuguese (EU), Mandarin, and Russian

Version 1.2.10

  • Various typo fixes and random new lines appeared in versions 1.2.1-1.2.8. 1.2.9 added a few new lines that mention SDV 1.4's content, and 1.2.10 finally finished year 3's festival dialogue.

Version 1.2.0

Version 1.1.2

  • A couple dozen extra lines added among Clint, Jas, Robin, and Vincent

Version 1.1.1

  • Fixes a crash with Penny's dialogue
  • Minor bug fixes

Version 1.1.0

  • Several spelling/grammar fixes
  • Adds festival specific dialogue for Y2 & Y3
  • Fixes Thursday crash issue that some users reported
  • Added additional dialogue

Version 1.0.3 (XNB only)

  • Several spelling/grammar fixes
  • Changed one of Harvey's new lines to make it less depressing
  • Various bugfixes, including softlocks for Gus and Penny

Version 1.0.2

  • Fixed an overnight crash when Haley reaches 2 hearts in the spring, going into a Saturday
  • Fixed a softlock when you talk to Penny with 4 hearts, on a Monday in summer
  • Fixed a typo with the Wizard on Fall 26

Is this mod compatible with other dialogue mods?

-Yes, sort of. If you install this mod along with another dialogue mod, all dialogue changes will be implemented. Exceptions are if two mods add/replace/modify the same "slot" in the code, which frequently happens. For example: Two mods want to change Shane's winter_4 dialogue. The mod that loads last will be the one you'll see in game. Mods load in alphabetical order, as they appear in your Mods folder.


Is this mod compatible with SVE?

On a technical level, yes, but I didn't design this mod with SVE in mind. That said, you'll find very few if any lore contradictions. I haven't yet heard any specific complaints from those who install both SVE and Canon Friendly Dialogue Expansion.

Do you have plans to make a version specifically for SVE?

Short answer: no. A while ago, I looked through some of the dialogue files for SVE's new characters and I didn't really find them lacking. FlashShifter did a very thorough job with them and I was impressed.
Apart from that, there are a few miscellaneous reasons that deter me from writing content with SVE in mind.
However, I wouldn't object if someone wanted to create a separate dialogue mod that can load on top of mine and integrates SVE a little better.


Can I install this mod for a previously existing save file?

Yes. Install and uninstall this mod as much as you'd like. It has no bearing on the save data at all. It's worth noting, however, that you'll see the most variety of dialogue if you haven't yet maxed out every villager's heart level.

What's in this dialogue expansion mod?

-1500+ new day-to-day dialogue messages for ALL 34 characters who have a heart level. When starting a new game, most dialogue is the same as vanilla, but as you raise characters' heart levels in increments of 2, they tend to open up more often and become more personal, vulnerable, and/or philosophical.

-Approximately 600 new marriage dialogue messages across all 12 spouses (about 50 per spouse).
Note: Flirty, PG-rated dialogue that indicates physical intimacy is now a little more common. ConcernedApe had a couple of suggestive lines, so I took this concept and expanded on it a bit. All new marriage dialogue is SFW.

-There are also about 400 new dialogue messages for festivals.
Year 1 features the same festival dialogue as vanilla. Years 2 and 3 each get a brand new set of dialogue. For year 4 and beyond, the dialogue is randomized between the three sets.
(The night market is not included.)

What can I expect, specifically, in the new day-to-day lines of dialogue?

-See for yourself if you'd like: The readme in the Docs tab contains a script of most of the changes. Skim through it to see if my writing style is to your liking. (Spoilers, obviously.)

-A majority of the new lines are for bachelors and bachelorettes, but minor characters also see their number of lines double, triple, or quadruple.

-Dialogue possibilities also frequently change with the season, as with vanilla, but this is more likely to happen than before.

-Bachelors and bachelorettes become a bit flirtier at 10 hearts.

-There are a dozen or so new multiple choice dialogue prompts.

-There is new day-before-festival dialogue for many characters (but not in excess).

-Most characters have unique messages to acknowledge new year's eve and new year's day, instead of just treating it like another ordinary day.

-Almost all characters who had rainy day dialogue now have a 50/50 chance at one of two possible rainy day lines, instead of just one. Due to the coding, I had to make some minor edits, condensing some of these messages from two dialogue boxes to just one. This was a small change that had to be made for the sake of better dialogue variety. (There is also only a 50% chance that rainy day dialogue triggers at all when it rains, unchanged from vanilla.)

What is your writing style like?

-My writing style is as close to ConcernedApe's as I could make it. I avoid contradictions with the game's established canon like the plague. Creative additions to characters are based on logical possibilities that use the canon as a starting point. For example, in this mod, Vincent says his favorite flavor of ice cream is mint chip, because A) he likes receiving ice cream as a gift, B) mint chip is a popular flavor IRL that associates well with his peppy personality, and C) there's nothing in the canon that contradicts this. This is a typical example of how far I take liberties with the game's original text (i. e. usually not too terribly far, though there are also some bolder examples).

-This mod is good for veterans and first-time players alike: No characters undergo radical changes in personality. So if two players met, one having played with this mod and one having played without, they would have more or less the same "feel" of all characters.

-All new content is SFW. Subject material and language are at the same "PG" level as vanilla. (i. e. hell and damn are the worst the language gets and are still rare.)

How do I install?

1. Download and unzip this mod. You should see a folder titled [CP] Stardew Valley Dialogue Expansion.
2. Locate your Stardew Valley folder. Go to Stardew Valley > Mods.
3. Drag and drop the folder [CP] Stardew Valley Dialogue Expansion into Mods. All done!

*In the case of more official content updates, I will update this mod so that it remains compatible with all official material.*

How can I quickly verify that the mod is working?

Start a new save file and talk to Shane. The first time your character interacts with him, there will be a ". " punctuating the end of his dialogue. In vanilla, the same sentence is punctuated with just a "?".

Where can I submit corrections/translations?

CFDE is now on Github. If you have questions about translations, feel free to PM paradigmnomad.

Please post or PM gizzymo if you find more issues that need fixing, or if you have critical feedback for any dialogue that seems inconsistent with the game's lore/canon.

This page explains how the game stores dialogue text, its format, and how the game parses it. This is an advanced guide for mod developers.

Содержание

Format

Dialogue text can contain tokens and commands which control the dialogue box, change the text (e.g. switch between gender-specific strings), inject values, etc. These are parsed by the Dialogue class.

Portrait commands

These set the portrait shown in the dialogue box for the current line of dialogue. If there's no portrait command, the neutral portrait is used.

Portraits are numbered left-to-right and top-to-bottom, starting at $0. The first six portraits are standard, and can be identified by the number (like $2) or a unique alias (like $s). All potential spouses and many other characters have these six portraits, but it's not fully consistent; for example, Caroline only has four.

numbered alias description
$0 $k Use their neutral portrait.
$1 $h Use their happy portrait.
$2 $s Use their sad portrait.
$3 $u Use their unique portrait. This is different for each NPC: grumpy (Abigail), holding football (Alex), angry (Caroline), sick (Governor), etc.
$4 $l Use their love portrait.
$5 $a Use their angry portrait.
$ <id> A custom portrait beyond the standard six.

Portrait commands should be at the end of a dialogue line:

Dialogue commands

Question example

To understand how $q, $r, and $p work, an example may be helpful. Note how you can format the script to be easier to read:

The dialogue above triggers on any Friday in the summer. The NPC begins with a response that is always shown: "I think I'll go to the beach tomorrow!"

Next they ask you a question.

$q starts the question. 305/306 checks to see if this question has been asked before, and if it has it sends you to the dialogue key beachquestion_followup. (Note that you can name your dialogue keys whatever you like which makes it easier to read.)

Next are the responses the player can give. You can add any number of $r lines; here we have three:

If you say yes (first option), the game will store ID 305 as the answer given to this question. Next, your friendship with that person increases by 15. beachquestion_yes tells the script which dialogue key continuation to use as a response to your answer.

If you say no (second and third option) the game will store ID 306 as the answer given, then depending on which answer you gave will either not change your friendship with the person, 0, or reduce it, -10. Then it will use either beachquestion_sorry or beachquestion_no to continue the dialogue.

Now we need to make dialogue keys for each response:

Of note here is beachquestion_followup. If the player talks to the NPC again, $q 305/306 will check that the question has already been answered and instead go directly to this key.

$p 305 begins a variable response which means "if the player chose yes, say this line, else say this line instead". If the player answered yes, the NPC responds happily. Otherwise, they will comment that they need to find someone to go with them.

There is another variable response the next day:

Once again the first line (The beach is lovely. ) always shows up when the player talks to the NPC, but the next line depends on whether or not they've answered yes the previous day.

Here is another example from Haley's existing dialogue file. Note how the script formatting is harder to read, but the game is able to process both.

The first time the summer_Sat dialogue is chosen, neither response 42 nor 43 will have been given (because this question is the only one which has them as responses), so Haley will say, "Farming sounds so boring. What do you even do all day?" The player can select among these responses:

  • Care for plants
  • Explore the caves
  • Snoop around in your room
  • Dig for treasure

The next time summer_Sat is chosen, one of the response IDs listed in the $q command will have been given (either 42 or 43). Therefore, the $q and everything after is scrapped, and dialogue summer_Sat_old is put in its place. This new dialogue uses the $p command to change Haley's dialogue based on whether or not you gave response ID 43 to any previous question. If you answered "Snoop around your room," everything before the | will be used, so Haley will now say, "Farming sounds so boring. Hey, you better not be snooping around in my room anymore!" If response ID 43 has not been given (in this case, you must have given response ID 42, i.e. one of the other three responses to the previous question), everything after the | will be used, so Haley will instead say, "Farming sounds so boring. But I guess it could get you in pretty good shape."

Replacer commands

Replacer commands will be replaced with the relevant string. Note that only @ works in mail entries.

@ Farmer's name.
Example: Hi there @!
%adj Random adjective. (Defined in StringsFromCSFiles.xnb)
%noun Random noun. (Defined in StringsFromCSFiles.xnb)
%place Random place name. (Defined in StringsFromCSFiles.xnb)
%spouse The name of Farmer's spouse.
%name A randomly-generated name.
%firstnameletter The first half of the farmer's name (rounded down), like Nat if the farmer's name is Natalie.
%time Current time.
%band The name of Sam and Sebastian's band.
%book The title of Elliott's book.
%rival A random first name of the Farmer's gender from StringsFromCSFiles.xnb (keys Utility.cs.5499 through Utility.cs.5560). Will not match the Farmer's name.
%pet The name of Farmer's pet.
%farm Farm name.
%favorite The Farmer's favorite thing.
%kid1 The name of Farmer's first child.
%kid2 The name of Farmer's second child.

Алгоритм

Игра находит диалог следующим образом:

  1. Диалог событий считывается из соответствующих команд событий (смотри Модификации:События).
  2. Диалог по конкретному местоположению читается из StringsFromCSFiles <location> .cs.
  3. Диалог с другими персонажами считывается из файлов, относящихся к конкретным персонажам.
  4. Если диалоги не были найдены, игра прибегает к жестко закодированному диалогу из StringsFromCSFiles (в частности, ключи с префиксом NPC.cs NPC.cs).

Данные

Текст диалога хранится в четырех файлах.

Диалог с конкретным персонажем

Characters\Dialogue\*.xnb содержит большую часть диалогов для каждого персонажа(по одному файлу на персонажа). Игра выберет диалог из одного из разделов ниже в порядке, указанном здесь.

Специальный диалог

Существует несколько ключей для конкретных случаев:

Ключ Описание
danceRejection Диалог, используемый для отклонения предложения потанцевать во время цветочных танцев. (Другой диалог используется, если они уже согласились танцевать с другим игроком.)
divorced Диалог отображается, когда вы разговариваете со своим разведенным супругом.
<location> _Entry Возможные диалоговые строки, показанные над NPC, при входе на <location> , шанс 50%. Эта запись диалога может содержать несколько параметров, разделенных / ; игра случайным образом выберет один из них для отображения.
Пример: SeedShop_Entry: "Hi, Pierre!/Now, what do I need. /Ah, that looks good!/Makin' my special sauce tonight!/Pierre! What's fresh?/Pierre! Waddya got for me?"
ComeBackLater
Snoring
Диалог Гила, когда не выполнено никаких новых задач приключенческого квеста. ComeBackLater будет показан один раз, и все последующие диалоги будут показаны Snoring.

Диалоги на локациях

В противном случае игра выберет диалог в таком порядке.

  • Каждый ключ может быть дополнительно снабжен префиксом названием сезона, например, springMountain_47_23.

Игра проверит варианты в таком порядке: <season> <key> , и <key> .

Ключ Описание
<location> _ <x> _ <y> Диалог, отображаемый в указанном местоположении, когда NPC стоит на позиции плитки <x> , <y> .
Например: Mountain_47_23: "Я прихожу сюда за тишиной и покоем."
<location> _ <dayName> Диалог, отображаемый в указанном месте в указанный день недели.
Например: Saloon_Fri: "Сегодня вечером дела шли действительно хорошо. Я доволен."
<location> <hearts> Диалог, отображаемый в указанном местоположении, если у вас есть хотя бы <hearts> сердец. <hearts> должно быть 10, 8, 6, 4 или 2 (никакое другое количество не будет учтено).
Например: Saloon8: "Привет @. Я рад тебя видеть! Тебе здесь всегда рады."
<location> Диалог, отображаемый в указанном местоположении.
Например: Saloon: "Теперь, когда я здесь, я наконец-то могу расслабиться и немного пообщаться."

Диалоги во время дождя

Characters\Dialogue\rainy.xnb содержит одну запись диалога на каждого NPC. Есть примерно 50% вероятность, что NPC воспользуется этим диалогом, если что-то из нижеперечисленного совпало,

  • идет дождь;
  • игрок не супруг NPC;
  • игрок разведен с NPC.

Общий диалог

В противном случае игра выберет диалог, используя один из этих ключевых форматов (в порядке приоритета):

  1. <season> _ <key> _inlaw_ <spouseName>
  2. <season> _ <key>
  3. <key> _inlaw_ <spouseName>
  4. <key>

Для каждого варианта выше: <season> это - название сезона (например, spring_14); _inlaw_ <spouseName> , если игрок супруг указанного NPC, независимо от того, связан ли NPC с игроком (например, Sat_inlaw_Abigail); и <key> записывается в одним из форматов, перечисленных ниже.

Запасной

Если ничего из вышеперечисленного не совпадает, игра покажет значение с ключом NPC.cs.4061 расположенным в Strings\StringsFromCSFiles.xnb. (Английская версия: "Hi.")

Брачные диалоги

Characters\Dialogue\MarriageDialogue.xnb contains dialogue text for all spouses, and each NPC may optionally have their own dialogue file like Characters\Dialogue\MarriageDialogueAbigail.xnb. When looking up a dialogue key, it will use the one in the NPC's file if it exists, else the one in the generic file, else a default text (usually blank).

Each dialogue entry has a key with one of these formats:

Файлы событий

Data\Events\*.xnb содержит сценарии событий, включая любой диалог в событии (смотри Модификации:События).

Описание анимации

Data\animationDescriptions.xnb содержит короткие фрагменты диалога, соответствующие определенным пунктам расписания.

Строки из CS файлов

Strings\StringsFromCSFiles.xnb содержит разные переводы. Включает диалог NPC, определенный в коде, диалог, который разделяется между несколькими персонажами, диалог для некоторых жестко запрограммированных событий, таких как брак и т.д.

Общий диалог, специфичный для NPC

Проявив некоторую изобретательность, вы можете заставить каждого NPC реагировать по-разному вместо использования обычного статического диалога. Например, вы можете использовать Content Patcher для изменения NPC.cs.3962 и NPC.cs.3963 (чтобы подарить букет), и NPC.cs.3980 (для принятия кулона русалки):

В этом примере каждый NPC получит свой ответ give_flowersA, give_flowersB, и give_pendant ключи диалога в их файлах диалога. (Смотри формат ниже приведена дополнительная информация о синтаксисе.) Обратите внимание, что они должны быть добавлены для всех вариантов, чтобы избежать ошибок. Например, вы могли бы добавить это для Хейли:

Contents

The dialogue text is stored in four sets of files.

Character-specific dialogue

Characters\Dialogue\*.xnb contains most of the dialogue for each character (one file per character). The game will choose dialogue from one of the sections below, in the order shown here.

Special dialogue

There are a few predefined keys for specific cases:

key format description
danceRejection Dialogue used to reject an offer to dance at the Flower Dance. (A different dialogue is used if they've already agreed to dance with another player.)
divorced Dialogue shown when you speak to your divorced spouse.
<location> _Entry Possible dialogue lines shown above the NPC's name when they enter the named <location> , with a 50% chance. This dialogue entry can contain multiple options separated by / ; the game will randomly choose one to display.
Example: SeedShop_Entry: "Hi, Pierre!/Now, what do I need. /Ah, that looks good!/Makin' my special sauce tonight!/Pierre! What's fresh?/Pierre! Waddya got for me?"
ComeBackLater
Snoring
Gil's dialogue when you haven't completed any new Adventure Quest goals. ComeBackLater will be shown once, and all subsequent dialogues will show Snoring.

Location dialogue

Otherwise the game will choose dialogue in this order.

  • Each key can optionally be prefixed with a season name, like springMountain_47_23.

The game will check variants in this order: <season> <key> , and <key> . The variants aren't listed below for simplicity.

key format description
<location> _ <x> _ <y> Dialogue shown in the named location when the NPC is standing at tile position <x> , <y> .
Example: Mountain_47_23: "I come here for the peace and quiet."
<location> _ <dayName> Dialogue shown in the named location on the given day of week.
Example: Saloon_Fri: "Business has been really good tonight. I'm pleased."
<location> <hearts> Dialogue shown in the named location if you have at least <hearts> hearts with them. The <hearts> will be checked in the order 10, 8, 6, 4, 2 (no other value will be recognised).
Example: Saloon8: "Hi there @. I'm glad to see you! You're always welcome here."
<location> Dialogue shown in the named location.
Example: Saloon: "Now that I'm here I can finally relax and socialize a bit."

Rain dialogue

Characters\Dialogue\rainy.xnb contains one dialogue entry per NPC. There's a roughly 50% chance they'll use this dialogue if one of the above didn't match, it's raining, and you're not married to or divorced from them.

Generic dialogue

Otherwise the game will choose a dialogue using one of these key formats (in precedence order):

  1. <season> _ <key> _inlaw_ <spouseName>
  2. <season> _ <key>
  3. <key> _inlaw_ <spouseName>
  4. <key>

For each variation above: <season> is a season name (like spring_14); _inlaw_ <spouseName> matches if the player is married to the named NPC, regardless of whether the speaking NPC is related to the named one (like Sat_inlaw_Abigail); and <key> is one of the formats listed below.

Fallback

If none of the above match, the game will show the value with key NPC.cs.4061 in Strings\StringsFromCSFiles.xnb. (English version: "Hi.")

Marriage dialogue

Characters\Dialogue\MarriageDialogue.xnb contains dialogue text for all spouses, and each NPC may optionally have their own dialogue file like Characters\Dialogue\MarriageDialogueAbigail.xnb. When looking up a dialogue key, it will use the one in the NPC's file if it exists, else the one in the generic file, else a default text (usually blank).

Each dialogue entry has a key with one of these formats:

Event files

Data\Events\*.xnb contains event scripts, including any dialogue in the event (see Modding:Event data).

Animation descriptions

Data\animationDescriptions.xnb contains short bits of dialogue to go with certain schedule points.

Strings from CS files

Strings\StringsFromCSFiles.xnb contains miscellaneous translations. That includes NPC dialogue defined in the code, dialogue that's shared between multiple characters, dialogue for some hardcoded events like marriage, etc.

NPC-specific generic dialogue

With some ingenuity, you can make each NPC respond differently instead of using the normal static dialogue. For example, you can use Content Patcher to change NPC.cs.3962 and NPC.cs.3963 (to give a bouquet), and NPC.cs.3980 (for the mermaid pendant acceptance):

In this example, each NPC will get their response from the give_flowersA, give_flowersB, and give_pendant dialogue key in their character dialogue files. (See format below for more info on the syntax.) Note that these should be added for all datable characters to avoid errors. For example, you could add this for Haley:

This can be used for other generic responses, and you even can avoid the "Give Bouquet" by asking for an answered question's ID.

Values

The game uses these predefined values in some dialogue keys. This section is linked from above where needed.

Days of week

Seasons

First/later year

In some cases the game uses a "first/later year" value for dialogue conditions. This only has two possible values:

value meaning
1 Occurs in the first year.
2 Occurs in any year after the first (not only year 2).

Response IDs

A response ID identifies an answer chosen by the player in response to a question dialogue. In some cases a question may have several answers with the same ID (e.g. several variations of "yes"), or use the same ID for every question (in which case the ID just shows whether the player has answered the question).

Mods can add their own response IDs, but here are the vanilla IDs as of 1.3.36¹:

Algorithm

The game finds dialogue as follows:

  1. Event dialogue is read from the appropriate event commands (see Modding:Event data).
  2. Location-specific dialogue is read from StringsFromCSFiles <location> .cs.
  3. Else character dialogue is read from the character-specific files.
  4. If no dialogues were found, the game resorts to hardcoded dialogue from the StringsFromCSFiles files (specifically keys prefixed with NPC.cs NPC.cs).

Читайте также: