Template:InfoboxLifeform: Difference between revisions

From Subnautica Wiki
(Usage)
Tag: sourceedit
m (Fix.)
 
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<infobox layout="stacked">
{| cellpadding="4" cellspacing="0" style="margin: 1em 1em 1em 0; border: 1px #ccc solid;" align="right" width="300px"
<title source="title"><default>{{PAGENAME}}</default></title>
! colspan="2" | {{#if:{{{image}}} | [[File:{{{image}}}]] | [[File:Unknown.png]]}}
<image source="image"><caption source="caption"/></image>
|-
<data source="category"><label>category</label></data>
| colspan="2" style="text-align: center; font-weight: bold; background-color: #0130B9" | {{PAGENAME}}
<data source="attitude"><label>attitude</label></data>
|-
<data source="catchable"><label>catchable</label></data>
{{#if:{{{category|}}}|
<data source="biome"><label>'''Biome(s):'''</label></data>
{{!}} '''Category:'''
<data source="dna"><label>'''DNA:'''</label></data>
{{!}} style="border-left-style: solid" {{!}} {{#switch: {{{category}}}
<data source="food"><label>'''Food Raw/Cooked:'''</label></data>
|Fauna = [[:Category:Fauna|Fauna]] [[Category:Fauna]]
<data source="h20"><label>'''H<sup>2</sup>0 Raw/Cooked:'''</label></data>
|Flora = [[:Category:Flora|Flora]] [[Category:Flora]]}}}}
<data source="resources"><label>'''Resources:'''</label></data>
|-
<data source="comment"><label>'''Comment:'''</label></data>
{{#if:{{{attitude|}}}|
</infobox>
{{!}} '''Attitude:'''
<noinclude>
{{!}} style="border-left-style: solid" {{!}} {{#switch: {{{attitude}}}
== Usage & preview ==
|Passive = [[:Category:Passive|Passive]] [[Category:Passive]]
Type in this:
|Defensive = [[:Category:Defensive|Defensive]] [[Category:Defensive]]
|Aggressive = [[:Category:Aggressive|Aggressive]] [[Category:Aggressive]]}}}}
|-
{{#if:{{{catchable|}}}|
{{!}} '''Catchable:'''
{{!}} style="border-left-style: solid" {{!}} {{#switch: {{{catchable}}}
| Y||y = [[File:Yes.png]] [[Category:Catchable]]
| N||n = [[File:No.png]]
| (Error: Input Y or N)}}}}
|-
{{#if:{{{biome|}}}|
{{!}} '''Biome(s):'''
{{!}} style="border-left-style: solid" {{!}} {{{biome}}}}}
|-
{{#if:{{{dna|}}}|
{{!}} '''DNA:'''
{{!}} style="border-left-style: solid" {{!}} {{{dna}}}}}
|-
{{#if:{{{food|}}}|
{{!}} '''Food Raw/Cooked:'''
{{!}} style="border-left-style: solid" {{!}} {{{food}}} [[Category:Food]]}}
|-
{{#if:{{{h20|}}}|
{{!}} '''H<sup>2</sup>0 Raw/Cooked:'''
{{!}} style="border-left-style: solid" {{!}} {{{h20}}}}}
|-
{{#if:{{{resources|}}}|
{{!}} '''Resources:'''
{{!}} style="border-left-style: solid" {{!}} {{{resources}}}}}
|-
{{#if:{{{comment|}}}|
{{!}} '''Comment:'''
{{!}} style="border-left-style: solid" {{!}} {{{comment}}}}}
|}[[Category:Life Forms]]<noinclude>
[{{Purge}}]


<pre>
== Usage ==
{{InfoboxLifeform
* Empty values will not be displayed. Thus, it is better to leave something blank than to write "none" or "unknown".
|image=
* Artificial newline breaks can be made using '''<nowiki><br></nowiki>'''
|category=
* For the "biome" section, choose one or more from the following list. This will make the biome clickable AND put the life form into its respective biome category:
|attitude=
|catchable=
|biome=
|dna=
|food=
|h20=
|resources=
|comment=
}}


</pre>
<pre>[[:Category:Safe Shallows|Safe Shallows]] [[Category:Safe Shallows]]
[[:Category:Kelp Forest|Kelp Forest]] [[Category:Kelp Forest]]
[[:Category:Grassy Plateaus|Grassy Plateaus]] [[Category:Grassy Plateaus]]
[[:Category:Jelly Shroom|Jelly Shroom]] [[Category:Jelly Shroom]]
[[:Category:Mushroom Forest|Mushroom Forest]] [[Category:Mushroom Forest]]
[[:Category:Koosh Zone|Koosh Zone]] [[Category:Koosh Zone]]
[[:Category:Inactive Lava|Inactive Lava]] [[Category:Inactive Lava]]
[[:Category:Sparse Zone|Sparse Zone]] [[Category:Sparse Zone]]
[[:Category:Active Lava|Active Lava]] [[Category:Active Lava]]</pre>


to see this:
'''Example:'''

<pre>{{InfoboxLifeform
{{InfoboxLifeform
|image = Holefish.png
|image=Example.jpg
|category = (Fauna, Flora)
|category=This is a test
|attitude = (Passive, Defensive, Aggressive)
|attitude=This is a test
|catchable = (y, n)
|catchable=This is a test
|biome = [[:Category:Safe Shallows|Safe Shallows]] [[Category:Safe Shallows]]
|biome=This is a test
|dna = [[Speed]]
|food = +12 / +21
|dna=This is a test
|h20 = -15 / +3
|food=This is a test
|h20=This is a test
|resources = [[Membrane]] <br> [[Titanium]]
|resources=This is a test
|comment = Likes long walks on the beach
|comment=This is a test
}}
}}


[{{fullurl:{{ns:Template}}:{{PAGENAME}}}}?action=purge Click here to refresh the preview above]
</noinclude>
</noinclude>

Latest revision as of 05:57, 4 July 2023

<infobox layout="stacked"> <title source="title"><default>InfoboxLifeform</default></title>

<image source="image"></image> <label>category</label> <label>attitude</label> <label>catchable</label> <label>Biome(s):</label> <label>DNA:</label> <label>Food Raw/Cooked:</label> <label>H20 Raw/Cooked:</label> <label>Resources:</label> <label>Comment:</label> </infobox>

Usage & preview

Type in this:

{{InfoboxLifeform
|image=
|category=
|attitude=
|catchable=
|biome=
|dna=
|food=
|h20=
|resources=
|comment=
}}

to see this:

<infobox layout="stacked"> <title source="title"><default>InfoboxLifeform</default></title>

<image source="image"></image> <label>category</label> <label>attitude</label> <label>catchable</label> <label>Biome(s):</label> <label>DNA:</label> <label>Food Raw/Cooked:</label> <label>H20 Raw/Cooked:</label> <label>Resources:</label> <label>Comment:</label> </infobox> Click here to refresh the preview above