Alterações

Saltar para a navegação Saltar para a pesquisa
sem resumo de edição
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 15: Linha 15:  
   "Universal_Dislike": "-4 -8 -12 -15 -16 -19 -22 -24 -25 -28 -74 78 169 246 247 305 309 310 311 403 419 423 535 536 537 725 726 749",
 
   "Universal_Dislike": "-4 -8 -12 -15 -16 -19 -22 -24 -25 -28 -74 78 169 246 247 305 309 310 311 403 419 423 535 536 537 725 726 749",
 
   "Universal_Hate": "0 -20 -21 92 110 111 112 142 152 153 157 178 105 168 170 171 172 374 376 378 380 397 420 684 721 766 767 772 203 308",
 
   "Universal_Hate": "0 -20 -21 92 110 111 112 142 152 153 157 178 105 168 170 171 172 374 376 378 380 397 420 684 721 766 767 772 203 308",
   "Robin": ""Isso é para mim? Uau, eu absolutamente amo isso !!/224 426 636/Obrigado! Isso é muito legal!/-6 -79 424 709/Um... why?/16 330/What the...? This is terrible!/2/Thank you. This might come in handy.// ",
+
   "Robin": "Isso é para mim? Uau, eu absolutamente amo isso !!/224 426 636/Obrigado! Isso é muito legal!/-6 -79 424 709/Um... why?/16 330/What the...? This is terrible!/2/Thank you. This might come in handy.// ",
 
   "Demetrius": "You're giving this to me? This is amazing!/207 232 233 400/Thank you! This is a very interesting specimen./-5 -79 422/...What is this?/80 330/This is disgusting./2/That was very thoughtful of you./-4/ ",
 
   "Demetrius": "You're giving this to me? This is amazing!/207 232 233 400/Thank you! This is a very interesting specimen./-5 -79 422/...What is this?/80 330/This is disgusting./2/That was very thoughtful of you./-4/ ",
 
   "Maru": "Is that...? Oh wow, @! This is spectacular!/72 197 190 215 222 243 336 337 400 787/This is a super gift! Thank you!/-260 62 64 66 68 70 334 335 725 726/Oh... That's for me? I'll just put it over here.../-4 330 414 410 404 724/Yuck! You thought I would like this?/340 342 2 430 416/Thanks.// ",
 
   "Maru": "Is that...? Oh wow, @! This is spectacular!/72 197 190 215 222 243 336 337 400 787/This is a super gift! Thank you!/-260 62 64 66 68 70 334 335 725 726/Oh... That's for me? I'll just put it over here.../-4 330 414 410 404 724/Yuck! You thought I would like this?/340 342 2 430 416/Thanks.// ",
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"
 
|-
 
|-
 
! index
 
! index
Linha 112: Linha 112:  
* between an item ID and category ID;
 
* between an item ID and category ID;
 
* between a universal taste and personal taste;
 
* between a universal taste and personal taste;
* between conflicting values (''e.g.'', Jodi both loves and hates Daffodils (item ID 18) specifically);
+
* between conflicting values (''e.g.,'' Jodi both loves and hates Daffodils (item ID 18) specifically);
* 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>
Linha 173: Linha 173:  
</pre>
 
</pre>
   −
[[Category:Modding]]
+
[[Category:Modificações]]
    
[[en:Modding:Gift taste data]]
 
[[en:Modding:Gift taste data]]
105 580

edições

Menu de navegação