模板:Item infobox

出自Calamity Mod Wiki
跳至導覽 跳至搜尋

{{#cargo_attach _table = Debuffs }}

Template-info.svg Documentation The documentation below is transcluded from Template:Item infobox/doc. (edit | history)

為翻譯做出的魔改

  • 參數:refname
使用方法:傳入物品原英文名。
在不傳入此參數的情況下,行為與魔改前一致。此參數並不會影響手動指定的圖片名。
此參數解決2個問題:
1. 原版的Item infobox的默認圖片查找依賴於name參數,而當前中文站內的圖片名稱都是英文,這就導致在不特定指定圖片文件名的情況下,此模板找不到圖片。(某些情況下,需要指定多個狀態的圖片,也會顯得比較繁瑣。)魔改後的模板依賴refname查找默認圖片,在refname未傳入時會像魔改前一樣使用name查找。
2. 原版的Item infobox會在有debuff參數的情況下將name作為Item列錄入Debuff數據庫,而對應的減益頁面在顯示「來自武器」列表時會直接用Item的值查找圖片文件,然後由於當前中文站內的圖片名稱都是英文而找不到圖片。在refname傳入時,魔改後的模板會將<name>/<refname>作為Item列錄入Debuff數據庫,在refname未傳入時會像魔改前一樣只錄入name。同時,Template:Item debuffs/cargo也做了相應的改動,在Item列存在「第二部分」時,會用這個「第二部分」查找圖片文件,不存在時就直接使用「第一部分」查找圖片文件(行為與魔改前一致)。
  • 參數:debuffimg
使用方法:傳入減益的圖片。
在不傳入此參數的情況下,行為與魔改前一致。
因為減益不能自定義圖片,所以加了這個參數來讓它支持。
  • 參數:debuffref
使用方法:傳入減益原英文名。
在不傳入此參數的情況下,行為與魔改前一致。此參數並不會影響手動指定的圖片名。
類似refname,解決原版模板按照英文名查找信息的問題。

Usage

  • Everything is optional.
  • You can add a "name," "image," "imagefemale," and "imagebreak." Fill these values if the ROOTPAGENAME macro is not adequate (if the page name has a disambig qualifier for example)
{{item infobox
| boxwidth = width of infobox; default = 21em or stretches to image width
| float = default is right
| css / style = css style for infobox box, if width:xx or float:xx inclueded it will override boxwidth= or float=.
| name = custom item name; default = page name
| namesub = custom item name, displays below name
| image = inventory image; default = name.png (also used for sets)
| imagefemale = female equipped variant; default = name female.png
| imageplaced = placed image; default = name (placed).gif; if no GIF exists, default = name (placed).png
| imageequipped = equipped image; default = name (equipped).gif; if no GIF exists, default = name (equipped).png
| imagebreak = if yes, placed/equipped image is pushed to a new line below the inventory image; default = no
| type = eg. Weapon, Tool, Furniture, etc.
| type2 = secondary type; =Set for armor and vanity sets
| damage = damage inflicted per hit
| damageraw = deprecated; use "data-sort-type=number" in Damage column header instead;

(was used if damage had icons and/or formatting, to give an unformatted number for use in sorting lists)

| damagetype = melee, ranged, magic, summon, or rogue
| auto = yes, if weapon/item autoswings/autofires by holding the use key/button
| defense = defense provided
| bonus =
| setbonus = for armor sets, where type2 = Set
| pick = pickaxe power, without "%"
| pickreq = required pickaxe power, without "%"
| axe = axe power, without "%"
| hammer = hammer power, without "%"
| bait = bait power, without "%"
| knockback = knockback inflicted per hit, if more than one value needed, you should wrap the values with {{kb}}, e.g. {{kb|7.5}}/{{kb|6}}
| placeable = yes/no
| width = width when placed, tiles
| height = height when placed, in tiles
| mana = mana cost per use
| mregen = mana regeneration
| mheal = mana heal
| life = health (life) cost per use
| lregen = health regeneration
| hheal = health heal
| tooltip = Tooltip
| velocity = velocity of fired projectiles
| velocitymult = for ammunition only, the multiplier this type of ammunition applies to the weapon it's used for
| extraupdates = the extra updates applied to the projectiles from the weapon, will calculate effective velocity automatically
| critical = if no value is entered and the main Type is "Weapon", a default value of 4% is displayed
| body slot =
| use = use time
| reach = reach in tiles, for yoyos
| attduration = attack duration in seconds, for yoyos
| toolspeed =
| tool = tool used to free this item if in its placed form (this field is somewhat deprecated)
| buff / buff2 = buff provided
| bufflink / bufflink2 = no: when buff doesn't have it's own page
| duration / duration2 = buff duration
| bufftip / bufftip2 = buff tooltip
| debuff / debuff2 = debuff provided
| debufflink / debufflink2 = no: when debuff doesn't have it's own page
| debuffduration / debuffduration2 = debuff duration
| debuffchance / debuffchance2 = debuff chance
| debufftip / debufftip2 = debuff tooltip
| stack = max quantity of this item that can be stacked in a single inventory slot; defaults to 1 for all items
| color = map color for tiles in hex format e.g. #ffff00
| rare = rarity value, eg. '1' for Blue, '2' for Green, 'd' for Dark Red (donator), 'q' for Amber (quest), 'rainbow' for expert-exclusive.
| buy = buy value in coins, enter using the value template ({{value}})

Placing // within either the sell value or buy value will return separate lines for Buy and Sell.

| sell = sell value in coins, also enter using coin templates
| research = the number of individual items needed to fully research this item in Journey Mode
| consumable = true: (found in source code) leaves player's inventory with Use / Attack, includes placeable items
| listcat = a supplemental category name to include the current item in a DPL list, eg. "arrows" causes the item to display at Arrows
| listcat2 ... listcat5 = identical to listcat: an additional supplemental category name
| listexclude = yes, to exclude the current template from DPL lists
| hardmode = yes, for items that only become available in Hardmode worlds
| postml = yes, for items that only become available after the Moon Lord is defeated
| image2 = adds an image at the bottom of the infobox
| image2caption = adds a caption for the bottom image
| proj = adds an image of a projectile fired by the weapon
| projcaption = adds a caption for the projectile image
| sound = adds a sound made by the item
| soundtext = adds a label to the sound
}}