Development Notes
Relevant source files
The following files were used as context for generating this wiki page:
- datafiles/main/chapters/37.json
- datafiles/main/chapters/33.json
- datafiles/data/weapons.json
- datafiles/data/unit_stats.json
- datafiles/data/psychic_powers.json
- datafiles/main/chapter_advantages.json
- datafiles/main/chapter_disadvantages.json
- datafiles/data/psychic_disciplines.json
- datafiles/data/technologies.json
The ChapterMaster project is built upon a data-driven architecture where game entities, mechanics, and chapter configurations are defined primarily through JSON data structures. This wiki page outlines the core technical systems, including chapter definitions, unit statistics, weaponry attributes, and psychic power mechanics as derived from the project's data files.
Chapter Configuration System
Chapters are the primary entities in the game, defined by a complex schema that includes flavor text, founding details, fleet types, and mechanical modifiers. Each chapter's JSON file dictates its starting strength, purity, and cooperation levels with other Imperial factions.
Core Chapter Attributes
Chapters utilize a numerical ID system and reference internal splash imagery and icons. Fleet types (Homeworld, Fleet based, or Penitent) determine the initial fleet composition and available resources.
Sources: datafiles/main/chapters/37.json:4-15, datafiles/main/chapters/33.json:4-15
Recruitment and Homeworlds
Chapters are assigned specific homeworld and recruiting world types, such as "Hive", "Death", or "Dead" worlds. These selections influence recruitment availability and governing rules.
Sources: datafiles/main/chapters/37.json:19-24, datafiles/main/chapters/33.json:19-24
Advantage and Disadvantage Logic
The game uses a point-based trait system. Advantages (e.g., "Elite Guard", "Ancient Armoury") and Disadvantages (e.g., "Splintered", "Tech-Heresy") modify chapter points, fleet composition, and specialist availability.
Sources: datafiles/main/chapter_advantages.json:1-10, datafiles/main/chapter_disadvantages.json:1-10
The diagram above shows how the chapter definition serves as the root for trait-based modifiers that influence game balance and initial resources.
Sources: datafiles/main/chapters/37.json:200-240, datafiles/main/chapter_advantages.json
Unit and Combat Systems
Units are defined by a set of primary statistics and starting equipment preferences.
Base Unit Statistics
Statistics for unit types (e.g., Chapter Master, Marine, Dreadnought) are stored as arrays containing a base value and a variance/modifier value.
| Unit Type | Primary Stats (BS/WS/STR) | Key Traits |
|---|---|---|
| Chapter Master | 50 / 50 / 42 | Lead by Example |
| Dreadnought | 55 / 55 / 70 | Ancient, Still Standing |
| Marine | 40 / 40 / 40 | Astartes |
| Scout | 30 / 30 / 36 | Max cap on skills |
Sources: datafiles/data/unit_stats.json:2-15, datafiles/data/unit_stats.json:181-200
Weaponry Mechanics
The weapons.json file contains a massive database of equipment. Each weapon features multiple attack profiles based on quality (standard, master-crafted, artifact).
The inheritance structure represents how weapons share core attributes like Armour Piercing (arp) while having distinct melee or ranged specific fields.
Sources: datafiles/data/weapons.json:2-100
Psychic Systems
The psychic system is divided into Disciplines (groupings) and specific Powers (actions).
Psychic Disciplines
Disciplines like Librarius, Biomancy, and Telekinesis define a theme and a specific list of available powers. Each discipline has a specific "prefix" used for internal identification.
Sources: datafiles/data/psychic_disciplines.json:2-20
Power Mechanics
Psychic powers are categorized as "attack" or "buff". Attack powers include magnitude (damage), range, and target types (enemy_unit or enemy_vehicle).
| Power Name | Type | Range | Magnitude |
|---|---|---|---|
| Smite | attack | 5 | 260 |
| Iron Arm | buff | 0 | 0 |
| Vortex of Doom | attack | 5 | 800 |
| Haemorrhage | attack | 3 | 800 |
Sources: datafiles/data/psychic_powers.json:330-360, datafiles/data/psychic_powers.json:374-386
Technological Progression
The technology system manages the unlocking of advanced gear and manufacturing capabilities via "Forging".
Forging Requirements
Advanced equipment requires specific technologies to be forged. For example, a "Heavy Flamer" requires flame_1 and heavy_1.
Sources: datafiles/data/weapons.json:448-451, datafiles/data/technologies.json:1-10
Technology Tree
Technologies often have prerequisites, creating a progression path for the chapter.
- Armour 1 (Ceramite Bonding) -> Armour 2 (Advanced Ceramite Bonding)
- Armour 2 -> Dreadnought 1 (Sarcophagus Assembly)
- Heavy 1 -> Vehicle Armaments 1
Sources: datafiles/data/technologies.json:1-115
Summary
The project's architecture relies on extensive JSON configuration to define game logic. By separating data (units, weapons, technologies) from the core engine, the system allows for highly customizable chapter experiences and complex interactions between chapter traits and combat effectiveness.
Sources: datafiles/main/chapters/37.json, datafiles/data/weapons.json, datafiles/data/unit_stats.json