Cambios

Línea 108: Línea 108:  
</ul>
 
</ul>
   −
==How a gift taste is determined==
+
==Cómo se determina el gusto==
The data format allows tastes to conflict in multiple ways:
+
Este formato permite resolver problemas entre gustos
   −
* between an [[Modding:Items|item ID]] and category ID;
+
* Entre una [[Modding:Items|item ID]] y una ID de categoría;
* between a universal taste and personal taste;
+
* Entre gusto universal y personal;
* between conflicting values (''e.g.,'' Jodi both loves and hates Daffodils (item ID 18) specifically);
+
* Entre valores contradictorios (''e.g.,'' Jodi ama y odia los narcisos (item ID 18));
* and any combination of the above (''e.g.,'' between a universal item ID and personal category ID).
+
* Y cualquier combinación de estas (''e.g.,'' entre un item universal y una categoria personal).
   −
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:
+
El juego usa un algoritmo algo complicado para determinar cuánto un PNJ le gusta un regalo (ve <samp>NPC::getGiftTasteForThisItem</samp>). Aquí hay una versión limpia del algoritmo en pseudo-código:
 +
 
 +
considera "if" como "si [condición]", y "else if" como "si lo anterior no funciona, revisa [condición]"
 +
"return" es el valor que devuelve.
    
<pre>
 
<pre>
var TASTE = neutral
+
var GUSTO = neutral
bool HAS_UNIVERSAL_ID = false
+
bool TIENE_ID_UNIVERSAL = false
bool HAS_UNIVERSAL_NEUTRAL_ID = false
+
bool TIENE_ID_UNIVERSAL_NEUTRAL = false
   −
// part I: universal taste by category
+
// parte I: gusto universal por categoría
if category is universally loved:
+
if categoría es universalmente amado:
   TASTE = love
+
   GUSTO = amor
else if category is universally hated:
+
else if categoría es universalmente odiado:
   TASTE = hate
+
   GUSTO = odio
else if category is universally liked:
+
else if categoría es universalmente gustado:
   TASTE = like
+
   GUSTO = gusto
else if category is universally disliked:
+
else if categoría es universalmente disgustado:
   TASTE = dislike
+
   GUSTO = disgusto
   −
// part II: universal taste by item ID
+
// parte II: gusto universal por item ID
if itemID is universally loved:
+
if itemID es universalmente amado:
   TASTE = love
+
   GUSTO = amor
   HAS_UNIVERSAL_ID = true
+
   TIENE_ID_UNIVERSAL = true
else if itemID is universally hated:
+
else if itemID es universalmente odiado:
   TASTE = hate
+
   GUSTO = odio
   HAS_UNIVERSAL_ID = true
+
   TIENE_ID_UNIVERSAL = true
else if itemID is universally liked:
+
else if itemID es universalmente gustado:
   TASTE = like
+
   GUSTO = gusto
   HAS_UNIVERSAL_ID = true
+
   TIENE_ID_UNIVERSAL = true
else if itemID is universally disliked:
+
else if itemID es universalmente disgustado:
   TASTE = dislike
+
   GUSTO = disgusto
   HAS_UNIVERSAL_ID = true
+
   TIENE_ID_UNIVERSAL = true
else if itemID is universally neutral:
+
else if itemID es universalmente neutral:
   TASTE = neutral
+
   GUSTO = neutral
   HAS_UNIVERSAL_ID = true
+
   TIENE_ID_UNIVERSAL = true
   HAS_UNIVERSAL_NEUTRAL_ID = true
+
   TIENE_ID_UNIVERSAL_NEUTRAL = true
   −
// part III: override neutral if it's from universal category
+
// parte III: anular neutral si es de categoría universal
if TASTE is neutral and not HAS_UNIVERSAL_NEUTRAL_ID:
+
if GUSTO es neutral y no TIENE_ID_UNIVERSAL_NEUTRAL:
   if item is edible but tastes bad (-300 > edibility < 0):
+
   if item es edible pero sabe mal (-300 > comestibilidad < 0):
       TASTE = hate
+
       GUSTO = odio
   else if item has a price < 20g:
+
   else if item vale < 20g:
       TASTE = dislike
+
       GUSTO = disgusto
   −
// part IV: sometimes override with personal tastes
+
// parte IV: a veces se anula por gustos personales
if ((npc loves itemID OR (item has a category AND npc loves category)) AND (item has no category OR npc doesn't personally love category OR no universal taste for itemID)
+
if ((npc ama itemID O (item tiene categoría Y npc ama categoría)) Y (item no tiene categoría O npc no tiene amor por categoría O no hay gusto universal para itemID)
   return love
+
   return amor
if ((npc hates itemID OR (item has a category AND npc hates category)) AND (item has no category OR npc doesn't personally hate category OR no universal taste for itemID)
+
if ((npc odia itemID O (item tiene categoría Y npc odia categoría)) Y (item no tiene categoría O npc no tiene odio por categoría O no hay gusto universal para itemID)
 
   return hate
 
   return hate
if ((npc like itemID OR (item has a category AND npc likes category)) AND (item has no category OR npc doesn't personally like category OR no universal taste for itemID)
+
if ((npc le gusta itemID O (item tiene categoría Y npc le gusta categoría)) Y (item no tiene categoría O npc no tiene gusto por categoría O no hay gusto universal para itemID)
   return like
+
   return gusto
if ((npc dislikes itemID OR (item has a category AND npc dislikes category)) AND (item has no category OR npc doesn't personally dislike category OR no universal taste for itemID)
+
if ((npc le disgusta itemID O (item tiene categoría Y npc le disgusta categoría)) Y (item no tiene categoría O npc no tiene disgusto por categoría O no hay gusto universal para itemID)
   return dislike
+
   return disgusto
if ((npc neutrals itemID OR (item has a category AND npc neutrals category)) AND (item has no category OR npc doesn't personally neutral category OR no universal taste for itemID)
+
if ((npc neutrals itemID O (item tiene categoría Y npc neutrals categoría)) Y (item no tiene categoría O npc no tiene neutral por categoría O no hay gusto universal para itemID)
 
   return neutral
 
   return neutral
   −
// part V: return taste if not overridden
+
// parte V: devuelve el gusto si no fue anulado
return TASTE
+
return GUSTO
 
</pre>
 
</pre>
   −
[[Category:Modding]]
+
[[Categoría:Modding]]
    
[[pt:Modificações:Dados dos gostos do presente]]
 
[[pt:Modificações:Dados dos gostos do presente]]
 
[[ru:Модификации:Подарки]]
 
[[ru:Модификации:Подарки]]
47

ediciones