Files
wiki/About-Slugs.md

8 lines
616 B
Markdown

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".