A: The most common cause is an incorrect load order. Please double-check that this compatibility patch loads after Harmony, Core, RJW, Cumpilation, and RJW Menstruation. See the Installation section for the correct order. If the load order is correct, check RimWorld's debug log (enable Development Mode in Options) for specific error messages. Enable "Debug Logging" in this mod's settings for more detailed output. Report the issue on the mod page ([Link to Issues/Workshop - TBD]) with your log file (e.g., using HugsLib's log sharing feature).
Overview
This mod aims to provide a smooth experience for players using both the "Cumpilation" and "RJW Menstruation" mods by resolving potential conflicts and integrating their features where appropriate. It acts as a bridge, ensuring mechanics like fertility, pregnancy, and bodily fluids interact logically and consistently based on configurable settings.
This web page serves as the companion documentation and helper tool, offering detailed explanations, configuration guides, and troubleshooting assistance.
Features
- Resolves known conflicts between Cumpilation and RJW Menstruation mechanics.
- Ensures consistent handling of fertility, pregnancy, and related bodily functions affected by both mods.
- Harmonizes relevant Hediffs (e.g., fertility cycles, fluid effects) and game logic.
- Optional configuration settings via the Mod Settings menu to customize integration behavior (e.g., fertility sync, fluid interactions).
-
This interactive web-based helper tool for documentation and troubleshooting:
- FAQ Search/Filter
- Interactive Load Order Example
- Logic Flow Visualizer (using Mermaid.js)
- (Planned) Configuration Simulator
- (Planned) Troubleshooting Wizard
- (Planned) Live Log Analyzer
- (Planned) Dynamic Compatibility Matrix
Installation
- Ensure RimWorld, Harmony, Cumpilation, and RJW Menstruation are installed and enabled.
- Download the latest release of this compatibility patch from [Link to Release/Workshop Page - TBD].
-
Place the mod folder in your RimWorld
Mods
directory or subscribe via the Steam Workshop. - Activate the mod in the RimWorld mod list.
-
Load Order: This is crucial! Ensure this patch
loads after Harmony, Core, RJW, Cumpilation, and RJW
Menstruation.
Example Load Order (Hover over key mods):
- Harmony
- Core
- Royalty (if applicable)
- Ideology (if applicable)
- Biotech (if applicable)
- ... (Other Core/DLC Patches)
- RJW
- Cumpilation
- RJW Menstruation
- [This Mod] Cumpilation & RJW Menstruation Compatibility
- ... (Other mods)
How it Works
This patch uses the Harmony library to modify the behavior of Cumpilation and RJW Menstruation at runtime without altering their original code directly. This non-destructive patching approach maximizes compatibility and reduces the chance of conflicts with mod updates. Key areas of integration include:
- Fertility Synchronization: Patches ensure that fertility calculations consider the pawn's menstrual cycle status (fertile window, infertile phases from RJW Menstruation) alongside fertility modifiers from Cumpilation (e.g., effects of cum). Rules are established for how these factors combine or take precedence, configurable via Mod Settings.
- Pregnancy Consistency: Adjustments are made to pregnancy chance calculations. Factors like timing within the menstrual cycle, Cumpilation fluid effects (potency, volume), pawn traits/genes, and existing Hediffs are considered cohesively to prevent conflicting outcomes or double-counting modifiers. A unified check can be enabled.
-
Hediff Harmonization: The patch manages how Hediffs
from both mods interact. This might involve preventing redundant
Hediffs, ensuring Cumpilation fluids don't inappropriately interfere
with cycle progression (or defining specific interactions if
intended and configured), and vice-versa. Compatibility-specific data might be
stored using
ModExtension
or customHediffComp
s. - Event Handling: Relevant events from both mods (e.g., orgasm events, cycle phase changes) might be monitored or patched to trigger appropriate cross-mod effects or updates based on configuration.
The goal is seamless integration, making the two mods feel like they were designed to work together regarding these specific mechanics. Refer to the Configuration and Technical Details sections for more information.
Logic Flow Visualizer (Example: Unified Fertility Check)
Diagram illustrating the combined fertility check process when enabled in settings (requires Mermaid.js).
graph TD A[Fertility Check Triggered] --> B{Is Pawn Ovulating? (RJW Menstruation)}; B -- No --> F[Result: Infertile]; B -- Yes --> C{Base Fertility + Genes/Traits}; C --> D{Apply Cumpilation Fluid Effects? (Setting)}; D -- Yes --> E[Apply Fluid Modifiers]; D -- No --> G[Calculate Final Fertility Chance]; E --> G; G --> H[Result: Final Fertility %];
Configuration
This mod includes optional settings accessible via RimWorld's main menu -> Options -> Mod Settings -> "Cumpilation & RJW Menstruation Compatibility". Default settings aim for logical and balanced integration, but you can customize the behavior.
Available options typically include:
- Enable Fertility Synchronization: (Default: On) Makes Cumpilation fertility effects respect RJW Menstruation's fertile/infertile windows.
- Fluid Affects Cycle: (Default: Off/Minimal) Allows configuration for Cumpilation fluid exposure to potentially influence the menstrual cycle (e.g., delay, severity). Requires careful balancing.
- Cycle Affects Fluid Effects: (Default: On) Allows the current phase of the menstrual cycle to modify the impact or absorption of Cumpilation fluids.
- Use Unified Pregnancy Check: (Default: On) Consolidates pregnancy chance calculations to prevent conflicts and ensure consistent application of modifiers from both mods.
- Fertility Boost Multiplier: (Slider/Input) Adjusts the impact of Cumpilation fluids on fertility during the fertile window.
- Enable Debug Logging: (Checkbox) Outputs detailed logs to the RimWorld debug console for troubleshooting.
- Configuration Presets: (Buttons) Load recommended settings or save/load custom configurations.
Always check the Mod Settings menu in-game for the most up-to-date options and their descriptions (tooltips). This web page provides a general guide.
Configuration Simulator (Planned)
This section will allow you to select hypothetical mod settings and see explanations of the resulting gameplay effects.
Troubleshooting & FAQ
Q: I'm getting errors after installing this mod. What should I do?
Q: Does this mod add new gameplay features or content?
A: No, this is purely a compatibility patch. It modifies existing mechanics from Cumpilation and RJW Menstruation to ensure they work together correctly based on settings. It does not introduce new items, Hediffs, events, or major gameplay systems itself, though it might use internal Hediffs or components for tracking state.
Q: What happens if I don't use the correct load order?
A: Incorrect load order can lead to various problems: errors during startup or gameplay (check the debug log!), features not working as expected (e.g., fertility calculations being wrong, conflicts not being resolved), or the patch simply having no effect at all because its Harmony patches don't find the methods they need to modify. The correct load order is essential.
Q: Is this compatible with [Other Mod Name]?
A: Compatibility depends on what the other mod changes. This patch primarily targets methods and Hediffs related to fertility, pregnancy, and specific fluid/cycle mechanics within Cumpilation and RJW Menstruation. Mods that heavily modify these same systems might conflict. It's generally compatible with mods that don't touch these specific areas. See the Compatibility section for more details and planned matrix. If you suspect a conflict, please report it with details.
Q: How do I find and share my debug log?
A: First, enable "Development Mode" in RimWorld's Options menu. If
errors occur, a log window might pop up, or you can open it with
the `
key (tilde/backtick, usually left of '1'). For sharing, the best way is to use
the HugsLib mod, which adds a green "Share Logs" button in the log window. Click it and share the provided link. Alternatively, you can find the Player.log
file manually in your RimWorld configuration folder (location varies by OS - search online for "RimWorld Player.log location [your OS]"). Enable this mod's debug logging in settings for more relevant info.
Q: Will this mod affect performance?
A: The mod uses Harmony patching, which is generally efficient. Patches are applied at startup. While any mod adds some overhead, this patch is designed to be lightweight and should have minimal impact on performance during normal gameplay. Performance-intensive calculations (like frequent checks in Tick() methods) are avoided or optimized where possible. If performance issues arise, check for conflicts or enable debug logging to see if the patch is overly active.
Troubleshooting Wizard (Planned)
This section will eventually guide users through common problems with a step-by-step process.
Live Log Analyzer (Planned)
(Advanced) This section might allow pasting log snippets to check for known errors related to this patch.
Compatibility
This mod is designed specifically to bridge Cumpilation and RJW Menstruation. Compatibility with other mods depends on their interactions with these core systems.
- Required Dependencies: Harmony, Core, RJW, Cumpilation, RJW Menstruation.
- Race Mods: Generally compatible. Patches aim to be race-agnostic, but races with highly unique reproductive mechanics (non-mammalian cycles, unusual fluid interactions) might have untested edge cases. Report issues.
- Biotech DLC: Supported. Interactions with genes affecting fertility, pregnancy, cycles, and fluid production are considered. Pollution and mechanitor implants should not directly conflict.
- Other RJW Addons:
- RJW Children/Pregnancy: Should generally be compatible, as this patch focuses on fertility checks and cycle interaction, not the pregnancy Hediff itself once initiated (unless conflicts arise). Load order might matter.
- SafeJobWorld: Likely compatible, as it focuses on job assignments.
- Other addons modifying fertility/pregnancy Hediffs: Potential for conflict. Load this patch after other RJW addons unless specified otherwise.
- Mods Affecting Health/Hediffs: Generally compatible unless they directly modify the same fertility/pregnancy logic or Hediffs targeted by this patch (e.g.,
Hediff_MenstruationCycle
,Hediff_Cum
interactions). - Performance Mods (e.g., RimThreaded): Compatibility is not guaranteed, especially with mods that heavily patch sensitive game logic like Hediffs and pawn state updates. Use with caution and report any threading issues.
If you encounter issues with a specific mod, please report it with details about the mod, load order, settings, and the observed behavior.
Mod Compatibility Matrix (Planned)
This section will eventually list known compatibility statuses with specific popular mods, potentially loaded dynamically.
Known Issues
Please report any bugs or unexpected behavior you encounter via the issue tracker or mod page.
- Currently no major known issues.
Technical Details (For Modders & Advanced Users)
This section outlines the internal design and implementation approach.
Patching Strategy
- Uses Harmony for runtime patching.
- Prioritizes `[HarmonyPatch]` attributes targeting specific methods in Cumpilation and RJW Menstruation.
- Favors non-destructive `[HarmonyPrefix]` (often returning `false` to replace logic) and `[HarmonyPostfix]` (to modify results or trigger side effects).
- Uses `[HarmonyPrepare]` for conditional patching based on mod presence or settings.
- Targets methods related to fertility calculation, Hediff ticking/application (especially `Hediff_MenstruationCycle`, `Hediff_Cum`, pregnancy Hediffs), pregnancy chance calculation, fluid effects, and cycle updates.
- XML Patches are used sparingly, primarily for adding `ModExtension` data or simple Def adjustments if necessary, using XPath for robustness.
Integration Logic
- Fertility Sync: Patches fertility checks to incorporate `Hediff_MenstruationCycle` state. Order of operations (base -> cycle -> hediffs -> fluids) is defined and potentially configurable.
- Pregnancy Consistency: Patches or replaces pregnancy chance methods to use a unified calculation considering factors from both mods according to settings. Aims to prevent double-triggers or conflicting results.
- Hediff Harmonization: Manages interactions via patches. May add custom `HediffComp` to store compatibility state (e.g., on `Hediff_MenstruationCycle`) or use `ModExtension` on relevant Defs. Can disable or modify conflicting Hediff effects based on settings.
- State Management: Uses `HediffComp` or potentially a custom `Pawn_Comp` for pawn-specific state. Avoids global components unless necessary.
- Event Handling: Patches relevant event triggers (e.g., orgasm, cycle change) to ensure integrated logic runs.
Configuration & Debugging
- Uses standard RimWorld `Mod` and `ModSettings` classes.
- Provides granular settings with clear tooltips.
- Includes toggleable debug logging (`Verse.Log` prefixed with `[CumpilationRJWCompat]`) controlled via Mod Settings.
- May include Dev Mode debug actions for testing specific scenarios.
Compatibility & API
- Includes startup checks for dependencies.
- Designed to be race-agnostic where possible.
- Considers Biotech gene interactions.
- May expose a simple static API class (e.g., `CumpilationRJWCompat.API`) for other mods to query integrated state (e.g., `IsPawnFertile(pawn)` considering both mods and settings). API stability will be maintained where possible.
Design Philosophy
The primary goal of this patch is seamless integration and user choice.
- Compatibility First: Aim to make Cumpilation and RJW Menstruation work together logically without fundamentally changing the core experience of either mod, unless necessary to resolve a direct conflict.
- Non-Destructive: Use Harmony patching to avoid modifying the original mod assemblies directly, improving compatibility with updates.
- Configurability: Provide clear options in Mod Settings to allow users to tailor the integration to their preferences, from minimal conflict resolution to deeper mechanical links. Default settings should represent a sensible baseline.
- Clarity: Ensure that the interactions, settings, and potential outcomes are clearly documented (via this web tool and in-game tooltips).
- Performance Conscious: Implement patches efficiently, avoiding unnecessary calculations in frequently called code paths (like `Tick`).
- Maintainability: Structure the code logically to facilitate updates and debugging as the core mods evolve.
The patch should feel like a natural extension, resolving inconsistencies rather than adding entirely new, complex systems.
Changelog
v1.0.0 (Initial Release) - [YYYY-MM-DD]
- Initial release providing basic compatibility patches.
- Synchronized fertility windows between RJW Menstruation cycles and Cumpilation effects (configurable).
- Implemented unified pregnancy check logic (configurable).
- Resolved initial Hediff conflicts related to fertility/pregnancy chance.
- Added basic Mod Settings menu for configuration.
- Created initial documentation web page with FAQ, load order guide, basic technical details.
- Implemented FAQ search, theme toggle, and Mermaid.js diagram example.
Contributing
Contributions are welcome! This includes reporting bugs, suggesting
features, providing feedback, improving documentation, or submitting code changes (pull
requests). Please check the mod's source repository ([Link to Repository - TBD]) for contribution guidelines
(CONTRIBUTING.md
) if available.
When reporting issues, please provide as much detail as possible:
- Clear description of the problem and expected behavior.
- Steps to reproduce the issue consistently.
- Your mod list (especially relevant mods like RJW addons, race mods, health mods). Use HugsLib for easy sharing.
- Your RimWorld debug log (see FAQ on how to share). Ensure this mod's debug logging is enabled if relevant.
- The settings you are using for this compatibility patch.