Template:Item modifier compatibility/doc: Difference between revisions
Jump to navigation
Jump to search
>Illviljan mNo edit summary |
No edit summary |
||
(23 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{Documentation subpage}} | ||
This template adds a drop down table | {{Lua|Module:Modifier compatibility}} | ||
This template adds a drop down table from data tables. The data is queried from cargo tables that lists the spawnable named mods with conditions based on [[item]] [[modifier|tags]], its [[modifier|mod domain]] and [[modifier|generation type]]. | |||
==Parameters== | ==Parameters== | ||
===Item selection=== | |||
One of these is required. Do not specify more than one. | |||
{| class="wikitable" | |||
! Parameter | |||
! Value | |||
! Description | |||
|- | |||
| metadata_id | |||
| str | |||
| Metadata ID of the item to search for | |||
|- | |||
| page | |||
| str | |||
| Name of the wiki page on which the item data resides | |||
|- | |||
| item_name | |||
| str | |||
| Name of the item to search for. The search query will also extend to aliases of the item (e.g., legacy names). | |||
The search may fail if there are multiple items with the given name. In that case, use a different item selection parameter, such as <code>page</code>. | |||
|- | |||
| item_name_exact | |||
| str | |||
| Exact name of the item to search for. | |||
The search may fail if there are multiple items with the given name. In that case, use a different item selection parameter, such as <code>page</code>. | |||
|} | |||
===Optional parameters=== | |||
{| class="wikitable" | {| class="wikitable" | ||
! Parameter !! Description | ! Parameter | ||
! Value | |||
! Description | |||
|- | |- | ||
| | | item_tags | ||
| list[str] | |||
| Comma-separated list of tags. This overrides the item's tags. | |||
|- | |- | ||
| | | extra_item_tags | ||
| list[str] | |||
| Comma-separated list of tags to append to the item's tags. | |||
|} | |} | ||
==Example== | ==Example== | ||
<pre> | <pre> | ||
{{Item | {{Item modifier compatibility | ||
|item_name = Bone Helmet | |||
}} | }} | ||
</pre> | </pre> | ||
{{Item modifiers | {{Documentation categories| | ||
<!-- Categories and interwikis go here. --> | |||
[[Category:Query templates]] | |||
[[de:Vorlage:Item modifiers]] | |||
}} | }} | ||
Latest revision as of 14:08, 11 October 2023
This subpage provides documentation for Template:Item modifier compatibility.
This template adds a drop down table from data tables. The data is queried from cargo tables that lists the spawnable named mods with conditions based on item tags, its mod domain and generation type.
Parameters
Item selection
One of these is required. Do not specify more than one.
Parameter | Value | Description |
---|---|---|
metadata_id | str | Metadata ID of the item to search for |
page | str | Name of the wiki page on which the item data resides |
item_name | str | Name of the item to search for. The search query will also extend to aliases of the item (e.g., legacy names).
The search may fail if there are multiple items with the given name. In that case, use a different item selection parameter, such as |
item_name_exact | str | Exact name of the item to search for.
The search may fail if there are multiple items with the given name. In that case, use a different item selection parameter, such as |
Optional parameters
Parameter | Value | Description |
---|---|---|
item_tags | list[str] | Comma-separated list of tags. This overrides the item's tags. |
extra_item_tags | list[str] | Comma-separated list of tags to append to the item's tags. |
Example
{{Item modifier compatibility |item_name = Bone Helmet }}