Tables

Jul 19, 2019
Tables
  • - Item Tables -

    Main Page
    Introduction

    This page will explain you how to create an item table that will be used to randomly spawn items in a container


    Tables file

    Here is an example automatically generated with the file
    Code (YAML):
    Example_table:
      Min
    : 2
      Max
    : 4
      Items
    :
        item1
    :
          Material
    : Example_item
          Chance
    : 2
          Min
    : 1
          Max
    : 2
        item2
    :
          Material
    : Other_item
          Chance
    : 1
          Min
    : 1
          Max
    : 1
        golden_apple
    :
          Material
    : GOLDEN_APPLE
          Chance
    : 3
          Min
    : 1
          Max
    : 3
        iron_ingot
    :
          Material
    : IRON_INGOT
          Chance
    : 4
          Min
    : 3
          Max
    : 7
        healing_pot
    :
          Material
    : POTION
          Effect
    : INSTANT_HEAL
          Level
    : 1
          Chance
    : 5
          Min
    : 1
          Max
    : 3
    Another_table
    :
      Min
    : 1
      Max
    : 2
      Items
    :
        mmItem1
    :
          Provider
    : mythicmobs
          Name
    : SkeletonKingSword
          Chance
    : 1
          Min
    : 1
          Max
    : 1
        mmItem2
    :
          Provider
    : mythicmobs
          Name
    : KingsCrown
          Chance
    : 3
          Min
    : 1
          Max
    : 1


    Main section

    Min
    The minimum amount of different items that will be set in the container

    Max
    The maximum amount of different items that will be set in the container

    Items
    The list of all the different items that will be randomly chosen



    Items section

    Every section name within the Items section marks the beginning of an item section

    Material
    It is the Minecraft material name
    When in-game you can press F3 + H to show the item material name


    You can set the material name to any custom internal item name if you wish to set a custom item in the container

    If you set the Material to 'Potion', the Effect section must be provided


    Chance
    It is the relative chance for the item to be found in the container
    If you don't know what it is, read the Relative Chance section

    Min
    The minimum amount of this specific item that will be set in the container

    Max
    The maximum amount of this specific item that will be set in the container

    Effect (Optional)
    The Minecraft potion effect. Must be provided if the Material is set to 'Potion'

    Level (Optional)
    The potion effect level. Default is 1

    Provider (Optional)
    The name of the plugin you'r referring to when setting an external item (example: MythicMobs)

    Name (Optional)
    The name of the external item. Must be provided if the Provider is set

    Type (Optional)

    The MMOItem item type of the item. Must be provided if Provider is set to 'mmoitems' (example: dagger)


    Relative chance

    The plugin use a relative chance system which means that it's not in percentage.
    If you set 3 different items with each Chance set to 1 it means that each of them will have 1 chance out of 3 to be chosen.
    Formula: Item Chance / Total Chance = Probability for this item to be set in the container

    In the example above the golden apple has 3 chance out of 15 to be set in the container (between 1 and 3 copies of it). -> 3 / (2+1+3+4+5) = 3/15


    I will add more features in future updates
  • Loading...
  • Loading...