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
DungeonPoolCount
public static int DungeonPoolCount { get; }
Property Value
POIPoolCount
public static int POIPoolCount { get; }
Property Value
TitlePoolCount
public static int TitlePoolCount { get; }
Property Value
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
racestringcityTypeCityTypeentryCityNameEntry
InjectCityName(string, string, CityType, string)
public static void InjectCityName(string race, string name, CityType cityType = CityType.Any, string meaning = null)
Parameters
InjectDungeonName(string, DungeonNameEntry)
public static void InjectDungeonName(string biome, DungeonNameEntry entry)
Parameters
biomestringentryDungeonNameEntry
InjectDungeonName(string, string, string)
public static void InjectDungeonName(string biome, string name, string meaning = null)
Parameters
InjectPOIName(string, POIType, POINameEntry)
public static void InjectPOIName(string biome, POIType type, POINameEntry entry)
Parameters
biomestringtypePOITypeentryPOINameEntry
InjectPOIName(string, string, POIType, string)
public static void InjectPOIName(string biome, string name, POIType type = POIType.Any, string meaning = null)
Parameters
InjectTitle(string, string, string)
public static void InjectTitle(string race, string category, string title)
Parameters
InjectTitles(string, string, IEnumerable<string>)
public static void InjectTitles(string race, string category, IEnumerable<string> titles)
Parameters
racestringcategorystringtitlesIEnumerable<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
racestringcategorystringrngDeterministicRNG
Returns
Events
PoolChanged
public static event Action PoolChanged