Module:ItemData/nav/doc: Difference between revisions
m example now uses 1250 to 3000 instead of 500 to 1250 to show that its ordered by souls as there is a 1750 soul item |
m write_item_slot_subgroup added type parameter |
||
(3 intermediate revisions by the same user not shown) | |||
Line 27: | Line 27: | ||
==get_item_nav_cards== | ==get_item_nav_cards== | ||
Gets a list of items that are each sent to the [[Template:ItemBox]] template, separated by | 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. | Filters down to a specific slot/category, and within a range of souls. | ||
Line 45: | Line 45: | ||
{{#invoke:ItemData/nav|get_item_nav_cards|Armor|1250|3000}} | {{#invoke:ItemData/nav|get_item_nav_cards|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) | |||
<code><nowiki>{{#invoke:ItemData/nav|write_item_slot_subgroup|Weapon|get_item_nav_bulletpoints|debug_mode=true}}</nowiki></code> | |||
{{#invoke:ItemData/nav|write_item_slot_subgroup|Weapon|get_item_nav_bulletpoints|debug_mode=true}} | |||
With debug_mode off | |||
<code><nowiki>{{#invoke:ItemData/nav|write_item_slot_subgroup|Weapon|get_item_nav_bulletpoints}}</nowiki></code> | |||
{{#invoke:ItemData/nav|write_item_slot_subgroup|Weapon|get_item_nav_bulletpoints}} | |||
Recall that it creates subgroup parameters for the mentioned templates. |
Latest revision as of 18:21, 1 November 2024
Overview[edit source]
Functions for creating navigation boxes/lists for items, grouped by a slot/category and souls
Functions[edit source]
[edit source]
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[edit source]
- 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
- 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[edit source]
With debug_mode on (for illustration purposes)
{{#invoke:ItemData/nav|get_item_nav_bulletpoints|Armor|1250|3000|debug_mode=true}}
{{ItemIcon|Bullet Armor}} • {{ItemIcon|Bullet Lifesteal}} • {{ItemIcon|Combat Barrier}} • {{ItemIcon|Debuff Reducer}} • {{ItemIcon|Divine Barrier}} • {{ItemIcon|Enchanter's Barrier}} • {{ItemIcon|Enduring Speed}} • {{ItemIcon|Healbane}} • {{ItemIcon|Healing Booster}} • {{ItemIcon|Healing Nova}} • {{ItemIcon|Reactive Barrier}} • {{ItemIcon|Restorative Locket}} • {{ItemIcon|Return Fire}} • {{ItemIcon|Spirit Armor}} • {{ItemIcon|Spirit Lifesteal}}
With debug_mode off
{{#invoke:ItemData/nav|get_item_nav_bulletpoints|Armor|1250|3000}}
Bullet Armor • Bullet Lifesteal • Combat Barrier • Debuff Reducer • Divine Barrier • Enchanter's Barrier • Enduring Speed • Healbane • Healing Booster • Healing Nova • Reactive Barrier • Restorative Locket • Return Fire • Spirit Armor • Spirit Lifesteal
[edit source]
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[edit source]
Same as get_item_nav_bulletpoints
Examples[edit source]
With debug_mode on (for illustration purposes)
{{#invoke:ItemData/nav|get_item_nav_bulletpoints|Armor|1250|3000|debug_mode=true}}
{{ItemBox|item_name=Bullet Armor}} {{ItemBox|item_name=Bullet Lifesteal}} {{ItemBox|item_name=Combat Barrier}} {{ItemBox|item_name=Debuff Reducer}} {{ItemBox|item_name=Divine Barrier}} {{ItemBox|item_name=Enchanter's Barrier}} {{ItemBox|item_name=Enduring Speed}} {{ItemBox|item_name=Healbane}} {{ItemBox|item_name=Healing Booster}} {{ItemBox|item_name=Healing Nova}} {{ItemBox|item_name=Reactive Barrier}} {{ItemBox|item_name=Restorative Locket}} {{ItemBox|item_name=Return Fire}} {{ItemBox|item_name=Spirit Armor}} {{ItemBox|item_name=Spirit Lifesteal}}
With debug_mode off
{{#invoke:ItemData/nav|get_item_nav_bulletpoints|Armor|1250|3000}}
1,250 |
---|
Bullet Armor |
1,250 |
---|
Bullet Lifesteal |
1,250 |
---|
Combat Barrier |
1,250 |
---|
Debuff Reducer |
1,250 |
---|
ACTIVE |
Divine Barrier |
1,250 |
---|
Enchanter's Barrier |
1,750 |
---|
Enduring Speed |
1,250 |
---|
Healbane |
1,250 |
---|
Healing Booster |
1,750 |
---|
ACTIVE |
Healing Nova |
1,250 |
---|
Reactive Barrier |
1,250 |
---|
ACTIVE |
Restorative Locket |
1,750 |
---|
ACTIVE |
Return Fire |
1,250 |
---|
Spirit Armor |
1,250 |
---|
Spirit Lifesteal |
write_item_slot_subgroup[edit source]
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[edit source]
- 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[edit source]
With debug_mode on (for illustration purposes)
{{#invoke:ItemData/nav|write_item_slot_subgroup|Weapon|get_item_nav_bulletpoints|debug_mode=true}}
{{ItemIcon|Basic Magazine}} • {{ItemIcon|Close Quarters}} • {{ItemIcon|Headshot Booster}} • {{ItemIcon|High-Velocity Mag}} • {{ItemIcon|Hollow Point Ward}} • {{ItemIcon|Monster Rounds}} • {{ItemIcon|Rapid Rounds}} • {{ItemIcon|Restorative Shot}} | |
{{ItemIcon|Active Reload}} • {{ItemIcon|Berserker}} • {{ItemIcon|Fleetfoot}} • {{ItemIcon|Kinetic Dash}} • {{ItemIcon|Long Range}} • {{ItemIcon|Melee Charge}} • {{ItemIcon|Mystic Shot}} • {{ItemIcon|Slowing Bullets}} • {{ItemIcon|Soul Shredder Bullets}} • {{ItemIcon|Swift Striker}} | |
{{ItemIcon|Alchemical Fire}} • {{ItemIcon|Burst Fire}} • {{ItemIcon|Escalating Resilience}} • {{ItemIcon|Headhunter}} • {{ItemIcon|Heroic Aura}} • {{ItemIcon|Hunter's Aura}} • {{ItemIcon|Intensifying Magazine}} • {{ItemIcon|Point Blank}} • {{ItemIcon|Pristine Emblem}} • {{ItemIcon|Sharpshooter}} • {{ItemIcon|Spellslinger Headshots}} • {{ItemIcon|Tesla Bullets}} • {{ItemIcon|Titanic Magazine}} • {{ItemIcon|Toxic Bullets}} • {{ItemIcon|Warp Stone}} | |
{{ItemIcon|Crippling Headshot}} • {{ItemIcon|Frenzy}} • {{ItemIcon|Glass Cannon}} • {{ItemIcon|Lucky Shot}} • {{ItemIcon|Ricochet}} • {{ItemIcon|Shadow Weave}} • {{ItemIcon|Silencer}} • {{ItemIcon|Spiritual Overflow}} • {{ItemIcon|Vampiric Burst}} |
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.