Template:FriendshipImpact: Difference between revisions

From Dreamlight Valley Wiki
Jump to navigation Jump to search
(Create page, intended for use in Daily Discussions answers/responses with minor friendship impacts)
 
(Add documentation (same page for now))
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<includeonly><span id="nametemplate" style="font-weight: bold;" class="no-wrap" data-sort-value="{{#ifeq:{{{sortkey}}}|||{{#ifeq:{{{sortkey|true}}}|true|{{#iferror:{{#expr:{{{1|0}}}>1}}|0|{{#expr:{{{1|}}}}}}}|{{{sortkey}}}}}}}">{{#iferror:{{#expr:{{{1|0}}}>1}}|{{{1|}}}| [[File:Friendship.png|20px|link=]] {{formatnum:{{{1|}}}}} }}{{#ifeq:{{{2|}}}|noLabel||&nbsp;Friendship}}</span></includeonly><noinclude>
<includeonly>''<span id="nametemplate" style="font-weight: bold;" class="no-wrap" data-sort-value="{{#ifeq:{{{sortkey}}}|||{{#ifeq:{{{sortkey|true}}}|true|{{#iferror:{{#expr:{{{1|0}}}>1}}|0|{{#expr:{{{1|}}}}}}}|{{{sortkey}}}}}}}">&#91;{{#iferror:{{#expr:{{{1|0}}}>1}}|{{{1|}}}| [[File:Friendship.png|20px|link=]] {{{1|}}} }}{{#ifeq:{{{2|}}}|noLabel||&nbsp;Friendship}}&#93;</span>''</includeonly><noinclude>
==Description==
This template is used to indicate when a dialogue option has an impact on Friendship. It inserts an inline image for  Friendship, along with the Friendship impact value and optional label.
 
<!--TODO: Rationale for the template, why it improves the wiki. Example: This template makes inserting common icons and imagery easier for wiki veterans and newcomers alike. It also helps standardize which icons are used and and unify how these icons are styled, which makes them easier to maintain.-->
 
==Usage==
This template can be used by entering the following onto a relevant page:
 
<pre>{{FriendshipImpact|<< +/- value>>}}</pre>
 
The intended usage is to include the +/- sign for clarity.
 
There are also optional parameters that can be used:
<pre>{{FriendshipImpact|<< +/- value>>|noLabel}}</pre>
 
If the additional parameters are not provided, the "Friendship" label will display, and no number will display.
 
If <code>noLabel</code> is provided, the "Friendship" label will not display - this is a more concise format.
 
==Examples==
<pre>{{FriendshipImpact|-2|noLabel}}</pre>
results in...
 
{{FriendshipImpact|-2|noLabel}}
{{FriendshipImpact|-2|noLabel}}
<pre>{{FriendshipImpact|+2}}</pre>
results in...
{{FriendshipImpact|+2}}
<!--
Examples that function, but are not intended usage:
<pre>{{FriendshipImpact}}</pre>
results in...


{{FriendshipImpact}}
{{FriendshipImpact}}


{{FriendshipImpact|2}}


{{FriendshipImpact|+2}}
<pre>{{FriendshipImpact|3}}</pre>
results in...
 
{{FriendshipImpact|3}}
-->
 
[[Category:Formatting templates]]</noinclude>
[[Category:Formatting templates]]</noinclude>

Latest revision as of 17:45, 19 June 2023

Description

This template is used to indicate when a dialogue option has an impact on Friendship. It inserts an inline image for Friendship, along with the Friendship impact value and optional label.


Usage

This template can be used by entering the following onto a relevant page:

{{FriendshipImpact|<< +/- value>>}}

The intended usage is to include the +/- sign for clarity.

There are also optional parameters that can be used:

{{FriendshipImpact|<< +/- value>>|noLabel}}

If the additional parameters are not provided, the "Friendship" label will display, and no number will display.

If noLabel is provided, the "Friendship" label will not display - this is a more concise format.

Examples

{{FriendshipImpact|-2|noLabel}}

results in...

[Friendship.png -2]


{{FriendshipImpact|+2}}

results in...

[Friendship.png +2 Friendship]