From cc221dc15843a100d267ac84ed9414cb905af8ed Mon Sep 17 00:00:00 2001 From: John Bytheway Date: Wed, 19 Feb 2020 04:45:10 -0500 Subject: [PATCH] Document the Unicode mapgen support --- doc/MAPGEN.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/MAPGEN.md b/doc/MAPGEN.md index 2f5b1fbee289c..c6b62497b6cc7 100644 --- a/doc/MAPGEN.md +++ b/doc/MAPGEN.md @@ -197,9 +197,11 @@ Example: "fill_ter": "t_grass" *required if "fill_ter" is unset* > Value: ([array]): blocks of 24 rows of blocks of 24 character lines. Each character is defined by "terrain" and optionally "furniture" or other entries below +Other parts can be linked with this map, for example one can place things like a gaspump (with gasoline) or a toilet (with water) or items from an item group or fields at the square given by a character. + Any character used here must have some definition elsewhere to indicate its purpose. Failing to do so is an error which will be caught by running the tests. The tests will run automatically when you make a pull request for adding new maps to the game. If you have defined `fill_ter` or you are writing nested mapgen, then there are a couple of exceptions. The space and period characters (` ` and `.`) are permitted to have no definition and be used for 'background' in the `rows`. -Other parts can be linked with this map, for example one can place things like a gaspump (with gasoline) or a toilet (with water) or items from an item group or fields at the square given by a character. +As keys, you can use any Unicode characters which are not double-width. This includes for example most European alphabets but not Chinese characters. If you intend to take advantage of this, ensure that your editor is saving the file with a UTF-8 encoding. Accents are acceptable, even when using [combining characters](https://en.wikipedia.org/wiki/Combining_character). No normalization is performed; comparison is done at the raw bytes (code unit) level. Therefore, there are literally an infinite number of mapgen key characters available. Please don't abuse this by using distinct characters that are visually indistinguishable, or which are so rare as to be unlikely to render correctly for other developers. Example: