Template:Item: Difference between revisions

1,171 bytes removed ,  00:10, 18 December 2020
m
Reverted edits by Egocarib (talk) to last revision by Teamtoto
(Add artifact data storage)
m (Reverted edits by Egocarib (talk) to last revision by Teamtoto)
Line 8: Line 8:
|Ammo=Page|Accuracy=Integer|Shots=Integer|MaxAmmo=Integer
|Ammo=Page|Accuracy=Integer|Shots=Integer|MaxAmmo=Integer
|MaxVolume=Integer|LiquidGen=Integer|LiquidType=String
|MaxVolume=Integer|LiquidGen=Integer|LiquidType=String
|Seeping=Boolean
|MaxCharge=Integer|ChargeUsed=Integer|ChargePerDram=Integer
|MaxCharge=Integer|ChargeUsed=Integer|ChargePerDram=Integer
|Complexity=Integer
|Complexity=Integer
Line 24: Line 23:
|WornOn=Page|UsesSlots=List (,) of Page
|WornOn=Page|UsesSlots=List (,) of Page
|Healing=String
|Healing=String
|ChairLevel=Integer
|HarvestedInto=Page|PreservedInto=Page|PreservedQuantity=Integer
|HarvestedInto=Page|PreservedInto=Page|PreservedQuantity=Integer
|ElementalDamage=String
|ElementalDamage=String
Line 45: Line 43:
|Accuracy={{{accuracy|}}}
|Accuracy={{{accuracy|}}}
|Shots={{{shots|}}}|MaxAmmo={{{maxammo|}}}
|Shots={{{shots|}}}|MaxAmmo={{{maxammo|}}}
|MaxVolume={{{maxvol|}}}|LiquidGen={{{liquidgen|}}}|LiquidType={{{liquidtype|}}}
|MaxVolume={{{maxvol|}}}|LiquidGen={{{liquidgen|}}}|LiquidType={{{liquidtype|}}}|
|Seeping={{{seeping|}}}
MaxCharge={{{maxcharge|}}}|ChargeUsed={{{chargeused|}}}|ChargePerDram={{{chargeperdram|}}}
|MaxCharge={{{maxcharge|}}}|ChargeUsed={{{chargeused|}}}|ChargePerDram={{{chargeperdram|}}}
|Complexity={{{complexity|}}}
|Complexity={{{complexity|}}}
|Bits={{{bits|}}}
|Bits={{{bits|}}}
Line 64: Line 61:
|UsesSlots={{{usesslots|{{{wornon|}}}}}}|
|UsesSlots={{{usesslots|{{{wornon|}}}}}}|
Healing={{{healing|}}}|
Healing={{{healing|}}}|
ChairLevel={{{chairlevel|}}}|
HarvestedInto={{{harvestedinto|}}}|
HarvestedInto={{{harvestedinto|}}}|
PreservedInto={{{preservedinto|}}}|
PreservedInto={{{preservedinto|}}}|
Line 82: Line 78:
|Commerce={{{commerce|}}}
|Commerce={{{commerce|}}}
|DisplayChar={{Qud char|{{{colorstr|&y}}}|{{{renderstr|.}}}}}
|DisplayChar={{Qud char|{{{colorstr|&y}}}|{{{renderstr|.}}}}}
|TileColors={{{tilecolors|}}}
|Weight={{{weight|}}}
|Weight={{{weight|}}}
|Tier={{#if: {{{tier|}}} | {{{tier}}} | {{#if: {{{bits|}}} | {{#sub:{{{bits}}}| -1 }} }} }}
|Tier={{#if: {{{tier|}}} | {{{tier}}} | {{#if: {{{bits|}}} | {{#sub:{{{bits}}}| -1 }} }} }}
Line 92: Line 87:
|Description={{qud text|{{{desc|}}}}} }}<!--
|Description={{qud text|{{{desc|}}}}} }}<!--


   Variable definition for convenience:
   Variable definition for convenience


-->{{#vardefine:name|{{{title|{{#titleparts:{{PAGENAME}}}} }}}}}<!---
-->{{#vardefine:name|{{{title|{{#titleparts:{{PAGENAME}}}} }}}}}<!---


  Artifact Data Storage:
   Infobox Start
 
-->{{ArtifactData|unknownimage={{{unknowntile|}}}|unknownname={{{unknownname|}}}|unknownaltname={{{unknownaltname|}}}}}<!--
 
   Infobox Start:


-->{{#invoke:infobox|infobox
-->{{#invoke:infobox|infobox
| class = qud-item-infobox
| class = qud-item-infobox
| imagearea =
| imagearea = {{#switch: {{{image|none}}} | none = {{#if: {{{renderstr|}}} | <div class{{=}}"qud-displaychar-standin-for-image">{{Qud char|{{{colorstr|&amp;y}}}|{{{renderstr}}}}}</div> | }} | #default = {{#ifexist: File:{{#switch: {{{image|none}}} | none = Caves_of_qud_logo.png | #default = {{{image}}} }} || {{#if: {{{renderstr|}}} | <div class{{=}}"qud-displaychar-standin-for-image">{{Qud char|{{{colorstr|&amp;y}}}|{{{renderstr}}}}}</div> | }} }} }}
{{#if: {{{overrideimages|}}} | {{{overrideimages}}} |
  {{#switch: {{{image|none}}}
  | none = {{#if: {{{renderstr|}}} | <div class{{=}}"qud-displaychar-standin-for-image">{{Qud char|{{{colorstr|&amp;y}}}|{{{renderstr}}}}}</div> | }}
  | #default = {{#ifexist: File:{{#switch: {{{image|none}}} | none = Caves_of_qud_logo.png | #default = {{{image}}} }} |{{#if:{{{gif|}}}|{{infobox image and gif|{{{image}}}|{{{gif}}}|{{PAGENAME}}}}}}| {{#if: {{{renderstr|}}} | <div class{{=}}"qud-displaychar-standin-for-image">{{Qud char|{{{colorstr|&amp;y}}}|{{{renderstr}}}}}</div> | }} }}
  }}
}}
| rows =  
| rows =  
{{#if: {{{pv|}}}{{{maxpv|}}}{{{vibro|}}}{{{damage|}}}{{{av|}}}{{{dv|}}}{{#ifeq:{{{featureweightinfo|}}}|no||{{{weight|}}}}}{{{commerce|}}} |
<!--lists the max pv, with a default base pv of 4. if you want to change the base pv, set pv to(number)-->
  {{infobox row|field=
<!--if you set vibro to yes, it will replace the pv with the match armor value symbol-->
    {{Item/CoreStats
{{#if: {{{pv|}}}{{{vibro|}}}{{{maxpv|}}} | {{infobox row|[[PV]]{{#ifeq: {{{vibro|}}} | yes ||{{Tooltip|Base PV{{Color|K|/Max PV}}}}}}|{{PV}}{{#ifeq: {{{vibro|}}} | yes |{{Tooltip|The penetration of this weapon matches the enemy's armor value.||centered}}|{{{pv|4}}}{{Color | K |/{{{maxpv|{{{pv|4}}} }}} }} }} }} }}
      | pv = {{{pv|}}}
      | maxpv = {{{maxpv|}}}
      | vibro = {{{vibro|}}}
      | missile = {{{ismissile|no}}}
      | thrown = {{{isthrown|no}}}
      | damage = {{{damage|}}}
      | av = {{{av|}}}
      | dv = {{{dv|}}}
      | weight = {{#ifeq:{{{featureweightinfo|}}}|no||{{{weight|}}}}}
      | value = {{{commerce|}}}
      | currency = {{{iscurrency|no}}}
    }}
  }}
}}
<!--does the object have no penetration when unpowered?-->
<!--does the object have no penetration when unpowered?-->
{{#ifeq: {{{pvpowered|}}}|yes| {{infobox row|PV (Unpowered)|{{#if:{{{isthrown|}}}|{{PV}}5|{{PV}}4{{Color | K |/4}} }} }} }}
{{#ifeq: {{{pvpowered|}}}|yes| {{infobox row|PV (Unpowered)|{{PV}}4{{Color | K |/4}} }} }}
{{#if: {{{damage|}}} | {{infobox row|Damage|{{heart}}{{dice tooltip|{{{damage}}}}} }} }}
{{#if: {{{elementaldamage|}}}  | {{infobox row|Elemental Damage|{{heart}}{{dice tooltip|{{{elementaldamage}}}}} {{{elementaltype}}} }} }}
{{#if: {{{elementaldamage|}}}  | {{infobox row|Elemental Damage|{{heart}}{{dice tooltip|{{{elementaldamage}}}}} {{{elementaltype}}} }} }}
{{#if: {{{unpowereddamage|}}}|{{infobox row|Damage(Unpowered)|{{heart}}{{{unpowereddamage|}}} }} }}
{{#if: {{{unpowereddamage|}}}|{{infobox row|Damage(Unpowered)|{{heart}}{{{unpowereddamage|}}} }} }}
{{#if: {{{hp|}}}      | {{infobox row|HP|{{{hp}}} }} }}
{{#if: {{{hp|}}}      | {{infobox row|HP|{{{hp}}} }} }}
{{#if: {{{av|}}}      | {{infobox row|Base [[AV]]|{{AV}}{{{av}}} }} }}
{{#if: {{{dv|}}}      | {{infobox row|Base [[DV]]|{{DV}}{{{dv}}} }} }}
{{#if: {{{ma|}}}      | {{infobox row|Base [[MA]]|{{{ma}}} }} }}
{{#if: {{{ma|}}}      | {{infobox row|Base [[MA]]|{{{ma}}} }} }}
<!-- a number to hit-->
<!-- a number to hit-->
Line 139: Line 113:
<!-- Guns!-->
<!-- Guns!-->
<!--the ammo it needs. lead slugs, arrows, blood, etc. -->
<!--the ammo it needs. lead slugs, arrows, blood, etc. -->
{{#if: {{{ammodamagetypes|}}} | {{infobox row|[[Damage Type]]|{{{ammodamagetypes}}} }} }}
{{#if: {{{ammo|}}}    | {{infobox row|Ammo Type|{{consecutive links|{{{ammo}}}}} }} }}
{{#if: {{{ammo|}}}    | {{infobox row|Ammo Type|{{consecutive links|{{{ammo}}}}} }} }}
{{#if: {{{accuracy|}}}| {{infobox row|Accuracy|{{#switch: {{{accuracy|0}}}|0=Very High|1|2|3|4=High|5|6|7|8|9=Medium|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24=Low|Very Low}} ({{{accuracy}}}) }} }}
{{#if: {{{accuracy|}}}| {{infobox row|Accuracy|{{#switch: {{{accuracy|0}}}|0=Very High|1|2|3|4=High|5|6|7|8|9=Medium|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24=Low|Very Low}} ({{{accuracy}}}) }} }}
Line 147: Line 120:
{{#if: {{{maxvol|}}}  | {{infobox row|Max Volume|{{{maxvol}}} drams }} }}
{{#if: {{{maxvol|}}}  | {{infobox row|Max Volume|{{{maxvol}}} drams }} }}
{{#if: {{{liquidgen|}}}| {{infobox row|Liquid Generation|1 dram of {{{liquidtype}}} every {{{liquidgen}}} turns}} }}
{{#if: {{{liquidgen|}}}| {{infobox row|Liquid Generation|1 dram of {{{liquidtype}}} every {{{liquidgen}}} turns}} }}
<!--gases-->
{{#if: {{{seeping|}}} | {{infobox row|Seeping{{Tooltip|Whether this gas can<br>seep through walls}}|{{{seeping}}} }}
{{infobox row|Inhaled{{Tooltip|Whether this gas is<br>[[respiration|respiration-based]]}}|{{Gas respiration yesno|gasid={{{id}}}}} }}
}}
<!--Generic item stuff-->
<!--Generic item stuff-->
{{#if: {{{maxcharge|}}}|{{infobox row|Max Charge|{{{maxcharge}}} }} }}
{{#if: {{{maxcharge|}}}|{{infobox row|Max Charge|{{{maxcharge}}} }} }}
{{#if: {{{chargeused|}}}  
{{#if: {{{chargeused|}}}  
| {{infobox row|Charge per Use|{{#if: {{{energycellrequired|}}} | {{cell performance for charge|{{{chargeused}}}}} | {{{chargeused}}} }} }}
| {{infobox row|Charge per Use|{{{chargeused}}} }}
{{#if: {{{chargefunction|}}}  | {{infobox row|Charge Used For|{{{chargefunction}}} }} }}
{{#if: {{{chargefunction|}}}  | {{infobox row|Charge Used For|{{{chargefunction}}} }} }}
}}
}}
{{#if: {{{imprintchargecost|}}} | {{infobox row|Imprint Cost{{Tooltip|Charge cost to program a<br>location into this recoiler}}|{{{imprintchargecost}}} }} }}
{{#if: {{{chargeperdram|}}}| {{infobox row|Charge per Dram|{{{chargeperdram}}} }} }}
{{#if: {{{chargeperdram|}}}| {{infobox row|Charge per Dram|{{{chargeperdram}}} }} }}
{{#if: {{{weight|}}}  | {{infobox row|Weight|{{{weight}}}{{pounds}} }} }}
<!--tinkering-->
<!--tinkering-->
{{#if: {{{commerce|}}} | {{infobox row |[[Commerce|Commerce]]|{{{commerce}}} }} }}
{{#if: {{{complexity|}}}| {{infobox row|Complexity|{{{complexity}}} }} }}
{{#if: {{{complexity|}}}| {{infobox row|Complexity|{{{complexity}}} }} }}
{{#if: {{{tier|}}}    | {{#vardefine:TIER|{{{tier}}}}} |
{{#if: {{{tier|}}}    | {{#vardefine:TIER|{{{tier}}}}} |
Line 181: Line 151:
<!--This is more specific stuff-->
<!--This is more specific stuff-->
{{#if: {{{bookid|}}}  | {{infobox row|Book ID|{{{bookid}}} }} }}
{{#if: {{{bookid|}}}  | {{infobox row|Book ID|{{{bookid}}} }} }}
{{#if: {{{chairlevel|}}} | {{infobox row|Chair Level{{Tooltip|Chair level affects the power<br>of the [[sitting]] effect}}|{{{chairlevel}}} }} }}
{{#if: {{{lightradius|}}}| {{infobox row|Light Radius|{{{lightradius}}} }} }}
{{#if: {{{lightradius|}}}| {{infobox row|Light Radius|{{{lightradius}}} }} }}
{{#if: {{{healing|}}} | {{infobox row|Healing|{{{healing}}} }} }}
{{#if: {{{healing|}}} | {{infobox row|Healing|{{{healing}}} }} }}
Line 200: Line 169:
{{#if: {{{extra|}}}|{{infobox row||Extra Info:</br>{{{extra}}} }} }}
{{#if: {{{extra|}}}|{{infobox row||Extra Info:</br>{{{extra}}} }} }}
}}
}}
{{#if: {{{desc|}}}  
{{#if: {{{desc|}}} | {{Qud look |text={{{desc}}}|title={{#invoke:ModDisplay|main|{{{mods|}}}}}{{{title|{{PAGENAME}} }}} }} }}
  |{{Qud look  
    |text={{{desc}}}
    |title={{#ifeq: {{{categories|}}}|Cybernetics
      |{{Qud text|&y[&WImplant&y] - &Y{{{title|{{PAGENAME}} }}} }}
      |{{#ifeq: {{{id|}}}|MasterworkCarbine
        |{{{title|{{PAGENAME}} }}}<!--Dont append mods to Sparbine, since they're already in its displayname-->
        |{{#invoke:ModDisplay|main|{{{mods|}}}}}{{{title|{{PAGENAME}} }}}
      }}
    }}
  }}
}}
{{#if: {{{categories|}}} | [[Category:{{{categories}}}]] }}
{{#if: {{{categories|}}} | [[Category:{{{categories}}}]] }}
</includeonly>
</includeonly>