Template:Item: Difference between revisions
Jump to navigation
Jump to search
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 23: | Line 24: | ||
|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 43: | Line 45: | ||
|Accuracy={{{accuracy|}}} | |Accuracy={{{accuracy|}}} | ||
|Shots={{{shots|}}}|MaxAmmo={{{maxammo|}}} | |Shots={{{shots|}}}|MaxAmmo={{{maxammo|}}} | ||
|MaxVolume={{{maxvol|}}}|LiquidGen={{{liquidgen|}}}|LiquidType={{{liquidtype|}}}| | |MaxVolume={{{maxvol|}}}|LiquidGen={{{liquidgen|}}}|LiquidType={{{liquidtype|}}} | ||
MaxCharge={{{maxcharge|}}}|ChargeUsed={{{chargeused|}}}|ChargePerDram={{{chargeperdram|}}} | |Seeping={{{seeping|}}} | ||
|MaxCharge={{{maxcharge|}}}|ChargeUsed={{{chargeused|}}}|ChargePerDram={{{chargeperdram|}}} | |||
|Complexity={{{complexity|}}} | |Complexity={{{complexity|}}} | ||
|Bits={{{bits|}}} | |Bits={{{bits|}}} | ||
Line 61: | Line 64: | ||
|UsesSlots={{{usesslots|{{{wornon|}}}}}}| | |UsesSlots={{{usesslots|{{{wornon|}}}}}}| | ||
Healing={{{healing|}}}| | Healing={{{healing|}}}| | ||
ChairLevel={{{chairlevel|}}}| | |||
HarvestedInto={{{harvestedinto|}}}| | HarvestedInto={{{harvestedinto|}}}| | ||
PreservedInto={{{preservedinto|}}}| | PreservedInto={{{preservedinto|}}}| | ||
Line 78: | Line 82: | ||
|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 87: | Line 92: | ||
|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}}}} }}}}}<!--- | ||
Infobox Start | Infobox Start: | ||
-->{{#invoke:infobox|infobox | -->{{#invoke:infobox|infobox | ||
| class = qud-item-infobox | | class = qud-item-infobox | ||
| imagearea = {{#switch: {{{image|none}}} | none = {{#if: {{{renderstr|}}} | <div class{{=}}"qud-displaychar-standin-for-image">{{Qud char|{{{colorstr|&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|&y}}}|{{{renderstr}}}}}</div> | }} }} }} | | imagearea = | ||
{{#if: {{{overrideimages|}}} | {{{overrideimages}}} | | |||
{{#switch: {{{image|none}}} | |||
| none = {{#if: {{{renderstr|}}} | <div class{{=}}"qud-displaychar-standin-for-image">{{Qud char|{{{colorstr|&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|&y}}}|{{{renderstr}}}}}</div> | }} }} | |||
}} | |||
}} | |||
| rows = | | rows = | ||
{{#if: {{{pv|}}}{{{maxpv|}}}{{{vibro|}}}{{{damage|}}}{{{av|}}}{{{dv|}}}{{#ifeq:{{{featureweightinfo|}}}|no||{{{weight|}}}}}{{{commerce|}}} | | |||
{{infobox row|field= | |||
{{#if: {{{pv|}}}{{{vibro|}}}{{{ | {{Item/CoreStats | ||
| 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)| | {{#ifeq: {{{pvpowered|}}}|yes| {{infobox row|PV (Unpowered)|{{#if:{{{isthrown|}}}|{{PV}}5|{{PV}}4{{Color | K |/4}} }} }} }} | ||
{{#if: {{{ | |||
{{#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: {{{ma|}}} | {{infobox row|Base [[MA]]|{{{ma}}} }} }} | {{#if: {{{ma|}}} | {{infobox row|Base [[MA]]|{{{ma}}} }} }} | ||
<!-- a number to hit--> | <!-- a number to hit--> | ||
Line 113: | Line 135: | ||
<!-- 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 120: | Line 143: | ||
{{#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|{{{chargeused}}} }} | | {{infobox row|Charge per Use|{{#if: {{{energycellrequired|}}} | {{cell performance for charge|{{{chargeused}}}}} | {{{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}}} }} }} | ||
<!--tinkering--> | <!--tinkering--> | ||
{{#if: {{{complexity|}}}| {{infobox row|Complexity|{{{complexity}}} }} }} | {{#if: {{{complexity|}}}| {{infobox row|Complexity|{{{complexity}}} }} }} | ||
{{#if: {{{tier|}}} | {{#vardefine:TIER|{{{tier}}}}} | | {{#if: {{{tier|}}} | {{#vardefine:TIER|{{{tier}}}}} | | ||
Line 151: | Line 177: | ||
<!--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 169: | Line 196: | ||
{{#if: {{{extra|}}}|{{infobox row||Extra Info:</br>{{{extra}}} }} }} | {{#if: {{{extra|}}}|{{infobox row||Extra Info:</br>{{{extra}}} }} }} | ||
}} | }} | ||
{{#if: {{{desc|}}} | {{Qud look |text={{{desc}}}|title={{#invoke:ModDisplay|main|{{{mods|}}}}}{{{title|{{PAGENAME}} }}} }} }} | {{#if: {{{desc|}}} | ||
|{{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> |
Revision as of 00:11, 18 December 2020
This template defines the table "ItemsTable". View table.
This template adds rows to the table "GeneralData", which is declared by the template General data table. View table.
Documentation
[purge]
Parameter | Explanation | Data type |
---|---|---|
title | The display name of the item. | {{Qud text|(title)}} |
image | The image. If the item has no associate sprite, set equal to none. | item name.png/none |
pv | The base PV, which is by default 4 if not set. Optional. | int |
maxpv | The max strength bonus + base pv. | int |
vibro | Replaces the damage number with the armor match symbol if true. | yes/no |
pvpowered | If yes, adds a row that shows the unpowered pv (4) | yes/no |
damage | damage | dice value |
unpowereddamge | damage when unpowered | dice value |
hp | hitpoints of creature | int |
av | Base armor value | int |
dv | The base dodge value | int |
ma | The mental armor value, if it exists. | int |
tohit | The bonus or penalty to hit | (+/-)int |
ammodamagetypes | the type(s) of damage caused by this weapon | string list (delimited by or ,) |
ammo | what type of ammo is used. | string |
accuracy | How accurate the gun is. | int |
shots | How many shots are fired in one round | int |
maxammo | How much ammo a gun can have loaded at once. | int |
maxvol | the maximum liquid volume | int |
liquidgenrate | for liquid generators. how many turns it takes for 1 dram to generate. (can be a number or a range like 20-40) | string |
liquidgentype | The type of liquid generated. | string |
inhaled | "yes" if a gas is respiration-based, "no" if it isn't. | boolean |
seeping | "yes" if a gas can seep through walls, "no" if it can't. | boolean |
maxcharge | how much charge it can hold (usually reserved for cells) | int |
chargeperdram | how much charge is one dram (for liquid cells) | int |
chargeused | How much charge is consumed per use | int |
chargefunction | What function the charge is necessary to support | string |
dramsperuse | How many drams consumed per use of the object, if fueled by liquid | int or float |
imprintchargecost | Charge cost to imprint a ProgrammableRecoiler | int |
weight | int | |
featureweightinfo | whether the weight should be featured near the top of the infobox (yes) or moved into the extra data field (no) | string |
commerce | The value of the object | int |
complexity | int | |
tier | int | |
bits | bits. Will only show if canbuild=yes or candisassemble=yes | 0 for nonspecific bits |
canbuild | yes/no | |
candisassemble | yes/no | |
empsensitive | if it's sensitive to emp bursts. | yes/no |
weaponskill | the skill tree required for use. | string |
colorstr | the color of the character with tiles mode off. | &(char),defaults to &y |
renderstr | What the item looks like with tiles mode off. | char |
id | The name of the object in ObjectBlueprints.xml | string |
bookid | Id in books.xml | string |
chairlevel | The Chair Level of this chair. Affects the power of sitting. | int |
lightradius | radius of light it gives off | int |
hunger | how much hunger it satiates | String |
thirst | how much thirst it slakes | int |
healing | what the item heals | string |
harvestedinto | what the item harvested from this is | string |
preservedinto | what the item preserves into | string |
preservedquantity | how much of the preserved item is made | integer |
twohanded | If item requires two hands to wield | yes/no |
metal | if the object is made out of metal | yes/no |
lightprojectile | if tag Name="Light" | yes/no |
reflect | if it reflects, what percentage of damage is reflected | integer |
extra | Any other features that do not have an associated variable. Uses Template:Extra info. | {{Extra info| ...... }}
|
agility/strength/willpower/toughness/agility/intelligence | The stats the mutations affect. | (+/-)int |
acid/electric/cold/heat/poison | The elemental resistances/weaknesses the mutation has. | (+/-)int |
reputationbonus | the reputation stuff that the player gets when this is equipped. | Template:Reputation bonus for each faction |
wornon | slot the item is worn on | string |
usesslots | slots the item takes up. defaults to worn on if not specified. | List (,) of string |
supportedmods | the list of mods this item supports | List (,) of string |
desc | The short description of the object. | The whole string, with color codes included |
Usage
{{Item | title = Stopsvalinn | image = Stopsvalinn.png | av = 3 | dv = 0 | ma = 0 | ego = +1 }}