Difference between revisions of "Template:Crafted"

From Salem Wiki
Jump to: navigation, search
(testing newhaven support)
Line 1: Line 1:
<includeonly>{{#ifeq:{{PAGENAME}}|Contributing||[[Category:Crafted]][[Category:Objects]]}}
+
<includeonly>
 +
{{#vardefine: pagename | {{#ifeq:{{NAMESPACE}}|Main|{{PAGENAME}}|{{#titleparts: {{PAGENAME}} | -1 }} }} }}
 +
{{#ifeq:{{var: pagename }}|Contributing||[[Category:Crafted]][[Category:Objects]]}}
 
{| style="float:left; width:320px; padding:0.2em; border:black 2px solid; border-radius:0.4em; background:#71583b; font-family:Calibri; margin-right:25px"
 
{| style="float:left; width:320px; padding:0.2em; border:black 2px solid; border-radius:0.4em; background:#71583b; font-family:Calibri; margin-right:25px"
! style="color:white; font-size:1.4em"|{{i|{{PAGENAME}}}}
+
! style="color:white; font-size:1.4em"|{{i|{{var: pagename }}}}
 
|-
 
|-
 
| style="color:white; font-size:1.2em; text-align:center"|{{CheckNamespace}}
 
| style="color:white; font-size:1.2em; text-align:center"|{{CheckNamespace}}
Line 8: Line 10:
 
{| style="width:100%; border:black 2px solid; background:#4c4c4c; padding-left:0.2em;"
 
{| style="width:100%; border:black 2px solid; background:#4c4c4c; padding-left:0.2em;"
 
| style="width:80px;" |'''Skill(s) required:'''
 
| style="width:80px;" |'''Skill(s) required:'''
| colspan=2 |{{#switch: {{{Skills required|}}} | ={{#ask: [[Category:Skills]] [[Unlocks::(Main):{{PAGENAME}}]] | ?Skills | format = ul | link=none | template=i | default=None }}| {{#ask: [[Category:Skills]] [[Unlocks::{{PAGENAME}}]] | ?Skills | format = ul | link=none | template=i | default= }}{{T1|{{{Skills required}}}}} }}
+
| colspan=2 |{{#switch: {{{Skills required|}}} | ={{#ask: [[Category:Skills]] [[Unlocks::(Main):{{var: pagename }}]] | ?Skills | format = ul | link=none | template=i | default=None }}| {{#ask: [[Category:Skills]] [[Unlocks::{{var: pagename }}]] | ?Skills | format = ul | link=none | template=i | default= }}{{T1|{{{Skills required}}}}} }}
 
|-
 
|-
 
| '''Object(s) required:''' || colspan=2 | {{#switch: {{{Objects required|}}} | =None | {{T4|{{{Objects required}}} }} }}
 
| '''Object(s) required:''' || colspan=2 | {{#switch: {{{Objects required|}}} | =None | {{T4|{{{Objects required}}} }} }}
Line 19: Line 21:
 
|-
 
|-
 
| style="vertical-align:top;" | '''Required by:'''
 
| style="vertical-align:top;" | '''Required by:'''
| style="vertical-align:top;" | '''Objects'''<br />{{#ask: [[Category:Objects]] [[Requires::{{PAGENAME}}]] | ?Objects | format = ul | default=None }}  
+
| style="vertical-align:top;" | '''Objects'''<br />{{#ask: [[Category:Objects]] [[Requires::{{var: pagename }}]] | ?Objects | format = ul | default=None }}  
| style="vertical-align:top;" | '''Structures'''<br />{{#ask: [[Category:Structures]] [[Requires::{{PAGENAME}}]] | ?Objects | format = ul | default=None }}
+
| style="vertical-align:top;" | '''Structures'''<br />{{#ask: [[Category:Structures]] [[Requires::{{var: pagename }}]] | ?Objects | format = ul | default=None }}
 
|}</includeonly>
 
|}</includeonly>
 
<noinclude>{{documentation}}</noinclude>
 
<noinclude>{{documentation}}</noinclude>

Revision as of 14:19, 27 June 2024


Template documentation (for the template shown above, sometimes hidden or invisible)
NOTE: This is a MODULAR template. It MUST be used before one of the following templates:


See Help:Contributing for instructions and examples for adding a new page to the wiki.


{{#vardefine: pagename | }}

Unknown Item icon.png [[Template:Var: pagename|Template:Var: pagename]]
Skill(s) required: None
Object(s) required: None
Weight: unknown
Required by: Objects
NoneThe part "]]" of the query was not understood.</br>Results might not be as expected.
Structures
NoneThe part "]]" of the query was not understood.</br>Results might not be as expected.
Code:
{{Crafted
| Objects required= 
| Weight=
}}

If it's standalone use:

{{Crafted
| Objects required= 
| Weight=
}}
|}

If you for some reason want to add a required skill (or several) to an object outside of the skill template you can force it by adding a "Skills required" line. However, please only use this as an exception for special cases, such as Salem Store items or similar; objects unlocked by a skill otherwise, whether directly or indirectly (such as variable crafts of one craft), should be listed on the skill page and that way be automatically displayed as a required skill for that object.

{{Crafted
| Skills required=
| Objects required= 
| Weight=
}}

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