Anonymous

Template:ModifierTable/doc: Difference between revisions

From Melvor Idle
Document property filtering capability
No edit summary
(Document property filtering capability)
Line 10: Line 10:
| class="table-positive" | ✓
| class="table-positive" | ✓
| class="table-na" | None
| class="table-na" | None
| A comma separated list of modifiers to be included within the table. Modifiers with 'increased' and 'decreased' variants may be specified once without these prefixes, unless parameter <code>3</code> is set to <code>false</code>
| A comma separated list of modifiers to be included within the table. Supports both modifier IDs and modifier aliases, where IDs are preferred. Optionally, filters may be specified on a per-modifier basis by enclosing the filters within a set of square brackets following the modifier ID, for example: <code>flatBaseRandomProductQuantity[item:Abyssal Stardust]</code>. See the <code>filters</code> parameter for more information.
| {{T|ModifierTable|GlobalSkillXP,GlobalMasteryXP|XP Bonus}}<br/>Generates a table listing objects providing all of the <code>increasedGlobalSkillXP</code>, <code>decreasedGlobalSkillXP</code>, <code>increasedGlobalMasteryXP</code>, and <code>decreasedGlobalMasteryXP</code> modifiers
 
Modifier aliases with 'increased' and 'decreased' variants may be specified once without these prefixes, unless parameter <code>3</code> is set to <code>false</code>
| {{T|ModifierTable|skillInterval[skill:Fishing],flatSkillInterval[skill:Mining]|Interval Modifiers}}<br>Generates a combined table of percentage skill interval modifiers for Fishing and flat interval modifiers for Mining.
 
 
{{T|ModifierTable|GlobalSkillXP,GlobalMasteryXP|XP Bonus}}<br>Generates a table listing objects providing all of the <code>increasedGlobalSkillXP</code>, <code>decreasedGlobalSkillXP</code>, <code>increasedGlobalMasteryXP</code>, and <code>decreasedGlobalMasteryXP</code> modifiers
|-
|-
| <code>2</code>
| <code>2</code>
Line 24: Line 29:
| A boolean value, which if set to <code>true</code> allows modifiers with 'increased' and 'decreased' variants to be specified within parameter <code>1</code> without these prefixes.
| A boolean value, which if set to <code>true</code> allows modifiers with 'increased' and 'decreased' variants to be specified within parameter <code>1</code> without these prefixes.


'''Note that this parameter must be set to <code>false</code> if including modifiers which have no such variants'''
'''Note that this parameter must be set to <code>false</code> if including modifier aliases which have no such variants.''' This parameter has no impact on modifier IDs.
| {{T|ModifierTable|GPFlat|Flat GP|true}}<br/>Generates a table listing objects providing flat GP increases and/or decreases. This is equivalent to {{T|ModifierTable|increasedGPFlat,decreasedGPFlat|Flat GP|false}}
| {{T|ModifierTable|GPFlat|Flat GP|true}}<br/>Generates a table listing objects providing flat GP increases and/or decreases. This is equivalent to {{T|ModifierTable|increasedGPFlat,decreasedGPFlat|Flat GP|false}}
|-
|-
| <code>skill</code>
| <code>filters</code>
| ✗
| ✗
| class="table-na" | None
| class="table-na" | None
| Specifies a skill name to use for modifiers that vary by skill. For example, the <code>decreasedSkillInterval</code> modifier can provide interval reductions to any non-combat skill, in which case it is usually desirable to generate a table which only lists interval reductions for a given skill, rather than interval reductions for all skills
| Specifies a semi-colon separated list of property name & value pairs, refining the list of returned modifiers based on properties of said modifiers. A common use case is to restrict a table to modifiers which affect a given skill. For a list of supported properties, see [[#Property Filters]].
| {{T|ModifierTable|decreasedSkillInterval|Interval Reduction|false|skill=Fishing}}<br/>Generates a table of objects providing interval reduction for [[Fishing]]
 
Any properties specified on a per-modifier basis are used in preference to properties of the same name specified within this parameter.
| {{T|ModifierTable|skillInterval,flatSkillInterval|Interval Reduction|false|filters=skill:Fishing;valueType:neg}}<br/>Generates a table of objects providing interval reduction for [[Fishing]]
|-
|-
| <code>displayOtherMods</code>
| <code>displayOtherMods</code>
Line 52: Line 59:
This has no impact if only a single modifier is being shown, as such tables will always be sorted by magnitude, then type, then source name.
This has no impact if only a single modifier is being shown, as such tables will always be sorted by magnitude, then type, then source name.
| {{T|ModifierTable|AltMagicRunePreservation,RunePreservation|Rune Preservation|true|forceMagnitudeSort=true}}<br/>Displays general & Alt. Magic rune preservation bonuses, primarily sorted from highest to lowest magnitude
| {{T|ModifierTable|AltMagicRunePreservation,RunePreservation|Rune Preservation|true|forceMagnitudeSort=true}}<br/>Displays general & Alt. Magic rune preservation bonuses, primarily sorted from highest to lowest magnitude
|}
==Property Filters==
{| class="wikitable sortable stickyHeader"
|- class="headerRow-0"
! Property !! Description !! Example
|-
| <code>currency</code>
| For modifiers affecting received currency amounts, restricts the output to modifiers affecting the specified currency.
| {{T|ModifierTable|flatCurrencyGainFromMonsterDrops|Currency Gain|filters=currency:AP}}<br>Lists things providing a flat increase of Abyssal Pieces from monster drops.
|-
| <code>damageType</code>
| For modifiers relating to specific damage types (e.g. modifiers providing damage resistance), restricts the output to modifiers affecting the specified damage type.
| {{T|ModifierTable|flatResistance|DR|filters=damageType:Normal Damage}}<br>Lists things providing [[Damage Reduction]] modifiers.
|-
| <code>skill</code>
| For skill specific modifiers, restricts the output to modifiers affecting the specified skill.
| {{T|ModifierTable|flatSkillInterval|Interval Change|filters=skill:Woodcutting}}<br>Lists things providing a flat interval change to {{Skill|Woodcutting}}.
|-
| <code>realm</code>
| For modifiers that apply to a particular realm, restricts the output to modifiers in effect only within the specified realm.
| {{T|ModifierTable|nonShardSummoningCostReduction|Cost Reduction|filters=realm:Abyssal Realm}}<br>Lists things providing a non-shard cost reduction to {{Skill|Summoning}} recipes within the Abyssal Realm.
|-
| <code>item</code>
| For modifiers impacting particular items, restricts the output to modifiers affecting the specified item.
| {{T|ModifierTable|flatBaseRandomProductQuantity|Base Quantity Change|filters=item:Abyssal Stardust}}<br>Lists things that influence the base quantity of {{ItemIcon|Abyssal Stardust}}.
|-
| <code>effectGroup</code>
| For modifiers relating to combat status effects, restricts the output to modifiers affecting the specified effect.
| {{T|ModifierTable|effectIgnoreChance|Effect Ignore Chance|filters=effectGroup:Fear}}<br>Lists things that alter the chance of ignoring [[Fear]].
|-
| <code>valueType</code>
| Filters modifiers based on their value. <code>pos</code> restricts the output to only modifiers with values greater than zero, while <code>neg</code> restricts to modifiers with value less than zero.
| {{T|ModifierTable|skillInterval|% Skill Interval Increases|filters=valueType:pos}}<br>Lists things that increase the interval of skills.
|}
|}