Extension:OreDict

From Gamepedia Help Wiki
Jump to: navigation, search
OreDict
Version 3.3.1
Author(s) Jinbobo
Eli Foster
Eric Schneider (Xbony2)
Extension link On GitHub
Requirements Tilesheets
Description
An extension that mimics the ore dictionary in Minecraft.

The OreDict extension mimics the Minecraft Forge OreDictionary using tag names, mod abbreviations, and item names. This is extension uses a lot of the features from the Tilesheets extension, making them go hand-in-hand.

Special pages[edit | edit source]

  • ImportOreDict - Used to add several OreDict entries at once.
  • OreDictEntryManager - Used to edit a single OreDict entry's values or create a single OreDict entry with an intuitive graphic user interface.
  • OreDictList - Lists all of the OreDict entries created on the wiki.

Usage[edit | edit source]

#dict parser function[edit | edit source]

The #dict parser function displays all tiles (from the Tilesheets extension) registered to the specified OreDict tag.

Parameters[edit | edit source]

  • 1: The tag or item name to select by.
  • tag: Set to specify that it is being selected by tag name.
If this is not set, it will search for entries whose name—not tag—matches the first parameter. It will display multiple OreDict entries that match the same item and mod pairs but have different tag names.
  • mod: Set to a mod abbreviation to include only entries in this mod.
  • no-fallback: Set to prevent the fallback icon from showing for missing OreDict entries. This does not suppress OreDict entries from showing error tiles entirely. For example, calling #dict with ingotIron and this option set when there is no registered ingotIron OreDict entry would return nothing. However, if there was an entry at ingotIron pointing to Iron Ingot from V, but that tile itself did not exist, it would return the error icon.

Any other parameters will be passed directly to the {{G/Cell}} template through the OreDictOutput hook in the Tilesheets extension.

ImportOreDict[edit | edit source]

The ImportOreDict special page is used to import OreDict entries. Each entry is separated by a newline. There are five parameters for each entry, two of which can be left blank.

Parameter Description Required
tagName The tag name that is used to call all items of that OreDict entry. X
itemName The name of the item as defined with the Tilesheets extension. X
modName The abbreviation of the mod as defined with the Tilesheets extension. X
gridParams Nobody has any idea what these are for. Ignore.
flags The flags to apply to the entry. See below for the definitions of the various flags.

An example import line is: logWood!Oak Wood Log!V!!.

OreDictEntryManager[edit | edit source]

The initial special page only has a single search field and two buttons: Go and Create new entry. Go will find the entry at the ID that you have defined in the search field, and take you to its modification page. This field only takes integer values. Create new entry will redirect you to the entry creation page.

Entry creation[edit | edit source]

On this page, there are 13 new fields. Many of these are associated with various entry flag values.

Field name Description Associated flag
Entry ID The entry ID that is given to the entry. This cannot be changed, and is handled entirely by the extension.
Ore dictionary tag name The desired tag name for the entry. This is what will be used to call all items of that tag.
Item name The name of the item.
Abbreviated mod name The abbreviated mod name defined with the Tilesheets extension.
Default grid parameters
Entry flag value The entry's current sum flag value.
Select tag by member items 64 or 0x40
Select tag by tag name 128 or 0x80
Select entry by item name 1 or 0x01
Select entry by tag name 2 or 0x02
Display entry when selected by item name 4 or 0x04
Display entry when selected by tag name 8 or 0x08
Mark entry as deleted Flags the item as disabled. There is currently no way to actually delete entries from the database. 256 or 0x100

Entry modification[edit | edit source]

This has all of the same parameters as the creation page, though its tag name is locked at the given ID's tag name, and its values are defaulted to the ones provided by that ID.

OreDictList[edit | edit source]

This lists all OreDict entries on a given wiki. It can be searched with entry IDs, prefixes, tag names, mod names, and the amount shown per page can be changed. It displays the entry in a table, with the ID, the tag name, item name, mod name, grid parameters, and flags. There is also an edit button that will take you to the entry manager modification page for that given entry.

API[edit | edit source]

The OreDict extensions provides MediaWiki API action modules for interacting with the extension. The parameters are prefixed with od.

action=neworedict[edit | edit source]

Creates a new OreDict entry.

Parameters[edit | edit source]

  • mod (String): (Required) The mod abbreviation for the new entry.
  • tag (String): (Required) The tag name for the new entry.
  • item (String): (Required) The item name for the new entry.
  • params (String): (Defaults to "") The grid parameters for the new entry.
  • flags (Integer): (Defaults to "207") The flags for the new entry.
  • token (csrf)

Returns[edit | edit source]

  • edit
    • neworedict
      • result: New entry's ID

Possible errors[edit | edit source]

  • permissiondenied: User does not have editoredict permission.
  • entryexists: The entry for item, tag, and mod already exists.

action=deleteoredict[edit | edit source]

Deletes an OreDict entry from the table by its ID.

Parameters[edit | edit source]

  • ids (Integer, separate with "|", minimum value is "1"): (Required) A list of entry IDs to delete.
  • token (csrf)

Returns[edit | edit source]

  • edit
    • deleteoredict
      • entry ID => deletion success (boolean)
      • entry ID => deletion success (boolean)
      • ...

Possible errors[edit | edit source]

  • permissiondenied: User does not have the editoredict permission.

action=editoredict[edit | edit source]

Updates the mod, tag, name, params, and/or flags for a given entry.

Parameters[edit | edit source]

  • mod (String): (Optional) The new mod abbreviation for the entry.
  • tag (String): (Optional) The new tag name for the entry.
  • item (String): (Optional) The new item name for the entry.
  • params (String): (Optional) The new grid parameters for the entry.
  • flags (Integer): (Optional) The new flags for the entry.
  • id (Integer, minimum value is "1"): (Required) The entry ID, to determine which entry to update.
  • token (csrf)

Returns[edit | edit source]

  • edit
    • editoredict
      • entry ID => true

Possible errors[edit | edit source]

  • dbfail: Failed to edit the ID in the database.
  • nodiff: There was no change made for the entry.
  • entrynotexists: There is no entry for the provided ID.
  • permissiondenied: User does not have the editoredict permission.

action=query&prop=oredictentry[edit | edit source]

Get OreDict entry data.

Parameters[edit | edit source]

  • ids (Integer, separate with "|", minimum value is "1"): (Required) The IDs for the entries to obtain information for.

Returns[edit | edit source]

  • query
    • oredictentries
      • entry ID
        • tag_name => The tag name for this ID
        • mod_name => The mod name for this ID
        • item_name => The item name for this ID
        • grid_params => The grid parameters for this ID
        • flags => The entry flags for this ID
        • id => The entry ID

Possible errors[edit | edit source]

There are no errors for this module.

action=query&list=oredictsearch[edit | edit source]

Searches for OreDict entries that meet specific criteria defined by the optional parameters.

Parameters[edit | edit source]

  • limit (Limit, minimum value is "1", maximum for users is "500", maximum for bots is "5000"): (Defaults to 10) The maximum number of entries to list.
  • prefix (String): (Defaults to "") Restricts results to those that have a tag alphabetically after the prefix.
  • mod (String): (Defaults to "") Restricts results to this mod.
  • tag (String): (Defaults to "") Restricts results to this tag name.
  • name (String): (Defaults to "") Restricts results to this item name.
  • from (Integer, minimum value is "0"): (Defaults to "0") The entry ID to start listing at.

Returns[edit | edit source]

  • query
    • totalhits => The number of entries returned
    • oredictentries
      • tag_name => The tag name for this ID
      • mod_name => The mod name for this ID
      • item_name => The item name for this ID
      • grid_params => The grid parameters for this ID
      • flags => The entry flags for this ID
      • id => The entry ID

Possible errors[edit | edit source]

There are no errors for this module.