Template:Modifier link/doc: Difference between revisions

From Path of Exile Wiki
Jump to navigation Jump to search
>Illviljan
(Created page with "{{template shortcut|Ml}} {{documentation subpage}} The '''{{BASEPAGENAME}}''' template is used to show mod names and stat text in short and concise way. Mainly to be used in...")
 
 
(16 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{template shortcut|Ml}}
{{Documentation subpage}}


{{documentation subpage}}
{{Lua|Module:Modifier link}}
{{Template shortcut|Ml}}


The '''{{BASEPAGENAME}}''' template is used to show mod names and stat text in short and concise way. Mainly to be used in the main text.  
The '''{{BASEPAGENAME}}''' template is used to show mod names and stat text in short and concise way. Mainly to be used in the main text.  
Line 7: Line 8:
==Overview==
==Overview==
The template will do the following:
The template will do the following:
* Query modifier.
* Query modifier. If results are more than 1, it returns an error that suggests which mod id to use.
* Format the result in a familiar way.
* Format the result in a familiar way.
Consider using {{tlx|Modifier table}} instead if you want to create large tables.


==Parameters==
==Parameters==
Line 19: Line 22:
|-
|-
|'''id'''
|'''id'''
|| Modifier id. Defaults to first unnamed input, <nowiki>{{{1}}}</nowiki>.
|| Modifier id or modid (<code>mods.id</code>). Defaults to first unnamed input, <nowiki>{{{1}}}</nowiki>.
Even though the modifier id is the required input it will search through the following cargo fields:
# <code>mods.name</code>
# <code>mods.id</code>
# <code>mods.stat_text</code>
# <code>mods.stat_text_raw</code>
This simplifies finding the correct modifier considerably, since the lua error will display the mods the query found and the correct modifier id in an easy copy/paste way.
|| {{no}}
|| {{no}}
|-
|'''statid'''
|| Stat id. Required when querying for exact values instead of stat text.
Searches <code>mod_stats.id</code> that are on the same page as the modifier id.
|| {{yes}}
|-
|'''display'''
|| Display formats. Choose between:
* abbr - Abbreviated stat text. (Default)
* id - Show the modifier id.
* verbose - Show both modifier name and stat text.
* stat_text - Show only stat text.
* min - Minimum value for a stat. Requires <code>statid</code> to be defined.
* max - Maximum value for a stat. Requires <code>statid</code> to be defined.
|| {{yes}}
|}
|}


==Examples==
==Examples==
<pre>  
{| class="wikitable sortable"
{{Modifier link|StrIntMasterItemGenerationCanHaveMultipleCraftedMods}}
|-
</pre>
! Code !! Result
yields: {{Modifier link|StrIntMasterItemGenerationCanHaveMultipleCraftedMods}}
|-
| <pre>{{Modifier link
|LocalIncreasedPhysicalDamagePercentAndAccuracyRating8
}}</pre> || {{Modifier link|LocalIncreasedPhysicalDamagePercentAndAccuracyRating8}}
|-
| <pre>
{{Modifier link
|LocalIncreasedPhysicalDamagePercentAndAccuracyRating8
|display=id
}}
</pre>|| {{Modifier link
|LocalIncreasedPhysicalDamagePercentAndAccuracyRating8
|display=id
}}
|-
| <pre>
{{Modifier link
|LocalIncreasedPhysicalDamagePercentAndAccuracyRating8
|display=verbose
}}
</pre>|| {{Modifier link
|LocalIncreasedPhysicalDamagePercentAndAccuracyRating8
|display=verbose
}}
|-
| <pre>  
{{Modifier link
|LocalIncreasedPhysicalDamagePercentAndAccuracyRating8
|display=stat_text
}}  
</pre>|| {{Modifier link
|LocalIncreasedPhysicalDamagePercentAndAccuracyRating8
|display=stat_text
}}
|-
| <pre>  
{{Modifier link
|LocalIncreasedPhysicalDamagePercentAndAccuracyRating8
|display=min
|statid=local_physical_damage_+%
}}
</pre>|| {{Modifier link
|LocalIncreasedPhysicalDamagePercentAndAccuracyRating8
|display=min
|statid=local_physical_damage_+%
}}
|-
| <pre>
{{Modifier link
|LocalIncreasedPhysicalDamagePercentAndAccuracyRating8
|display=max
|statid=local_physical_damage_+%
}}
</pre>|| {{Modifier link
|LocalIncreasedPhysicalDamagePercentAndAccuracyRating8
|display=max
|statid=local_physical_damage_+%
}}
|}
 
==Maintenance==
When this template returns errors the page will show up in following categories:
* [[:Category:Pages with modifier link errors]]
* [[:Category:Pages with script errors]]


<includeonly>
{{Documentation categories|
[[Category:Data templates]]
<!-- Categories and interwikis go here. -->
</includeonly>
[[Category:Link formatting templates]]
[[Category:Query templates]]
}}

Latest revision as of 18:40, 12 September 2021

This subpage provides documentation for Template:Modifier link.

Lua logo

This template uses the following modules:

Shortcut

The Modifier link template is used to show mod names and stat text in short and concise way. Mainly to be used in the main text.

Overview

The template will do the following:

  • Query modifier. If results are more than 1, it returns an error that suggests which mod id to use.
  • Format the result in a familiar way.

Consider using {{Modifier table}} instead if you want to create large tables.

Parameters

All parameters should be filled in if possible to ensure it's working correctly.

Parameter Description Optional
id Modifier id or modid (mods.id). Defaults to first unnamed input, {{{1}}}.

Even though the modifier id is the required input it will search through the following cargo fields:

  1. mods.name
  2. mods.id
  3. mods.stat_text
  4. mods.stat_text_raw

This simplifies finding the correct modifier considerably, since the lua error will display the mods the query found and the correct modifier id in an easy copy/paste way.

statid Stat id. Required when querying for exact values instead of stat text.

Searches mod_stats.id that are on the same page as the modifier id.

display Display formats. Choose between:
  • abbr - Abbreviated stat text. (Default)
  • id - Show the modifier id.
  • verbose - Show both modifier name and stat text.
  • stat_text - Show only stat text.
  • min - Minimum value for a stat. Requires statid to be defined.
  • max - Maximum value for a stat. Requires statid to be defined.

Examples

Code Result
{{Modifier link
 |LocalIncreasedPhysicalDamagePercentAndAccuracyRating8
}}
Dictator'sDictator's
Prefix
(75-79)% increased Physical Damage
+(175-200) to Accuracy Rating
 
{{Modifier link
 |LocalIncreasedPhysicalDamagePercentAndAccuracyRating8
 |display=id
}} 
LocalIncreasedPhysicalDamagePercentAndAccuracyRating8Dictator's
Prefix
(75-79)% increased Physical Damage
+(175-200) to Accuracy Rating
 
{{Modifier link
 |LocalIncreasedPhysicalDamagePercentAndAccuracyRating8
 |display=verbose
}} 
Dictator's - (75-79)% increased Physical Damage, +(175-200) to Accuracy Rating (Prefix)
 
{{Modifier link
 |LocalIncreasedPhysicalDamagePercentAndAccuracyRating8
 |display=stat_text
}} 
(75-79)% increased Physical Damage
+(175-200) to Accuracy Rating
 
{{Modifier link
 |LocalIncreasedPhysicalDamagePercentAndAccuracyRating8
 |display=min
 |statid=local_physical_damage_+%
}} 
75
 
{{Modifier link
 |LocalIncreasedPhysicalDamagePercentAndAccuracyRating8
 |display=max
 |statid=local_physical_damage_+%
}} 
79

Maintenance

When this template returns errors the page will show up in following categories: