Module:ItemData/nav/doc: Difference between revisionsGive feedback
Gammaton32 (talk | contribs) Undo revision 24590 by Gammaton32 (talk) restored Tag: Undo |
Gammaton32 (talk | contribs) →get_item_nav_bulletpoints: better examples |
||
| Line 16: | Line 16: | ||
===Examples=== | ===Examples=== | ||
With debug_mode on (for illustration purposes) | With debug_mode on (for illustration purposes) | ||
<code><nowiki>{{#invoke:ItemData/nav|get_item_nav_bulletpoints|Armor|1250| | <code><nowiki>{{#invoke:ItemData/nav|get_item_nav_bulletpoints|Armor|1250|3000|debug_mode=true}}</nowiki></code> | ||
{{#invoke:ItemData/nav|get_item_nav_bulletpoints|Armor|1250| | {{#invoke:ItemData/nav|get_item_nav_bulletpoints|Armor|1250|3000|debug_mode=true}} | ||
With debug_mode off | With debug_mode off | ||
<code><nowiki>{{#invoke:ItemData/nav|get_item_nav_bulletpoints|Armor|1250|3000}}</nowiki></code> | |||
{{#invoke:ItemData/nav|get_item_nav_bulletpoints|Armor|1250|3000}} | |||
To include the 3000 items | |||
<code><nowiki>{{#invoke:ItemData/nav|get_item_nav_bulletpoints|Armor|1250|3001}}</nowiki></code> | <code><nowiki>{{#invoke:ItemData/nav|get_item_nav_bulletpoints|Armor|1250|3001}}</nowiki></code> | ||
Revision as of 01:13, 22 April 2025
Overview
Functions for creating navigation boxes/lists for items, grouped by a slot/category and souls
Functions
get_item_nav_bulletpoints
Gets a list of items that are each sent to the Template:ItemIcon template, separated by bullet points.
Filters down to a slot/specific category, and within a range of souls.
Parameters
- slot - Slot/category that the items should be, should be Weapon, Armor, or Tech
- min_souls - Minimum souls that the items should have
- max_souls - Maximum souls that the items should have (Note: the command does not include items equal to this value, so in order to include them it should be written as
cost + 1) - debug_mode - (OPTIONAL) - if set to 'true', the wikitext is unprocessed, allowing for it to be read more clearly. Also used for showcasing the documentation examples more clearly.
Examples
With debug_mode on (for illustration purposes)
{{#invoke:ItemData/nav|get_item_nav_bulletpoints|Armor|1250|3000|debug_mode=true}}
{{ItemIcon|Battle Vest|size=26px}} • {{ItemIcon|Bullet Lifesteal|size=26px}} • {{ItemIcon|Debuff Reducer|size=26px}} • {{ItemIcon|Enchanter's Emblem|size=26px}} • {{ItemIcon|Enduring Speed|size=26px}} • {{ItemIcon|Guardian Ward|size=26px}} • {{ItemIcon|Healbane|size=26px}} • {{ItemIcon|Healing Booster|size=26px}} • {{ItemIcon|Reactive Barrier|size=26px}} • {{ItemIcon|Restorative Locket|size=26px}} • {{ItemIcon|Return Fire|size=26px}} • {{ItemIcon|Spirit Lifesteal|size=26px}} • {{ItemIcon|Spirit Shielding|size=26px}} • {{ItemIcon|Trophy Collector|size=26px}} • {{ItemIcon|Weapon Shielding|size=26px}}
With debug_mode off
{{#invoke:ItemData/nav|get_item_nav_bulletpoints|Armor|1250|3000}}
Battle Vest • Bullet Lifesteal • Debuff Reducer • Enchanter's Emblem • Enduring Speed • Guardian Ward • Healbane • Healing Booster • Reactive Barrier • Restorative Locket • Return Fire • Spirit Lifesteal • Spirit Shielding • Trophy Collector • Weapon Shielding
To include the 3000 items
{{#invoke:ItemData/nav|get_item_nav_bulletpoints|Armor|1250|3001}}
Battle Vest • Bullet Lifesteal • Debuff Reducer • Enchanter's Emblem • Enduring Speed • Guardian Ward • Healbane • Healing Booster • Reactive Barrier • Restorative Locket • Return Fire • Spirit Lifesteal • Spirit Shielding • Trophy Collector • Weapon Shielding
get_item_nav_cards
Gets a list of items that are each sent to the Template:ItemBox template, separated by space.
Filters down to a specific slot/category, and within a range of souls.
Parameters
Same as get_item_nav_bulletpoints
Examples
With debug_mode on (for illustration purposes)
{{#invoke:ItemData/nav|get_item_nav_bulletpoints|Armor|1250|3000|debug_mode=true}}
{{ItemBox|itemName=Battle Vest|overrideLinkClick=Battle Vest|lowGraphics=true}} {{ItemBox|itemName=Bullet Lifesteal|overrideLinkClick=Bullet Lifesteal (item)|lowGraphics=true}} {{ItemBox|itemName=Debuff Reducer|overrideLinkClick=Debuff Reducer|lowGraphics=true}} {{ItemBox|itemName=Enchanter's Emblem|overrideLinkClick=Enchanter's Emblem|lowGraphics=true}} {{ItemBox|itemName=Enduring Speed|overrideLinkClick=Enduring Speed|lowGraphics=true}} {{ItemBox|itemName=Guardian Ward|overrideLinkClick=Guardian Ward|lowGraphics=true}} {{ItemBox|itemName=Healbane|overrideLinkClick=Healbane|lowGraphics=true}} {{ItemBox|itemName=Healing Booster|overrideLinkClick=Healing Booster|lowGraphics=true}} {{ItemBox|itemName=Reactive Barrier|overrideLinkClick=Reactive Barrier|lowGraphics=true}} {{ItemBox|itemName=Restorative Locket|overrideLinkClick=Restorative Locket|lowGraphics=true}} {{ItemBox|itemName=Return Fire|overrideLinkClick=Return Fire|lowGraphics=true}} {{ItemBox|itemName=Spirit Lifesteal|overrideLinkClick=Spirit Lifesteal (item)|lowGraphics=true}} {{ItemBox|itemName=Spirit Shielding|overrideLinkClick=Spirit Shielding|lowGraphics=true}} {{ItemBox|itemName=Trophy Collector|overrideLinkClick=Trophy Collector|lowGraphics=true}} {{ItemBox|itemName=Weapon Shielding|overrideLinkClick=Weapon Shielding|lowGraphics=true}}
With debug_mode off
{{#invoke:ItemData/nav|get_item_nav_bulletpoints|Armor|1250|3000}}
write_item_slot_subgroup
Writes a sub group for the navbox on Template:Item Navbox and Template:Infobox ShopItems. The sub group contains all items in each price range from "ItemPricePerTier" in Data:GenericData.json
Parameters
- slot - Slot/category to create the subgroup for, ie Weapon, Armor, or Tech
- type - The subfunction to call that determines the list formatting style. Options are 'get_item_nav_bulletpoints' or 'get_item_nav_cards'
- debug_mode - (OPTIONAL) - if set to 'true', the wikitext is unprocessed, allowing for it to be read more clearly. Also used for showcasing the documentation examples more clearly.
Examples
With debug_mode on (for illustration purposes)
{{#invoke:ItemData/nav|write_item_slot_subgroup|Weapon|get_item_nav_bulletpoints|debug_mode=true}}
{{ItemIcon|Close Quarters|size=26px}} • {{ItemIcon|Extended Magazine|size=26px}} • {{ItemIcon|Headshot Booster|size=26px}} • {{ItemIcon|High-Velocity Rounds|size=26px}} • {{ItemIcon|Monster Rounds|size=26px}} • {{ItemIcon|Rapid Rounds|size=26px}} • {{ItemIcon|Restorative Shot|size=26px}} | |
{{ItemIcon|Active Reload|size=26px}} • {{ItemIcon|Fleetfoot|size=26px}} • {{ItemIcon|Intensifying Magazine|size=26px}} • {{ItemIcon|Kinetic Dash|size=26px}} • {{ItemIcon|Long Range|size=26px}} • {{ItemIcon|Melee Charge|size=26px}} • {{ItemIcon|Mystic Shot|size=26px}} • {{ItemIcon|Opening Rounds|size=26px}} • {{ItemIcon|Recharging Rush|size=26px}} • {{ItemIcon|Slowing Bullets|size=26px}} • {{ItemIcon|Spirit Shredder Bullets|size=26px}} • {{ItemIcon|Split Shot|size=26px}} • {{ItemIcon|Stalker|size=26px}} • {{ItemIcon|Swift Striker|size=26px}} • {{ItemIcon|Titanic Magazine|size=26px}} • {{ItemIcon|Weakening Headshot|size=26px}} | |
{{ItemIcon|Alchemical Fire|size=26px}} • {{ItemIcon|Ballistic Enchantment|size=26px}} • {{ItemIcon|Berserker|size=26px}} • {{ItemIcon|Blood Tribute|size=26px}} • {{ItemIcon|Burst Fire|size=26px}} • {{ItemIcon|Cultist Sacrifice|size=26px}} • {{ItemIcon|Escalating Resilience|size=26px}} • {{ItemIcon|Express Shot|size=26px}} • {{ItemIcon|Headhunter|size=26px}} • {{ItemIcon|Heroic Aura|size=26px}} • {{ItemIcon|Hollow Point|size=26px}} • {{ItemIcon|Hunter's Aura|size=26px}} • {{ItemIcon|Point Blank|size=26px}} • {{ItemIcon|Shadow Weave|size=26px}} • {{ItemIcon|Sharpshooter|size=26px}} • {{ItemIcon|Spirit Rend|size=26px}} • {{ItemIcon|Tesla Bullets|size=26px}} • {{ItemIcon|Toxic Bullets|size=26px}} • {{ItemIcon|Weighted Shots|size=26px}} | |
{{ItemIcon|Armor Piercing Rounds|size=26px}} • {{ItemIcon|Capacitor|size=26px}} • {{ItemIcon|Crippling Headshot|size=26px}} • {{ItemIcon|Crushing Fists|size=26px}} • {{ItemIcon|Frenzy|size=26px}} • {{ItemIcon|Glass Cannon|size=26px}} • {{ItemIcon|Lucky Shot|size=26px}} • {{ItemIcon|Ricochet|size=26px}} • {{ItemIcon|Silencer|size=26px}} • {{ItemIcon|Spellslinger|size=26px}} • {{ItemIcon|Spiritual Overflow|size=26px}} | |
{{ItemIcon|Haunting Shot|size=26px}} • {{ItemIcon|Infinite Rounds|size=26px}} • {{ItemIcon|Runed Gauntlets|size=26px}} |
With debug_mode off
{{#invoke:ItemData/nav|write_item_slot_subgroup|Weapon|get_item_nav_bulletpoints}}
Recall that it creates subgroup parameters for the mentioned templates.