Dynamic Name Generation
Relevant source files
The following files were used as context for generating this wiki page:
The Dynamic Name Generation system in ChapterMaster is a data-driven framework designed to assign unique identities to key personnel, geographic locations, and organizational structures within a Space Marine Chapter. The system utilizes a combination of pre-defined static values provided in JSON configuration files and fallback logic that triggers automated generation when specific fields are left blank. This ensures that every Chapter, whether canon or custom-made, possesses a complete set of names for its leadership and assets.
Sources: datafiles/main/chapters/37.json:115-132, datafiles/main/chapters/33.json:155-172
Architecture and Configuration
The naming logic is primarily governed by Chapter-specific JSON files located within the datafiles/main/chapters/ directory. Each file contains a names block and several top-level strings that dictate how the game engine should populate identities.
Chapter Leadership and Staff
The names object within each Chapter file serves as the primary registry for high-ranking officials. If these fields are populated with a string, the system uses that specific name. If left as an empty string (""), the system triggers an autogeneration routine.
Key fields subject to dynamic generation include:
- Chapter Staff: Head Chaplain (
hchaplain), Chief Librarian (clibrarian), Forge Master (fmaster), and Head Apothecary (hapothecary). - Company Captains: Roles such as Watch Master, Admiral, Lord Executioner, and Recruiter.
Sources: datafiles/main/chapters/37.json:115-132, datafiles/main/chapters/33.json:155-172
Geographic and Asset Naming
Beyond personnel, the system manages names for planetary bodies and naval assets. Fields such as homeworld_name, recruiting_name, and flagship_name follow a "blank-to-autogenerate" logic.
| Configuration Field | Description | Autogeneration Trigger |
|---|---|---|
homeworld_name | Name of the Chapter's primary planet | Empty string ("") |
recruiting_name | Name of the planet used for recruitment | Empty string ("") |
flagship_name | Name of the Chapter's primary capital ship | Empty string ("") |
squad_name | The collective noun used for units (e.g., "Squad", "Kill Team") | Specified string |
Sources: datafiles/main/chapters/37.json:21-25, datafiles/main/chapters/33.json:21-25, datafiles/main/chapters/33.json:200
Component Relationships
The following diagram illustrates how the Chapter configuration interacts with the naming system to determine the final identity of game entities.
The system prioritizes manual overrides in the JSON configuration before falling back to randomized pools.
Sources: datafiles/main/chapters/37.json:21-25, datafiles/main/chapters/36.json:115-130
Custom Role and Squad Naming
Chapters can override standard unit titles through the custom_roles and custom_squads blocks. This allows for thematic naming conventions that align with a Chapter's specific "flavor."
Specialist Role Overrides
The custom_roles block redefines the titles for specialists. For example, the Celestial Lions Chapter renames standard roles to reflect their unique culture:
- Captain becomes Warleader
- Sergeant becomes Pride Leader
- Chaplain becomes Deathspeaker
- Librarian becomes Spiritwalker
Source: datafiles/main/chapters/35.json:208-225
Squad Formation Naming
The custom_squads block allows for naming specific unit compositions. The Deathwatch Chapter utilizes this to define various "Kill Teams," such as:
- Aquila Kill Team (Tactical Squad override)
- Venator Kill Team (Devastator Squad override)
- Furor Kill Team (Terminator Assault override)
Source: datafiles/main/chapters/33.json:265-420
Implementation Example: Personnel Names
The following snippet demonstrates how a Chapter defines static names for leadership while leaving others for dynamic generation.
"names": {
"hchaplain": "",
"clibrarian": "",
"honorcapt": "Kassayan",
"arsenalmaster": "Orelius",
"admiral": "Nigelus",
"marchmaster": "Benedict"
}
In this instance, specific captains have fixed names, while the Head Chaplain and Chief Librarian will be named dynamically upon game initialization.
Sources: datafiles/main/chapters/36.json:115-125
Dynamic Name Generation provides a flexible layer of immersion, allowing the project to support both strictly defined lore (such as the Raptors or Consecrators) and the infinite variety required for custom Chapter creation.