模板:Qualityprice:修订间差异
来自星露谷物语扩展百科
更多语言
更多操作
删除的内容 添加的内容
doc, untranslated |
无编辑摘要 |
||
| (未显示3个用户的8个中间版本) | |||
| 第1行: | 第1行: | ||
<includeonly><!-- |
|||
<includeonly>{{#ifeq:{{lc:{{{dsv|}}}}}|false||<span style="display: none;">data-sort-value="{{#invoke:Calcsellprice|csp |
|||
| ⚫ | |||
|im = {{{1|}}} <!-- image --> |
|im = {{{1|}}} <!-- image --> |
||
|bp = {{#expr:{{{2|0}}}}} <!-- base price --> |
|bp = {{#expr:{{{2|0}}}}} <!-- base price --> |
||
|q = 0 <!-- quality = normal --> |
|q = 0 <!-- quality = normal --> |
||
|pm = {{{pm|1}}} <!-- profession multiplier --> |
|pm = {{{pm|1}}} <!-- profession multiplier --> |
||
|ll = {{CONTENTLANG}} <!-- local language --> |
|||
|fm = false <!-- format number? --> |
|fm = false <!-- format number? --> |
||
}} |
}}}}"> |
||
| ⚫ | |||
{{#if:{{#pos:{{{hide|}}}|normal}}|| |
{{#if:{{#pos:{{{hide|}}}|normal}}|| |
||
{{#switch:{{{quality|all}}} |
{{#switch:{{{quality|all}}} |
||
| 第13行: | 第12行: | ||
<tr> |
<tr> |
||
<td>{{Overlayimg|{{{1|Blank icon}}}|width=24|center=true|type=star|quality=0}}</td> |
<td>{{Overlayimg|{{{1|Blank icon}}}|width=24|center=true|type=star|quality=0}}</td> |
||
<td>{{#iferror:{{#expr:{{{2|}}}}}|{{{2|}}}|{{#invoke: |
<td>{{#iferror:{{#expr:{{{2|}}}}}|{{{2|}}}|{{#invoke:Templates|csp |
||
|im = {{{1|}}} <!-- image --> |
|im = {{{1|}}} <!-- image --> |
||
|bp = {{#expr:{{{2|0}}}}} <!-- base price --> |
|bp = {{#expr:{{{2|0}}}}} <!-- base price --> |
||
|q = 0 <!-- normal quality --> |
|q = 0 <!-- normal quality --> |
||
|pm = {{{pm|1}}} <!-- profession multiplier --> |
|pm = {{{pm|1}}} <!-- profession multiplier --> |
||
|ll = {{CONTENTLANG}} <!-- local language --> |
|||
|fm = true <!-- format number? --> |
|fm = true <!-- format number? --> |
||
}} }} |
}} }} |
||
| 第29行: | 第27行: | ||
<tr> |
<tr> |
||
<td>{{Overlayimg|{{{1|Blank icon}}}|width=24|center=true|type=star|quality=1}}</td> |
<td>{{Overlayimg|{{{1|Blank icon}}}|width=24|center=true|type=star|quality=1}}</td> |
||
<td>{{#iferror:{{#expr:{{{2|}}}}}|{{{2|}}}|{{#invoke: |
<td>{{#iferror:{{#expr:{{{2|}}}}}|{{{2|}}}|{{#invoke:Templates|csp |
||
|im = {{{1|}}} <!-- image --> |
|im = {{{1|}}} <!-- image --> |
||
|bp = {{#expr:{{{2|0}}}}} <!-- base price --> |
|bp = {{#expr:{{{2|0}}}}} <!-- base price --> |
||
|q = 1 <!-- silver quality --> |
|q = 1 <!-- silver quality --> |
||
|pm = {{{pm|1}}} <!-- profession multiplier --> |
|pm = {{{pm|1}}} <!-- profession multiplier --> |
||
|ll = {{CONTENTLANG}} <!-- local language --> |
|||
|fm = true <!-- format number? --> |
|fm = true <!-- format number? --> |
||
}} }} |
}} }} |
||
| 第45行: | 第42行: | ||
<tr> |
<tr> |
||
<td>{{Overlayimg|{{{1|Blank icon}}}|width=24|center=true|type=star|quality=2}}</td> |
<td>{{Overlayimg|{{{1|Blank icon}}}|width=24|center=true|type=star|quality=2}}</td> |
||
<td>{{#iferror:{{#expr:{{{2|}}}}}|{{{2|}}}|{{#invoke: |
<td>{{#iferror:{{#expr:{{{2|}}}}}|{{{2|}}}|{{#invoke:Templates|csp |
||
|im = {{{1|}}} <!-- image --> |
|im = {{{1|}}} <!-- image --> |
||
|bp = {{#expr:{{{2|0}}}}} <!-- base price --> |
|bp = {{#expr:{{{2|0}}}}} <!-- base price --> |
||
|q = 2 <!-- gold quality --> |
|q = 2 <!-- gold quality --> |
||
|pm = {{{pm|1}}} <!-- profession multiplier --> |
|pm = {{{pm|1}}} <!-- profession multiplier --> |
||
|ll = {{CONTENTLANG}} <!-- local language --> |
|||
|fm = true <!-- format number? --> |
|fm = true <!-- format number? --> |
||
}} }} |
}} }} |
||
| 第61行: | 第57行: | ||
<tr> |
<tr> |
||
<td>{{Overlayimg|{{{1|Blank icon}}}|width=24|center=true|type=star|quality=4}}</td> |
<td>{{Overlayimg|{{{1|Blank icon}}}|width=24|center=true|type=star|quality=4}}</td> |
||
<td>{{#iferror:{{#expr:{{{2|}}}}}|{{{2|}}}|{{#invoke: |
<td>{{#iferror:{{#expr:{{{2|}}}}}|{{{2|}}}|{{#invoke:Templates|csp |
||
|im = {{{1|}}} <!-- image --> |
|im = {{{1|}}} <!-- image --> |
||
|bp = {{#expr:{{{2|0}}}}} <!-- base price --> |
|bp = {{#expr:{{{2|0}}}}} <!-- base price --> |
||
|q = 4 <!-- iridium quality --> |
|q = 4 <!-- iridium quality --> |
||
|pm = {{{pm|1}}} <!-- profession multiplier --> |
|pm = {{{pm|1}}} <!-- profession multiplier --> |
||
|ll = {{CONTENTLANG}} <!-- local language --> |
|||
|fm = true |
|fm = true |
||
}} }} |
}} }} |
||
</td> |
</td> |
||
</tr> |
</tr> |
||
}} }} }}</table></includeonly><noinclude>{{ |
}} }} }}</table></includeonly><noinclude>{{Documentation}}</noinclude> |
||
==描述== |
|||
这个模板用于显示物品多种品质下的售出价格,并且能够根据使用的需要进行格式化。这个模板采用了物品的图标(带有星级标记),而非金币图标。图标的大小为24px。 |
|||
'''(另注:该模板参数只接受物品的英文名称。若给定的是物品的中文名称,则物品图标无法正常显示,部分物品还可能因公式设定出现计算错误的情况。)''' |
|||
==参数== |
|||
{|class="wikitable sortable" |
|||
|- |
|||
!参数 |
|||
!提示 |
|||
|- |
|||
|First (unnamed) parameter |
|||
|Name of image (minus ".png") |
|||
|- |
|||
|Second (unnamed) parameter |
|||
|Normal/base sell price of item (can be found in <samp>ObjectInformation.xnb</samp>)<br />''or''<br />Normal/base sell price of item used to make [[工匠物品]] (see examples below)<br />Note: also accepts non-numbers such as "3x base fruit price" without throwing an error |
|||
|- |
|||
|quality |
|||
|Single quality to display.<br />Defaults to all qualities (normal, silver, gold, iridium) if omitted.<br />'''Note:''' Instead of specifying 3 qualities to show, use the "hide" parameter with one quality instead.<br />Items that exist in normal quality only do not have to specify <samp>quality=normal</samp> (''i.e.,'' [[山洞萝卜]], [[姜]], [[绿茶]], [[蜂蜜]], [[果酱和腌菜|果酱]], [[果汁]], [[油]], [[果酱和腌菜|腌菜]], [[齐瓜]], and [[茶叶]])<div style="font-size: smaller;">''Note: Other items may be added in the future. In the meantime, specifying <samp>quality=normal</samp> will work.''</div> |
|||
|- |
|||
|hide |
|||
|Qualities to hide<br />(''e.g.,'' <samp>hide=silver,gold</samp>) |
|||
|- |
|||
|pm |
|||
|Profession modifier<br />[[技能#耕种|Tiller]] gives a 10% bonus, so specify <samp>pm=1.1</samp><br />[[技能#钓鱼|Angler]] gives a 50% bonus, so specify <samp>pm=1.5</samp><br />etc. |
|||
|- |
|||
|dsv |
|||
|data-sort-value<br />Set to <samp>false</samp> if the quality price(s) are displayed in a non-sortable structure (like an infobox)<br />Default value is true (the entire parameter can be omitted if a data-sort-value is desired). |
|||
|- |
|||
|} |
|||
==举例== |
|||
{|class="wikitable sortable" |
|||
|- |
|||
!代码 |
|||
!显示效果 |
|||
|- |
|||
|<code><nowiki>{{Qualityprice|Melon|250}}</nowiki></code> |
|||
|{{Qualityprice|Melon|250}} |
|||
|- |
|||
|<code><nowiki>{{Qualityprice|Parsnip|35|pm=1.1}}</nowiki></code> |
|||
|{{Qualityprice|Parsnip|35|pm=1.1}} |
|||
|- |
|||
|<code><nowiki>{{Qualityprice|Ginger|60}}</nowiki></code> |
|||
|{{Qualityprice|Ginger|60}} |
|||
|- |
|||
|<code><nowiki>{{Qualityprice|Goat Cheese|400|hide=normal,silver}}</nowiki></code> |
|||
|{{Qualityprice|Goat Cheese|400|hide=normal,silver}} |
|||
|- |
|||
|<code><nowiki>{{Qualityprice|Large Goat Milk FR|345}}</nowiki></code> |
|||
|{{Qualityprice|Large Goat Milk FR|345}} |
|||
|- |
|||
|<code><nowiki>{{Qualityprice|Juice|260}}</nowiki></code><br />(The base sell price of [[红叶卷心菜]] is 260,<br />and the base sell price of 红叶卷心菜 果汁 is 585) |
|||
|{{Qualityprice|Juice|260}} |
|||
|- |
|||
|<code><nowiki>{{Qualityprice|Wine|750|pm=1.4}}</nowiki></code><br />(The base sell price of [[杨桃]] is 750,<br />and the Artisan base sell price of 杨桃 果酒 is 3,150) |
|||
|{{Qualityprice|Wine|750|pm=1.4}} |
|||
|- |
|||
|<code><nowiki>{{Qualityprice|Honey|30}}</nowiki></code><br />(The base sell price of a [[郁金香]] is 30,<br />and the base sell price of 郁金香 蜂蜜 is 160) |
|||
|{{Qualityprice|Honey|30}} |
|||
|- |
|||
|} |
|||
</noinclude> |
|||
2026年1月12日 (一) 21:08的最新版本
描述
该模板用于显示指定品质物品的价格,并根据显示语言进行适当格式化。物品图像(包含品质星级)将替代金币图标显示,图片尺寸固定为 24 像素。
参数
| 参数 | 说明 |
|---|---|
| 第一个(未命名)参数 | 图片名称(传入的参数含有 .png 后缀时会自动移除) |
| 第二个(未命名)参数 | 物品基础售价(可在 ObjectInformation.xnb 文件中查找) 或 制作工匠物品所用原料的基础售价(参见下方示例) 注:可接受非数字值(如 3x base fruit price),不会引发错误 |
| quality | 指定显示单个品质等级 默认显示全部品质(普通、银星、金星、铱星) 仅存在普通品质的物品无需指定(如山洞萝卜、姜、绿茶、蜂蜜、果酱、果汁、油、腌菜、齐瓜、茶叶等) 注:未来可能添加其他物品。当前可通过 quality=normal 或 quality=0 强制指定普通品质
|
| hide | 需要隐藏的品质等级 (例:hide=silver,gold 隐藏银星和金星) |
| pm | 职业修正系数 农耕人 +10% 售价:pm=1.1 垂钓者 +50% 售价:pm=1.5 |
| dsv | 数据排序值控制 设置为 false 时禁用排序功能(适用于信息框等非排序结构) 默认 true(需要排序时可省略此参数) |
示例
| 模板调用 | 效果 | ||||||||
|---|---|---|---|---|---|---|---|---|---|
{{Qualityprice|Melon|250}}
|
| ||||||||
{{Qualityprice|Parsnip|35|pm=1.1}}
|
| ||||||||
{{Qualityprice|Ginger|60}}
|
| ||||||||
{{Qualityprice|Goat Cheese|400|hide=normal,silver}}
|
| ||||||||
{{Qualityprice|Large Goat Milk FR|345}}
|
| ||||||||
{{Qualityprice|Juice|260}}(红叶卷心菜基础售价260, 红叶卷心菜果汁基础售价585) |
| ||||||||
{{Qualityprice|Purple Juice|260|quality=0}}(使用彩色图标时必须指定 quality=normal 或 quality=0) |
| ||||||||
{{Qualityprice|Wine|750|pm=1.4}}(杨桃基础售价750, 杨桃葡萄酒工匠基础售价3150) |
| ||||||||
{{Qualityprice|Honey|30}}(郁金香基础售价30, 郁金香蜂蜜基础售价160) |
|
[ 查看 | 编辑 | 历史 | 刷新 ]上述文档的内容来自模板:Qualityprice/doc。