Difference between revisions of "Template:Infobox fish"

From Stardew Valley Wiki
Jump to navigation Jump to search
m (tweak level-required text)
 
(26 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<includeonly><!--
+
<includeonly>{{#switch:{{NAMESPACE}}
 
+
|{{ns:User}}|{{ns:User talk}}=
// TRANSLATIONS
+
|#default=<div id="infoboxborder">
-->{{#arraydefine:$lang_information  | Information }}<!--
+
{{{!}} id="infoboxtable"
-->{{#arraydefine:$lang_foundin      | Found in }}<!--
+
{{!}} colspan="2" id="infoboxheader" {{!}} {{{name|{{PAGENAME}}}}}
-->{{#arraydefine:$lang_time          | Time of Day }}<!--
+
{{!}}-
-->{{#arraydefine:$lang_season        | Season }}<!--
+
{{!}}colspan="2" style="padding-bottom: 5px;"{{!}} [[File:{{{eng|Blank icon}}}.png|center]]
-->{{#arraydefine:$lang_weather      | Weather }}<!--
+
{{!}}-
-->{{#arraydefine:$lang_difficulty    | Difficulty }}<!--
+
{{!}} colspan="2" id="infoboxdetail" style="text-align: center; font-style: italic; padding-right: 3px;" {{!}} {{#if:{{{description|}}}|{{{description|}}}|{{Description|{{PAGENAME}}}}}}
-->{{#arraydefine:$lang_behavior      | Behavior }}<!--
+
{{!}}-
-->{{#arraydefine:$lang_behaviorlink  | Fish#Behavior }}<!--
+
{{!}} colspan="2" id="infoboxsection" style="text-align:center; padding-left: 0; padding-right: 0;" {{!}} Information
-->{{#arraydefine:$lang_levelrequired | Fishing Level Required }}<!--
+
{{#if:{{{source|}}}|<nowiki/>
-->{{#arraydefine:$lang_fishing      | Fishing }}<!--
 
-->{{#arraydefine:$lang_fishsize      | Size (inches)}}<!--
 
-->{{#arraydefine:$lang_xp            | XP}}<!--
 
-->{{#arraydefine:$lang_healingeffect | Healing Effect }}<!--
 
-->{{#arraydefine:$lang_roe          | Roe }}<!--
 
-->{{#arraydefine:$lang_agedroe      | Aged Roe }}<!--
 
-->{{#arraydefine:$lang_caviar        | Caviar }}<!--
 
 
 
-->{{ParseInputValues|code=behav||
 
,Mixed,
 
,Smooth,
 
,Sinker,
 
,Floater,
 
,Dart,
 
}}{{ParseInputValues|code=legend||
 
,Crimsonfish,
 
,Angler,
 
,Legend,
 
,Glacierfish,
 
,Mutant Carp,
 
}}<!--
 
 
 
// set usemetric to true (or any nonempty value) if metric units should be used for fish size
 
-->{{#arraydefine:$lang_usemetric    |}}<!--
 
 
 
// END of translations
 
// Initialize array variables
 
-->{{#arraydefine:$quality|{{ParseInputQuality|quality={{{quality|}}}|iridium={{{iridium|}}}|hide={{{hide|}}}}}}}<!--
 
--><includeonly><div id="infoboxborder">
 
{| id="infoboxtable"
 
| colspan="2" id="infoboxheader" | {{{name|{{PAGENAME}}}}}
 
|-
 
| colspan="2" style="padding-bottom:5px; text-align: center;" | {{Autoimage|{{{image|}}}|eng={{{eng|}}}}}
 
|-
 
| colspan="2" id="infoboxdetail" style="text-align: center; font-style: italic;" | {{#if:{{{description|}}}|{{{description|}}}|{{Description|{{PAGENAME}}}}}}
 
|-
 
| colspan="2" id="infoboxsection" style="text-align:center;" | {{#arrayprint:$lang_information}}{{#if:{{{location|}}} |<nowiki />
 
 
   {{!}}-
 
   {{!}}-
   {{!}} id="infoboxsection" {{!}} {{#arrayprint:$lang_foundin}}:
+
   {{!}} id="infoboxsection" {{!}} Source
   {{!}} id="infoboxdetail"  {{!}} {{#ifexist:{{{location|}}}|[[{{{location|}}}]]|{{{location|}}}}}
+
   {{!}} id="infoboxdetail"  {{!}} {{{source|}}}
 +
}}{{#if:{{{location|}}} |<nowiki />
 +
  {{!}}-
 +
  {{!}} id="infoboxsection" {{!}} Location
 +
  {{!}} id="infoboxdetail"  {{!}} {{{location|}}}
 
}}{{#if:{{{time|}}} |<nowiki />
 
}}{{#if:{{{time|}}} |<nowiki />
   {{!}}-{
+
   {{!}}-
   {{!}} id="infoboxsection" {{!}} {{#arrayprint:$lang_time}}:
+
   {{!}} id="infoboxsection" {{!}} Time
 
   {{!}} id="infoboxdetail"  {{!}} {{{time|}}}
 
   {{!}} id="infoboxdetail"  {{!}} {{{time|}}}
 
}}{{#if:{{{season|}}} |<nowiki />
 
}}{{#if:{{{season|}}} |<nowiki />
 
   {{!}}-
 
   {{!}}-
   {{!}} id="infoboxsection" {{!}} {{#arrayprint:$lang_season}}:
+
   {{!}} id="infoboxsection" {{!}} Season
   {{!}} id="infoboxdetail"  {{!}} {{Season|{{{season}}}}}
+
   {{!}} id="infoboxdetail"  {{!}} {{#iferror: {{Season|{{{season}}}}} | {{{season|}}} | {{Season|{{{season}}}}} }}
 
}}{{#if:{{{weather|}}} |<nowiki />
 
}}{{#if:{{{weather|}}} |<nowiki />
 
   {{!}}-
 
   {{!}}-
   {{!}} id="infoboxsection" {{!}} {{#arrayprint:$lang_weather}}:
+
   {{!}} id="infoboxsection" {{!}} Weather
   {{!}} id="infoboxdetail"  {{!}} {{Weather inline|{{{weather}}}}}
+
   {{!}} id="infoboxdetail"  {{!}} {{#iferror: {{Weather inline|{{{weather|}}}}} | {{{weather|}}} | {{Weather inline|{{{weather|}}}}} }}
 
}}{{#if:{{{difficulty|}}} |<nowiki />
 
}}{{#if:{{{difficulty|}}} |<nowiki />
 
   {{!}}-
 
   {{!}}-
   {{!}} id="infoboxsection" {{!}} {{#arrayprint:$lang_difficulty}}:
+
   {{!}} id="infoboxsection" {{!}} Difficulty
 
   {{!}} id="infoboxdetail"  {{!}} {{{difficulty|}}}
 
   {{!}} id="infoboxdetail"  {{!}} {{{difficulty|}}}
 
}}{{#if:{{{behavior|}}} |<nowiki />
 
}}{{#if:{{{behavior|}}} |<nowiki />
 
   {{!}}-
 
   {{!}}-
   {{!}} id="infoboxsection" {{!}} [[{{#arrayprint:$lang_behaviorlink}}|<span style="color: white;">{{#arrayprint:$lang_behavior}}</span>]]:
+
   {{!}} id="infoboxsection" {{!}} Behavior
   {{!}} id="infoboxdetail" {{!}} {{ParseInputValues|code=behav|{{{behavior|}}}|default=true|translate=true}}
+
   {{!}} 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 />
 
}}{{#if:{{{fl|}}}|<nowiki />
 
   {{!}}-
 
   {{!}}-
   {{!}} id="infoboxsection" {{!}} [[{{#arrayprint:$lang_fishing}}|<span style="color: white;">{{#arrayprint:$lang_levelrequired}}</span>]]:
+
   {{!}} id="infoboxsection" {{!}} Fishing Level Required
   {{!}} id="infoboxdetail   {{!}} {{{fl|}}}
+
   {{!}} id="infoboxdetail" {{!}} {{{fl|}}}
 
}}{{#if:{{{size|}}}|<nowiki />
 
}}{{#if:{{{size|}}}|<nowiki />
 
   {{!}}-
 
   {{!}}-
   {{!}} id="infoboxsection" {{!}} {{#arrayprint:$lang_fishsize}}:
+
   {{!}} id="infoboxsection" {{!}} Size (inches)
   {{!}} id="infoboxdetail"  {{!}} <!--
+
   {{!}} id="infoboxdetail"  {{!}} {{#switch:{{uc:{{CONTENTLANG}}}}
-->{{#if:{{#arrayprint:$lang_usemetric}}
+
       |EN = {{#replace:{{{size|}}}|-|–}}
       | {{#if:{{#pos:{{{size|}}}|-}}
+
      |#default = {{#if:{{#pos:{{{size|}}}|-}}  
          | {{#expr:{{#explode:{{{size|}}}|-|0}}*2.54 round 0}} - {{#expr:{{#explode:{{{size|}}}|-|1}}*2.54 round 0}}
+
                |{{#expr:{{#explode:{{{size|}}}|-|0}}*2.54 round 0}}{{#expr:{{#explode:{{{size|}}}|-|-1}}*2.54 round 0}}
          | {{#expr:{{{size|}}}*2.54 round 0}}}}
+
                |{{#expr:{{{size|}}}*2.54 round 0}} }} }}
      | {{{size|}}}
+
}}
}}}}{{#if:{{{difficulty|}}}|<nowiki />
+
{{#if:{{{difficulty|}}} |<nowiki />
  {{!}}-
+
{{!}}-
  {{!}} id="infoboxsection" {{!}} {{#arrayprint:$lang_xp}}:
+
    {{!}}id="infoboxsection" {{!}} Fishing XP
  {{!}} id="infoboxdetail"  {{!}}<!--
+
    {{!}}id="infoboxdetail"  {{!}} {{#switch:{{lc:{{{eng|}}}}}
-->    {{#arraydefine:$legendary|{{ParseInputValues|code=legend|{{{eng|{{{name|{{PAGENAME}}}}}}}}}}}}<!--
+
        |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)}}
-->    {{#arraydefine:$quality_values|{{ParseInputQuality|quality={{{quality|}}}|iridium={{{iridium|}}}}}}}<!--
+
        |#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)}} }}
-->    {{#arrayprint:$quality_values||@qual@<!--
+
}}{{#if:{{{xp|}}} |<nowiki />
-->        | {{#ifeq:@qual@|Normal||&nbsp;&nbsp;&nbsp;[[File:@qual@ Quality.png|14px|link=|alt=@qual@]]&thinsp;}}<!--
+
{{!}}-
          -->{{#expr: {{#if:{{#arrayprint:$legendary}}|5|1}}
+
    {{!}}id="infoboxsection" {{!}} XP
              * floor( 3 * (1 + {{#switch:@qual@|Normal=0|Silver=1|Gold=2|Iridium=4}})
+
{{!}}id="infoboxdetail"  {{!}} {{{xp|}}}
              + {{{difficulty}}}/3)
+
}}{{#if:{{{edibility|}}} | <nowiki />
}}}}}}{{#if:{{{edibility|}}}|<nowiki />
+
{{!}}-
{{!}}-
+
{{#switch:{{lc:{{{edibility|}}}}}
<!--
+
| -300 | ''inedible'' | inedible =    
 
+
{{!}} id="infoboxsection" {{!}} Energy
// Display edibility. Use two-column format when many values: so not if poison/inedible/0
+
{{!}} id="infoboxdetail"  {{!}} ''Inedible''
-->{{#ifexpr:{{#iferror:{{#expr:{{{edibility|0}}}>0|0|1}}|0}} |<nowiki/>
+
|#default =
      {{!}} id="infoboxsection" colspan="2" style="text-align: center;" {{!}} {{#arrayprint:$lang_healingeffect}}
+
    {{!}} id="infoboxsection" {{!}} [[Energy]] / [[Health]]
      {{!}}-
+
{{!}} id="infoboxdetail"  {{!}} {{EdibilityGrid|{{{eng|}}}|{{{edibility|}}}|dsv=false}}
      {{!}} id="infoboxdetail"  {{!}} {{Edibility |{{{edibility|}}} |quality={{{quality|{{{healq|true}}}}}} |iridium={{{iridium|}}} |statistics=Energy}}
+
}} }}{{#ifeq:{{{professions|}}} | false |<nowiki />
      {{!}} id="infoboxdetail"  {{!}} {{Edibility |{{{edibility|}}} |quality={{{quality|{{{healq|true}}}}}} |iridium={{{iridium|}}} |statistics=Health}}
+
{{!}}-
    |<nowiki/>
+
      {{!}} id="infoboxsection" {{!}} Sell Price
      {{!}} id="infoboxsection" {{!}} {{#arrayprint:$lang_healingeffect}}:
+
      {{!}} id="infoboxdetail"  {{!}} {{#switch: {{lc:{{{quality|}}}}}
      {{!}} id="infoboxdetail"  {{!}} {{Edibility |{{{edibility|}}} |quality={{{quality|{{{healq|true}}}}}} |iridium={{{iridium|}}}}}
+
      |normal|false = {{Price|{{{price|}}}}}
}}}}<!--
+
      |#default = {{Qualityprice|{{{eng|Blank icon}}}|{{{price|}}}|dsv=false}}
 
+
  }}
// custom_price if defined provides entire text of all price-related sections
+
|<!-- professions != false --><nowiki />
-->{{#if:{{{custom_price|}}}
+
{{!}}-
      |{{{custom_price}}}<!--
+
{{!}} colspan="2" style="padding: 0; border: 0;"{{!}}
 
+
<table style="width: 101%; margin-top: -2px; margin-left: -2px;">
// Display all item prices: Base price plus all professions listed in {{{profession}}}
+
<tr>
// Subtemplate automatically decides how to handle multiple columns, etc.
+
<td id="infoboxsection" colspan="3" style="text-align: center; padding-left: 0; padding-right: 0;">Sell Prices</td>
-->  |{{Infosection price
+
</tr>
        |prof    = Base, Fisher, Angler
+
<tr>
        |item    = {{{eng|{{{name|{{#ifeq:{{CONTENTLANG}}|en|{{PAGENAME}}|{{{image|}}}}}}}}}}}
+
<td id="infoboxsection">Base</td>
        |price    = {{{price|}}}
+
<td id="infoboxsection">[[File:Fisher.png|24px|link=]] [[Skills#Fishing|Fisher]]<br />''(+25%)''</td>
        |iridium  = {{{iridium|}}}
+
<td id="infoboxsection">[[File:Angler Icon.png|24px|link=]] [[Skills#Fishing|Angler]]<br />''(+50%)''</td>
        |quality  = {{{quality|true}}}
+
</tr>
        |hide    = {{{hideprice|}}}
+
<tr>
        |ncolumns = 3
+
{{#switch: {{lc:{{{quality|}}}}}  
}}{{#if:{{{roe|}}}|
+
|normal|false =  
      {{Infosection price
+
  <td>{{Qualityprice|{{{eng|Blank icon}}}|{{{price|}}}|quality=normal|dsv=false}}</td>
        |prof      = Base, Base, Artisan
+
  <td>{{Qualityprice|{{{eng|Blank icon}}}|{{{price|}}}|quality=normal|pm=1.25|dsv=false}}</td>
|srcprice  = {{{price|}}}
+
  <td>{{Qualityprice|{{{eng|Blank icon}}}|{{{price|}}}|quality=normal|pm=1.5|dsv=false}}</td>
|auto      = true
+
|#default =
|artisan  = true
+
  <td>{{Qualityprice|{{{eng|Blank icon}}}|{{{price|}}}|dsv=false}}</td>
        |itemcell1 = Roe
+
  <td>{{Qualityprice|{{{eng|Blank icon}}}|{{{price|}}}|pm=1.25|dsv=false}}</td>
|itemcell2 = {{#ifeq:{{{eng|{{{name|{{PAGENAME}}}}}}}}|Sturgeon|Caviar|Aged Roe}}
+
  <td>{{Qualityprice|{{{eng|Blank icon}}}|{{{price|}}}|pm=1.5|dsv=false}}</td>
|itemcell3 = {{#ifeq:{{{eng|{{{name|{{PAGENAME}}}}}}}}|Sturgeon|Caviar|Aged Roe}}
+
}}
        |imageRoe  = {{{roe}}} Roe
+
</tr>
|linkRoe  = {{#arrayprint:$lang_roe}}
+
</table>
|linkAged Roe={{#arrayprint:$lang_agedroe}}
+
}}{{#if:{{{roe|}}}|<nowiki />
|linkCaviar = {{#arrayprint:$lang_caviar}}
+
    {{!}}-
|ncolumns  = 3
+
{{!}} 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
</div>{{InfoboxSEO}}{{#seo:
+
{{!}}-
|og:image={{#if:{{{image|}}}|{{filepath:{{{image|}}}}}}}
+
    {{!}} id="infoboxsection" {{!}} Roe
}}</includeonly><noinclude>{{Englishdoc}}{{#ifexist:{{FULLPAGENAME}}/doc |<nowiki/>
+
{{!}} id="infoboxsection" {{!}} {{#ifeq:{{{eng|}}}|Sturgeon|Caviar|Aged Roe}}
{{{{FULLPAGENAME}}/doc}} }}</noinclude>
+
{{!}} 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}} }}
 +
{{!}}-
 +
    {{!}}}
 +
}}
 +
{{!}}-
 +
{{!}}}
 +
}}</div>{{InfoboxSEO}}</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)