Template:Consumables: Difference between revisions

From PZwiki
No edit summary
(Updated the template to include happiness value)
Line 7: Line 7:
{{#ifexpr:{{{boredom|0}}}<>0|'''Boredom Change:''' {{{boredom}}}<br>|}}
{{#ifexpr:{{{boredom|0}}}<>0|'''Boredom Change:''' {{{boredom}}}<br>|}}
{{#ifexpr:{{{stress|0}}}<>0|'''Stress Change:''' {{{stress}}}|}}
{{#ifexpr:{{{stress|0}}}<>0|'''Stress Change:''' {{{stress}}}|}}
{{#ifexpr:{{{happiness|0}}}<>0|'''Happiness Change:''' {{{stress}}}|}}
</small><br>
</small><br>
    
    
Line 16: Line 17:
<noinclude>
<noinclude>


Usage Example:
Use this template to add an infobox to a consumable item's page. If a property is not included, it will not be displayed. Possible properties to add include:


Weight [required]<BR>
Image [required]<BR>
Hunger<BR>
boredom<BR>
stress<BR>
happiness<BR>


 
Example usage in a page:
 
 
 
 
 
 
 
{{Consumables2
{{Consumables2
|name = Test
|name = Test
Line 31: Line 33:
|hunger = -20  
|hunger = -20  
|weight = 0.2
|weight = 0.2
|happiness = -10
}}
}}


Line 41: Line 44:
  <nowiki>}}</nowiki>
  <nowiki>}}</nowiki>


{{Consumables2
|image = Template-info.png
|hunger = -20
|weight = 0.2
}}
<nowiki>{{</nowiki>Consumables2
|image = Template-info.png
|hunger = -20
|weight = 0.2
<nowiki>}}</nowiki>
[[category:templates]]
[[category:templates]]
</noinclude>
</noinclude>

Revision as of 04:19, 3 December 2013

Consumables
[[Image:{{{image}}}|120px]]

Weight: {{{weight}}}





Usage Example: Use this template to add an infobox to a consumable item's page. If a property is not included, it will not be displayed. Possible properties to add include:

Weight [required]
Image [required]
Hunger
boredom
stress
happiness

Example usage in a page: Template:Consumables2


{{Consumables2
|name = Test 
|image = Template-info.png
|hunger = -20 
|weight = 0.2
}}