Linha 6: |
Linha 6: |
| ==Data== | | ==Data== |
| ===Dados não tratados=== | | ===Dados não tratados=== |
− | Os gostos de presentes do NPC são armazenados em <tt>Content\Data\NPCGiftTastes.xnb</tt>, que pode ser [[Modding:Editing XNB files#unpacking|descompactado em um arquivo de texto.]]. Here's the raw data as of {{version|1.3.33}} for reference: | + | Os gostos de presentes do NPC são armazenados em <samp>Content\Data\NPCGiftTastes.xnb</samp>, que pode ser [[Modding:Editing XNB files#unpacking|descompactado em um arquivo de texto.]]. Here's the raw data as of {{version|1.3.33}} for reference: |
| | | |
| <syntaxhighlight lang="json"> | | <syntaxhighlight lang="json"> |
Linha 55: |
Linha 55: |
| | | |
| <ul> | | <ul> |
− | <li>''Universal tastes'' apply to all villagers. Their key is <tt>Universal_''Taste''</tt>, and their value is a space-delimited array of reference IDs (item ID if ≥0, category ID if <0). For example, consider this entry: | + | <li>''Universal tastes'' apply to all villagers. Their key is <samp>Universal_''Taste''</samp>, and their value is a space-delimited array of reference IDs (item ID if ≥0, category ID if <0). For example, consider this entry: |
| | | |
| <syntaxhighlight lang="json"> | | <syntaxhighlight lang="json"> |
Linha 63: |
Linha 63: |
| This data means villagers should have a universal like for category -2, item 72, etc.</li> | | This data means villagers should have a universal like for category -2, item 72, etc.</li> |
| | | |
− | <li>''Personal tastes'' apply to a specific villager. Their key is the villager's internal name (like <tt>Abigail</tt>), and their value alternates dialogue text with a list of reference IDs in this order: love, like, dislike, hate, and neutral. For example, consider Abigail's gift tastes: | + | <li>''Personal tastes'' apply to a specific villager. Their key is the villager's internal name (like <samp>Abigail</samp>), and their value alternates dialogue text with a list of reference IDs in this order: love, like, dislike, hate, and neutral. For example, consider Abigail's gift tastes: |
| | | |
| <syntaxhighlight lang="json"> | | <syntaxhighlight lang="json"> |
Linha 69: |
Linha 69: |
| </syntaxhighlight> | | </syntaxhighlight> |
| | | |
− | By splitting the string with <tt>/</tt> as the delimiter, we can extract this data: | + | By splitting the string with <samp>/</samp> as the delimiter, we can extract this data: |
| | | |
| {|class="wikitable" | | {|class="wikitable" |
Linha 115: |
Linha 115: |
| * and any combination of the above (''e.g.'', between a universal item ID and personal category ID). | | * and any combination of the above (''e.g.'', between a universal item ID and personal category ID). |
| | | |
− | The game uses a rather complicated algorithm to determine how much an NPC likes an gift (see <tt>NPC::getGiftTasteForThisItem</tt>). Here's a cleaned up version of the algorithm in pseudocode: | + | The game uses a rather complicated algorithm to determine how much an NPC likes an gift (see <samp>NPC::getGiftTasteForThisItem</samp>). Here's a cleaned up version of the algorithm in pseudocode: |
| | | |
| <pre> | | <pre> |