Vorlage:Inventory/doc: Unterschied zwischen den Versionen

Aus Meddlerde
(Die Seite wurde neu angelegt: „<templatedata> { "params": { "itemName1": { "description": "Name of the first item", "example": "Longsword", "type": "string", "required": true }, "quantity1": { "description": "Quantity of the first item", "example": "1", "type": "number", "required": true }, "weight1": { "description": "Weight of the fir…“)
 
Keine Bearbeitungszusammenfassung
 
Zeile 1: Zeile 1:
{{Documentation subpage}}
== Usage ==
Place the following in your page to display the inventory:
<syntaxhighlight lang="wiki">
{{Inventory
| itemName1 = Longsword
| quantity1 = 1
| weight1 = 3 lbs
| description1 = A versatile weapon
| category1 = Weapon
| itemName2 = Backpack
| quantity2 = 1
| weight2 = 5 lbs
| description2 = A sturdy backpack
| category2 = Gear
}}
</syntaxhighlight>
Item names will automatically link to their dnd5e.wikidot.com page via the {{Item}} template.
== Example ==
{{Inventory
| itemName1 = Longsword
| quantity1 = 1
| weight1 = 3 lbs
| description1 = A versatile weapon
| category1 = Weapon
| itemName2 = Backpack
| quantity2 = 1
| weight2 = 5 lbs
| description2 = A sturdy backpack
| category2 = Gear
}}
<templatedata>
<templatedata>
{
{
     "params": {
     "params": {
         "itemName1": {
         "itemName1": {
             "description": "Name of the first item",
             "description": "Name of the first item (links to Wikidot)",
             "example": "Longsword",
             "example": "Longsword",
             "type": "string",
             "type": "string",
Zeile 33: Zeile 69:
         },
         },
         "itemName2": {
         "itemName2": {
             "description": "Name of the second item",
             "description": "Name of the second item (links to Wikidot)",
             "example": "Backpack",
             "example": "Backpack",
             "type": "string",
             "type": "string",
Zeile 63: Zeile 99:
         }
         }
     },
     },
     "description": "Generates an inventory table for D&D 5e characters"
     "description": "Displays a D&D 5e style fantasy inventory box with item links to Wikidot."
}
}
</templatedata>
</templatedata>

Aktuelle Version vom 23. August 2025, 15:14 Uhr

Usage

Place the following in your page to display the inventory:

{{Inventory
 | itemName1 = Longsword
 | quantity1 = 1
 | weight1 = 3 lbs
 | description1 = A versatile weapon
 | category1 = Weapon
 | itemName2 = Backpack
 | quantity2 = 1
 | weight2 = 5 lbs
 | description2 = A sturdy backpack
 | category2 = Gear
}}

Item names will automatically link to their dnd5e.wikidot.com page via the Vorlage:Item template.

Example

🪙 Inventory

<thead> </thead> <tbody> </tbody>
Item Qty Weight Description Category
Vorlage:Item 1 3 lbs A versatile weapon Weapon
Vorlage:Item 1 5 lbs A sturdy backpack Gear

Displays a D&D 5e style fantasy inventory box with item links to Wikidot.

Vorlagenparameter

ParameterBeschreibungTypStatus
itemName1itemName1

Name of the first item (links to Wikidot)

Beispiel
Longsword
Zeichenfolgeerforderlich
quantity1quantity1

Quantity of the first item

Beispiel
1
Nummererforderlich
weight1weight1

Weight of the first item

Beispiel
3 lbs
Zeichenfolgeerforderlich
description1description1

Description of the first item

Beispiel
A versatile weapon
Zeichenfolgeerforderlich
category1category1

Category of the first item

Beispiel
Weapon
Zeichenfolgeerforderlich
itemName2itemName2

Name of the second item (links to Wikidot)

Beispiel
Backpack
Zeichenfolgeerforderlich
quantity2quantity2

Quantity of the second item

Beispiel
1
Nummererforderlich
weight2weight2

Weight of the second item

Beispiel
5 lbs
Zeichenfolgeerforderlich
description2description2

Description of the second item

Beispiel
A sturdy backpack
Zeichenfolgeerforderlich
category2category2

Category of the second item

Beispiel
Gear
Zeichenfolgeerforderlich