User:PaladinOne/Sandbox/CGG

This is a full rewrite of the Crafting Grid Guide, as requested by . - PaladinAHOne  Staff (talk) 21:02, 11 February 2015 (UTC)

Crafting Grids are an important aspect of almost every page on the wiki, used to inform readers about how they can obtain the items and blocks they are reading about. This wiki has a dedicated set of templates, originally created by for use in displaying these grids. It is extremely important that this template syntax is understood and used correctly by all editors. This guide page has been written for that purpose.

Basics
All Crafting Grid templates are named and called using the following convention:

For example: A full list of available crafting grid templates can be seen here. If a crafting grid is not available, please contact a staff member.
 * Crafting table - Cg/Crafting Table
 * Furnace - Cg/Furnace
 * Macerator (IndustrialCraft 2) - Cg/Macerator
 * Sawmill - Cg/Sawmill

Each location within a crafting grid that can contain an item will have a specific cell name that corresponds to it. The cell names can vary across different grids, so it it is important to always read the templates' documentation pages.

The cells are filled by using the templates Grid/ and G/O: Template:Grid/Cell and Template:Grid/Ore Dictionary. These will be explained later in this guide, but in short, their purpose is to take the name of an item and display an image of it, which also displays a tooltip when the mouse is hovered over it. The choice between which to use is dependent upon how the recipe in question is defined by the mod that adds it.

Template:Grid/Cell
Grid/Cell, more commonly called Gc, is the standard template used to display items. It requests an abbreviated mod name and an item name, and displays an image of that item and a link to that item's page. A list of abbreviated mod names can be found here. Gc can also accept an alternate page for the image to link to (or none for no link), alternate text to use for the tooltip,

Template:Grid/Ore Dictionary
The Ore Dictionary is a component of Forge, designed to allow ores and ingots of the same type to be used by different mods and treated as the same. The FTB Wiki contains an Ore Dictionary extension, allowing Crafting Grid displays to do the same.

G/O, more commonly called O, is the normal way to display an object in a crafting grid, in which the crafting recipe uses the Ore Dictionary to determine recipe inputs. O is called using an Ore Dictionary name tag. A full list of all currently registered Ore Dictionary tags and the items they correspond to can be found here.

Shown below is the template call for the recipe of a Diamond Pickaxe, using the Ore Dictionary. {{Cg/Crafting Table
 * A1={{O|gemDiamond}}
 * B1={{O|gemDiamond}}
 * C1={{O|gemDiamond}}
 * B2={{O|stickWood}}
 * C2={{O|stickWood}}
 * O={{Gc|mod=V|Diamond Pickaxe}}

Tilesheets
The images displayed by Gc and O are retrieved from Tilesheets, large image files of every block and item added by a mod, and linked to by a server-side registry. A list of all tilesheets currently on the wiki can be found here, and a list of all items stored in all sheets can be found here. If Gc is given the name of an item that does not appear in a tilesheet, or is given the wrong Mod name, Gc will display a flat red box. An example is shown below.

Produces:

If this occurs, an Error will also appear under Tilesheet extension warnings in the page preview. (Remember: Always Preview pages before you save them.) In this case, the error would read: Entry missing for This Item Does Not Exist! If this occurs when editing a page, check to make sure the mod name and item name are set correctly (check the Item List to be sure), and if you are sure that the red box comes from a missing tilesheet entry, finish your editing, save the page, and report the missing entry to a wiki staff member.

What Not To Do
Over the years of this wiki, template conventions have changed. One very important convention to have changed is the use of G. G combined the functions of Gc and O, accepting an item name and returning a list of Ore Dictionary-equivalent items. The previous version of this guide said to use G almost everywhere. However, G has a few important flaws. First, it is significantly slower than Gc or O. Pages that use G can take twice as long to load as pages that use Gc and O. Second, G can display the wrong thing. Items can have more than one Ore Dictionary tag associated with them, and G does not have a way of differentiating which tag to look at when generating its list of items to display.