The Sims Medieval Wiki
m (Created page with "<includeonly>{{#switch:{{{1}}} | type=Armor | name={{{name}}} | desc={{{desc|No Description}}} | image={{{image|File:Placeholder}}} | imagewidth={{{imagewidth|200}}} | caption={{...")
 
m
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#switch:{{{1}}}
+
<includeonly><onlyinclude>{{#switch:{{{1}}}
 
| type=Armor
 
| type=Armor
 
| name={{{name}}}
 
| name={{{name}}}
Line 6: Line 6:
 
| imagewidth={{{imagewidth|200}}}
 
| imagewidth={{{imagewidth|200}}}
 
| caption={{{caption|}}}
 
| caption={{{caption|}}}
| icon={{{icon|File:Placeholder}}}
+
| icon={{{icon|}}}
| attack={{{attack|0}}}
+
| defense={{{defense|0}}}
 
| weight={{{weight|0}}}
 
| weight={{{weight|0}}}
| notes={{{notes}}}
+
| bestdefense={{{bestdefense|}}}
| recipe={{{recipe}}}
+
| bestweight={{{bestweight|}}}
  +
| notes={{{notes|}}}
  +
| recipe={{{recipe|{{#ifexist:{{{1}}}/recipe|{{{1}}}/recipe|}}}}}
 
| craftable={{#if:{{{recipe|}}}|1|0}}
 
| craftable={{#if:{{{recipe|}}}|1|0}}
|}}</includeonly><noinclude>
+
|}}</onlyinclude></includeonly><noinclude>
  +
{{documentation}}
This template generates a Armor object with queriable properties.
 
 
</noinclude>
 
===Usage===
 
1. Use this template to define the object in its own page, for example, in a page Shield of Invisibility<pre>
 
{{Sword
 
| {{{1}}}
 
| name=Shield of Invisibility
 
| desc=No, this shield does not make you invisible. The shield IS invisible. In fact, you can't really know for sure whether it is there or not.
 
| image=File:Shield_of_invisibility.png
 
| imagewidth=200
 
| caption=Caption for image
 
| icon=File:Shield_of_invisibility_icon.png
 
| attack=5
 
| weight=5
 
| notes=This shield don't exists, in-game or otherwise.
 
}}
 
</pre>
 
 
2. Use the following way to extract properties from the generated page.
 
<pre>
 
{{:Shield of Invisibility|name}} is a {{:Shield of Invisibility|type}} (Defense:{{:Shield of Invisibility|defense}, Weight:{{:Shield of Invisibility|weight}})
 
</pre>
 
Output:
 
<pre>
 
Shield of Invisibility is a Armor(Defense:5, Weight:5)
 
</pre>
 
 
{{Equipment}}
 
</noinclude><noinclude>
 
[[Category:Equipment]][[Category:Armor]]</noinclude>
 

Latest revision as of 20:27, 11 April 2011

Template documentation (for the above template, sometimes hidden or invisible)

Visit Template:Armor/doc to edit this text! (How does this work?)