Template:ItemLink/doc

From CrossCode Wiki
Revision as of 17:38, 17 July 2016 by Streetclaw (talk | contribs) (→‎Item Lists: json path added)
Jump to navigation Jump to search
File:Template-info.svg Template Documentation

This is a template for adding links to items.

Code Result
{{ItemLink|Winterclaw}}
LV26Winterclaw
{{ItemLink|Geo-Data #3469}}
Geo-Data #3469
{{ItemLink|Recruit's Scope}}
LV11Recruit's Scope

Customization

There are many possibitities to customize the behavior.

Parameter Type Default Description
noIcon boolean (1/0) show (0) Hide (1) or show (0) the Icon
{{ItemLink|Ginger Tom. Salad|noIcon=1}}
Ginger Tom. Salad
showName string Item-Name Overrides the Item-Name (alternative Name)
{{ItemLink|Ginger Tom. Salad|showName=Blattsalat}}
Blattsalat
noLink boolean (1/0) show (0) Hide (1) or show (0) the Link
{{ItemLink|Chili Dog|noLink=1}}
Chili Dog
anchorOverride boolean (1/0) disabled (0) Internal use only (return the anchor-name if anchorOverride is 1)
{{ItemLink|Geo-Data #3469|anchorOverride=1}}
Geo-Data #3469
nowrap boolean (1/0) enabled (1) disable (0) or enable (1) Nowrap (prevent line breaks)
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. {{ItemLink|Scrappy Plate|nowrap=0}} Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. LV11Scrappy Plate Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
noRename boolean (1/0) disabled (0) disable (0) or enable (1) noRename (prevent auto-rename)
noRename: {{ItemLink|Rauser|noRename=1}} Rename: {{ItemLink|Rauser|noRename=0}}
noRename: LV01Rauser Rename: LV01-Rauserr

Special Items

Code Result
{{ItemLink|Health Pickup}}
Health Pickup

Default Item

If an item is misspelled, does not exist or simply has not been added to the template yet, it will show the default item image and link to the Items page (File:Foo.pngfoo).

Name

Names containing special characters are supported.

It is possible that the name appears different than that entered one:

{{ItemLink|Raw Steak}}
Raw Steak will be displayed as Raw Steak. In these cases they are marked with an r (for renamed). All renamed Items will be listet in the category AutoRenamedItem.
* {{ItemLink|Rauser}}
* {{ItemLink|-Rauser}}
* {{ItemLink|Rauser NOEZ}}
* {{ItemLink|-Rauser NOEZ}}
* {{ItemLink|Rauser|showName=No Rauser}}
* {{ItemLink|Rauser|noRename=1}}

Wikimedia supports linktrail which allows to add specific charaters to an link:

[[Hedgehag]]s

Hedgehags

Under specific conditions (parameter nowrap=0 is needed) Linktrail is supported by ItemLink:

{{ItemLink|Veggie Set|nowrap=0}}s

Veggie Sets

If nowrap is nessesary:

{{Nowrap|{{ItemLink|Veggie Set|nowrap=0}}s}}

Veggie Sets

Linktrail and renamed Items:

{{ItemLink|Rauser|nowrap=0}}s

LV01-Rauserrs

Item Lists

List Description
Template:ItemLink/iconList Contains all Icons
Template:ItemLink/nameList Contains all Items which should be Renamed
Template:ItemLink/anchorList Contains all Items which anchor should be Renamed
Template:ItemLink/linkList Contains all Links to the Item Pages

Rules for the Item Lists

  • All Items should be sorted by Id (That ist the position of the Entry inside the item-database.json. Alternative: ItemViewer on Github) - Path to item-database.json:
    • Mac OS
      1. Open the .app package (Context Menu - show package)
      2. Navigate to Contents/Resources/app.nw/data/item-database.json
    • Windows
      1. Create a copy of your Game (.exe)
      2. Rename .exe to .zip
      3. Unpack the zip file
      4. Navigate to Contents/Resources/app.nw/data/item-database.json
  • Only subsections should be editied
  • Achor Nameing rules:
    • Whitspace = _
    • English Item-names only
    • Only user the special Charaters _ and -
    • Remove all other special Chars like ' . , # ; < > ( ) { } / \
    • Remove all - if they are at first position: -Item -> Item
  • Don't be shy. If there is a missing Item, add it.