How khanmaytok/plagueis works
Main Components
• Mod Descriptor & Workspace:
• Descriptor File: The descriptor.mod file serves as the entry point that informs the game of this mod’s content.
• Workspace File: The acs_plagueis.code-workspace file indicates a development configuration for editors like Visual Studio Code.
• Configuration Files (Common):
• “common” Directory: Contains various subdirectories like character_interactions, court_positions, landed_titles, men_at_arms_types, messages, modifiers, on_action, scripted_character_templates, scripted_effects, and traits. These files are critical for defining game rules, scripted interactions, and gameplay modifiers.
• Event Scripts:
• “events” Directory: Holds event definition scripts (like acs_game_start.txt and acs_periodic_events.txt) that control in-game event flows.
• Graphical Assets:
• History and Localization:
• “history” Directory: Includes files that add depth to the lore (characters and titles).
• “localization” Directory: Offers language-specific files (English, French, German, etc.) to localize mod content.
• Additional Scripts/Configuration:
• Individual files like buffer.lua and other markdowns (e.g., MOD_REFERENCES.md) may provide additional logic or documentation reference.
Relationships and Interactions
• Core Game Rule Configurations:
• The “common” directory files collectively provide the rules, templates, and behavior modifications. They influence how events are triggered, interactions resolved, and the overall gameplay experience.
• Event Handling:
• The “events” files interact with the game engine by listening for or triggering specific actions. They likely reference or are triggered by the scripts in the “common” directory.
• Graphical Representation:
• Localization & History:
• The “history” files provide context and narrative background, often referenced in both game events and user interface elements.
Architectural Patterns and Design Principles
• Separation of Concerns: There is a clear separation between configuration (common rules), event handling (events), visual assets (gfx), and narrative (history/localization).
• Dependency Injection through Configuration: The mod relies on configuration-based extensions where changes to files in the “common” or “events” directories drive and modify game behavior without code recompilation.
• Modularity: Each subdirectory handles a discrete set of functions (e.g., character interactions, court positions, or modifiers), which highlights modular design.