Изменения

Перейти к навигации Перейти к поиску
Нет описания правки
Строка 1: Строка 1:  
←[[Модификации:Индекс|Индекс]]
 
←[[Модификации:Индекс|Индекс]]
 
{{Переведите}}
 
{{Переведите}}
This page explains how the game stores and parses recipe data for cooking and crafting. (Tailoring recipes use a different format.) This is an advanced guide for mod developers.
+
На этой странице объясняется, как игра хранит и анализирует данные рецептов для приготовления пищи и крафта. (Рецепты пошива одежды используют другой формат.) Это расширенное руководство для разработчиков модов.
   −
==Данные==
+
==Источник==
===Cooking recipes===
+
===Кулинарные рецепты===
Cooking recipe data is stored in <tt>Content\Data\CookingRecipes.xnb</tt>,могут быть [[Модификации:Редактирование_XNB_файлов#Редактирование распакованных данных|извлечены для редактирования]]. Вот исходные данные по состоянию на {{version|1.5.1}} для примера:
+
Данные кулинарных рецептов хранятся в <samp>Content\Data\CookingRecipes.xnb</samp>, могут быть [[Модификации:Редактирование_XNB_файлов#Редактирование распакованных данных|извлечены для редактирования]]. Вот исходные данные по состоянию на {{version|1.5.1}} для примера:
    
{{collapse|Данные|content=<syntaxhighlight lang="json">
 
{{collapse|Данные|content=<syntaxhighlight lang="json">
Строка 92: Строка 92:  
</syntaxhighlight>}}
 
</syntaxhighlight>}}
   −
===Crafting recipes===
+
===Рецепты создаваемых предметов===
Crafting recipe data is stored in <tt>Content\Data\CraftingRecipes.xnb</tt>, могут быть [[Модификации:Редактирование_XNB_файлов#Редактирование распакованных данных|извлечены для редактирования]]. Вот исходные данные по состоянию на {{version|1.5.1}} для примера:
+
Данные рецепта создаваемых предметов хранятся в <samp>Content\Data\CraftingRecipes.xnb</samp>, могут быть [[Модификации:Редактирование_XNB_файлов#Редактирование распакованных данных|извлечены для редактирования]]. Вот исходные данные по состоянию на {{version|1.5.1}} для примера:
   −
{{collapse|Data|content=<syntaxhighlight lang="json">
+
{{collapse|Данные|content=<syntaxhighlight lang="json">
 
{
 
{
 
   "Wood Fence": "388 2/Field/322/false/l 0",
 
   "Wood Fence": "388 2/Field/322/false/l 0",
Строка 230: Строка 230:  
</syntaxhighlight>}}
 
</syntaxhighlight>}}
   −
==Format==
+
==Формат==
   −
{| class="wikitable"
+
{|class="wikitable"
 
|-
 
|-
! colspan="2" | Index
+
! colspan="2" | Индекс
! rowspan="2" | Field
+
! rowspan="2" | Поле
! colspan="2" | Example Value
+
! colspan="2" | Пример значения
 
|-
 
|-
! <small>Cooking</small>
+
! <small>Кулинария</small>
! <small>Crafting</small>
+
! <small>Создание предметов</small>
! <small>Cooking</small>
+
! <small>Кулинария</small>
! <small>Crafting</small>
+
! <small>Создание предметов</small>
 
|-
 
|-
| colspan="2" style="text-align: center" | Key
+
| colspan="2" style="text-align: center;" | Key
| Name
+
| Название
 
| ''Salad''
 
| ''Salad''
 
| ''Stone Fence''
 
| ''Stone Fence''
 
|-
 
|-
| colspan="2" style="text-align: center" | 0
+
| colspan="2" style="text-align: center;" | 0
| Ingredients
+
| Ингредиенты
 
| ''20 1 22 1 419 1''
 
| ''20 1 22 1 419 1''
 
| ''390 2''
 
| ''390 2''
 
|-
 
|-
| colspan="2" style="text-align: center" | 1
+
| colspan="2" style="text-align: center;" | 1
| (Unused)
+
| (Не используется)
 
| ''25 5''
 
| ''25 5''
 
| ''Field''
 
| ''Field''
 
|-
 
|-
| colspan="2" style="text-align: center" | 2
+
| colspan="2" style="text-align: center;" | 2
| Yield
+
| Результат
 
| ''196''
 
| ''196''
 
| ''323''
 
| ''323''
 
|-
 
|-
| style="text-align: center" | &mdash;
+
| style="text-align: center;" | &mdash;
| style="text-align: center" | 3
+
| style="text-align: center;" | 3
| Big craftable?
+
| Большой создаваемый предмет?
 
| &mdash;
 
| &mdash;
 
| ''false''
 
| ''false''
 
|-
 
|-
| style="text-align: center" | 3
+
| style="text-align: center;" | 3
| style="text-align: center" | 4
+
| style="text-align: center;" | 4
| Unlock conditions
+
| Условия разблокировки
 
| ''f Emily 3''
 
| ''f Emily 3''
 
| ''Farming 2''
 
| ''Farming 2''
 
|-
 
|-
| style="text-align: center" | 4
+
| style="text-align: center;" | 4
| style="text-align: center" | 5
+
| style="text-align: center;" | 5
| Display name<br><small>(not for English)</small>
+
| Отображаемое название<br /><small>(не для английского языка)</small>
| ''Ensalada''
+
| ''[[Салат]]''
| ''Valla de piedra''
+
| ''[[Каменный забор]]''
 
|}
 
|}
   −
In English, the '''display name''' is the same as the '''name''' from the key and cannot be changed. In other languages, the separate display name field applies.
+
На английском языке '''отображаемое название''' соответствует '''названию''' и не может быть изменен. На других языках применяется отдельное поле отображаемого названия.
   −
The values in '''field 1''' are of different types for cooking and crafting recipes, but both kinds of value are unused by the game. For cooking, the field is set to a pair of numbers. For crafting, the field is set to <tt>Home</tt> or <tt>Field</tt>.
+
Значения в '''поле 1''' бывают разных типов для приготовления пищи и создание предметов, но оба вида не используются в игре. Для приготовления пищи в поле устанавливается пара чисел. Для создания предметов поле имеет значение <samp>Home</samp> или <samp>Field</samp>.
   −
===Ingredients and yield===
+
===Ингредиенты и результат===
    
The '''ingredients''' are a space-separated list of numbers in pairs. The first number of each pair is an object index from [[Modding:Object data|ObjectInformation.xnb]]. (Negative numbers refer to categories, also listed in that article.) The second number of each pair is the quantity of that object that is required for the recipe.
 
The '''ingredients''' are a space-separated list of numbers in pairs. The first number of each pair is an object index from [[Modding:Object data|ObjectInformation.xnb]]. (Negative numbers refer to categories, also listed in that article.) The second number of each pair is the quantity of that object that is required for the recipe.
Строка 296: Строка 296:  
The '''unlock conditions''' field supports any one of these condition types, depending on recipe type:
 
The '''unlock conditions''' field supports any one of these condition types, depending on recipe type:
   −
{| class="wikitable"
+
{|class="wikitable"
 
|-
 
|-
 
! Syntax
 
! Syntax
Строка 302: Строка 302:  
! Description
 
! Description
 
|-
 
|-
| <tt>f&nbsp;{{t|NPC}}&nbsp;{{t|hearts}}</tt>
+
| <samp>f&nbsp;{{t|NPC}}&nbsp;{{t|hearts}}</samp>
 
| Cooking
 
| Cooking
| When the player reaches the given number of hearts of friendship with the named NPC, a letter with the key <tt>{{t|NPC}}Cooking</tt> will be queued for delivery tomorrow. That letter then unlocks the recipe with the [[Modding:Mail_data#Value|<tt>%item cookingRecipe %%</tt> token]].
+
| When the player reaches the given number of hearts of friendship with the named NPC, a letter with the key <samp>{{t|NPC}}Cooking</samp> will be queued for delivery tomorrow. That letter then unlocks the recipe with the [[Modding:Mail_data#Value|<samp>%item cookingRecipe %%</samp> token]].
 
|-
 
|-
| <tt>l&nbsp;{{t|level}}</tt>
+
| <samp>l&nbsp;{{t|level}}</samp>
 
| both
 
| both
 
| When the player reaches the given [[Skills#Skill-Based_Title|total skill level]], the recipe will be unlocked.
 
| When the player reaches the given [[Skills#Skill-Based_Title|total skill level]], the recipe will be unlocked.
 
|-
 
|-
| <tt>s&nbsp;{{t|skill}}&nbsp;{{t|level}}</tt>
+
| <samp>s&nbsp;{{t|skill}}&nbsp;{{t|level}}</samp>
 
| both
 
| both
 
| When the player reaches the given level of the named skill, the recipe will be unlocked. The valid skill names are <code>Farming</code>, <code>Mining</code>, <code>Fishing</code>, <code>Foraging</code>, <code>Luck</code>, and <code>Combat</code> (but <code>Luck</code> is unimplemented).
 
| When the player reaches the given level of the named skill, the recipe will be unlocked. The valid skill names are <code>Farming</code>, <code>Mining</code>, <code>Fishing</code>, <code>Foraging</code>, <code>Luck</code>, and <code>Combat</code> (but <code>Luck</code> is unimplemented).
 
|-
 
|-
| <tt>{{t|skill}}&nbsp;{{t|level}}</tt>
+
| <samp>{{t|skill}}&nbsp;{{t|level}}</samp>
 
| both
 
| both
 
| This is an alternate form of the skill unlock above.
 
| This is an alternate form of the skill unlock above.
 
|-
 
|-
| <tt>none</tt>
+
| <samp>none</samp>
 
| both
 
| both
 
| The recipe must be unlocked in some other way, such as an event. (See [[#Exceptions|Exceptions]] below for starting recipes and other hard-coded unlocks.)
 
| The recipe must be unlocked in some other way, such as an event. (See [[#Exceptions|Exceptions]] below for starting recipes and other hard-coded unlocks.)
Строка 346: Строка 346:  
Recipes that are unlocked during vanilla game events are hard-coded to be unlocked when those events are skipped.
 
Recipes that are unlocked during vanilla game events are hard-coded to be unlocked when those events are skipped.
   −
The recipes unlocked by [[The Queen of Sauce]] TV channel are set in <tt>Content\Data\TV\CookingChannel.xnb</tt>.
+
The recipes unlocked by [[The Queen of Sauce]] TV channel are set in <samp>Content\Data\TV\CookingChannel.xnb</samp>.
 
[[en:Modding:Recipe_data]]
 
[[en:Modding:Recipe_data]]
 
[[Category:Модификации]]
 
[[Category:Модификации]]
1

правка

Навигация