欢迎来到我的世界玩家社区Wiki!如需参与编辑,请每一位编辑者务必仔细阅读Wiki方针
全站通知:

模板:虚无世界3(Advent of Ascension 3)/LootTable

来自我的世界玩家社区WIKI_BWIKI_哔哩哔哩
跳到导航 跳到搜索


虚无世界3(Advent of Ascension 3)-Lua logo.svg
本模板使用模块:虚无世界3(Advent of Ascension 3)/LootTable,一种写入了Lua编程语言的脚本。
请见维基百科:Lua扩展:Scribunto了解更多资讯。


Template:LootTable is a template used for displaying information regarding loot tables. The available parameters are listed below:

  • title – sets the title displayed at the top of the table. If not specified or left blank, the default title depends on the type parameter (described below).
  • otherlooting - changes the title of the third column from the left. If not specified or left blank, the default column title depends on the type parameter.
  • type – determines which loot table the table is representing. Set this to either mob or chest, or leave it blank to have it default to mob.
    • If set to mob, will cause the following to occur:
      • The title of the table will read Unique drops (if the "title" parameter isn't set).
      • The third column from the left will be titled Looting.
    • If set to chest, the following will occur:
      • The title of the table will read Chest loot.
      • The third column from the left will be titled Luck.
    • If the type parameter is not set, it defaults to mob.

Adding loot

To add loot, add a parameter pool1 followed by a series of text with the below formatting, which represents a row in the table:

item:text; quantity:text; looting:text; weight:text; notes:text; image:text; imagesize:text
  • item: specifies the name of the item being represented (e.g. item:Limonite Ingot).
  • This can also be set to "nothing" if the table row represents the chance of dropping no item.
  • quantity: specifies how many of this item gets dropped (e.g. quantity:3-5). This should not be specified if the item is nothing or another loot table.
  • looting: describes what effect the Looting enchantment has on the drop (e.g. looting:+2 per level).
  • weight: specifies the weight of this item in the pool (e.g. weight:3). This should be a positive integer, and will be used to calculate the values shown in the "Chance" column in the table.
  • notes: specifies the text to display in the "Notes" column (e.g. notes:Some text here).
  • image: specifies a filename without the "File:", but with the extension (e.g. image:Limonite Ingot.png). Usually this is not needed if the filename is the same as the article name and has a '.png' extension.
    • It can also be set to image:none to prevent an image from displaying, such as when the "item" is another loot table.
  • imagesize: specifies the size of the image, which defaults to 32px. This option is usually not needed either.

It's recommended to specify at least the item, quantity (when applicable) and weight; the rest of the above options can be left out if not applicable.

The above options should be separated by a semicolon (;), though one isn't needed after the last item in the line. The number of spaces immediately around the semicolon and the colon after the option name has no effect on the output.

Multiple items can be added to the table by adding each text string on a separate line. To add a new pool, add |pool2= (or pool3, pool4 etc) followed by the items in the new pool.

Specifying number of rolls

To specify the number of rolls in a pool, add a parameter |rolls1= (replacing 1 with the number of the pool specified above). Bonus rolls can be specified with |bonusrolls1=, though it can be left out if the pool doesn't have any bonus rolls.

Example usage

{{虚无世界3(Advent of Ascension 3)/LootTable
|title= Example loot table
|pool1=
item:Floating Stone; quantity:0-1; weight:50
item:Haven Tokens; quantity:1-8; weight:20
item:nothing; weight:100
|rolls1= 3
|bonusrolls1= 0-1

|pool2=
item:Limonite Ingot; quantity:1; weight:30; image:none
item:Copper Coin; quantity:1-3; weight:20; notes:Some text here
item:Voliant Heart; quantity:1; weight:20
|rolls2= 1
}}

上述文本会生成如下表格:


示例模板
物品 数量 抢夺 概率 注释
文件:Floating Stone.png 漂浮之石 0-1 29.4%
文件:Haven Tokens.png 天堂代币 1-8 11.8%
58.8%
上述随机池将随机选取3次,同时每级幸运额外随机选取0-1次。
褐铁锭 1 42.9%
文件:Copper Coin.png 铜币 1-3 28.6% Some text here
文件:Voliant Heart.png 天界轰炸者之心 1 28.6%
上述随机池将随机选取1次。