Tabla del botín

De WikiMinecraft
(Redirigido desde «Tabla de botín»)
Saltar a: navegación, buscar

Las tablas del botín (en inglés Loot tables) son las tablas JSON técnicas que representan los aspectos que deberían estar en un cofre generado de manera natural, qué objetos deben caer cuando se mata a una criatura o qué objetos se pueden pescar.

Uso

Las tablas de botín se estructuran como una etiqueta en cadena que determina la tabla a usar, y una etiqueta larga que determinar la semilla. Los cofres o criaturas con la misma semilla y tabla darán los mismos objetos. Las tablas del botín no determinan qué ranura de un cofre se utiliza; eso se determina al azar basadose en la semilla.

Para cofres, cofres trampa, vagonetas con cofre y vagonetas con tolva:



  • EntityCSS.png
    EntityCSS.png
    • Nbtsheet.png
       LootTable: tabla del botín que se utiliza para llenar el cofre cuando es abierto, o de otro modo se interactuó con los objetos. Cuando el cofre es parte de un cofre doble, sólo la mitad correspondiente a la etiqueta del cofre seleccionado se verá afectada.
    • Nbtsheet.png
       LootTableSeed: las semillas para la generación de la tabla del botín. 0 u omisión utilizará una semilla aleatoria.

Estas etiquetas serán eliminadas una vez que los objetos han interactuado (abriendo el cofre, rompiendo el cofre, etc.), y sólo entonces se pueden poner objetos en el cofre.

Para criaturas:

  • Nbtsheet.png
    The root tag.
    • Nbtsheet.png
       DeathLootTable: Tabla del botín que se utilizará para los objetos que caen cuando se mata a la entidad.
    • Nbtsheet.png
       DeathLootTableSeed: Semillas para la generación de la tabla del botín. 0 u su omisión utilizará una semilla aleatoria.

Las tablas del botín de criaturas y cofres pueden ser alteradas con los comandos /entitydata y /blockdata.

Los mapas personalizados pueden utilizar tablas del botín para cambiar el botín que se genera en el cofre o es otorgado por las criaturas. Se puede modificar cualquiera de las tablas del botín existentes o crear otras nuevas. Esta es la estructura del archivo:

  • <world save folder>
    • data
      • loot_tables

Cada carpeta bajo "loot_tables" es un espacio_nombre. Los archivos predeterminados están bajo el espacio_nombre "minecraft", pero los mapas personalizados y mods tienen cada uno sus propios espacio_nombre. Por ejemplo, si se fuera a crear un mapa personalizado llamado "Mapa parkour increible", el espacio_nombre podría ser "mapa_parkour_increible" (no pueden contener espacios). Contendrá cualquier tabla del botín que el mapa utilizará.

Para reemplazar las tablas del botín por defecto, que le colocan en el espacio_nombre "minecraft". Están organizados por entidades, cofres, y la pesca, como se muestra en la sección "Lista de tablas de botín". Para utilizar un espacio de nombres personalizado, se configura la etiqueta de tabla del botín a "espacio_nombre:nombre_tabla", donde "espacio_nombre" es el nombre del espacio de nombres personalizado y "nombre_tabla" es el nombre de archivo de la tabla personalizado, sin la extensión .json.

Etiquetas (tags)

Las tablas del botín se definen mediante el formato JSON. A continuación hay una lista de etiquetas utilizadas.

  • Nbtsheet.png
     The root tag (La etiqueta raíz)
    • Nbtsheet.png
       pools: A list of all pools for this entity. Each pool used will generate items from its list of items based on the number of rolls. Pools are applied in order.
      • Nbtsheet.png
         A pool
        • Nbtsheet.png
           conditions: Determines conditions for this pool to be used. If multiple conditions are specified, all must pass.
          • Nbtsheet.png
             A condition
            • Nbtsheet.png
               condition: Name of condition. Valid conditions are described below.
        • Nbtsheet.png
           rolls: Specifies the exact number of rolls on the pool.
        • Nbtsheet.png
           rolls: Specifies a random number of rolls within a range.
          • Nbtsheet.png
             min: Minimum number of rolls.
          • Nbtsheet.png
             max: Maximum number of rolls.
        • Nbtsheet.png
           bonus_rolls: Specifies the exact number of bonus rolls on the pool per point of luck. Rounded down after multiplying.
        • Nbtsheet.png
           bonus_rolls: Specifies a random number of bonus rolls within a range. Rounded down after multiplying.
          • Nbtsheet.png
             min: Minimum number of bonus rolls.
          • Nbtsheet.png
             max: Maximum number of bonus rolls.
        • Nbtsheet.png
           entries: A list of all things that can be produced by this pool. One entry is chosen per roll as a weighted random selection from all entries without failing conditions.
          • Nbtsheet.png
             An entry
            • Nbtsheet.png
               conditions: Determines conditions for this entry to be used. If multiple conditions are specified, all must pass.
              • Nbtsheet.png
                 A condition
                • Nbtsheet.png
                   condition: Name of condition. Valid conditions are described below.
            • Nbtsheet.png
               type: Type of entry. Can be item for item entries, loot_table to produce items from another loot table, or empty for an entry that generates nothing.
            • Nbtsheet.png
               name:
              • For type 'item', ID name of the item to be produced, e.g. minecraft:diamond. The default, if not changed by functions, is a stack of 1 of the default instance of the item.
              • For type 'loot_table', loot table to be used, e.g. minecraft:gameplay/fishing/junk.
            • Nbtsheet.png
               functions: For type 'item', applies functions to the item stack being produced. Functions are applied in order, so for example looting_enchant must be after set_count to work correctly.
              • Nbtsheet.png
                 A function:
                • Nbtsheet.png
                   function: Name of the function to apply. Valid functions are described below.
                • Nbtsheet.png
                   conditions: Determines conditions for this function to be applied. If multiple conditions are specified, all must pass.
                  • Nbtsheet.png
                     A condition
                    • Nbtsheet.png
                       condition: Name of condition. Valid conditions are described below.
            • Nbtsheet.png
               weight: Determines how often this entry will be chosen out of all the entries in the pool. Entries with higher weights will be used more often (chance is this entry's weighttotal of all considered entries' weights).
            • Nbtsheet.png
               quality: Modifies the entry's weight based on the killing/opening/fishing player's luck attribute. Formula is floor( weight + quality * generic.luck).

Funciones

