Table of Contents

Class NameGrammar

Namespace
FishMMO.Shared.NameGeneration
Assembly
FishMMO.Shared.dll

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.

public static class NameGrammar
Inheritance
NameGrammar
Inherited Members

Properties

BattleQualifiers

public static string[] BattleQualifiers { get; }

Property Value

string[]

BiomeMeaningCodas

public static IReadOnlyList<StringMapping> BiomeMeaningCodas { get; }

Property Value

IReadOnlyList<StringMapping>

BiomeMeaningOnsets

public static IReadOnlyList<StringMapping> BiomeMeaningOnsets { get; }

Property Value

IReadOnlyList<StringMapping>

CityPrefixes

public static string[] CityPrefixes { get; }

Property Value

string[]

CitySuffixMeanings

public static IReadOnlyDictionary<string, string> CitySuffixMeanings { get; }

Property Value

IReadOnlyDictionary<string, string>

ComposedAdjectives

public static string[] ComposedAdjectives { get; }

Property Value

string[]

ComposedQualifiers

public static string[] ComposedQualifiers { get; }

Property Value

string[]

Current

The template currently supplying the grammar, or null.

public static NameGrammarTemplate Current { get; }

Property Value

NameGrammarTemplate

DeedObjects

public static string[] DeedObjects { get; }

Property Value

string[]

DeedVerbs

public static string[] DeedVerbs { get; }

Property Value

string[]

EraQualifiers

public static string[] EraQualifiers { get; }

Property Value

string[]

FallbackCitySuffixes

public static string[] FallbackCitySuffixes { get; }

Property Value

string[]

GenericOccupations

public static string[] GenericOccupations { get; }

Property Value

string[]

IsLoaded

True once a grammar template has been registered.

public static bool IsLoaded { get; }

Property Value

bool

ItemEpithets

public static string[] ItemEpithets { get; }

Property Value

string[]

ItemGenericNouns

public static string[] ItemGenericNouns { get; }

Property Value

string[]

ItemHeroRelations

public static string[] ItemHeroRelations { get; }

Property Value

string[]

ItemLegendaryPrefixes

public static string[] ItemLegendaryPrefixes { get; }

Property Value

string[]

ItemPlaceRelations

public static string[] ItemPlaceRelations { get; }

Property Value

string[]

ItemTypeNouns

public static IReadOnlyDictionary<string, string[]> ItemTypeNouns { get; }

Property Value

IReadOnlyDictionary<string, string[]>

ItemTypeSuffixes

public static IReadOnlyDictionary<string, string[]> ItemTypeSuffixes { get; }

Property Value

IReadOnlyDictionary<string, string[]>

MeaningCodas

public static IReadOnlyList<StringMapping> MeaningCodas { get; }

Property Value

IReadOnlyList<StringMapping>

MeaningMiddles

public static IReadOnlyDictionary<string, string> MeaningMiddles { get; }

Property Value

IReadOnlyDictionary<string, string>

MeaningOnsets

public static IReadOnlyList<StringMapping> MeaningOnsets { get; }

Property Value

IReadOnlyList<StringMapping>

MeaningTitleBias

public static IReadOnlyList<StringMapping> MeaningTitleBias { get; }

Property Value

IReadOnlyList<StringMapping>

OrdinalTakingHonorifics

public static HashSet<string> OrdinalTakingHonorifics { get; }

Property Value

HashSet<string>

Ordinals

public static string[] Ordinals { get; }

Property Value

string[]

Outcomes

public static string[] Outcomes { get; }

Property Value

string[]

POITypeSuffixes

public static IReadOnlyDictionary<string, string[]> POITypeSuffixes { get; }

Property Value

IReadOnlyDictionary<string, string[]>

PlaceEpithetPatterns

public static string[] PlaceEpithetPatterns { get; }

Property Value

string[]

PlaceTakingHonorifics

public static HashSet<string> PlaceTakingHonorifics { get; }

Property Value

HashSet<string>

PossessivePronouns

public static string[] PossessivePronouns { get; }

Property Value

string[]

TitleTemplates

public static IReadOnlyList<TitleTemplate> TitleTemplates { get; }

Property Value

IReadOnlyList<TitleTemplate>

UniversalPlaces

public static string[] UniversalPlaces { get; }

Property Value

string[]

Methods

Clear()

Drops the active grammar.

public static void Clear()

MatchPrefix(IReadOnlyList<StringMapping>, string)

First row whose key the text starts with, or null. Case-insensitive.

public static string MatchPrefix(IReadOnlyList<StringMapping> rows, string text)

Parameters

rows IReadOnlyList<StringMapping>
text string

Returns

string

MatchSuffix(IReadOnlyList<StringMapping>, string)

First row whose key the text ends with, or null. Case-insensitive.

public static string MatchSuffix(IReadOnlyList<StringMapping> rows, string text)

Parameters

rows IReadOnlyList<StringMapping>
text string

Returns

string

Rebuild()

Rebuilds every lookup from Current; call after editing it at runtime.

public static void Rebuild()

Register(NameGrammarTemplate)

Makes a template the active grammar. The last one registered wins.

public static void Register(NameGrammarTemplate template)

Parameters

template NameGrammarTemplate

Unregister(NameGrammarTemplate)

Drops the active grammar, but only if it is still the given template.

public static void Unregister(NameGrammarTemplate template)

Parameters

template NameGrammarTemplate

Events

Changed

Raised when the active grammar changes.

public static event Action Changed

Event Type

Action