Table of Contents

Class RuntimeInjection

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

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 / GeneratePOIName call 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.

public static class RuntimeInjection
Inheritance
RuntimeInjection
Inherited Members

Properties

CityPoolCount

Counts for debugging / editor UIs.

public static int CityPoolCount { get; }

Property Value

int

DungeonPoolCount

public static int DungeonPoolCount { get; }

Property Value

int

POIPoolCount

public static int POIPoolCount { get; }

Property Value

int

TitlePoolCount

public static int TitlePoolCount { get; }

Property Value

int

Methods

ClearAll()

public static void ClearAll()

ClearCityPool()

public static void ClearCityPool()

ClearDungeonPool()

public static void ClearDungeonPool()

ClearPOIPool()

public static void ClearPOIPool()

ClearTitlePool()

public static void ClearTitlePool()

InjectCityName(string, CityType, CityNameEntry)

public static void InjectCityName(string race, CityType cityType, CityNameEntry entry)

Parameters

race string
cityType CityType
entry CityNameEntry

InjectCityName(string, string, CityType, string)

public static void InjectCityName(string race, string name, CityType cityType = CityType.Any, string meaning = null)

Parameters

race string
name string
cityType CityType
meaning string

InjectDungeonName(string, DungeonNameEntry)

public static void InjectDungeonName(string biome, DungeonNameEntry entry)

Parameters

biome string
entry DungeonNameEntry

InjectDungeonName(string, string, string)

public static void InjectDungeonName(string biome, string name, string meaning = null)

Parameters

biome string
name string
meaning string

InjectPOIName(string, POIType, POINameEntry)

public static void InjectPOIName(string biome, POIType type, POINameEntry entry)

Parameters

biome string
type POIType
entry POINameEntry

InjectPOIName(string, string, POIType, string)

public static void InjectPOIName(string biome, string name, POIType type = POIType.Any, string meaning = null)

Parameters

biome string
name string
type POIType
meaning string

InjectTitle(string, string, string)

public static void InjectTitle(string race, string category, string title)

Parameters

race string
category string
title string

InjectTitles(string, string, IEnumerable<string>)

public static void InjectTitles(string race, string category, IEnumerable<string> titles)

Parameters

race string
category string
titles IEnumerable<string>

TryPickTitle(string, string, DeterministicRNG)

Deterministically sample an injected title for (race, category) via the provided RNG, or return null if the pool for that key is empty. Falls back from (race,cat) → (any,cat) to let designers inject race-agnostic titles.

public static string TryPickTitle(string race, string category, DeterministicRNG rng)

Parameters

race string
category string
rng DeterministicRNG

Returns

string

Events

PoolChanged

public static event Action PoolChanged

Event Type

Action