Las tablas del botín utilizan las diferentes funciones para cambiar la pila del objeto que se produce, por ejemplo, ajustar el tamaño de la pila o la adición de encantamientos. A continuación se presentan una lista de funciones válidas, y las etiquetas utilizadas por ellas. Las etiquetas se colocan en la misma función del objeto como
Nbtsheet.png
 function:.
  • enchant_randomly - Enchants the item with one randomly-selected enchantment. The level of the enchantment, if applicable, will be random.
    • Nbtsheet.png
       enchantments: List of enchantment names to choose from. If omitted, all enchantments applicable to the item will be possible.
  • enchant_with_levels - Enchants the item, with the specified enchantment level (roughly equivalent to using an enchantment table at that level).
    •  treasure: Determines whether treasure enchantments are allowed on this item.
    • Nbtsheet.png
       levels: Specifies the exact enchantment level to use.
    • Nbtsheet.png
       levels: Specifies a random enchantment level within a range.
      • Nbtsheet.png
         min: Minimum level to use.
      • Nbtsheet.png
         max: Maximum level to use.
  • furnace_smelt - Smelts the item as it would be in a furnace. Used in combination with the entity_properties condition to cook food from animals on death.
  • looting_enchant - Adjusts the stack size based on the level of the Looting enchantment on the killer entity.
    • Nbtsheet.png
       count: Specifies an exact number of additional items per level of looting.
    • Nbtsheet.png
       count: Specifies a random number (within a range) of additional items per level of looting. Note the random number generated may be fractional, and will be rounded after multiplying by the looting level.
      • Nbtsheet.png
         min: Minimum increase.
      • Nbtsheet.png
         max: Maximum increase.
  • set_attributes - Add attribute modifiers to the item.
    • Nbtsheet.png
       modifiers
      • Nbtsheet.png
         A modifier
        • Nbtsheet.png
           name: Name of the modifier.
        • Nbtsheet.png
           attribute: The name of the attribute this modifier is to act upon.
        • Nbtsheet.png
           operation: Must be either "addition", "multiply_base" or "multiply_total".
        • Nbtsheet.png
           amount: Specifies the exact amount of change of the modifier.
        • Nbtsheet.png
           amount: Specifies a random amount within a range.
          • Nbtsheet.png
             min: Minimum amount.
          • Nbtsheet.png
             max: Maximum amout.
        • Nbtsheet.png
           id: Optional : UUID of the modifier following. If non specified, a new UUID will be generated.
        • Nbtsheet.png
           slot: Slots the item must be in for the modifier to take effect, this value can be one of the following : "mainhand", "offhand", "feet", "legs", "torso", or "head".
        • Nbtsheet.png
           slot: One of the listed slots will be chosen randomly.
  • set_count - Sets the stack size.
    • Nbtsheet.png
       count: Specifies the exact stack size to set.
    • Nbtsheet.png
       count: Specifies a random stack size within a range.
      • Nbtsheet.png
         min: Minimum stack size.
      • Nbtsheet.png
         max: Maximum stack size.
  • set_damage - Sets the item's damage value (durability) for tools.
    • Nbtsheet.png
       damage: Specifies the damage fraction to set (1.0 is undamaged, 0.0 is zero durability left).
    • Nbtsheet.png
       damage: Specifies a random damage fraction within a range.
      • Nbtsheet.png
         min: Minimum value.
      • Nbtsheet.png
         max: Maximum value.
  • set_data - Sets the item data value of the item.
    • Nbtsheet.png
       data: Specifies the exact value to set.
    • Nbtsheet.png
       data: Specifies a random value within a range.
      • Nbtsheet.png
         min: Minimum value.
      • Nbtsheet.png
         max: Maximum value.
  • set_nbt - Adds NBT data to an item.
    • Nbtsheet.png
       tag: Tag string to add, similar to those used by commands. Note that the first bracket is required and quotation marks need to be escaped using a backslash (\).

Condiciones

Las tablas del botín utilizan diversas condiciones que suman los requisitos paraa una caída de objeto, conjunción, o función. A continuación se presentan una lista de condiciones válidas, y las etiquetas utilizadas por ellos. Las etiquetas se colocan en la misma condición de objeto como
Nbtsheet.png
 condition:.
  • entity_properties - Test properties of an entity.
    • Nbtsheet.png
       entity: Specifies the entity to check for the condition. Set to this to use the entity that died, killer for the killer, or killer_player for a killer that is a player.
    • Nbtsheet.png
       properties: Properties to be checked.
      •  on_fire: Test whether the entity is or is not on fire.
  • entity_scores - Test the scoreboard scores of an entity.
    • Nbtsheet.png
       entity: Specifies the entity to check for the condition. Set to this to use the entity that died, killer for the killer, or killer_player for a killer that is a player.
    • Nbtsheet.png
       scores: Scores to check. All specifies scores must pass for the condition to pass.
      • Nbtsheet.png
         A score: Key name is the objective while the value is the exact score value required for the condition to pass.
      • Nbtsheet.png
         A score: Key name is the objective while the value specifies a range of score values required for the condition to pass.
        • Nbtsheet.png
           min: Minimum score.
        • Nbtsheet.png
           max: Maximum score.
  • killed_by_player - Test if a killer_player entity is available.
    •  inverse: If true, the condition passes if killer_player is not available.
  • random_chance - Test if a random number 0.0–1.0 is less than a specified value.
    • Nbtsheet.png
       chance: Success rate as a number 0.0–1.0.
  • random_chance_with_looting - Test if a random number 0.0–1.0 is less than a specified value, affected by the level of Looting on the killer entity.
    • Nbtsheet.png
       chance: Base success rate.
    • Nbtsheet.png
       looting_multiplier: Looting adjustment to the base success rate. Formula is chance + looting_level * looting_multiplier.

