注意:1.4.5 的更新内容量较大,页面上很可能仍有内容尚未更新。
如中文 wiki 信息过时,可以参考英文 wiki 对应页面。
Terraria Wiki:项目/1.4.5 获取 wiki 状态与更新指南

Template:Bestiary entries

来自Terraria Wiki
跳转到导航 跳转到搜索
This template is i18n-ready, which means it is easy to localize for different languages. Please see I18n & l10n for templates to learn more.
See Template:Bestiary entries/l10n for the localization of this template.
Important.svg
CAUTION: Terraria Wiki code is complex!!!
If you want to use this code on another wiki, wiki.gg staff are not able to assist you.
Please consider picking a different wiki to adapt code from, or making your own templates!
Remember that content on a wiki is more important than fancy formatting.
Template-info.svg 文档 以下文档来自Template:Bestiary entries/doc。(编辑 | 历史

This template displays the number of Bestiary entries that corresponds to a given progress percentage.

Often, certain conditions etc. are only given in percentages, but this information is less useful than a specific number of entries. This template facilitates quickly appending that number. Furthermore, it will update the number automatically should the total number of entries change in a later update.

{{b entries}} is an alias for {{bestiary entries}}.

Usage

{{ b entries | <progress percentage> | <unit> }}

First unnamed parameter

Ratio expression, such percent, fractal, etc., see examples below. The result will be rounded up to the next integer. The template will not output anything if this parameter is invalid.

Second unnamed parameter

If set, the template appends the unit ("entry"/"entries"). The parameter can be set to any value, but it should be entry or entries for clarity.

Examples

Code Result
{{b entries|31%}} 170
{{b entries|31%|entry}} 170 个条目
{{b entries|0|entry}} 0 个条目
{{b entries|0.1%|entry}} 1 个条目
{{b entries|31%|entries}} 170 个条目
{{b entries|31%|true}} 170 个条目
{{b entries|100%}} (total number of entries) 546
{{b entries|0%}} 0
{{b entries|0}} 0
{{b entries|0.00}} 0
{{b entries|3.1415%}} 18
{{b entries|0.31}} 170
{{b entries|1/4}} 137
{{b entries|20%+5%}} 137
{{b entries|50%/2}} 137
{{b entries|0.2+1/20}} 137
{{b entries|-20%}} (invalid)
{{b entries|120%}} (invalid)
{{b entries|2}} (invalid, same as 200%)
{{b entries|120%|entries}} (invalid) ? entries
Once 31% of the Bestiary has been filled ({{b entries|31%|entries}}), ... Once 31% of the Bestiary has been filled (170 个条目), ...
Filling 170 Bestiary entries is equivalent to {{percent|170/{{b entries|100%}}}} completion. Filling 170 Bestiary entries is equivalent to 31.14% completion.
3.1415% of 546 would be 17.15259, but is rounded up: {{b entries|3.1415%}} 3.1415% of 546 would be 17.15259, but is rounded up: 18