Module:ItemData/nav/doc: Difference between revisions

Undo revision 24590 by Gammaton32 (talk) restored
Tag: Undo
LVL (talk | contribs)
No edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=Overview=
=Overview=
Functions for creating navigation boxes/lists for items, grouped by a slot/category and souls
Functions for creating navigation boxes/lists for items, grouped by a slot/category and souls. Supports filtering for Street Brawl items.


=Functions=
=Functions=
Line 6: Line 6:
Gets a list of items that are each sent to the [[Template:ItemIcon]] template, separated by bullet points.
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.
Filters down to a slot/specific category, and within a range of souls. Can optionally filter for Street Brawl items.


===Parameters===
===Parameters===
Line 13: Line 13:
* '''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 <code>cost + 1</code>)
* '''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 <code>cost + 1</code>)
* '''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.
* '''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.
* '''filter''' - (OPTIONAL) - Filters items based on Street Brawl status. Options: <code>exclude_street_brawl</code> (show only regular items), <code>street_brawl_only</code> (show only Street Brawl items), or unset (show all)


===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|3001|debug_mode=true}}</nowiki></code>
<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|3001|debug_mode=true}}
{{#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>


Line 29: Line 35:
Gets a list of items that are each sent to the [[Template:ItemBox]] template, separated by space.
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. Can optionally filter for Street Brawl items.


===Parameters===
===Parameters===
Line 47: Line 53:


==write_item_slot_subgroup==
==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]]
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]]. Street Brawl items are automatically separated into their own row at the end.


===Parameters===
===Parameters===
Line 53: Line 59:
* '''type''' - The subfunction to call that determines the list formatting style. Options are 'get_item_nav_bulletpoints' or 'get_item_nav_cards'
* '''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.
* '''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.
* '''street_brawl_label''' - (OPTIONAL) - Custom label text for the Street Brawl row. Defaults to "Street Brawl"


===Examples===
===Examples===
Line 67: Line 74:


Recall that it creates subgroup parameters for the mentioned templates.
Recall that it creates subgroup parameters for the mentioned templates.
==generate_active_items_table==
Creates table of localized released active items. Used in [[Template:Active Items]]
===Example===
<pre>{{#invoke:ItemData/nav|generate_active_items_table}}</pre>
{{#invoke:ItemData/nav|generate_active_items_table}}