The Wiki for Tale 4 is in read-only mode and is available for archival and reference purposes only. Please visit the current Tale 11 Wiki in the meantime.

If you have any issues with this Wiki, please post in #wiki-editing on Discord or contact Brad in-game.

Difference between revisions of "User:Tungsten/Acro2"

From A Tale in the Desert
Jump to navigationJump to search
(Removing all content from page)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<includeonly>{{#ifeq:User|{{NAMESPACE}}|{{#if:{{#show:User:{{BASEPAGENAME}}|?Level}}|<span style="color:{{#iferror:{{#expr:0>={{{1|0}}}}}|green;">|{{#ifexpr:{{#show:User:{{BASEPAGENAME}}|?Level}}>={{{1|0}}}|green;">|maroon;">}}}}'''''(level {{{1|?}}}{{#if:{{{2|}}}|, </span><span style="color:{{#iferror:{{#expr:0>={{{2}}}}}|green;">|{{#ifexpr:{{#show:User:{{BASEPAGENAME}}|?Level}}>={{{2}}}|green;">|maroon;">}}}}{{{2}}}{{#if:{{{3|}}}|, </span><span style="color:{{#iferror:{{#expr:0>={{{3}}}}}|green;">|{{#ifexpr:{{#show:User:{{BASEPAGENAME}}|?Level}}>={{{3}}}|green;">|maroon;">}}}}{{{3}}}{{#if:{{{4|}}}|, </span><span style="color:{{#iferror:{{#expr:0>={{{4}}}}}|green;">|{{#ifexpr:{{#show:User:{{BASEPAGENAME}}|?Level}}>={{{4}}}|green;">|maroon;">}}}}{{{4}}}{{#if:{{{5|}}}|, </span><span style="color:{{#iferror:{{#expr:0>={{{5}}}}}|green;">|{{#ifexpr:{{#show:User:{{BASEPAGENAME}}|?Level}}>={{{5}}}|green;">|maroon;">}}}}{{{5}}}{{#if:{{{6|}}}|, </span><span style="color:{{#iferror:{{#expr:0>={{{6}}}}}|green;">|{{#ifexpr:{{#show:User:{{BASEPAGENAME}}|?Level}}>={{{6}}}|green;">|maroon;">}}}}{{{6}}}{{#if:{{{7|}}}|, </span><span style="color:{{#iferror:{{#expr:0>={{{7}}}}}|green;">|{{#ifexpr:{{#show:User:{{BASEPAGENAME}}|?Level}}>={{{7}}}|green;">|maroon;">}}}}{{{7}}}</span><span style="color:{{#iferror:{{#expr:0>={{{1|0}}}}}|green;">|{{#ifexpr:{{#show:User:{{BASEPAGENAME}}|?Level}}>={{{1|0}}}|green;">|maroon;">}}}})</span>|</span><span style="color:{{#iferror:{{#expr:0>={{{1|0}}}}}|green;">|{{#ifexpr:{{#show:User:{{BASEPAGENAME}}|?Level}}>={{{1|0}}}|green;">|maroon;">}}}})</span>}}|</span><span style="color:{{#iferror:{{#expr:0>={{{1|0}}}}}|green;">|{{#ifexpr:{{#show:User:{{BASEPAGENAME}}|?Level}}>={{{1|0}}}|green;">|maroon;">}}}})</span>}}|</span><span style="color:{{#iferror:{{#expr:0>={{{1|0}}}}}|green;">|{{#ifexpr:{{#show:User:{{BASEPAGENAME}}|?Level}}>={{{1|0}}}|green;">|maroon;">}}}})</span>}}|</span><span style="color:{{#iferror:{{#expr:0>={{{1|0}}}}}|green;">|{{#ifexpr:{{#show:User:{{BASEPAGENAME}}|?Level}}>={{{1|0}}}|green;">|maroon;">}}}})</span>}}|</span><span style="color:{{#iferror:{{#expr:0>={{{1|0}}}}}|green;">|{{#ifexpr:{{#show:User:{{BASEPAGENAME}}|?Level}}>={{{1|0}}}|green;">|maroon;">}}}})</span>}}|</span><span style="color:{{#iferror:{{#expr:0>={{{1|0}}}}}|green;">|{{#ifexpr:{{#show:User:{{BASEPAGENAME}}|?Level}}>={{{1|0}}}|green;">|maroon;">}}}})</span>}}'''''|''(level {{{1|?}}}{{#if:{{{2|}}}|, {{{2}}}{{#if:{{{3|}}}|, {{{3}}}{{#if:{{{4|}}}|, {{{4}}}{{#if:{{{5|}}}|, {{{5}}}{{#if:{{{6|}}}|, {{{6}}}{{#if:{{{7|}}}|, {{{7}}})|)}}|)}}|)}}|)}}|)}}|)}}''}}|''(level {{{1|?}}}{{#if:{{{2|}}}|, {{{2}}}{{#if:{{{3|}}}|, {{{3}}}{{#if:{{{4|}}}|, {{{4}}}{{#if:{{{5|}}}|, {{{5}}}{{#if:{{{6|}}}|, {{{6}}}{{#if:{{{7|}}}|, {{{7}}})|)}}|)}}|)}}|)}}|)}}|)}}''}}</includeonly><noinclude>
 
  
In the user namespace this template hilights the level requirements of a building/test/skill/tech depending on whether the user meets them or not. Elsewhere it simply prints the level requirements in plain black.
 
 
=== Warning ===
 
This is a '''monster''' template! Edit, or even view the code at your own risk! -- You have been warned! :D
 
 
I know it could be simplyfied by splitting it into two or more templates, but then there would be many templates whereas now there is only this one.
 
 
== Usage ==
 
In order for this template to work, it has to know your level. This is achieved by declaring the '''Level''' property on your '''main''' page, like this:
 
<pre>
 
Avatar Name: whatever
 
Level: [[level::21]]
 
Residence: somewhere in Egypt
 
</pre>
 
 
Once you have this property, you can use this template on any of your pages. The template also supports multiple levels up to 7.
 
 
 
So, for example, if you want to have a list of skills on your pages, you could write the following:
 
 
<pre>
 
* [[Mechanics]] ''(level 8)''
 
* [[Salvage Techniques]] ''(level 1, 4, 7, 14, 21, 28, 35)''
 
* [[Silkworm Farming]] ''(level 28)''
 
</pre>
 
 
which would look like this:
 
 
* [[Mechanics]] ''(level 8)''
 
* [[Salvage Techniques]] ''(level 1, 4, 7, 14, 21, 28, 35)''
 
* [[Silkworm Farming]] ''(level 28)''
 
 
 
If you apply the template to this code like this:
 
 
<pre>
 
* [[Mechanics]] {{Level|8}}
 
* [[Salvage Techniques]] {{Level|1|4|7|14|21|28|35}}
 
* [[Silkworm Farming]] {{Level|28}}
 
</pre>
 
 
you would get a result similar to what you see here:
 
 
* [[Mechanics]] '''''<span style="color:green;">(level 8)</span>'''''
 
* [[Salvage Techniques]] '''''<span style="color:green;">(level 1, 4, 7, <span style="color:maroon;">14, 21, 28, 35</span>)</span>'''''
 
* [[Silkworm Farming]] '''''<span style="color:maroon;">(level 28)</span>'''''
 
 
''(Provided you already declared the level property on your '''main''' user page, and your level is somewhere between 8 and 14.)''
 
 
 
The template checks the namespace and if it is included into the user namespace, it checks the level property. If either of these checks fail, the level values will be displayed in plain black. This way the template can be included on the main wiki pages without changing them in any way. This is good because if you copy, say, a list of tests from a page all about tests, the template could have already been included there, so you won't have to edit every line.
 
 
== Detailed Syntax and Output ==
 
{| border="1" cellpadding="2" cellspacing="0"
 
! Code
 
! Output<br />(Level=1)
 
! Output<br />(Level=5)
 
! Output<br />(Level=10)
 
! No Level or<br /> outside User: namespace
 
|-
 
| align="center" width="20%" | <code><nowiki>{{Level}}</nowiki></code>
 
| align="center" width="20%" | '''''<span style="color:green;">(level ?)</span>'''''
 
| align="center" width="20%" | '''''<span style="color:green;">(level ?)</span>'''''
 
| align="center" width="20%" | '''''<span style="color:green;">(level ?)</span>'''''
 
| align="center" width="20%" | ''(level ?)''
 
|-
 
| align="center" width="20%" | <code><nowiki>{{Level|1}}</nowiki></code>
 
| align="center" width="20%" | '''''<span style="color:green;">(level 1)</span>'''''
 
| align="center" width="20%" | '''''<span style="color:green;">(level 1)</span>'''''
 
| align="center" width="20%" | '''''<span style="color:green;">(level 1)</span>'''''
 
| align="center" width="20%" | ''(level 1)''
 
|-
 
| align="center" width="20%" | <code><nowiki>{{Level|4}}</nowiki></code>
 
| align="center" width="20%" | '''''<span style="color:maroon;">(level 4)</span>'''''
 
| align="center" width="20%" | '''''<span style="color:green;">(level 4)</span>'''''
 
| align="center" width="20%" | '''''<span style="color:green;">(level 4)</span>'''''
 
| align="center" width="20%" | ''(level 4)''
 
|-
 
| align="center" width="20%" | <code><nowiki>{{Level|8}}</nowiki></code>
 
| align="center" width="20%" | '''''<span style="color:maroon;">(level 8)</span>'''''
 
| align="center" width="20%" | '''''<span style="color:maroon;">(level 8)</span>'''''
 
| align="center" width="20%" | '''''<span style="color:green;">(level 8)</span>'''''
 
| align="center" width="20%" | ''(level 8)''
 
|-
 
| align="center" width="20%" | <code><nowiki>{{Level|12}}</nowiki></code>
 
| align="center" width="20%" | '''''<span style="color:maroon;">(level 12)</span>'''''
 
| align="center" width="20%" | '''''<span style="color:maroon;">(level 12)</span>'''''
 
| align="center" width="20%" | '''''<span style="color:maroon;">(level 12)</span>'''''
 
| align="center" width="20%" | ''(level 12)''
 
|-
 
| align="center" width="20%" | <code><nowiki>{{Level|15+}}</nowiki></code>
 
| align="center" width="20%" | '''''<span style="color:green;">(level 15+)</span>'''''
 
| align="center" width="20%" | '''''<span style="color:green;">(level 15+)</span>'''''
 
| align="center" width="20%" | '''''<span style="color:green;">(level 15+)</span>'''''
 
| align="center" width="20%" | ''(level 15+)''
 
|-
 
| align="center" width="20%" | <code><nowiki>{{Level|15-18}}</nowiki></code>
 
| align="center" width="20%" | '''''<span style="color:green;">(level 15-18)</span>'''''
 
| align="center" width="20%" | '''''<span style="color:green;">(level 15-18)</span>'''''
 
| align="center" width="20%" | '''''<span style="color:green;">(level 15-18)</span>'''''
 
| align="center" width="20%" | ''(level 15-18)''
 
|-
 
| align="center" width="20%" | <code><nowiki>{{Level|foo}}</nowiki></code>
 
| align="center" width="20%" | '''''<span style="color:green;">(level foo)</span>'''''
 
| align="center" width="20%" | '''''<span style="color:green;">(level foo)</span>'''''
 
| align="center" width="20%" | '''''<span style="color:green;">(level foo)</span>'''''
 
| align="center" width="20%" | ''(level foo)''
 
|-
 
| align="center" width="20%" | <code><nowiki>{{Level|3|6|9}}</nowiki></code>
 
| align="center" width="20%" | '''''<span style="color:maroon;">(level 3, 6, 9)</span>'''''
 
| align="center" width="20%" | '''''<span style="color:green;">(level 3, </span><span style="color:maroon;">6, 9</span><span style="color:green;">)</span>'''''
 
| align="center" width="20%" | '''''<span style="color:green;">(level 3, 6, 9)</span>'''''
 
| align="center" width="20%" | ''(level 3, 6, 9)''
 
|-
 
| align="center" width="20%" | <code><nowiki>{{Level|2|6|foo}}</nowiki></code>
 
| align="center" width="20%" | '''''<span style="color:maroon;">(level 2, 6, </span><span style="color:green;">foo</span><span style="color:maroon;">)</span>'''''
 
| align="center" width="20%" | '''''<span style="color:green;">(level 2, </span><span style="color:maroon;">6, </span><span style="color:green;">foo)</span>'''''
 
| align="center" width="20%" | '''''<span style="color:green;">(level 2, 6, foo)</span>'''''
 
| align="center" width="20%" | ''(level 2, 6, foo)''
 
|-
 
| align="center" width="20%" | <code><nowiki>{{Level|2|foo|6}}</nowiki></code>
 
| align="center" width="20%" | '''''<span style="color:maroon;">(level 2, </span><span style="color:green;">foo, </span><span style="color:maroon;">6)</span>'''''
 
| align="center" width="20%" | '''''<span style="color:green;">(level 2, foo, </span><span style="color:maroon;">6</span><span style="color:green;">)</span>'''''
 
| align="center" width="20%" | '''''<span style="color:green;">(level 2, foo, 6)</span>'''''
 
| align="center" width="20%" | ''(level 2, foo, 6)''
 
|-
 
| align="center" width="20%" | <code><nowiki>{{Level|8|6|4|2|0|-2|-4|-6}}</nowiki></code>
 
| align="center" width="20%" | '''''<span style="color:maroon;">(level 8, 6, 4, 2, </span><span style="color:green;">0, -2, -4</span><span style="color:maroon;">)</span>'''''
 
| align="center" width="20%" | '''''<span style="color:maroon;">(level 8, 6, </span><span style="color:green;">4, 2, 0, -2, -4</span><span style="color:maroon;">)</span>'''''
 
| align="center" width="20%" | '''''<span style="color:green;">(level 8, 6, 4, 2, 0, -2, -4)</span>'''''
 
| align="center" width="20%" | ''(level 8, 6, 4, 2, 0, -2, -4)''
 
|-
 
| align="center" width="20%" | <code><nowiki>{{Level|above 20? must check}}</nowiki></code>
 
| align="center" width="20%" | '''''<span style="color:green;">(level above 20? must check)</span>'''''
 
| align="center" width="20%" | '''''<span style="color:green;">(level above 20? must check)</span>'''''
 
| align="center" width="20%" | '''''<span style="color:green;">(level above 20? must check)</span>'''''
 
| align="center" width="20%" | ''(level above 20? must check)''
 
|}
 
 
</noinclude>
 

Latest revision as of 20:30, 17 December 2009