Difference between revisions of "Template:Item block"

From Stardew Valley Wiki
Jump to navigation Jump to search
(move doc info to template for archiving)
Line 1: Line 1:
<noinclude>{{Delete|Unused since v1.4}}</noinclude>
 
 
<includeonly>{| style="display:inline-block; border-bottom:1px solid #8dcaf0; margin:8px -1.5px -8px -1.5px; line-height: 1em;font-size:0.9em;"
 
<includeonly>{| style="display:inline-block; border-bottom:1px solid #8dcaf0; margin:8px -1.5px -8px -1.5px; line-height: 1em;font-size:0.9em;"
 
|-
 
|-

Revision as of 17:24, 24 July 2022


Description

Item block is a template for the Traveling Cart page. It's used to create a small table with picture/name/price range underlined by a white line.

Usage

This template is called around 400 times on the Traveling Cart page. In a effort to keep it light, "text-align:center;" is only declared once in the parent table:

 {| style="text-align:center;"
 |{{Item block|corn|48px|50}}
 |}


First argument: Item name

Second argument: Size of the image in pixel

Third argument: Base price or "furniture"

Fourth argument: Item probability out of 788, 1 if omitted (always 1/145 for furniture)

1.26% Corn.png

corn
data-sort-value="50"Gold.png150–1,000g

Optional arguments

special

If the stock do not respect normal probability:

{{Item block|corn|48px|1|special=40}}

40%* Corn.png

corn
data-sort-value="1"Gold.png100–1,000g

If the stock do not respect normal probability:

{{Item block|Tulip|48px|100|92}}

71.1% Tulip.png

Tulip
data-sort-value="100"Gold.png300–1,000g

link

If the link doesn't match the image name:

{{Item block|corn|48px|furniture|link=Abigail}}

0.68% Corn.png

Abigail
data-sort-value="furniture"Gold.png250–2,500g

image

If the image is not a png/doesn't match the item name:

{{Item block|corn|48px|100|image=Bat Anim.gif}}

1.26% Bat Anim.gif

corn
data-sort-value="100"Gold.png300–1,000g

Manual Entry

{{Item block|Kale Seeds|48px|35-100|math=false}}

1.26% Kale Seeds.png

Kale Seeds
data-sort-value="35-100"Lua error in Module:Tcartprice at line 25: attempt to perform arithmetic on a nil value.