Template:Faction feeling description: Difference between revisions

From Caves of Qud Wiki
Jump to navigation Jump to search
mNo edit summary
m (center tooltips to help prevent them overflowing infobox and getting cut off)
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>
<includeonly>{{#if: {{{2|}}}
{{#ifexpr:{{{1}}}<=-100|{{Tooltip|{{{1}}} Reputation|{{color| R|Hated}}}}|{{#ifexpr:{{{1}}}<=-50|{{Tooltip|{{{1}}} Reputation|{{color|r|Disliked}}}}|{{#ifexpr:{{{1}}}<=49|{{Tooltip|{{{1}}} Reputation|{{color|C|Neutral}}}}|{{#ifexpr:{{{1}}}<=99|{{Tooltip|{{{1}}} Reputation|{{color|g|Liked}}}}|{{#ifexpr:{{{1}}}>= 100|{{Tooltip|{{{1}}} Reputation|{{color|G|Loved}}}}|?}}}}}}}}}}
| {{#switch:1
</includeonly><noinclude>
| {{#expr:{{{1|}}} <= -100}} = {{Tooltip|{{{1}}} Reputation|{{color|R|Hate}}|centered}}
[[Category:Templates]]
| {{#expr:{{{1|}}} <= -50}}  = {{Tooltip|{{{1}}} Reputation|{{color|r|Dislike}}|centered}}
Takes a non-player creature's reputation value with a faction and displays the creature's relationship with that faction, with a tooltip displaying the value.
| {{#expr:{{{1|}}} <= 49}}  = {{Tooltip|{{{1}}} Reputation|{{color|Y|Neutral}}|centered}}
| {{#expr:{{{1|}}} >= 100}}  = {{Tooltip|{{{1}}} Reputation|{{color|G|Love}}|centered}}
| {{#expr:{{{1|}}} >= 50}}  = {{Tooltip|{{{1}}} Reputation|{{color|g|Like}}|centered}}
| ??
}}
|{{#switch:1
| {{#expr:{{{1|}}} <= -100}} = {{Tooltip|{{{1}}} Reputation|{{color|R|Hated}}|centered}}
| {{#expr:{{{1|}}} <= -50}}  = {{Tooltip|{{{1}}} Reputation|{{color|r|Disliked}}|centered}}
| {{#expr:{{{1|}}} <= 49}}  = {{Tooltip|{{{1}}} Reputation|{{color|Y|Neutral}}|centered}}
| {{#expr:{{{1|}}} >= 100}}  = {{Tooltip|{{{1}}} Reputation|{{color|G|Loved}}|centered}}
| {{#expr:{{{1|}}} >= 50}}   = {{Tooltip|{{{1}}} Reputation|{{color|g|Liked}}|centered}}
| ??
}}
}}</includeonly><noinclude><!--
-->Takes a non-player creature's reputation value with a faction as a parameter and displays the creature's relationship with that faction, with a tooltip displaying the value.




Usage:
Usage:


<syntaxhighlight lang="xml">
<pre>
{{FactionFeeling|21}}
{{Faction feeling description|21}}
</syntaxhighlight>
</pre>
...which results in: {{FactionFeeling|21}}
...which results in: {{Faction feeling description|21}}


{| class="wikitable"
{| class="wikitable"
Line 21: Line 35:
| 99 − 50 || {{color | g | Liked }}
| 99 − 50 || {{color | g | Liked }}
|-
|-
| 49 − -49 || {{color | C | Neutral }}
| 49 − -49 || {{color | Y | Neutral }}
|-
|-
| -50 − -99 || {{color | r | Disliked }}
| -50 − -99 || {{color | r | Disliked }}
Line 28: Line 42:
|}
|}


</noinclude>
You can set a second parameter to change the tense, for use in faction pages:
<pre>
{{Faction feeling description|80|faction}}
</pre>
...which results in: {{Faction feeling description|80|faction}}
[[Category:Templates]]</noinclude>

Latest revision as of 19:13, 13 February 2021

Takes a non-player creature's reputation value with a faction as a parameter and displays the creature's relationship with that faction, with a tooltip displaying the value.


Usage:

{{Faction feeling description|21}}

...which results in: Neutral21 Reputation

Reputation Relationship
≥ 100 Loved
99 − 50 Liked
49 − -49 Neutral
-50 − -99 Disliked
≤ -100 Hated

You can set a second parameter to change the tense, for use in faction pages:

{{Faction feeling description|80|faction}}

...which results in: Like80 Reputation