Template:Item/CoreStats: Difference between revisions

From Caves of Qud Wiki
Jump to navigation Jump to search
mNo edit summary
(support penetratingammo)
 
(20 intermediate revisions by the same user not shown)
Line 7: Line 7:
     PV:
     PV:


-->{{#if: {{{pv|}}}{{{maxpv|}}}
-->{{#if: {{{pv|}}}{{{maxpv|}}}{{{vibro|}}}
|<div class="qud-item-stats-entry qud-tooltip"><!--
|<div class="qud-item-stats-entry-wrap"><div class="qud-item-stats-entry qud-tooltip"><!--
--><div class="qud-item-stat-symbol">{{PV}}</div><!--
--><div class="qud-item-stat-symbol">{{#if:{{{penetratingammo|}}}|{{PV|pierce}}|{{PV}}}}</div><!--
--><div class="qud-item-stat-value">{{{pv|4}}}<span class="qud-max-pv">/{{{maxpv|4}}}</span></div><!--
--><div class="qud-item-stat-value">{{#ifeq: {{{vibro|}}} | yes | <span class="symbol-vibro">≈</span> | {{{pv|4}}}{{#ifeq:{{{missile|no}}}|yes||{{#ifeq:{{{thrown|no}}}|yes||<span class="qud-max-pv">/{{{maxpv|4}}}</span>}}}} }}</div><!--
--><span class="qud-tooltip-text">[[PV]]<span class="qud-max-pv">/Max PV</span></span><!--
--><span class="qud-tooltip-text">{{#ifeq: {{{vibro|}}} | yes | Adaptive PV<br>([[Vibro]]){{#ifeq:{{{thrown|no}}}|yes|<br><span class="qud-thrown-pv-txt">when thrown</span>}} | <span class="qud-pv-tooltip-text">[[Penetration (PV)|PV]]{{#ifeq:{{{missile|no}}}|yes||{{#ifeq:{{{thrown|no}}}|yes|<span class="qud-thrown-pv-txt">&nbsp;(thrown)</span>|<span class="qud-max-pv">/Max PV</span>}}}}</span>}}</span><!--
--></div>
--></div></div>
}}<!--
}}<!--


Line 18: Line 18:


-->{{#if: {{{damage|}}}
-->{{#if: {{{damage|}}}
|<div class="qud-item-stats-entry qud-tooltip"><!--
|<div class="qud-item-stats-entry-wrap"><div class="qud-item-stats-entry qud-tooltip"><!--
--><div class="qud-item-stat-symbol">{{heart}}</div><!--
--><div class="qud-item-stat-symbol">{{#ifeq: {{{damageelement|}}} | Electric | {{heart|W}} | {{heart}} }}</div><!--
--><div class="qud-item-stat-value">{{{damage}}}</div><!--
--><div class="qud-item-stat-value">{{{damage}}}</div><!--
--><span class="qud-tooltip-text">[[Damage]]</span><!--
--><span class="qud-tooltip-text"><div>[[Damage]]{{#ifeq:{{{thrown|no}}}|yes|<span class="qud-thrown-pv-txt">&nbsp;(thrown)</span>}}</div>{{#invoke:dice/Format | diceStats | roll = {{{damage}}} | template = Tooltip_dice_mean_string}}{{#invoke:dice/Format | diceStats | roll = {{{damage}}} | template = Tooltip_dice_range_string}}</span><!--
--></div>
--></div></div>
}}<!--
}}<!--


Line 28: Line 28:


-->{{#if: {{{av|}}}
-->{{#if: {{{av|}}}
|<div class="qud-item-stats-entry qud-tooltip"><!--
|<div class="qud-item-stats-entry-wrap"><div class="qud-item-stats-entry qud-tooltip"><!--
--><div class="qud-item-stat-symbol">{{AV}}</div><!--
--><div class="qud-item-stat-symbol">{{AV}}</div><!--
--><div class="qud-item-stat-value">{{{av}}}</div><!--
--><div class="qud-item-stat-value">{{{av}}}</div><!--
--><span class="qud-tooltip-text">[[AV|Armor Value]]</span><!--
--><span class="qud-tooltip-text">[[Armor (AV)|Armor Value]]</span><!--
--></div>
--></div></div>
}}<!--
}}<!--


Line 38: Line 38:


-->{{#if: {{{dv|}}}
-->{{#if: {{{dv|}}}
|<div class="qud-item-stats-entry qud-tooltip"><!--
|<div class="qud-item-stats-entry-wrap"><div class="qud-item-stats-entry qud-tooltip"><!--
--><div class="qud-item-stat-symbol">{{DV}}</div><!--
--><div class="qud-item-stat-symbol">{{DV}}</div><!--
--><div class="qud-item-stat-value">{{{dv}}}</div><!--
--><div class="qud-item-stat-value">{{{dv}}}</div><!--
--><span class="qud-tooltip-text">[[DV|Dodge Value]]</span><!--
--><span class="qud-tooltip-text">[[DV|Dodge Value]]</span><!--
--></div>
--></div></div>
}}<!--
 
    VALUE:
 
-->{{#if: {{{value|}}}
|<div class="qud-item-stats-entry-wrap"><div class="qud-item-stats-entry qud-tooltip"><!--
--><div class="qud-item-stat-symbol {{#ifeq: {{{currency|no}}}|yes|symbol-dram-trade|symbol-dram}}">$</div><!--
--><div class="qud-item-stat-value">{{#if:{{#pos:{{{value}}}|.}}|{{{value}}}|{{{value}}}.00}}</div><!--
--><span class="qud-tooltip-text">{{#ifeq: {{{currency|no}}}|yes|[[:Category:Trade_Goods|Trade Value]]|[[Commerce|Commerce Value]]}}</span><!--
--></div></div>
}}<!--
}}<!--


Line 48: Line 58:


-->{{#if: {{{weight|}}}
-->{{#if: {{{weight|}}}
|<div class="qud-item-stats-entry qud-tooltip"><!--
|<div class="qud-item-stats-entry-wrap"><div class="qud-item-stats-entry qud-tooltip"><!--
--><div class="qud-item-stat-value">{{{weight}}}</div><!--
--><div class="qud-item-stat-value">{{{weight}}}</div><!--
--><div class="qud-item-stat-symbol symbol-lb">{{#ifeq: {{{weight}}} | 1 | lb. | lbs.}}</div><!--
--><div class="qud-item-stat-symbol symbol-lb">{{#ifeq: {{{weight}}} | 1 | lb. | lbs.}}</div><!--
--><span class="qud-tooltip-text">Weight</span><!--
--><span class="qud-tooltip-text">Weight</span><!--
--></div>
--></div></div>
}}<!--
 
    VALUE:
 
-->{{#if: {{{value|}}}
|<div class="qud-item-stats-entry qud-tooltip"><!--
--><div class="qud-item-stat-symbol symbol-dram">$</div><!--
--><div class="qud-item-stat-value">{{{value}}}.00</div><!--
--><span class="qud-tooltip-text">[[Commerce|Raw Value]]</span><!--
--></div>
}}<!--
}}<!--


Line 68: Line 68:


--></div></includeonly><noinclude>
--></div></includeonly><noinclude>
Outputs an item's core stats. Intended for use in [[Template:Item].
Outputs an item's core stats. Intended for use in [[Template:Item]].


All parameters are optional.
All parameters are optional.
Line 75: Line 75:
{{Item/CoreStats
{{Item/CoreStats
| pv = 4
| pv = 4
| maxpv = 6
| maxpv = 6             <!-- if not specified, but pv is specified, 4 is used for this by default -->
| damage = 2d3
| vibro = no            <!-- if yes, vibro penetration symbol is shown and pv/maxpv are ignored -->
| penetratingammo = no  <!-- if yes, penetration arrow symbol is yellow (ex: Eigenrifle) -->
| missile = no          <!-- if yes, maxpv won't be shown, because it's not applicable to missile weapons -->
| thrown = no            <!-- if yes, maxpv won't be shown, because it's not applicable to thrown weapons -->
| damage = 2d3           <!-- also supports "damageelement" parameter; if equal to "Electric" will show a yellow heart instead of red -->
| av = 3
| av = 3
| dv = 2
| dv = 2
| weight = 10
| weight = 10
| value = 50
| value = 50
| currency = no          <!-- if yes, currency symbol is yellow and tooltip link goes to the Trade Goods page instead of the Commerce page -->
}}
}}
</syntaxhighlight>
</syntaxhighlight>
Line 95: Line 100:
}}
}}
</div>
</div>
== other examples ==
=== {{favilink|copper nugget}} ===
<div style="width: 270px;font-size:90%;margin:1em 1em 4em 1em;color:var(--qud-color-y);">
{{Item/CoreStats
| weight = 1
| value = 10
| currency = yes
}}
</div>
=== {{favilink|ceremonial vibrokhopesh}} ===
<div style="width: 270px;font-size:90%;margin:1em 1em 4em 1em;color:var(--qud-color-y);">
{{Item/CoreStats
| pv = 4
| maxpv = 4
| vibro = yes
| damage = 1d10+2
| weight = 5
| value = 255
}}
</div>
=== {{favilink|swarm rack}} ===
<div style="width: 270px;font-size:90%;margin:1em 1em 4em 1em;color:var(--qud-color-y);">
{{Item/CoreStats
| pv = 17
| maxpv = 17
| missile = yes
| damage = 3d6
| weight = 1500
| value = 300
}}
</div>
=== {{favilink|point-defense drone}} ===
<div style="width: 270px;font-size:90%;margin:1em 1em 4em 1em;color:var(--qud-color-y);">
{{Item/CoreStats
| pv = 9
| maxpv = 9
| damage = 1d10
| av = 0
| dv = 0
| weight = 5
| value = 800
| missile = yes
}}
</div>
=== {{Qud text|arc winder}} ===
<div style="width: 270px;font-size:90%;margin:1em 1em 4em 1em;color:var(--qud-color-y);">
{{Item/CoreStats
| damage = 4d4
| damageelement = Electric
| weight = 4
| value = 750
| missile = yes
}}
</div>
=== {{Qud text|eigenrifle}} ===
<div style="width: 270px;font-size:90%;margin:1em 1em 4em 1em;color:var(--qud-color-y);">
{{Item/CoreStats
| pv = 12
| maxpv = 12
| penetratingammo = yes
| damage = 1d12
| weight = 12
| value = 750
| missile = yes
}}
</div>
=== {{favilink|campfire}} ===
<div style="width: 270px;font-size:90%;margin:1em 1em 4em 1em;color:var(--qud-color-y);">
{{Item/CoreStats
| weight = 30
| value = 0.01
}}
</div>
</noinclude>
</noinclude>

Latest revision as of 19:58, 5 October 2021

Outputs an item's core stats. Intended for use in Template:Item.

All parameters are optional.

{{Item/CoreStats
| pv = 4
| maxpv = 6              <!-- if not specified, but pv is specified, 4 is used for this by default -->
| vibro = no             <!-- if yes, vibro penetration symbol is shown and pv/maxpv are ignored -->
| penetratingammo = no   <!-- if yes, penetration arrow symbol is yellow (ex: Eigenrifle) -->
| missile = no           <!-- if yes, maxpv won't be shown, because it's not applicable to missile weapons -->
| thrown = no            <!-- if yes, maxpv won't be shown, because it's not applicable to thrown weapons -->
| damage = 2d3           <!-- also supports "damageelement" parameter; if equal to "Electric" will show a yellow heart instead of red -->
| av = 3
| dv = 2
| weight = 10
| value = 50
| currency = no          <!-- if yes, currency symbol is yellow and tooltip link goes to the Trade Goods page instead of the Commerce page -->
}}
4/6
PV/Max PV
♥
2d3
average: 4range: 2-6
♦
3
Armor Value
○
2
Dodge Value
$
50.00
Commerce Value
10
lbs.
Weight



other examples

copper nugget

$
10.00
Trade Value
1
lb.
Weight

ceremonial vibrokhopesh

Adaptive PV
(Vibro)
♥
1d10+2
average: 7.5range: 3-12
$
255.00
Commerce Value
5
lbs.
Weight

swarm rack

17
PV
♥
3d6
average: 10.5range: 3-18
$
300.00
Commerce Value
1500
lbs.
Weight

point-defense drone

9
PV
♥
1d10
average: 5.5range: 1-10
♦
0
Armor Value
○
0
Dodge Value
$
800.00
Commerce Value
5
lbs.
Weight

arc winder

♥
4d4
average: 10range: 4-16
$
750.00
Commerce Value
4
lbs.
Weight

eigenrifle

12
PV
♥
1d12
average: 6.5range: 1-12
$
750.00
Commerce Value
12
lbs.
Weight

campfire

$
0.01
Commerce Value
30
lbs.
Weight