Template:Item Infobox/doc: Difference between revisions

From The Walkscape Walkthrough
Content added Content deleted
m (update)
mNo edit summary
 
(18 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Parameters==
Variables that are expected:
=== Name ===
# Title
The name of the item to appear at the top of the box. This value is optional but strongly recommended. If not provided, the name of the page will be used instead.
# Image
# (Skill Name)
# Rarity
# Type
# Slot
# Value


=== Image ===
These should perhaps be named in the future.
The image file to represent the item. This is also strongly recommended. If a value is not provided, a file with the name of the item.png will be attempted. If that item is not found, a question mark image will appear.
After that the Skills and Levels sections are populated by setting the skill name to the required value. If a skill does not have a value set, it will not appear in either section of the table. The rarity is from the set list of known rarities and should populate as a stylized text that reflects the in-game colors used for rarity.


=== Agility ===
The level of [[Agility]] required by the item. If left blank, the [[Agility]] skill and level will not be shown.


=== Carpentry ===
TODO:
The level of [[Carpentry]] required by the item. If left blank, the [[Carpentry]] skill and level will not be shown.

=== Cooking ===
The level of [[Cooking]] required by the item. If left blank, the [[Cooking]] skill and level will not be shown.

=== Crafting ===
The level of [[Crafting]] required by the item. If left blank, the [[Crafting]] skill and level will not be shown.

=== Fishing ===
The level of [[Fishing]] required by the item. If left blank, the [[Fishing]] skill and level will not be shown.

=== Foraging ===
The level of [[Foraging]] required by the item. If left blank, the [[Foraging]] skill and level will not be shown.

=== Mining ===
The level of [[Mining]] required by the item. If left blank, the [[Mining]] skill and level will not be shown.

=== Smithing ===
The level of [[Smithing]] required by the item. If left blank, the [[Smithing]] skill and level will not be shown.

=== Woodcutting ===
The level of [[Woodcutting]] required by the item. If left blank, the [[Woodcutting]] skill and level will not be shown.

=== Rarity ===
The rarity of the item.

=== Type ===
The type of item.

=== Slot ===
The slot the item can be equipped in, if equippable.

=== Value ===
The sell value of the item.

=== Finevalue ===
The sell value of the fine version of the item if it exists.

=== Keyword ===
A list of applicable keywords linking to the keyword's page seperated by <nowiki></br></nowiki> breaks if there are more than one.

==Quick Copy==
===Notated Copy===
<syntaxhighlight lang="wikitext">
{{Item_Infobox
| Name = (Recommended)
| Image = (Recommended)
| Agility = (Optional)
| Carpentry = (Optional)
| Cooking = (Optional)
| Crafting = (Optional)
| Fishing = (Optional)
| Foraging = (Optional)
| Mining = (Optional)
| Smithing = (Optional)
| Woodcutting = (Optional)
| Rarity = (Optional)
| Type = (Optional)
| Slot = (Optional)
| Value = (Optional)
| Finevalue = (Optional)
| Keyword = (Optional)
| Tradable = (Optional)
| Sellable = (Optional)
| Droppable = (Optional)
}}
</syntaxhighlight>

===Empty copy===
<syntaxhighlight lang="wikitext">
{{Item_Infobox
| Name =
| Image =
| Agility =
| Carpentry =
| Cooking =
| Crafting =
| Fishing =
| Foraging =
| Mining =
| Smithing =
| Woodcutting =
| Rarity =
| Type =
| Slot =
| Value =
| Finevalue =
| Keyword =
| Tradable =
| Sellable =
| Droppable =
}}
</syntaxhighlight>

==To Do==
* Rarity should probably be pulled out as its own template to make it more digestible and useable elsewhere. The values should also be converted to hex values as named colors are probably not very accurate.
* Rarity should probably be pulled out as its own template to make it more digestible and useable elsewhere. The values should also be converted to hex values as named colors are probably not very accurate.
* Check if this works for crafted items also (I think it will) and then rename it if it does to be more ambiguous. Maybe something like '''Infobox Item'''
* Check if this works for crafted items also (I think it will) and then rename it if it does to be more ambiguous. Maybe something like '''Infobox Item'''




==Examples==
Example:


{{Item_Infobox
| Name = Shovel Axe
| Image = Shovel_Axe.svg
| Mining = 50
| Woodcutting = 50
| Rarity = Legendary
| Type = Loot
| Slot = Tool
| Value = 100
| Keyword = [[Pickaxes]]</br>[[Hatchets]]
}}
The formatting for [[Shovel Axe]] is as follows:
The formatting for [[Shovel Axe]] is as follows:


<syntaxhighlight lang="wikitext">{{Item_Infobox
{{Infobox Loot
| Title = Shovel Axe
| Name = Shovel Axe
| Image = shovelaxe_svg.svg
| Image = Shovel_Axe.svg
| Mining = 50
| Mining = 50
| Woodcutting = 50
| Woodcutting = 50
Line 30: Line 133:
| Slot = Tool
| Slot = Tool
| Value = 100
| Value = 100
| Keyword = [[Pickaxes]]</br>[[Hatchets]]
}}</syntaxhighlight>

And the result is:



















{{Item_Infobox
| Name = Cape of Half-Achiever
| Image = Cape_of_Half-Achiever.svg
| Agility =
| Carpentry =
| Cooking =
| Crafting =
| Fishing =
| Foraging =
| Mining =
| Smithing =
| Woodcutting =
| Rarity = Legendary
| Type = Loot
| Slot = Cape
| Value = N/A
| Keyword =
| Tradable = No
| Sellable = No
| Droppable = No
}}
}}
The formatting for [[Cape of Half-Achiever]] is as follows:


<syntaxhighlight lang="wikitext">{{Item_Infobox
[[Category:Documentation]]
| Name = Cape of Half-Achiever
[[Category:Templates]]
| Image = Cape_of_Half-Achiever.svg
| Agility =
| Carpentry =
| Cooking =
| Crafting =
| Fishing =
| Foraging =
| Mining =
| Smithing =
| Woodcutting =
| Rarity = Legendary
| Type = Loot
| Slot = Cape
| Value = N/A
| Keyword =
| Tradable = No
| Sellable = No
| Droppable = No
}}</syntaxhighlight>

And the result is:


==Tabbed Items==
Tabbed items call the template once for each tab including only the infomation needed for that tab.

The tabbed area starts with a div statement and tabber tag <syntaxhighlight lang="wikitext"><div class="tabberfix tabberresize" style="float: right"><tabber></syntaxhighlight>. And ends by closing the tags <syntaxhighlight lang="wikitext"></tabber></div></syntaxhighlight>

Each tab starts with "pipe hyphen pipe" (|-|) then a name for the tab folowed by an equal sign (=) and then whatever goes inside the tab.

===Quick Copy===
<syntaxhighlight lang="wikitext"><div class="tabberfix tabberresize" style="float: right"><tabber>|-| Tab_1_Name = {{Item_Infobox
| Name =
| Image =
| Agility =
| Carpentry =
| Cooking =
| Crafting =
| Fishing =
| Foraging =
| Mining =
| Smithing =
| Woodcutting =
| Rarity =
| Type =
| Slot =
| Value =
| Finevalue =
}}
|-| Tab_2_Name = {{Item_Infobox
| Name =
| Image =
| Agility =
| Carpentry =
| Cooking =
| Crafting =
| Fishing =
| Foraging =
| Mining =
| Smithing =
| Woodcutting =
| Rarity =
| Type =
| Slot =
| Value =
| Finevalue =
}}</tabber></div></syntaxhighlight>

=== Tabbed Example ===
Fine Material
<syntaxhighlight lang="wikitext"><div class="tabberfix tabberresize" style="float: right"><tabber>|-| Normal = {{Item_Infobox
|Title = Nettle
|Image = Nettle.svg
|Type = Material
|Value = 0
}}
|-| Fine = {{Item_Infobox
|Title = Fine Nettle
|Image = Nettle.svg
|Type = Material
|Finevalue = 6
}}</tabber></div></syntaxhighlight>

And the result is:
<div class="tabberfix tabberresize" style="float: right"><tabber>|-| Normal = {{Item_Infobox
|Title = Nettle
|Image = Nettle.svg
|Type = Material
|Value = 0
}}
|-| Fine = {{Item_Infobox
|Title = Fine Nettle
|Image = Nettle.svg
|Type = Material
|Finevalue = 6
}}</tabber></div>
<noinclude>[[Category:Templates]] [[Category:Documentation]]</noinclude>

Latest revision as of 14:03, 9 June 2024

Parameters

Name

The name of the item to appear at the top of the box. This value is optional but strongly recommended. If not provided, the name of the page will be used instead.

Image

The image file to represent the item. This is also strongly recommended. If a value is not provided, a file with the name of the item.png will be attempted. If that item is not found, a question mark image will appear.

Agility

The level of Agility required by the item. If left blank, the Agility skill and level will not be shown.

Carpentry

The level of Carpentry required by the item. If left blank, the Carpentry skill and level will not be shown.

Cooking

The level of Cooking required by the item. If left blank, the Cooking skill and level will not be shown.

Crafting

The level of Crafting required by the item. If left blank, the Crafting skill and level will not be shown.

Fishing

The level of Fishing required by the item. If left blank, the Fishing skill and level will not be shown.

Foraging

The level of Foraging required by the item. If left blank, the Foraging skill and level will not be shown.

Mining

The level of Mining required by the item. If left blank, the Mining skill and level will not be shown.

Smithing

The level of Smithing required by the item. If left blank, the Smithing skill and level will not be shown.

Woodcutting

The level of Woodcutting required by the item. If left blank, the Woodcutting skill and level will not be shown.

Rarity

The rarity of the item.

Type

The type of item.

Slot

The slot the item can be equipped in, if equippable.

Value

The sell value of the item.

Finevalue

The sell value of the fine version of the item if it exists.

Keyword

A list of applicable keywords linking to the keyword's page seperated by </br> breaks if there are more than one.

Quick Copy

Notated Copy

{{Item_Infobox
| Name = (Recommended)
| Image = (Recommended)
| Agility = (Optional)
| Carpentry = (Optional)
| Cooking = (Optional)
| Crafting = (Optional)
| Fishing = (Optional)
| Foraging = (Optional)
| Mining = (Optional)
| Smithing = (Optional)
| Woodcutting = (Optional)
| Rarity = (Optional)
| Type = (Optional)
| Slot = (Optional)
| Value = (Optional)
| Finevalue = (Optional)
| Keyword = (Optional)
| Tradable = (Optional)
| Sellable = (Optional)
| Droppable = (Optional)
}}

Empty copy

{{Item_Infobox
| Name = 
| Image = 
| Agility = 
| Carpentry = 
| Cooking = 
| Crafting = 
| Fishing = 
| Foraging = 
| Mining = 
| Smithing = 
| Woodcutting = 
| Rarity = 
| Type = 
| Slot = 
| Value = 
| Finevalue = 
| Keyword = 
| Tradable = 
| Sellable = 
| Droppable = 
}}

To Do

  • Rarity should probably be pulled out as its own template to make it more digestible and useable elsewhere. The values should also be converted to hex values as named colors are probably not very accurate.
  • Check if this works for crafted items also (I think it will) and then rename it if it does to be more ambiguous. Maybe something like Infobox Item


Examples

Shovel Axe
Shovel Axe Sprite
Skill(s): framelesslink=Mining Mining lvl 50
framelesslink=Woodcutting Woodcutting lvl 50
Rarity:
Type: Loot
Slot: Tool
Value: 100
Keyword(s): Pickaxes
Hatchets
Properties
Tradable: Yes
Sellable: Yes
Droppable: Yes

The formatting for Shovel Axe is as follows:

{{Item_Infobox
| Name = Shovel Axe
| Image = Shovel_Axe.svg
| Mining = 50
| Woodcutting = 50
| Rarity = Legendary
| Type = Loot
| Slot = Tool
| Value = 100
| Keyword = [[Pickaxes]]</br>[[Hatchets]]
}}

And the result is:










Cape of Half-Achiever
Cape of Half-Achiever Sprite
Rarity:
Type: Loot
Slot: Cape
Value: N/A
Properties
Tradable: No
Sellable: No
Droppable: No

The formatting for Cape of Half-Achiever is as follows:

{{Item_Infobox
| Name = Cape of Half-Achiever
| Image = Cape_of_Half-Achiever.svg
| Agility = 
| Carpentry = 
| Cooking = 
| Crafting = 
| Fishing = 
| Foraging = 
| Mining = 
| Smithing = 
| Woodcutting = 
| Rarity = Legendary
| Type = Loot
| Slot = Cape
| Value = N/A
| Keyword = 
| Tradable = No
| Sellable = No
| Droppable = No
}}

And the result is:


Tabbed Items

Tabbed items call the template once for each tab including only the infomation needed for that tab.

The tabbed area starts with a div statement and tabber tag

<div class="tabberfix tabberresize" style="float: right"><tabber>

. And ends by closing the tags

</tabber></div>

Each tab starts with "pipe hyphen pipe" (|-|) then a name for the tab folowed by an equal sign (=) and then whatever goes inside the tab.

Quick Copy

<div class="tabberfix tabberresize" style="float: right"><tabber>|-| Tab_1_Name =  {{Item_Infobox
| Name = 
| Image = 
| Agility = 
| Carpentry = 
| Cooking = 
| Crafting = 
| Fishing = 
| Foraging = 
| Mining = 
| Smithing = 
| Woodcutting = 
| Rarity = 
| Type = 
| Slot = 
| Value = 
| Finevalue = 
}}
|-| Tab_2_Name = {{Item_Infobox
| Name = 
| Image = 
| Agility = 
| Carpentry = 
| Cooking = 
| Crafting = 
| Fishing = 
| Foraging = 
| Mining = 
| Smithing = 
| Woodcutting = 
| Rarity = 
| Type = 
| Slot = 
| Value = 
| Finevalue = 
}}</tabber></div>

Tabbed Example

Fine Material

<div class="tabberfix tabberresize" style="float: right"><tabber>|-| Normal =  {{Item_Infobox
|Title = Nettle
|Image = Nettle.svg
|Type = Material
|Value = 0
}}
|-| Fine = {{Item_Infobox
|Title = Fine Nettle
|Image = Nettle.svg
|Type = Material
|Finevalue = 6
}}</tabber></div>

And the result is:

Item Infobox/doc
{{{Name}}} Sprite
Type: Material
Value: 0
Properties
Tradable: Yes
Sellable: Yes
Droppable: Yes

Item Infobox/doc
{{{Name}}} Sprite
Type: Material
Fine Value: 6
Properties
Tradable: Yes
Sellable: Yes
Droppable: Yes