The m12 Name Generator provides a class which returns an array of words (presumably names or words you want to combine into names) which, with minimal effort, can be used to generate random names for NPCs (e.g Alice, Bob Wilkins, Catfoot Wanderhill), units (e.g 101st Airborne, Red Squadron), towns (North Sunnyville), or whatever else you want.
The generator derives these words from plaintext files located in the "sources" subfolder. These sources are extensible, meaning the user can add their own folders and files to this source folder and have their names generatable (csv and json files are currently not supported.)
These sources are organized with a tag system. Filenames and parent folder names are applied as tags to their children automatically, and further tags can be defined in a "tags" file.
Tags can be accessed as constants in the editor from the class "m12NameGeneratorAutoTags", e.g m12NameGeneratorAutoTags.english, m12NameGeneratorAutoTags.color, etc
A demo scene located in the DEMO subfolder demonstrates some basic use cases of this name generator. "demo_scene.gd" provides code examples whose output is printed to console if you run the scene. Select excerpts are previewed above.
For further documentation refer to README.md in the project folder, or by clicking through to the Github repository. Note that because .txt and .md files are not automatically treated as resources by Godot, they will NOT be added to your exported project automatically. In order to use m12NameGenerator in an exported project you will need to manually set the non-resource export filter in the Export dialog to include the file extensions of your sources (e.g *.txt, *.md). Consult the FileAccess documentation and/or m12_export_settings.jpg to see exactly what you need to change.
Portions of this code were adapted from the excellent plugin const_generator by tischenkob, specifically the functionality to access tags in code as constants, so shoutout to him. If you appreciate the autotag feature and would like your whole project to have that convenience (seriously, super useful for groups,) check out his const_generator in the Godot Asset Library (at time of upload it does not seem to have made it to the Asset Store, but here's hoping)
Changelog for version m12 Name Generator 1.0.1
No changelog provided for this version.