Template:Abundance: Difference between revisions
From HorizonXI Wiki
(added optional confidence interval to output) |
mNo edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 4: | Line 4: | ||
| #default = <span style="display:none">{{#switch:{{{2|}}}||0=0|#default={{#expr:{{{1}}} / {{{2}}} * 100 round 1}}}}%</span><!-- Invisible key for sort order | | #default = <span style="display:none">{{#switch:{{{2|}}}||0=0|#default={{#expr:{{{1}}} / {{{2}}} * 100 round 1}}}}%</span><!-- Invisible key for sort order | ||
-->{{#ifexpr:{{default|{{{2|}}}|0}}<=0|{{ht|No data.|[[File:Unknown.png|20px|Unknown|link= | If sample size is 0 display message | ||
-->{{#ifexpr:{{default|{{{2|}}}|0}}<=0|{{ht|No data.|[[File:Unknown.png|20px|Unknown|link=HorizonXI:Drop Rate Policy]]<sup>(0%)</sup>|gray}}|{{ht<!-- | |||
Evaluate the tooltip infotext based on sample size | |||
-->|{{#ifexpr:{{{2}}} < 100|({{{1}}}/{{{2}}}). Insufficient data for accurate Abundance. More information is needed.<!-- | -->|{{#ifexpr:{{{2}}} < 100|({{{1}}}/{{{2}}}). Insufficient data for accurate Abundance. More information is needed.<!-- | ||
-->|{{#ifexpr:{{{2}}} < 500|({{{1}}}/{{{2}}}). Low data; Abundance may be inaccurate.<!-- | -->|{{#ifexpr:{{{2}}} < 500|({{{1}}}/{{{2}}}). Low data; Abundance may be inaccurate.<!-- | ||
-->|({{{1}}}/{{{2}}}). High data; Abundance should be accurate.}}}}<!-- | -->|({{{1}}}/{{{2}}}). High data; Abundance should be accurate.}}}}<!-- | ||
-->|{{#ifexpr:{{{2}}} < 100|[[File:Warning.png|20px|More data needed.|link= | Evaluate the percentage and display as text | ||
-->|{{#ifexpr:({{{1}}} / {{{2}}} * 100) <= 1|[[ | -->|{{#ifexpr:{{{2}}} < 100|[[File:Warning.png|20px|More data needed.|link=HorizonXI:Drop Rate Policy]]<!-- | ||
-->|{{#ifexpr:({{{1}}} / {{{2}}} * 100) <= 5|[[ | -->|{{#ifexpr:({{{1}}} / {{{2}}} * 100) <= 1|[[HorizonXI:Drop Rate Policy|Extremely Rare]]<!-- | ||
-->|{{#ifexpr:({{{1}}} / {{{2}}} * 100) <= 10|[[ | -->|{{#ifexpr:({{{1}}} / {{{2}}} * 100) <= 5|[[HorizonXI:Drop Rate Policy|Very Rare]]<!-- | ||
-->|{{#ifexpr:({{{1}}} / {{{2}}} * 100) <= 15|[[ | -->|{{#ifexpr:({{{1}}} / {{{2}}} * 100) <= 10|[[HorizonXI:Drop Rate Policy|Rare]]<!-- | ||
-->|{{#ifexpr:({{{1}}} / {{{2}}} * 100) <= 20|[[ | -->|{{#ifexpr:({{{1}}} / {{{2}}} * 100) <= 15|[[HorizonXI:Drop Rate Policy|Uncommon]]<!-- | ||
-->|{{#ifexpr:({{{1}}} / {{{2}}} * 100) <= 50|[[ | -->|{{#ifexpr:({{{1}}} / {{{2}}} * 100) <= 20|[[HorizonXI:Drop Rate Policy|Common]]<!-- | ||
-->|[[ | -->|{{#ifexpr:({{{1}}} / {{{2}}} * 100) <= 50|[[HorizonXI:Drop Rate Policy|Very Common]]<!-- | ||
-->|[[HorizonXI:Drop Rate Policy|Extremely Common]]<!-- | |||
-->}}}}}}}}}}}}}}<!-- | -->}}}}}}}}}}}}}}<!-- | ||
Evaluate and display the percentage | |||
--><sup>({{#expr:{{{1}}} / {{{2}}} * 100 round 1}}{{#if: {{{CI|}}}|{{ConfidenceInterval|{{{1}}}|{{{2}}}}}|}}%)</sup><!-- | --><sup>({{#expr:{{{1}}} / {{{2}}} * 100 round 1}}{{#if: {{{CI|}}}|{{ConfidenceInterval|{{{1}}}|{{{2}}}}}|}}%)</sup><!-- | ||
Line 29: | Line 33: | ||
[[Category:Templates|{{PAGENAME}}]] | [[Category:Templates|{{PAGENAME}}]] | ||
==Usage== | ==Usage== | ||
''This section describes how the Abundance template works. If you are looking for rules and guidelines on use, see [[ | ''This section describes how the Abundance template works. If you are looking for rules and guidelines on use, see [[HorizonXI:Drop Rate Policy]].'' | ||
<pre> | <pre> | ||
{{Abundance|total items obtained|total attempts to obtain}} | {{Abundance|total items obtained|total attempts to obtain}} | ||
Line 61: | Line 65: | ||
|} | |} | ||
*The abundance is also displayed as a percent value after the text (in superscript) and the exact number of items obtained and attempts to obtain the item are displayed in the hovertext, as well as a message describing the data's current reliablity. | *The abundance is also displayed as a percent value after the text (in superscript) and the exact number of items obtained and attempts to obtain the item are displayed in the hovertext, as well as a message describing the data's current reliablity. | ||
*If the data is too low to be considered reliable (less than 50 attempts), the abundance percent will be colored gray and [[File:Warning.png|20px|More data needed|link= | *If the data is too low to be considered reliable (less than 50 attempts), the abundance percent will be colored gray and [[File:Warning.png|20px|More data needed|link=HorizonXI:Drop Rate Policy]] will be displayed in place of the usual text. | ||
*If the data is low, but not completely unreliable (less than 500 attempts), the abundance percent will simply be colored gray. | *If the data is low, but not completely unreliable (less than 500 attempts), the abundance percent will simply be colored gray. | ||
*"Map" (case-insensitive) can be used as the "number of items" value to display "''Received if not previously obtained''". | *"Map" (case-insensitive) can be used as the "number of items" value to display "''Received if not previously obtained''". |
Latest revision as of 15:49, 28 February 2024
Usage
This section describes how the Abundance template works. If you are looking for rules and guidelines on use, see HorizonXI:Drop Rate Policy.
{{Abundance|total items obtained|total attempts to obtain}}
- This template is used to collect and present rarity/abundance data. It is intended to collect data from multiple users and keep a running total (new results are added to the existing totals rather than replacing them), thus becoming more accurate over time.
- The template automatically displays the general rarity of the item using the following ranges:
Abundance Range Extremely Rare 0 - 1% Very Rare 1 - 5% Rare 5 - 10% Uncommon 10 - 15% Common 15 - 20% Very Common 20 - 50% Extremely Common 50 - 100%
- The abundance is also displayed as a percent value after the text (in superscript) and the exact number of items obtained and attempts to obtain the item are displayed in the hovertext, as well as a message describing the data's current reliablity.
- If the data is too low to be considered reliable (less than 50 attempts), the abundance percent will be colored gray and will be displayed in place of the usual text.
- If the data is low, but not completely unreliable (less than 500 attempts), the abundance percent will simply be colored gray.
- "Map" (case-insensitive) can be used as the "number of items" value to display "Received if not previously obtained".
- "Quest" (case-insensitive) can be used as the "number of items" value to display "Received with quest active".
- optional parameter CI has been added to display a 95% confidence interval. Setting it to true, e.g. {{Abundance|98|232|CI=true}} will display the confidence interval in the output.
Examples
Code | Result | Result with CI |
---|---|---|
{{Abundance|map}} |
Received if not previously obtained | Received if not previously obtained |
{{Abundance|quested}} |
Received with quest active | Received with quest active |
{{Abundance||}} |
(0%) | (0%) |
{{Abundance|0|0}} |
(0%) | (0%) |
{{Abundance|0|5}} |
(0%) | (0+/-60%) |
{{Abundance|1|10}} |
(10%) | (10+/-30%) |
{{Abundance|2|1503}} |
Extremely Rare(0.1%) | Extremely Rare(0.1+/-0.2%) |
{{Abundance|24|153}} |
Common(15.7%) | Common(15.7+/-5.8%) |
{{Abundance|100|344}} |
Very Common(29.1%) | Very Common(29.1+/-4.8%) |
{{Abundance|443|562}} |
Extremely Common(78.8%) | Extremely Common(78.8+/-3.4%) |
{{Abundance|11|625}} |
Very Rare(1.8%) | Very Rare(1.8+/-1%) |
{{Abundance|108|110}} |
Extremely Common(98.2%) | Extremely Common(98.2+/-2.7%) |