Skip to content
This repository has been archived by the owner on Aug 31, 2020. It is now read-only.

About Slugs

Andrew Miner edited this page Feb 3, 2015 · 1 revision

This is a term which comes up a lot in Crafting Guide, so it's best to be clear about these up front. A slug is a version of a thing's name which has any troublesome characters removed, and which has been cleaned up for easy use in programs. These are generally created with the following steps:

  1. Replace any non-alphanumeric character with an _
  2. Replace any duplicated _ with a single one
  3. Remove any _ at the start or end of the slug.
  4. Convert all letters to lowercase.

In other words, you'd convert something like "Oak Wood Planks" to "oak_wood_planks" or "(Empty) Fuel Can" to "empty_fuel_can".

Clone this wiki locally