Template:Mod/doc: Difference between revisions

From Path of Exile Wiki
Jump to navigation Jump to search
>OmegaK2
(Created page with "{{documentation subpage}} {{lua|Module:Miscellaneous}} __TOC__ The '''mod''' template is used to create a formatted mod page. ==Overview== The template will do the followin...")
 
mNo edit summary
 
(17 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{documentation subpage}}
{{Documentation subpage}}
{{lua|Module:Miscellaneous}}
 
{{High-risk|34000+}}
{{Lua|Module:Mod}}
__TOC__
__TOC__


Line 11: Line 13:
* create infoboxes
* create infoboxes
* add relevant categories to the page
* add relevant categories to the page
* add semantic properties to the page
* add cargo data to the page


Custom sections should go below the template.  
Custom sections should go below the template.


==Parameters==
==Parameters==
Line 28: Line 30:
! Parameter  
! Parameter  
! Type  
! Type  
! Cargo equivalent
! Description
! Description
|-
|-
| '''id'''  
| '''id'''  
| str (unique)
| str (unique)
| mods.id
| Internal Id of the mod.  
| Internal Id of the mod.  
| {{yes}}
|-  
|-  
| '''name'''
| '''name'''
| str
| str
| mods.name
| Name of the mod as shown in game. Can be empty.
| Name of the mod as shown in game. Can be empty.
|-  
|-  
| '''mod_group'''
| '''mod_groups'''
| str
| list of str
| Internal name of the mod group.
| mods.mod_groups
| List of comma-separated groups the mod belongs to
|-  
|-  
| '''mod_type'''
| '''mod_type'''
| str
| str
| mods.mod_type
| Internal name of the mod type
| Internal name of the mod type
|-  
|-  
| '''domain'''
| '''domain'''
| int (1<=x<=11)
| int
| Domain id of the mod.
| mods.domain
| Domain id of the mod. See [[Modifiers#Mod Domain]] for more info.
|-
|-
| '''generation_type'''
| '''generation_type'''
| int (1<=x<8)
| int  
| generation_type id of the mod.
| mods.generation_type
| generation_type id of the mod. See [[Modifiers#Mod Generation Type]] for mod info.
|-
|-
| '''level_requirement'''
| '''required_level'''
| int (1<=x<100)
| int (1<=x<100)
| mods.required_level
| The level requirement of the mod.
| The level requirement of the mod.
|-
|-
| '''stat_text'''
| '''stat_text'''
| str
| str
| mods.stat_text
mods.stat_text_raw
| Parsed text of the stats the mod has. In particular this means human-readable text as well as reformatted values - pretty much what the end user sees in game.
| Parsed text of the stats the mod has. In particular this means human-readable text as well as reformatted values - pretty much what the end user sees in game.
|-
| '''granted_buff_id'''
| str
| mods.granted_buff_id
| Id of the buff this modifier grants
|-
| '''granted_buff_value'''
| value
| mods.granted_buff_value
| stat value associated with the granted buff
|-
| '''granted_skill'''
| str
| mods.granted_skill
| Id of the skill which this mod grants
|-
|-
| '''tags'''
| '''tags'''
| list of str
| list of str
| mods.tags
| List of comma-separated tags the mod has (i.e. used to categorize the mod itself). Separate each tag with '''exactly''' <code>, </code> (1 comma and 1 space).
| List of comma-separated tags the mod has (i.e. used to categorize the mod itself). Separate each tag with '''exactly''' <code>, </code> (1 comma and 1 space).
|-
| '''tier_text'''
| str
| mods.tier_text
| Tier info text that is shown with advanced item descriptions in game.
|}
|}


Line 72: Line 106:


====Stats====
====Stats====
Code support: 1 <= N <= 4


{| class="wikitable"
{| class="wikitable"
! Parameter  
! Parameter  
! Type  
! Type  
! Cargo equivalent
! Description
! Description
|-
|-
| '''stat<N>_id'''  
| '''stat<N>_id'''  
| str
| str
| mod_stats.id
| Internal id of the stat
| Internal id of the stat
|-
|-
| '''stat<N>_min'''  
| '''stat<N>_min'''  
| str
| str
| mod_stats.min
| Minimum value for the stat. Minimum can equal maximum if there is no range.
| Minimum value for the stat. Minimum can equal maximum if there is no range.
|-
|-
| '''stat<N>_max'''  
| '''stat<N>_max'''  
| str
| str
| mod_stats.max
| Maximum value for the stat. Minimum can equal maximum if there is no range.
| Maximum value for the stat. Minimum can equal maximum if there is no range.
|}
|}


====Spawn Tags====
====Spawn weight list====


Code support: 1 <= N <= 15
List of tags and their weights for this modifier to spawn on an item. Order matters and is represented by the <code>spawn_weights.ordinal</code> field.


{| class="wikitable"
{| class="wikitable"
! Parameter  
! Parameter  
! Type  
! Type  
! Cargo equivalent
! Description
! Description
|-
|-
| '''spawn_tag<N>'''  
| '''spawn_weight<N>_tag'''  
| str
| str
| spawn_weights.tag
| Internal name of the tag used for the spawn weighting
| Internal name of the tag used for the spawn weighting
|-
|-
| '''spawn_value<N>'''  
| '''spawn_weight<N>_value'''  
| int (0<=x)
| int (0<=x)
| spawn_weights.value
| Value to be used for the spawn weighting
| Value to be used for the spawn weighting
|}
|}


<includeonly>
====Generation weight list====
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
 
[[Category:SMW templates]]
List of tags and their weight multipliers for this modifier to spawn on an item. Order matters and is represented by the <code>generation_weights.ordinal</code> field.
</includeonly>
 
{| class="wikitable"
! Parameter
! Type
! Cargo equivalent
! Description
|-
| '''generation_weight<N>_tag'''
| str
| generation_weights.tag
| Internal name of the tag used for the generation weighting
|-
| '''generation_weight<N>_value'''
| int (0<=x)
| generation_weights.value
| Value to be used for the generation weighting
|}
 
====Mod sell prices====
 
{| class="wikitable"
! Parameter
! Type
! Cargo equivalent
! Description
|-
| '''sell_price<N>_name'''
| str
| mod_sell_prices.name
| What item this modifier sells for
|-
| '''sell_price<N>_amount'''
| int (x>=0)
| mod_sell_prices.amount
| How many of the item this modifier sells for
|}
 
==Cargo==
{| class="wikitable"
! Table !! Declared by !! Attached by
|-
| [[Special:CargoTables/mods|mods]]
| {{tl|Mod/cargo/mods/declare}}
| {{tl|Mod/cargo/mods/attach}}
|-
| [[Special:CargoTables/mod_stats|mod_stats]]
| {{tl|Mod/cargo/mod stats/declare}}
| {{tl|Mod/cargo/mod stats/attach}}
|-
| [[Special:CargoTables/mod_spawn_weights|mod_spawn_weights]]
| {{tl|Mod/cargo/mod spawn weights/declare}}
| {{tl|Mod/cargo/mod spawn weights/attach}}
|-
| [[Special:CargoTables/mod_generation_weights|mod_generation_weights]]
| {{tl|Mod/cargo/mod generation weights/declare}}
| {{tl|Mod/cargo/mod generation weights/attach}}
|-
| [[Special:CargoTables/mod_sell_prices|mod_sell_prices]]
| {{tl|Mod/cargo/mod sell prices/declare}}
| {{tl|Mod/cargo/mod sell prices/attach}}
|}
 
{{Documentation categories|
<!-- Categories and interwikis go here. -->
[[Category:Data templates]]
[[de:Vorlage:Mod]]
}}

Latest revision as of 16:28, 11 June 2023

This subpage provides documentation for Template:Mod.

This template is used on 34000+ pages.

To avoid major disruption and server load, do not make unnecessary edits to this template. Test changes to this template first using its /sandbox and /testcases subpages . All of the changes can then be applied to this template in a single edit.

Consider discussing changes on the talk page or on Discord before implementing them.

Lua logo

This template uses the following modules:

The mod template is used to create a formatted mod page.

Overview

The template will do the following:

  • create an introductory sentence on the page
  • create infoboxes
  • add relevant categories to the page
  • add cargo data to the page

Custom sections should go below the template.

Parameters

All parameters should be filled in if possible to ensure it's working correctly.

Consider using PyPoE to export a template, example:

pypoe_exporter wiki mods mods --wiki <id_of_the_mod1> [id_of_the_mod2] [...] [id_of_the_mod3]

General

Parameter Type Cargo equivalent Description
id str (unique) mods.id Internal Id of the mod.
name str mods.name Name of the mod as shown in game. Can be empty.
mod_groups list of str mods.mod_groups List of comma-separated groups the mod belongs to
mod_type str mods.mod_type Internal name of the mod type
domain int mods.domain Domain id of the mod. See Modifiers#Mod Domain for more info.
generation_type int mods.generation_type generation_type id of the mod. See Modifiers#Mod Generation Type for mod info.
required_level int (1<=x<100) mods.required_level The level requirement of the mod.
stat_text str mods.stat_text

mods.stat_text_raw

Parsed text of the stats the mod has. In particular this means human-readable text as well as reformatted values - pretty much what the end user sees in game.
granted_buff_id str mods.granted_buff_id Id of the buff this modifier grants
granted_buff_value value mods.granted_buff_value stat value associated with the granted buff
granted_skill str mods.granted_skill Id of the skill which this mod grants
tags list of str mods.tags List of comma-separated tags the mod has (i.e. used to categorize the mod itself). Separate each tag with exactly , (1 comma and 1 space).
tier_text str mods.tier_text Tier info text that is shown with advanced item descriptions in game.

Multiple arguments

Replace <N> with the number of the argument. Start numbers with 1, and don't leave gaps. The order matters and each parameter must be specified for an individual element of N.

Stats

Parameter Type Cargo equivalent Description
stat<N>_id str mod_stats.id Internal id of the stat
stat<N>_min str mod_stats.min Minimum value for the stat. Minimum can equal maximum if there is no range.
stat<N>_max str mod_stats.max Maximum value for the stat. Minimum can equal maximum if there is no range.

Spawn weight list

List of tags and their weights for this modifier to spawn on an item. Order matters and is represented by the spawn_weights.ordinal field.

Parameter Type Cargo equivalent Description
spawn_weight<N>_tag str spawn_weights.tag Internal name of the tag used for the spawn weighting
spawn_weight<N>_value int (0<=x) spawn_weights.value Value to be used for the spawn weighting

Generation weight list

List of tags and their weight multipliers for this modifier to spawn on an item. Order matters and is represented by the generation_weights.ordinal field.

Parameter Type Cargo equivalent Description
generation_weight<N>_tag str generation_weights.tag Internal name of the tag used for the generation weighting
generation_weight<N>_value int (0<=x) generation_weights.value Value to be used for the generation weighting

Mod sell prices

Parameter Type Cargo equivalent Description
sell_price<N>_name str mod_sell_prices.name What item this modifier sells for
sell_price<N>_amount int (x>=0) mod_sell_prices.amount How many of the item this modifier sells for

Cargo

Table Declared by Attached by
mods {{Mod/cargo/mods/declare}} {{Mod/cargo/mods/attach}}
mod_stats {{Mod/cargo/mod stats/declare}} {{Mod/cargo/mod stats/attach}}
mod_spawn_weights {{Mod/cargo/mod spawn weights/declare}} {{Mod/cargo/mod spawn weights/attach}}
mod_generation_weights {{Mod/cargo/mod generation weights/declare}} {{Mod/cargo/mod generation weights/attach}}
mod_sell_prices {{Mod/cargo/mod sell prices/declare}} {{Mod/cargo/mod sell prices/attach}}