Namespace FishMMO.Shared.NameGeneration
Classes
- BiomeGenerationRequest
Fields shared by every request that names something from a biome.
- BiomePhonology
Phonology + vocabulary for a biome.
- CharacterEntry
A generated character entry: given name, optional family name and title, and the derived meaning.
- CityNameEntry
A generated city entry.
- DungeonNameEntry
A generated dungeon entry.
- GenerationRequest
Base for every generator request. The three seed fields decide determinism: with a RegionSeed the result is reproducible on any machine; without one the generator's own RNG drives the output.
- ItemNameEntry
A generated legendary item entry.
- ItemRequest
Request for legendary item name generation.
- LibraryContext
Pre-extracted name lists used to ground generated item names in existing world content.
- ModifierRegistry
Runtime index of every loaded NameModifierTemplate, keyed by its normalised modifier key. A modifier is an orthogonal flavour applied on top of any race and culture; with 30 races, 3 cultures each and 10 modifiers that is 900 name profiles from roughly the authoring cost of 30.
- NameGenerator
Public facade for the name-generation system: characters, cities, dungeons, points of interest and legendary items, all built from the naming templates registered in RaceRegistry, BiomeRegistry, ModifierRegistry and NameGrammar.
Determinism: when a request carries a
RegionSeed(and optionallyObjectSeed/Index) the result is reproducible on every peer — the same inputs derive the same DeterministicRNG. Without a seed the instance's own RNG drives the output.Thread safety: an instance is not thread-safe when its own RNG is used (no RegionSeed). For multi-threaded use construct one instance per thread, or always supply a RegionSeed so each call derives its own RNG.
- NameGrammar
The active NameGrammarTemplate, exposed as runtime lookups. The meaning tables that are scanned for a prefix or suffix match are kept in authored order (first match wins, exactly as authored); the exact-match tables are dictionaries.
- NameGrammarTemplate
The universal vocabulary every generator mode shares: the meaning tables that turn syllables into a gloss ("silver-", "of ancient", "light"), the title grammar (deeds, places, outcomes), the item vocabulary, and the city and POI tables that are not tied to one race or biome.
Exactly one of these is active; the last one loaded wins and registers itself with NameGrammar.
- NameModifierTemplate
A cross-race flavour —
ashen,bloodborn,tidebound— layered on top of any race's phonology. Its syllables are merged into the base phonology so names lean toward the theme without losing the race's sound. Registers itself with ModifierRegistry when loaded.
- NamingTableUtility
Helpers that turn the serialized table rows into runtime lookups.
- POINameEntry
A generated point-of-interest entry.
- RaceCitySuffixes
City suffix sets for a single race.
- RaceNamingData
Everything the name generator knows about one race, carried on its RaceTemplate: phonology, cultural variants, the places its titles refer to, its title vocabulary, and its city-name endings.
The serialized fields are what designers edit in the Race inspector; the runtime views are built once when the race registers with RaceRegistry, or lazily on first use.
- RacePhonology
Phonology for a single race or cultural variant.
- RaceRegistry
Runtime index of every loaded RaceTemplate that carries usable naming data, keyed by NamingKey. The registry holds no data of its own: races register as Addressables load them (or as the editor loader finds them) and leave when they unload.
- RaceTitles
Title arrays organized by category for a single race.
- RuntimeInjection
Runtime injection API for the Name Generator. Game code (mods, live-ops, content DLC) can push pre-authored city / dungeon / POI names, titles, and lore entities into the generator's working set at any point; subsequent
Generate*calls will return the injected content before falling back to procedural generation.This class is intentionally runtime-only (no Unity editor dependencies) so the same code path works in the editor, in play-mode, and in shipped builds.
Injected names are consumed FIFO — each
GenerateCityName/GenerateDungeonName/GeneratePOINamecall drains one entry from the matching pool. Titles (TitleBuilder) are sampled without being drained so a small set of curated titles can cover many characters.
- SerializableBiomePhonology
Inspector-editable phonology and vocabulary for a biome.
- SerializableCultureVariant
A cultural variant of a race: its own phonology under the race's titles and places.
- SerializableRaceCitySuffixes
City-name endings for one race, by city type.
- SerializableRacePhonology
Inspector-editable phonology for a race or one of its cultures. Converted to the runtime RacePhonology once, when the template loads.
- SerializableRaceTitles
Title vocabulary for one race, by category.
- StableHash
Cross-process-stable hashing used for deterministic seed derivation.
string.GetHashCode()is randomized per AppDomain in modern .NET (a HashDoS mitigation). That is fatal for an MMO content pipeline where two servers MUST generate the same content from the same seed. These helpers produce the same value across processes, runtimes, and platforms for the same input bytes.Algorithm: FNV-1a over UTF-8 bytes.
- StringListMapping
A string-to-list table row, e.g. a POI type and the suffixes it can take.
- StringMapping
A string-to-string table row. Unity cannot serialize a dictionary, so the naming templates author their lookup tables as ordered lists of these; order matters for the tables that are scanned for a prefix or suffix match.
- StringUtility
Shared string-sanitization helpers used by the name generator and its editor tooling.
- TitleBuilder
Template-driven title builder.
A title is a TitleTemplate from the grammar asset with its slots filled from the race's tables (honorifics, epithets, ranks, legends, occupations, places) and the grammar's universal vocabulary (deeds, eras, ordinals…). Templates whose slots cannot be filled for a race are skipped; honorifics only take a place or an ordinal when the grammar says they may; honorifics follow the character's gender; and a length budget decides whether a second clause is appended at all.
Examples:
Sir·Lady of Ashford·King, Third of his Name·the Ironwilled·Master Coinkeeper of Kingshold·Who Sealed the Dark Gate at the Battle of Hollow Hill.
- TitleMemory
Remembers recent titles so a batch does not hand the same authored legend to two characters in a row. One per generator; not shared across peers, and never consulted when a request is seeded, since a seeded title must replay exactly regardless of what was generated before it.
- TitleOptions
What the caller wants from a title: category, register, gender, role and size.
- TitlePoolRegistry
The loaded TitlePoolTemplates and the per-race merge of a race's own titles and places with every pool that serves its category. Holds no data of its own: pools register as they load. Pools are kept in name order and merged race-first, so the merged list — and therefore every seeded title — is identical on every peer whatever the load order.
- TitlePoolTemplate
Titles and places shared by every race in one or more categories, drawn on top of each race's own Titles. A pool for "Undead" gives every undead race grave-wardens and barrow-lords without repeating them on each template; a pool with no categories serves every race. Registered in TitlePoolRegistry on load.
- TitleTemplate
One way of composing a title, authored in the grammar asset. The pattern names its slots in braces —
{honorific:place} of {place}— and the builder fills them from the race's tables and the grammar; a template whose slots cannot all be filled for a given race is simply not used.
- UniqueResult<T>
Outcome of a unique-name batch generation.
- WeightedCoda
One coda syllable and how often it should be drawn relative to the others.
Enums
- CityType
City type categories for generation.
- ItemType
Category of legendary item to generate.
- POIType
POI category types for generation.
- TitleRegister
The social register a title belongs to. A banker wants a Civil title, a warchief a Martial one, a legendary hero a Mythic one; Any lets the name's meaning decide.