Difference between revisions of "Template:Infobox fish"

From Stardew Valley Wiki
Jump to navigation Jump to search
 
(43 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<includeonly><div id="infoboxborder">
+
<includeonly>{{#switch:{{NAMESPACE}}
{| id="infoboxtable"
+
|{{ns:User}}|{{ns:User talk}}=
|colspan="2" id="infoboxheader"|{{{name|{{PAGENAME}}}}}
+
|#default=<div id="infoboxborder">
|-
+
{{{!}} id="infoboxtable"
|colspan="2" style="padding-bottom: 5px;"|{{#if:{{{image}}}|[[File:{{{image|{{{name|{{PAGENAME}}}}}.png}}}|center]]}}
+
{{!}} colspan="2" id="infoboxheader" {{!}} {{{name|{{PAGENAME}}}}}
|-
 
|colspan="2" id="infoboxdetail" style="text-align: center; font-style: italic;"|{{#if:{{{description|}}}|{{{description|}}}|{{Description|{{PAGENAME}}}}}}
 
|-
 
|colspan="2" id="infoboxsection" style="text-align:center;"|Information<!--
 
-->{{#if:{{{location|}}} |<nowiki />
 
 
{{!}}-
 
{{!}}-
{{!}}id="infoboxsection"{{!}}Found in:
+
{{!}}colspan="2" style="padding-bottom: 5px;"{{!}} [[File:{{{eng|Blank icon}}}.png|center]]
{{!}}id="infoboxdetail"{{!}}{{{location|}}} |}}<!--
 
-->{{#if:{{{time|}}} |<nowiki />
 
 
{{!}}-
 
{{!}}-
{{!}}id="infoboxsection"{{!}}Time:
+
{{!}} colspan="2" id="infoboxdetail" style="text-align: center; font-style: italic; padding-right: 3px;" {{!}} {{#if:{{{description|}}}|{{{description|}}}|{{Description|{{PAGENAME}}}}}}
{{!}}id="infoboxdetail"{{!}}{{{time|}}} |}}<!--
 
-->{{#if:{{{season|}}} |<nowiki />
 
 
{{!}}-
 
{{!}}-
{{!}}id="infoboxsection"{{!}}Season:
+
{{!}} colspan="2" id="infoboxsection" style="text-align:center; padding-left: 0; padding-right: 0;" {{!}} Information
{{!}}id="infoboxdetail"{{!}}{{#switch: {{lc:{{{season|}}} }}
+
{{#if:{{{source|}}}|<nowiki/>
| spring = [[File:Spring.png|24px|link=]]&nbsp;[[Spring]]
+
  {{!}}-
| summer = [[File:Summer.png|24px|link=]]&nbsp;[[Summer]]
+
  {{!}} id="infoboxsection" {{!}} Source
| fall | autumn = [[File:Fall.png|24px|link=]]&nbsp;[[Fall]]
+
  {{!}} id="infoboxdetail"  {{!}} {{{source|}}}
| winter = [[File:Winter.png|24px|link=]]&nbsp;[[Winter]]
+
}}{{#if:{{{location|}}} |<nowiki />
| any | all = All
+
  {{!}}-
| #default = {{{season|}}} }} |}}<!--
+
  {{!}} id="infoboxsection" {{!}} Location
-->{{#if:{{{weather|}}} |<nowiki />
+
  {{!}} id="infoboxdetail"  {{!}} {{{location|}}}
 +
}}{{#if:{{{time|}}} |<nowiki />
 +
  {{!}}-
 +
  {{!}} id="infoboxsection" {{!}} Time
 +
  {{!}} id="infoboxdetail" {{!}} {{{time|}}}
 +
}}{{#if:{{{season|}}} |<nowiki />
 +
  {{!}}-
 +
  {{!}} id="infoboxsection" {{!}} Season
 +
  {{!}} id="infoboxdetail"  {{!}} {{#iferror: {{Season|{{{season}}}}} | {{{season|}}} | {{Season|{{{season}}}}} }}
 +
}}{{#if:{{{weather|}}} |<nowiki />
 +
  {{!}}-
 +
  {{!}} id="infoboxsection" {{!}} Weather
 +
  {{!}} id="infoboxdetail"  {{!}} {{#iferror: {{Weather inline|{{{weather|}}}}} | {{{weather|}}} | {{Weather inline|{{{weather|}}}}} }}
 +
}}{{#if:{{{difficulty|}}} |<nowiki />
 +
  {{!}}-
 +
  {{!}} id="infoboxsection" {{!}} Difficulty
 +
  {{!}} id="infoboxdetail"  {{!}} {{{difficulty|}}}
 +
}}{{#if:{{{behavior|}}} |<nowiki />
 +
  {{!}}-
 +
  {{!}} id="infoboxsection" {{!}} Behavior
 +
  {{!}} id="infoboxdetail" {{!}} {{#switch:{{lc:{{{behavior|}}}}}
 +
        |dart    = [[Fish#Behavior|Dart]]
 +
        |floater = [[Fish#Behavior|Floater]]
 +
        |mixed  = [[Fish#Behavior|Mixed]]
 +
        |sinker  = [[Fish#Behavior|Sinker]]
 +
        |smooth  = [[Fish#Behavior|Smooth]]
 +
        }}
 +
}}{{#if:{{{fl|}}}|<nowiki />
 +
  {{!}}-
 +
  {{!}} id="infoboxsection" {{!}} Fishing Level Required
 +
  {{!}} id="infoboxdetail" {{!}} {{{fl|}}}
 +
}}{{#if:{{{size|}}}|<nowiki />
 +
  {{!}}-
 +
  {{!}} id="infoboxsection" {{!}} Size (inches)
 +
  {{!}} id="infoboxdetail"  {{!}} {{#switch:{{uc:{{CONTENTLANG}}}}
 +
      |EN = {{#replace:{{{size|}}}|-|–}}
 +
      |#default = {{#if:{{#pos:{{{size|}}}|-}}
 +
                |{{#expr:{{#explode:{{{size|}}}|-|0}}*2.54 round 0}}–{{#expr:{{#explode:{{{size|}}}|-|-1}}*2.54 round 0}}
 +
                |{{#expr:{{{size|}}}*2.54 round 0}} }} }}
 +
}}
 +
{{#if:{{{difficulty|}}} |<nowiki />
 
{{!}}-
 
{{!}}-
{{!}}id="infoboxsection"{{!}}Weather:
+
    {{!}}id="infoboxsection" {{!}} Fishing XP
{{!}}id="infoboxdetail"{{!}}{{#switch: {{lc:{{{weather|}}}}}
+
    {{!}}id="infoboxdetail" {{!}} {{#switch:{{lc:{{{eng|}}}}}
| sunny | sun | rainy | rain | polleny | pollen | wind | windy | stormy | storm | snowy | snow | springwind = {{weather inline|{{{weather|}}}}}
+
        |crimsonfish|angler|legend|glacierfish|mutant carp = {{#expr:5*(floor((0+1)*3+{{{difficulty|}}}/3))}}&nbsp;&nbsp;&nbsp;[[File:Silver Quality.png|14px|link=]]&thinsp;{{#expr:5*(floor((1+1)*3+{{{difficulty|}}}/3))}}&nbsp;&nbsp;&nbsp;[[File:Gold Quality.png|14px|link=]]&thinsp;{{#expr:5*(floor((2+1)*3+{{{difficulty|}}}/3))}}&nbsp;&nbsp;&nbsp;[[File:Iridium Quality.png|14px|link=]]&thinsp;{{#expr:5*floor((4+1)*3+{{{difficulty|}}}/3)}}
| #default = {{{weather|}}} }} |}}<!--
+
        |#default={{#expr:floor((0+1)*3+{{{difficulty|}}}/3)}}&nbsp;&nbsp;&nbsp;[[File:Silver Quality.png|14px|link=]]&thinsp;{{#expr:floor((1+1)*3+{{{difficulty|}}}/3)}}&nbsp;&nbsp;&nbsp;[[File:Gold Quality.png|14px|link=]]&thinsp;{{#expr:floor((2+1)*3+{{{difficulty|}}}/3)}}&nbsp;&nbsp;&nbsp;[[File:Iridium Quality.png|14px|link=]]&thinsp;{{#expr:floor((4+1)*3+{{{difficulty|}}}/3)}} }}
-->{{#if:{{{difficulty|}}} |<nowiki />
+
}}{{#if:{{{xp|}}} |<nowiki />
 
{{!}}-
 
{{!}}-
{{!}}id="infoboxsection"{{!}}Difficulty:
+
    {{!}}id="infoboxsection" {{!}} XP
{{!}}id="infoboxdetail"{{!}}{{{difficulty|}}} |}}<!--
+
{{!}}id="infoboxdetail" {{!}} {{{xp|}}}
-->{{#if:{{{behavior|}}} |<nowiki />
+
}}{{#if:{{{edibility|}}} | <nowiki />
 
{{!}}-
 
{{!}}-
{{!}}id="infoboxsection"{{!}}[[Fish#Fishing Mini-Game{{!}}<span style="color: white;">Behavior</span>]]:
+
{{#switch:{{lc:{{{edibility|}}}}}
{{!}}id="infoboxdetail"{{!}}{{{behavior|}}} |}}<!--
+
| -300 | ''inedible'' | inedible =    
-->{{#if:{{{size|}}} |<nowiki />
+
{{!}} id="infoboxsection" {{!}} Energy
 +
{{!}} id="infoboxdetail"  {{!}} ''Inedible''
 +
|#default =
 +
    {{!}} id="infoboxsection" {{!}} [[Energy]] / [[Health]]
 +
{{!}} id="infoboxdetail" {{!}} {{EdibilityGrid|{{{eng|}}}|{{{edibility|}}}|dsv=false}}
 +
}} }}{{#ifeq:{{{professions|}}} | false |<nowiki />
 +
{{!}}-  
 +
      {{!}} id="infoboxsection" {{!}} Sell Price
 +
      {{!}} id="infoboxdetail"  {{!}} {{#switch: {{lc:{{{quality|}}}}}
 +
      |normal|false = {{Price|{{{price|}}}}}
 +
      |#default = {{Qualityprice|{{{eng|Blank icon}}}|{{{price|}}}|dsv=false}}
 +
  }}
 +
|<!-- professions != false --><nowiki />
 
{{!}}-
 
{{!}}-
{{!}}id="infoboxsection"{{!}}Size (inches):
+
{{!}} colspan="2" style="padding: 0; border: 0;"{{!}}
{{!}}id="infoboxdetail"{{!}}{{{size|}}} |}}<!--
+
<table style="width: 101%; margin-top: -2px; margin-left: -2px;">
-->{{#if:{{{difficulty|}}}|<nowiki />
+
<tr>
 +
<td id="infoboxsection" colspan="3" style="text-align: center; padding-left: 0; padding-right: 0;">Sell Prices</td>
 +
</tr>
 +
<tr>
 +
<td id="infoboxsection">Base</td>
 +
<td id="infoboxsection">[[File:Fisher.png|24px|link=]] [[Skills#Fishing|Fisher]]<br />''(+25%)''</td>
 +
<td id="infoboxsection">[[File:Angler Icon.png|24px|link=]] [[Skills#Fishing|Angler]]<br />''(+50%)''</td>
 +
</tr>
 +
<tr>
 +
{{#switch: {{lc:{{{quality|}}}}}
 +
|normal|false =
 +
  <td>{{Qualityprice|{{{eng|Blank icon}}}|{{{price|}}}|quality=normal|dsv=false}}</td>
 +
  <td>{{Qualityprice|{{{eng|Blank icon}}}|{{{price|}}}|quality=normal|pm=1.25|dsv=false}}</td>
 +
  <td>{{Qualityprice|{{{eng|Blank icon}}}|{{{price|}}}|quality=normal|pm=1.5|dsv=false}}</td>
 +
|#default =
 +
  <td>{{Qualityprice|{{{eng|Blank icon}}}|{{{price|}}}|dsv=false}}</td>
 +
  <td>{{Qualityprice|{{{eng|Blank icon}}}|{{{price|}}}|pm=1.25|dsv=false}}</td>
 +
  <td>{{Qualityprice|{{{eng|Blank icon}}}|{{{price|}}}|pm=1.5|dsv=false}}</td>
 +
}}
 +
</tr>
 +
</table>
 +
}}{{#if:{{{roe|}}}|<nowiki />
 +
    {{!}}-
 +
{{!}} colspan="2" style="padding: 0; border: 0;"{{!}}
 +
    {{{!}} style="width: 101%; margin-top: -2px; margin-left: -2px;"
 +
{{!}}-
 +
{{!}} id="infoboxsection" colspan="3" style="text-align: center; padding: 0;" {{!}} Artisan Sell Prices
 +
{{!}}-
 +
    {{!}} id="infoboxsection" {{!}} Roe
 +
{{!}} id="infoboxsection" {{!}} {{#ifeq:{{{eng|}}}|Sturgeon|Caviar|Aged Roe}}
 +
{{!}} id="infoboxsection" style="padding: 2px 0 0 8px;" {{!}} [[File:Artisan.png|24px|link=]] {{#ifeq:{{{eng|}}}|Sturgeon|Caviar|Aged Roe}} ''(+40%)''
 +
{{!}}-
 +
    {{!}} style="vertical-align: top;" {{!}} {{Qualityprice|{{{roe|}}} Roe|{{{price|}}}|quality=normal|dsv=false}}
 +
{{!}} style="vertical-align: top;" {{!}} {{#switch:{{{eng|}}}
 +
|Sturgeon = {{Qualityprice|Caviar|500|quality=normal|dsv=false}}
 +
|#default = {{Qualityprice|{{{roe|}}} Aged Roe|{{{price|}}}|quality=normal|dsv=false}} }}
 +
{{!}} style="vertical-align: top;" {{!}} {{#switch:{{{eng|}}}
 +
|Sturgeon = {{Qualityprice|Caviar|500|quality=normal|pm=1.4|dsv=false}}
 +
|#default = {{Qualityprice|{{{roe|}}} Aged Roe|{{{price|}}}|quality=normal|pm=1.4|dsv=false}} }}
 +
{{!}}-
 +
    {{!}}}
 +
}}
 
{{!}}-
 
{{!}}-
{{!}}id="infoboxsection{{!}}Base XP:
+
{{!}}}
{{!}}id="infoboxdetail{{!}}{{#switch:{{lc:{{PAGENAME}}}}
+
}}</div>{{InfoboxSEO}}</includeonly><noinclude>{{{{FULLPAGENAME}}/doc}}</noinclude>
|crimsonfish|angler|legend|glacierfish|mutant carp = {{#expr:5*(floor((0+1)*3+{{{difficulty|}}}/3))}}
 
|#default={{#expr:floor((0+1)*3+{{{difficulty|}}}/3)}} }}
 
|}}<!--
 
-->{{#if:{{{edibility|}}} |<nowiki />
 
{{!}}-
 
{{!}}id="infoboxsection"{{!}}Healing Effect:
 
{{!}}id="infoboxdetail"{{!}}{{#iferror: {{Edibility|{{{edibility|}}}|quality={{{healq|true}}}}} | Inedible | {{Edibility|{{{edibility|0}}}|quality={{{healq|true}}}|iridium={{{iridium|}}}}}}} |}}
 
|-
 
|id="infoboxsection" colspan="2" style="text-align: center; padding-left: 0; padding-right: 0;"|Sell Prices
 
|-
 
{|style="margin: -2px 0 0 0 !important; padding: 0 !important; width: 100% !important;"
 
|-
 
|id="infoboxsection" style="width: 30%;"|Base<br />Price:
 
|id="infoboxsection" style="width: 35%;"|[[File:Fisher.png|24px|link=]] [[Skills#Fishing|<span style="color: white;">Fisher</span>]]:<br />''(+25%)''
 
|id="infoboxsection" style="width: 35%;"|[[File:Angler Icon.png|24px|link=]] [[Skills#Fishing|<span style="color: white;">Angler</span>]]:<br />''(+50%)''
 
|-
 
|id="infoboxdetail"|{{Qualityprice|{{{name|{{PAGENAME}}}}}|{{{price|0}}}|{{#if:{{{iridium|}}}|iridium|}}|hide={{{hideprice|}}} }}
 
|id="infoboxdetail"|{{Qualityprice|{{{name|{{PAGENAME}}}}}|{{#expr:{{{price|0}}}*1.25}}|{{#if:{{{iridium|}}}|iridium|}}|hide={{{hideprice|}}} }}
 
|id="infoboxdetail"|{{Qualityprice|{{{name|{{PAGENAME}}}}}|{{#expr:{{{price|0}}}*1.50}}|{{#if:{{{iridium|}}}|iridium|}}|hide={{{hideprice|}}} }}
 
|}
 
|}
 
</div>{{InfoboxSEO}}{{#seo:
 
|og:image={{#if:{{{image|}}}|{{filepath:{{{image|}}}}}}}
 
}}</includeonly><noinclude>{{{{FULLPAGENAME}}/doc}}</noinclude>
 

Latest revision as of 01:28, 11 March 2023

Description

This template is used to display an infobox for fish (and fish-like item) pages. Do not use this on your user page. It is reserved for content pages.

Parameters

Parameter Notes
eng English fish name (Required in all languages. Used to populate image and prices.)
description In-game item description (optional -- populated by Template:Description if omitted). It is preferable to omit this parameter and update Template:Description instead.
location Area(s) where the fish can be caught
source How to obtain the fish, other than fishing pole
time What time range the fish can be caught in
season What season(s) the fish can caught in (e.g., Summer)
weather What weather the fish can be found in (e.g., Rain)
difficulty Difficulty level of the fish. Auto-populates the "Fishing XP" section if present.
behavior Behavior type of the fish (described in Fish#Behavior)
fl Required fishing level (optional)
size Base size range of the fish in inches (converts to other languages automatically). Can be found in the data file Fish.xnb
Note: Size range must be entered using the hyphen key on a standard English keyboard. This will be replaced with the appropriate character in the template (en dash, wave dash, etc.).
xp XP (and type of XP). Only for fish without the difficulty parameter set.
price Base price of the fish, no star
edibility Base edibility of the fish, no star
quality Set to "normal" or "false" for fish that come only in normal quality (Optional)
roe The color of the Roe (matching the filenames in Category:Roe images) to add a section showing Roe, Aged Roe, and prices
professions Set to false to suppress Fisher & Angler prices (Optional)