How thenicelander/ck3_blood_mage works
Main Components
• Mod Descriptor & Configuration: At the root, files like descriptor.mod, .gitignore, and a few build/config files define the mod package and integration rules.
• Common Mechanics (“common” directory): This is the heart of the mod, including subdirectories for:
• Buildings: New building types related to blood magic.
• Decisions and interactions: Files for decision-making (e.g., attuning lifeforce, converting cults) and character interactions.
• Deathreasons, modifiers, opinion modifiers, religions, and scripted components: These define how blood magic influences game rules and character behaviors.
• Event Handling (“events” directory): Contains various event scripts that trigger blood magic actions (e.g., lifedrain events, conversions, power enhancements).
• Localization (“localization” directory): Provides English text files that ensure the new mechanics and events are properly translated and integrated into the game interface.
• LLM Context: Although not as common in every CK3 mod, these files appear to serve as reference configurations or contextual data for character, dynasty, and trait mechanics.
• Documentation (“docs” directory and description files): Guides for mod usage, illustrations, and any additional technical details.
Relationships and Interactions
• The "common" directory acts as the engine: it exposes game mechanics (decisions, interactions, modifiers) and connects directly to the event triggers.
• The “events” directory responds to game conditions and interacts with the decisions in the “common” files – for example, when a player uses an ability like “Drain Traits”, an event from the events folder is fired.
• Visual representation in “gfx” and textual/communications provided by “localization” ensures that players understand and engage with the Blood Mage system.
• The LLM Context files provide a secondary layer of data definitions that might support advanced logic or statistical modeling behind character attributes, interactions, and trait inheritance.
Architectural Patterns and Design Principles
• Modularity: The clear separation into directories (common, events, gfx, localization, etc.) reflects a modular design where each part deals with a specific function of the mod.
• Separation of Concerns: The mechanics (e.g., blood magic progression, lifeforce resource) are defined in their own directories so that changes in one area (say, decisions) can be managed independently of visuals (gfx) or in-game events.
• Extensibility: The separation into multiple files within common subdirectories (buildings, decisions, traits, modifiers) indicates that additional mechanics can be added in future updates without overhauling the entire system.