Template:Faction feeling description: Difference between revisions

From Caves of Qud Wiki
Jump to navigation Jump to search
No edit summary
(add second argument)
Line 1: Line 1:
<includeonly>{{#switch:1
<includeonly>{{#if: {{{2|}}}
| {{#switch:1
| {{#expr:{{{1|}}} <= -100}} = {{Tooltip|{{{1}}} Reputation|{{color|R|Hate}}}}
| {{#expr:{{{1|}}} <= -50}}  = {{Tooltip|{{{1}}} Reputation|{{color|r|Dislike}}}}
| {{#expr:{{{1|}}} <= 49}}  = {{Tooltip|{{{1}}} Reputation|{{color|Y|Neutral}}}}
| {{#expr:{{{1|}}} >= 100}}  = {{Tooltip|{{{1}}} Reputation|{{color|G|Love}}}}
| {{#expr:{{{1|}}} >= 50}}  = {{Tooltip|{{{1}}} Reputation|{{color|g|Like}}}}
| ??
}}
|{{#switch:1
| {{#expr:{{{1|}}} <= -100}} = {{Tooltip|{{{1}}} Reputation|{{color|R|Hated}}}}
| {{#expr:{{{1|}}} <= -100}} = {{Tooltip|{{{1}}} Reputation|{{color|R|Hated}}}}
| {{#expr:{{{1|}}} <= -50}}  = {{Tooltip|{{{1}}} Reputation|{{color|r|Disliked}}}}
| {{#expr:{{{1|}}} <= -50}}  = {{Tooltip|{{{1}}} Reputation|{{color|r|Disliked}}}}
Line 6: Line 15:
| {{#expr:{{{1|}}} >= 50}}  = {{Tooltip|{{{1}}} Reputation|{{color|g|Liked}}}}
| {{#expr:{{{1|}}} >= 50}}  = {{Tooltip|{{{1}}} Reputation|{{color|g|Liked}}}}
| ??
| ??
}}
}}</includeonly><noinclude><!--
}}</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.
-->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.
Line 32: Line 42:
|}
|}


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>
[[Category:Templates]]</noinclude>

Revision as of 22:56, 4 January 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