Template:Crafting usage/doc:修订间差异

来自Minecraft Wiki
跳转到导航 跳转到搜索
添加的内容 删除的内容
(2333)
(// Edit via Wikiplus)
第38行: 第38行:
<includeonly>
<includeonly>
<!-- Template categories/interwiki here -->
<!-- Template categories/interwiki here -->
[[Category:Inventory templates]]
[[Category:物品栏模板]]
[[Category:表格模板]]
[[Category:表格模板]]
[[en:Template:Crafting Usage]]
[[en:Template:Crafting Usage]]

2017年4月15日 (六) 11:28的版本

[ 刷新 ]
这是文档页面,它应该被放置到Template:Crafting usage。查看Template:Documentation以获取更多信息。

此模板使用了Module:Crafting usage,此脚本使用Lua编写。
更多详情,请参阅Wikipedia:LuaExtension:Scribunto

该模版会在页面的“合成材料”段落显示使用该材料的合成配方。

只会在 Category:Recipe using <ingredient>分类列表)里搜索配方,仅接受使用了 {{crafting}}的结果。

如果找不到有效的配方,页面将会被加上 Category:Empty crafting usage

用法

  • {{{1}}}:用于控制要搜索的配方,默认为页面名称。可指定多个配方,使用逗号进行分隔。
  • {{{match}}}:指定配方的匹配程度,默认为精准匹配。可指定多个匹配类型,使用逗号进行分隔。如果指定了多个材料,但只有1种匹配类型,这个匹配类型将会用于所有配方的匹配。
    • start 表明匹配指定材料开头的配方。例如:“Redstone”将会匹配“Redstone Torch”、“Redstone Block”、“Redstone”等,但不会匹配到“Block of Redstone”、“Some Redstone thing”等。
    • end 表明匹配指定材料末尾的配方。例如“Redstone”将会匹配“Block of Redstone”、“Redstone”等,但不会匹配“Redstone Block”、“Some Redstone thing”等。
    • any 表明匹配任何含该材料的配方。例如:“Redstone”将会匹配“Block of Redstone”、“Redstone”、“Redstone Block”、“Some Redstone thing”等,但不会匹配“Red stone”、“Block of Reddishstone”等。
  • {{{category}}}:要搜索的分类的配方名称,默认为 Recipe using {{{1}}}
  • {{{ignore}}}:一个正则表达式字符串,以忽略没有命名空间以及下划线的空格。管道字符必须使用¦
  • {{{description}}}:如果配方带描述,将会自动显示配方的描述。但如果设置为0,描述列将会强制隐藏,如果设置为1,将会强制显示。
  • {{{continue}}}:如果设置了,表格将不会结束,允许手动添加附加的配方。与普通的 {{crafting}} 用法相同。最后一个配方必须设置 {{{foot}}}。这在缺失一些配方的情况下是权宜之计,或者加上 {{{ignore}}} 来手写一个配方,以进行更高高度的自定义。

{{Crafting}} usage

These args are used on the {{crafting}} templates themselves, but are read by this template.

  • {{{ignoreusage}}}: This can be added to crafting recipes which should be ignored by this template. Best for recipes which need to be ignored by multiple {{crafting usage}} templates.
  • {{{arggroups}}}: Used to manually specify which arguments are grouped (see below). Use the arg names (A1, A2, etc.) if the recipe is shaped, or numbers if the recipe is shapeless. Grouped args are separated by commas, and groups are separated by semi-colons. For example: A1,B1,A2;C1,Output would make A1, B1 and A2 a group and C1 and Output a group.

If not all frames of an animation is used, any value set in the name or ingredients arguments will be removed.

Arg groups

In order to correctly understand how the animations in a recipe should be displayed, the template needs to know which arguments are related. For example: in the bed recipe, any wood plank and any wool color can be mixed, and they will all produce the same color bed, thus none of them are related. However in the firework star recipe, the dye and the resulting firework star are related, but the extra ingredient isn't (any extra ingredient can be used with any color of firework star, but the correct dye has to be used to get the correct firework star).

For animations with different amount of frames, the template knows that they are not grouped, because the animation would get out of sync. However, if they have the same amount of frames, the template assumes they are a group. In cases where this isn't true, {{{arggroups}}} should be used.

Example[显示][编辑]