All the magic happens in app/NameGenerator.php
. Additional nouns can be added to the $nouns
array. You can add some modifiers to a noun to ensure it's first, last, doesn't end up next to existing names (like "Arcade High", for example), has a specific separator, and so on.
Explanation of all the possible modifiers on a noun:
$nouns = [
[
'word' => 'Streets of', // The noun
'prefix' => true, // True to ensure it's the first word in the name
'suffix' => false, // True to ensure it's the last word in the name
'not' => 'Rage', // Add other nouns you want to ensure is *not* next to. Can be an array or string.
'plural' => false, // False to prevent the word from being pluralized
'seperator' => ' ', // Force a specific seperator between words
],
]
The name is generated by a series of dice rolls:
- There is always at least one noun, but if the roll succeeds there may be a second word.
- If there are two words, they may be mashed together as a portmanteau or separated with a space or string provided by the first noun.
- The whole word might be pluralized.
- And finally there may be a year slapped on the end.