Изменения

Строка 322: Строка 322:  
|}
 
|}
   −
====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:
+
Чтобы понять, как работают $q, $r и $p, может быть полезен пример. Обратите внимание, как вы можете отформатировать сценарий, чтобы его было легче читать:
    
<syntaxhighlight lang="yaml">
 
<syntaxhighlight lang="yaml">
Строка 350: Строка 350:  
</syntaxhighlight>
 
</syntaxhighlight>
   −
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!"
+
Приведенный выше диалог запускается в любую пятницу летом. NPC начинает с ответа, который всегда отображается: "Я думаю, что завтра пойду на пляж!"
   −
Next they ask you a question.
+
Затем они задают вам вопрос.
 
<syntaxhighlight lang="yaml">#$q 305/306 beachquestion_followup#Would you like to go with me?</syntaxhighlight>
 
<syntaxhighlight lang="yaml">#$q 305/306 beachquestion_followup#Would you like to go with me?</syntaxhighlight>
   −
'''$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.)
+
'''$q''' запускает вопрос. '''305/306''' проверяет, задавался ли этот вопрос ранее, и если да, то он отправляет вас на ключ диалога '''beachquestion_followup'''. (Обратите внимание, что вы можете называть свои диалоги как угодно, что облегчает чтение.)
   −
Next are the responses the player can give. You can add any number of '''$r''' lines; here we have three:
+
Далее приведены ответы, которые может дать игрок. Вы можете добавить любое количество '''$r''' строк; здесь у нас есть три:
    
<syntaxhighlight lang="yaml">
 
<syntaxhighlight lang="yaml">
Строка 364: Строка 364:  
     #$r 306 -10 beachquestion_no#No thank you.
 
     #$r 306 -10 beachquestion_no#No thank you.
 
</syntaxhighlight>
 
</syntaxhighlight>
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.
+
Если вы скажете "да" (первый вариант), игра сохранит '''ID 305''' как ответ, данный на этот вопрос. Далее, ваша дружба с этим NPC увеличивается на '''15'''. '''beachquestion_yes''' указывает сценарию, какое продолжение диалогового ключа использовать в качестве ответа на ваш ответ.
   −
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.
+
Если вы скажете "нет" (второй и третий вариант), игра сохранит '''ID 306''' как ответ, данный на этот вопрос, в зависимости от того, какой ответ вы дали, ваша дружба с NPC изменится либо на, '''0''', либо на, '''-10'''. Тогда будет использоваться либо '''beachquestion_sorry''' или '''beachquestion_no''' для продолжения диалога.
   −
Now we need to make dialogue keys for each response:
+
Теперь нам нужно создать диалоговые ключи для каждого ответа:
    
<syntaxhighlight lang="yaml">
 
<syntaxhighlight lang="yaml">
Строка 381: Строка 381:  
</syntaxhighlight>
 
</syntaxhighlight>
   −
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.
+
Следует отметить '''beachquestion_followup'''. Если игрок снова поговорит с NPC, '''$q 305/306''' игра проверит, что на вопрос уже дан ответ, и вместо повторных вопросов, перейдет непосредственно к этому ключу.
   −
'''$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.
+
'''$p 305''' начинается переменная реакция, которая означает "'''если''' игрок выбрал "да", произнесите эту строку, '''иначе''' вместо этого произнесите эту строчку". Если игрок ответил "да", NPC отвечает радостно. OВ противном случае они скажут, что им нужно найти кого-то, кто пойдет с ними.
   −
There is another variable response the next day:
+
На следующий день есть еще один переменный ответ:
    
<syntaxhighlight lang="yaml">
 
<syntaxhighlight lang="yaml">
Строка 396: Строка 396:  
</syntaxhighlight>
 
</syntaxhighlight>
   −
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.
+
И снова первая строка (Пляж прекрасен...) всегда появляется, когда игрок разговаривает с NPC, но следующая строка зависит от того, ответили ли они " да " накануне или нет.
    
----
 
----
   −
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.
+
Вот еще один пример из существующего файла диалога Хейли. Обратите внимание, что форматирование сценария сложнее для чтения, но игра способна обрабатывать и то, и другое.
    
<syntaxhighlight lang="yaml">
 
<syntaxhighlight lang="yaml">
Строка 409: Строка 409:  
</syntaxhighlight>
 
</syntaxhighlight>
   −
The first time the <code>summer_Sat</code> 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:
+
В первый раз, когда <code>summer_Sat</code> диалог выбран, ни 42, ни 43 ответа не будет дано (потому что этот вопрос-единственный, на который они даны в качестве ответов), поэтому Хейли скажет: "Сельское хозяйство звучит так скучно... Чем ты вообще занимаешься весь день?" Игрок может выбрать один из этих ответов:
   −
* Care for plants
+
* Уход за растениями
* Explore the caves
+
* Исследование пещер
* Snoop around in your room
+
* Порыскать в своей комнате
* Dig for treasure
+
* Копание в поисках сокровищ
   −
The third response, <code>$r 43 -10 summer_Sat_13#Snoop around in your room</code>, sets response ID 43, reduces Haley's friendship by 10 points, and brings up the dialogue <code>summer_Sat_13</code> (Haley says, "What? You'd better not be doing that!"). All of the other responses set response ID 42, increase Haley's friendship by 10 points, and bring up the dialogue <code>summer_Sat_12</code> ("Hmm... sounds like a lot of work.").
+
Третий ответ, <code>$r 43 -10 summer_Sat_13#Snoop around in your room</code>, устанавливает ответ ID 43, уменьшает дружбу Хейли на 10 пунктов и запускает диалог <code>summer_Sat_13</code> (Хейли говорит: "Что? Тебе лучше этого не делать!"). Все остальные ответы задают ответ с ID 42, увеличит дружбу Хейли на 10 пунктов и начнёт диалог <code>summer_Sat_12</code> ("Хм... похоже, много работы.").
    
The next time <code>summer_Sat</code> is chosen, one of the response IDs listed in the <code>$q</code> command will have been given (either 42 or 43).  Therefore, the <code>$q</code> and everything after is scrapped, and dialogue <code>summer_Sat_old</code> is put in its place.  This new dialogue uses the <code>$p</code> 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 <code>|</code> 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 <code>|</code> will be used, so Haley will instead say, "Farming sounds so boring... But I guess it could get you in pretty good shape."
 
The next time <code>summer_Sat</code> is chosen, one of the response IDs listed in the <code>$q</code> command will have been given (either 42 or 43).  Therefore, the <code>$q</code> and everything after is scrapped, and dialogue <code>summer_Sat_old</code> is put in its place.  This new dialogue uses the <code>$p</code> 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 <code>|</code> 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 <code>|</code> will be used, so Haley will instead say, "Farming sounds so boring... But I guess it could get you in pretty good shape."
602

правки