Lista de tablas del botín

A continuación se muestra una lista de todas las tablas del botín que existen por defecto. Se pueden añadir más tablas al guardado del mundo para su uso con mapas personalizados.

  • loot_tables
    • chests - Items from loot chests
    • entities - Items dropped from entities. May cause issues when applied to chests, due to some items spawning in stacks of 0
      • sheep - Sheep with wool, also inherited by colored sheep
        • black
        • blue
        • brown
        • cyan
        • gray
        • green
        • light_blue
        • lime
        • magenta
        • orange
        • pink
        • purple
        • red
        • silver
        • white
        • yellow
      • bat
      • blaze
      • cave_spider
      • chicken
      • cow
      • creeper
      • elder_guardian
      • enderman
      • endermite
      • ghast
      • giant
      • guardian
      • horse
      • iron_golem
      • magma_cube
      • mushroom_cow
      • ocelot
      • pig
      • rabbit
      • sheep - Sheep without wool
      • shulker
      • silverfish
      • skeleton
      • skeleton_horse
      • slime
      • snowman - Snow golems
      • spider
      • squid
      • witch
      • wolf
      • zombie
      • zombie_horse
      • zombie_pigman
    • gameplay
      • fishing
        • fish
        • junk
        • treasure
      • fishing - Loads the three tables from the fishing folder, applying luck to each one
    • empty - Contains no items

Mapas personalizados

Los mapas personalizados pueden utilizar tablas del botín para cambiar el botín que se genera en el cofre o otorgan las criaturas. Ellas pueden cambiar ya sea las tablas del botín existentes o crear otras nuevas. Esta es la estructura de archivo:

  • <world save folder>
    • data
      • loot_tables
        • minecraft

Los archivos JSON van en esta carpeta. Por ejemplo, el archivo para zombis iría en data/loot_tables/minecraft/entities/zombie.json. Esto hará que todos los zombis en ese mundo utilice su tabla del botín en lugar de la tabla por defecto del botín de zombi. Para utilizar las tablas del botín personalizadas, agregar el archivo a la carpeta "minecraft". Entonces, invocar (con /summon) a la criatura con la etiqueta de datos DeathLootTable para establecerlo en el nombre del archivo (sin la extensión .json).

Historia

Lanzamiento oficial
1.919 de octubre, 2015Dinnerbone anuncia las tablas del botín.
15w43aAñadidas las tablas del botín.
15w43bAñadida la condición entity_scores.
15w43cRenombrado "villager_golem.json" a "iron_golem.json"
Añadidas las tablas del botín de pesca, ovejas sin lana y zombis y caballos esqueleto.
Renombrada la etiqueta
Nbtsheet.png
 item: a
Nbtsheet.png
 name:, y la etiqueta
Nbtsheet.png
 items: a
Nbtsheet.png
 entries:.
Añadida la etiqueta
Nbtsheet.png
 type: y soporte para cargar una tabla del botín en lugar de un objeto.
Añadida la etiqueta
Nbtsheet.png
 luck: a los archivos por defecto, por el momento no hace nada en el código.
Añadida la función set_damage
15w44aAñadidas las funciones enchant_randomly y set_attributes.
15w44bAñadida la etiqueta
Nbtsheet.png
 quality.
Retiradas las etiquetas
Nbtsheet.png
 luck y
Nbtsheet.png
 luck_multiplier.
Añadida la etiqueta
Nbtsheet.png
 bonus_rolls.
1.9.1pre1Las tablas de botín ahora funcionan con dispensadores y soltadores.
Añadida la tabla por defecto chests/jungle_temple_dispenser.