RimWorld Mod Compatibility: Cumpilation & RJW Menstruation

A compatibility mod ensuring features from "Cumpilation" and "RJW Menstruation" work together seamlessly. This page provides documentation, guides, and troubleshooting help.

Doc Version: v1.0.0

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

Installation

  1. Ensure RimWorld, Harmony, Cumpilation, and RJW Menstruation are installed and enabled.
  2. Download the latest release of this compatibility patch from [Link to Release/Workshop Page - TBD].
  3. Place the mod folder in your RimWorld Mods directory or subscribe via the Steam Workshop.
  4. Activate the mod in the RimWorld mod list.
  5. Load Order: This is crucial! Ensure this patch loads after Harmony, Core, RJW, Cumpilation, and RJW Menstruation.

    Example Load Order (Hover over key mods):

    1. Harmony
    2. Core
    3. Royalty (if applicable)
    4. Ideology (if applicable)
    5. Biotech (if applicable)
    6. ... (Other Core/DLC Patches)
    7. RJW
    8. Cumpilation
    9. RJW Menstruation
    10. [This Mod] Cumpilation & RJW Menstruation Compatibility
    11. ... (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:

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:

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?

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).

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.

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.

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.

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: