Template:Mod: Difference between revisions

From Caves of Qud Wiki
Jump to navigation Jump to search
imported>Lemonlich
No edit summary
(New storage: Type and Restriction. attributes: type, restriction, reliconly)
Line 1: Line 1:
<noinclude>
<noinclude>
{{#cargo_declare:_table=Mods|Type=String|Restriction=String|MinTier=Integer|MaxTier=Integer|ModID=String|Value=Float|Rarity=String|Tinkerable=Boolean|TinkerTier=Integer|Description=Wikitext}}[[Category:Cargo Store Templates]]
{{#cargo_declare:_table=Mods|Type=String|Restriction=String|MinTier=Integer|MaxTier=Integer|ModID=String (unique;mandatory)|Value=Float|Rarity=String|Tinkerable=Boolean|TinkerTier=Integer|Description=Wikitext|Restriction=String|Type=List (,) of String (hierarchy;allowed values=*General
</noinclude><includeonly>
*Weapon
{{#cargo_store:_table=Mods|Type={{{type|}}}|Restriction={{{restriction|None}}}|MinTier={{{mintier|0}}}|MaxTier={{{maxtier|99}}}|ModID={{{id|}}}|Value={{{value|1.0}}}|Rarity={{{rarity|}}}|Tinkerable={{{tinkerable|no}}}|TinkerTier={{{tinkertier|}}}|Description={{{desc|}}}}} {{#vardefine:name|{{{title|{{#titleparts:{{PAGENAME}}}}}}}}}
**Missile Weapon
***Magazine
***Firearm
**Melee Weapon
***Blade
****Short Blade
****Long Blade
***Axe
***Cudgel
*Armor
**Body
**Helmet
**Headwear
**Eyewear
**Shield
**Boot
**Glove
**Tread Accessory
*Grenade
*Pottery
*Electronic
**Energy Cell
**Tech Wall
*Book)}}[[Category:Cargo Store Templates]]


{{#invoke: infobox|infobox|
</noinclude><includeonly><!--                 
 
    Cargo Storage start
               
-->{{#cargo_store:_table=Mods|Type={{{type|}}}|Restriction={{{restriction|None}}}|MinTier={{{mintier|0}}}|MaxTier={{{maxtier|99}}}|ModID={{{id|}}}|Value={{{value|1.0}}}|Rarity={{{rarity|}}}|Tinkerable={{{tinkerable|no}}}|TinkerTier={{{tinkertier|}}}|Description={{{desc|}}}|Restriction={{#ifeq: {{{reliconly|}}}|yes|Relic Only</br>}}{{{restriction|}}}|Type={{{type|}}} }}<!--
 
    Variable Definitions
 
-->{{#vardefine:name|{{{title|{{#titleparts:{{PAGENAME}}}}}}}}}<!---
 
    Infobox Start
 
-->{{#invoke: infobox|infobox|
image=none
image=none
| rows =  
| rows =  
{{#if: {{{type|}}}    | {{infobox row|Category|{{{type}}}{{#switch:{{{type}}}
{{#if: {{{type|}}}    | {{infobox row|Category|{{{type}}}[[Category:{{{type}}} Mods]] }} }}
| General = [[Category:General Mods]]
{{#if: {{{restriction|}}}{{#ifeq:{{{reliconly|}}}|yes|yes}}|{{infobox row|Restrictions|{{#if: {{{reliconly|}}}|Relic Only</br>}}{{{restriction|}}} }} }}
| Weapon = [[Category:Weapon Mods]]
| Armor = [[Category:Armor Mods]]
| Defect = [[Category:Defective Mods]]
| Misc = [[Category:Miscellaneous Mods]]
| Relic = [[Category:Relic Mods]]}} }} }}
{{infobox row|Restriction|{{{restriction|None}}} }}
{{infobox row|Tiers|{{{mintier|0}}} - {{{maxtier|99}}} }}  
{{infobox row|Tiers|{{{mintier|0}}} - {{{maxtier|99}}} }}  
{{#if: {{{rarity|}}}|{{infobox row|Rarity|{{#switch: {{{rarity}}}| C = Common | U = Uncommon | R = Rare | M = Mega Rare}} }} }}
{{#if: {{{rarity|}}}|{{infobox row|Rarity|{{#switch: {{{rarity}}}| C = Common | U = Uncommon | R = Rare | M = Mega Rare}} }} }}
Line 22: Line 51:
{{#if: {{{id|}}}|{{infobox row|ID|{{{id}}} }} }}
{{#if: {{{id|}}}|{{infobox row|ID|{{{id}}} }} }}
}}{{#if: {{{desc|}}}|{{qud quote {{#ifeq:{{{notxml|}}}| yes | notxml}}|{{{desc}}}}} }}
}}{{#if: {{{desc|}}}|{{qud quote {{#ifeq:{{{notxml|}}}| yes | notxml}}|{{{desc}}}}} }}
[[Category:Mods]]</includeonly><noinclude>
[[Category:Mods]]</includeonly><noinclude><!---
 
For the tables/ mod groups the mod belongs in, tag the page as the appropriate category. should be the table name but with proper spaces.
    Documentation here
-->For the tables/ mod groups the mod belongs in, tag the page as the appropriate category. should be the table name but with proper spaces.


{| class="wikitable"
{| class="wikitable"
Line 33: Line 64:
! type
! type
| category of the mod (for the query module)
| category of the mod (for the query module)
| Choice of: '''General''' - '''Weapon''' - '''Armor''' - '''Defect''' - '''Misc''' - '''Relic'''
| Hierarchy. Choose the most specific category it applies to, it it's in multiple tables, separate each by an comma (,).
 
Choice of:  
*General
*Weapon
**Missile Weapon
***Magazine
***Firearm
**Melee Weapon
***Blade
****Short Blade
****Long Blade
***Axe
***Cudgel
*Armor
**Body
**Helmet
**Headwear
**Eyewear
**Shield
**Boot
**Glove
**Tread Accessory
*Grenade
*Pottery
*Electronic
**Energy Cell
**Tech Wall
*Book
|-
|-
! restriction
! restriction
| which item sub-category from that category specifically applicable (empty if the item is universal toward its category)
| any further specifications from type. If only applicable to relics, use <code>reliconly</code> below.
| strings
| strings
|-
! reliconly
| If the specified mod is specific only to relics.
| yes/no
|-
|-
! mintier
! mintier
Line 52: Line 115:
|-
|-
! id
! id
| the name of the object in Mods.xml
| the name of the object in Mods.xml. This is MANDATORY and must be unique.
| string
| string
|-
|-
Line 72: Line 135:
|}
|}


Source code Copy/Paste
Source code Copy/Paste. Delete all blank fields.
<nowiki>
<pre><nowiki>
{{Mod
{{Mod
|title      =
| title      =
|type      =
| type      =
|id        =
| id        =
|restriction=
| reliconly  =
|rarity    =
| rarity    =
|tinkerable =
| tinkerable =
|tinkertier =
| tinkertier =
|value      =
| value      =
|desc      =
| desc      =
}}</nowiki>
}}</nowiki></pre>
</noinclude>
</noinclude>

Revision as of 18:38, 31 August 2019

This template defines the table "Mods". View table.

For the tables/ mod groups the mod belongs in, tag the page as the appropriate category. should be the table name but with proper spaces.

title display name of the mod ingame. {{Qud text|(displayname with color codes)}}
type category of the mod (for the query module) Hierarchy. Choose the most specific category it applies to, it it's in multiple tables, separate each by an comma (,).

Choice of:

  • General
  • Weapon
    • Missile Weapon
      • Magazine
      • Firearm
    • Melee Weapon
      • Blade
        • Short Blade
        • Long Blade
      • Axe
      • Cudgel
  • Armor
    • Body
    • Helmet
    • Headwear
    • Eyewear
    • Shield
    • Boot
    • Glove
    • Tread Accessory
  • Grenade
  • Pottery
  • Electronic
    • Energy Cell
    • Tech Wall
  • Book
restriction any further specifications from type. If only applicable to relics, use reliconly below. strings
reliconly If the specified mod is specific only to relics. yes/no
mintier minimum tier items it can appear on. defaults to 0 integer
maxtier maximum tier items it can appear on. defaults to 99 integer
rarity rarity. character(C, U, R, M)
id the name of the object in Mods.xml. This is MANDATORY and must be unique. string
tinkerable defaults to no yes/no
tinkertier what tier of complexity this mod adds onto the object integer
value value. what this alters the base Commerce of the object by. float
desc description. string

Source code Copy/Paste. Delete all blank fields.

{{Mod
| title      =
| type       =
| id         =
| reliconly  =
| rarity     =
| tinkerable =
| tinkertier =
| value      =
| desc       =
}}