RJW Cumpilation & Menstruation Compatibility Patch
A compatibility mod for the RimWorld mods "Cumpilation" and "RJW
Menstruation", which are sub-mods of RimJobWorld. This patch aims to
ensure smooth interaction between these mods and considers compatibility
with the wider RJW ecosystem.
Features
- Resolves direct conflicts between Cumpilation and RJW Menstruation.
-
Integrates relevant mechanics where overlap occurs (e.g., fluid
interactions, mood effects).
-
Adjusts definitions and patches to ensure both mods function as
intended when loaded together.
Installation
-
Ensure you have the required mods installed:
- RimJobWorld (RJW)
- RJW Menstruation
- Cumpilation
-
Subscribe to this mod on the Steam Workshop OR download the release
and place it in your RimWorld
Mods
folder.
- Activate the mod in the RimWorld mod list.
-
Recommended Load Order:
- Core
- Royalty (if applicable)
- Ideology (if applicable)
- Biotech (if applicable)
- Anomaly (if applicable)
- RimJobWorld (RJW)
- RJW Menstruation
- Cumpilation
-
RJW Cumpilation & Menstruation Compatibility Patch
(This Mod)
- Other mods
Compatibility
-
Required: RimJobWorld, RJW Menstruation, Cumpilation.
-
Designed For: RimWorld versions 1.4, 1.5 (Maintain a clear version compatibility matrix for required mods).
-
Known Incompatibilities: None currently known. Please
report any issues.
Design Ideas & Considerations
This section outlines the guiding principles and areas of focus for the patch's development and maintenance.
Core Philosophy & Scope
-
Strict Scope Definition: This is a patch, not a feature mod. Focus solely on resolving conflicts and enabling sensible, intuitive interactions between Cumpilation and Menstruation. Avoid feature creep; new mechanics should belong in the parent mods or dedicated add-ons. The patch should *enable* the parent mods to work together seamlessly, not replace or significantly alter their core functions.
-
Philosophical Alignment: Ensure integrations align with the design intent and "feel" of RJW, Cumpilation, and Menstruation. Prioritize lore-friendliness within the RJW context. Changes contradicting parent mod mechanics should only be made if essential for compatibility.
-
Modularity: Design patches to be as independent as possible. Consider optional sub-modules (potentially separate mini-mods requiring this patch, or integrated via conditional patching) for deeper integration with specific third-party mods (e.g., Dubs Bad Hygiene, specific race mods, psychology mods) to keep the core patch lean and focused. Evaluate interactions with other RJW sub-mods to ensure non-interference or identify potential future patching needs.
Gameplay Integration & Mechanics
-
Body Fluid Management:
- Establish a unified framework for how relevant body fluids (RJW core, Cumpilation, Menstruation) are handled (generation, tracking, cleaning, effects, genetic influence) when the patch is active.
- Ensure Cumpilation's systems correctly account for menstrual blood without duplication or conflict (e.g., cleaning jobs, fluid map tracking, 'messiness' calculations, ground contamination, fluid storage/containers).
- Explore balanced cross-mod fluid effects within the defined scope. Focus on logical consequences (e.g., Cumpilation fluids slightly influencing cycle symptoms, menstrual blood affecting Cumpilation 'messiness' or cleaning difficulty, potential impact on fertility beyond cycle suspension). Avoid overly complex or niche biological interactions. Define clear rules for mixed fluid effects.
- Verify visual consistency of fluid decals/textures, preventing overlap or rendering glitches. Consider subtle visual cues for mixed fluids if feasible and performant.
- Investigate interactions with fluid-related genes (Biotech or mod-added, e.g.,
FluidPumping
, Bloodfeeder
, specific genetic fluid inheritance rules) or traits, ensuring predictable outcomes. Consider xenotype-specific fluid production or cycle differences (e.g., Ovum production rates, cycle lengths, fluid composition).
- Evaluate interactions with artificial body parts related to reproduction or fluid generation (e.g., artificial wombs, fluid pumps, bionic reproductive organs). Consider Transhumanist ideology interactions.
- Consider interactions with medical systems: Does contamination with mixed fluids affect wound infection chances? Are specific tending qualities needed? How do fluids interact with sterilization/hygiene procedures or medical beds?
- Assess potential interactions with waste/pollution systems (e.g., cleaning fluids contributing to wastepacks, pollution effects on cycles).
- Environmental Interactions: Evaluate how fluids interact with the environment beyond simple cleaning: effects of freezing/thawing, interaction with specific terrains/flooring, potential (minor/optional) effects on plant growth, interaction with fire/flammability.
- Animal Interactions: Consider how colony/wild animals react to fluids (cleaning behavior, consumption avoidance/attraction). Check for conflicts with animal physiology mods if relevant.
-
Hediff & Mood Interactions:
- Review and harmonize Hediffs and mood effects. Define clear interaction rules (stacking, modification, cancellation, thresholds) to prevent unintended consequences (e.g., excessive mood swings, conflicting physiological states like arousal vs. pain/nausea, Hediff loops). Provide specific examples like how menstrual cramps might interact with arousal Hediffs or post-coital moodlets.
- Consider if states/Hediffs from one mod should influence the triggers, severity, or duration of effects from the other (e.g., sickness affecting cycle regularity/severity, cycle stage affecting Cumpilation moodlets or interaction outcomes, arousal levels influencing cycle symptoms).
- Ensure pregnancy mechanics (from RJW or other mods) interact predictably with both Menstruation (cycle suspension) and Cumpilation (relevant fluid/state changes). Verify interactions with RJW's own fertility calculations, including potential impacts on conception chance or early miscarriage risk based on combined states.
- Consider long-term or cumulative effects of combined Hediffs over a pawn's lifespan (e.g., chronic pain interactions, adaptation to mood swings, interactions with aging). Evaluate interactions with mental breaks or specific psychological conditions (e.g., from Psychology mod, Vanilla Psycasts Expanded, Ideology precepts like Pain is Virtue, Flesh Purity). Do combined states increase the likelihood of specific break types?
- Evaluate interactions with drug use: How do various drugs (vanilla or modded) affect cycles, Cumpilation states, or their combined mood/Hediff effects? Consider pain management interactions with drugs, traits, genes, and precepts.
- Skill Interactions: Assess if severe mood/pain states resulting from combined effects should subtly impact skill gain/loss rates, inspiration chances, or manipulation/consciousness affecting skill use.
-
Event & Trigger Interactions:
- Analyze how events/triggers from one mod should logically interact with the state determined by the other (e.g., Cumpilation events considering menstrual phase, Menstruation events considering Cumpilation states like arousal or recent activity).
- Ensure timed events or cycles from both mods remain synchronized and function correctly together, especially across save/load cycles, during caravan travel, or other non-standard map situations (e.g., cryptosleep).
-
AI Behavior & Needs:
- Evaluate if combined states should subtly influence pawn AI decisions (e.g., cleaning priorities based on fluid type/mix, minor mood-driven behavior changes like seeking solitude, interaction seeking/avoidance based on cycle/fluid state, partner choice considerations based on perceived 'messiness' or mood). Keep AI changes subtle and performance-conscious. Avoid complex decision trees.
- Consider impact on social interactions: How do pawns react to or perceive others experiencing strong mood swings or messiness resulting from combined effects? Could this generate specific social log entries, opinion modifiers, unique interaction types (e.g., comforting, avoidance), or influence social relaxation activities?
- Assess impact on pawn needs and scheduling: Do combined effects increase rest need? Do pain or mood effects alter work type priorities or global work speed? Influence recreation choices or tendency to seek medical attention?
-
Hygiene & Cleaning:
- Verify that cleaning mechanics (from Cumpilation, RJW, Vanilla, or popular hygiene mods like Dubs Bad Hygiene, Washing) properly handle fluids generated by both mods under the patch. Ensure correct job assignment, filth removal, clothing contamination/cleaning, and room cleanliness effects.
- Consider optional, explicit support for popular hygiene mods, ensuring graceful degradation if they aren't present. This might involve specific PatchOperations targeting hygiene mod Defs or providing API hooks if available. Ensure compatibility with different hygiene need levels and bathroom setups.
-
Trait, Gene, & Race Compatibility:
- Ensure compatibility with relevant traits (e.g., Lecher, Nympho, Prude, Sanguine, Volatile, Masochist, Ascetic, Pain Is Virtue), Biotech genes (especially those affecting reproduction, fluids, mood, pain sensitivity, chemical processing, metabolism, fertility - e.g.,
Fertile
, Sterile
, Psychic Sensitivity
, Mood Stability
, Wound Healing
, Metabolism
), and common custom races. Address how combined effects manifest regarding menstruation and Cumpilation mechanics.
- Test with common race mods (e.g., HAR-based races) to ensure body part definitions (including custom reproductive organs) and physiological responses are handled correctly. Define fallback mechanisms for unknown races or custom body plans where possible, potentially defaulting to humanlike physiology unless specific race patches exist. Consider RJW race settings interactions.
- Explicitly consider Biotech xenotypes and their unique physiologies or gene combinations (e.g., Hussar pain tolerance, Impid fire interactions, Pigskin organ differences, Sanguophage cycles).
- Prosthetics/Implants: Evaluate interactions not just with reproductive parts, but also with mood/pain affecting implants (Joywire, Painstopper), circulatory pumps, metabolic enhancers, or other relevant bionics/archotech.
-
Anomaly DLC Integration (Optional):
- Investigate potential *passive* interactions with Anomaly content if deemed relevant and within scope. Examples: How do psychic effects (harmonizers, screamers, psychic rituals) influence cycles or Cumpilation states? Do specific entities react differently to pawns based on combined states (e.g., scent detection, aggression triggers)? Are there interactions with bioferrite harvesting, mutations, or void-related phenomena affecting reproductive systems or fluid generation? Requires careful consideration to maintain scope, avoid trivializing Anomaly mechanics, and prevent significant performance overhead. Focus on atmospheric or minor conditional effects, clearly documented and potentially optional via settings.
-
Mechanic Balancing:
- Continuously evaluate the combined effects on gameplay balance within RimWorld and RJW. Avoid creating exploits, unintended power shifts, or excessive pawn micromanagement. Ensure the patch doesn't make pawns overly debilitated or unreasonably powerful due to combined effects. Consider difficulty scaling.
- Actively solicit and incorporate community feedback on balance, especially regarding mood intensity, frequency of events, resource implications (e.g., cleaning, hygiene needs, medicine use), impact on pawn effectiveness (work speed, combat, social), interaction success rates, and overall colony management burden. Implement iterative balancing based on feedback.
Configuration & User Experience
-
Configuration Options:
- Implement Mod Settings for granular control over integration features (e.g., toggling specific fluid interactions, mood stacking rules, AI behavior adjustments) and balance parameters (e.g., effect intensity multipliers, frequency checks, specific Hediff interaction toggles).
- Clearly define how patch settings interact with parent mod settings (precedence, linkage, detection of parent settings). Aim for patch settings to override or modify behavior only when necessary for compatibility or explicit user choice. Consider dynamically enabling/disabling/hiding patch settings based on detected parent mod settings or other active mods.
- Explore configuration profiles (presets) for different playstyles (e.g., "Minimal Impact", "Full Integration", "Performance Focus", "Hardcore").
- Include debug options within Mod Settings to assist users and developers in diagnosing issues (e.g., verbose logging toggle, force event triggers, display internal states). Add warnings for settings with significant performance implications.
- Ensure default settings provide a stable, balanced, and generally expected experience without requiring immediate user configuration.
- Consider accessibility: ensure any UI elements added (icons, text) are clear and consider colorblind users if applicable.
-
User Experience & Documentation:
- Strive for seamless and intuitive integration; patched interactions should feel natural and require minimal user intervention beyond initial setup.
- Improve in-game tooltips/descriptions on relevant Hediffs, items, and interactions to clarify combined effects or states originating from the patch. Use dynamic text where possible to reflect current settings.
- Provide clear visual feedback for combined states where appropriate and feasible (e.g., distinct icons/overlays on the pawn's health tab, optional subtle visual cues on the pawn sprite itself), avoiding UI clutter.
- Write clear, concise explanations for Mod Settings options and their impact within the settings menu itself. Include links to external documentation (like a Wiki) from the Mod Settings page if helpful.
- Maintain a comprehensive CHANGELOG detailing changes, additions, and fixes per version. Clearly state compatibility versions for RimWorld and all required mods.
- Consider a simple Wiki or FAQ page (e.g., on GitHub) for common questions, troubleshooting steps, explanations of complex interactions, and configuration guidance.
- Implement in-game feedback (e.g., one-time letters, startup warnings) for critical compatibility issues detected at runtime (e.g., incorrect load order, missing dependencies, version mismatches).
Technical Implementation & Maintenance
-
Patching Strategy:
- Prioritize XML XPath patching for robustness against updates, targeting specific Defs and nodes precisely. Use C# Harmony patching only when essential for complex logic, conditional checks, modifying private methods, or achieving specific interaction flows inaccessible via XML.
- Use
PatchOperationFindMod
rigorously for all dependencies. Define dependencies clearly using loadAfter
in About.xml
. Ensure this patch loads *after* Cumpilation and Menstruation.
- Consider checks for specific dependency *versions* (`supportedVersions` in `About.xml` or runtime checks) if breaking changes are common in dependencies. Maintain the version compatibility matrix diligently.
- Employ conditional patching (`MayRequire` attribute in XPath, conditional logic in C#) based on mod presence and potentially their settings to maximize compatibility and minimize errors.
- When using Harmony, prefer Postfix/Transpiler patches over Prefixes to minimize conflicts. Use unique Harmony IDs (e.g.,
YourName.RJWCompMenstruPatch.MethodName
). Check for existing patches before applying. Implement null-safety checks within patches.
- Ensure unique
defName
values if the patch introduces any new definitions (e.g., Hediffs, Thoughts), following standard naming conventions.
-
Performance: Maintain focus on performance. Use targeted XML patches. If C# is used, write efficient code, avoid frequent `OnTick` operations, cache frequently accessed data, and profile using tools like Dubs Performance Analyzer, especially for AI, Hediff logic, or fluid tracking. Benchmark critical code paths under heavy load (e.g., large colonies, many concurrent events). Provide performance-related configuration options where applicable.
-
Error Handling & Logging: Implement robust error checking (e.g., null checks, type checks in C#). Provide clear, identifiable logging messages (prefixed with the mod name, e.g.,
[RJW C&M Patch]
) for patch application success/failure and runtime issues to aid user troubleshooting. Use Verse.Log.Warning
for non-critical issues and Verse.Log.Error
for critical failures. Avoid log spam in release builds; use a debug logging setting controlled via Mod Settings.
-
Graceful Degradation: Ensure the patch handles missing dependencies (required or optional) cleanly, disabling relevant functions or logging informative errors rather than causing critical game failures (red errors).
-
Update Strategy: Define a process for promptly reviewing and updating the patch in response to updates in RimWorld or dependency mods. Monitor dependency mod changelogs, GitHub repositories, and community reports. Establish a clear branching strategy (e.g., Git) for managing different RimWorld versions if necessary. Consider using ModSync RW integration for easier user updates/notifications.
-
Save Game Compatibility: Strive to maintain save compatibility between patch versions whenever possible. Clearly document any unavoidable breaking changes in the CHANGELOG and potentially via in-game notifications on load. Avoid storing complex custom data in save files unless absolutely necessary; prefer deriving state from existing game data or Hediffs. Test save/load cycles extensively during development, including during critical events.
-
Testing Strategy: Implement rigorous testing covering diverse scenarios: different combinations of settings (patch and parent mods), various traits, genes, races (including HAR), other common mods (especially UI, AI, medical, psychology, hygiene, other RJW add-ons), different game stages (early/mid/late), and edge cases (e.g., starting scenarios, caravan travel, pawn death/resurrection, mid-save addition/removal if feasible). Utilize developer mode tools for spawning items, triggering events, and manipulating pawn states. Test across different storyteller settings, difficulty levels, and colony sizes. Consider simple automated checks (e.g., XML validation scripts, basic Harmony patch verification).
-
Code Structure (If C#): Adhere to C# best practices: use clear namespaces, follow consistent style guides (e.g., .NET conventions), write explanatory comments for complex logic, implement proper error handling (try-catch blocks where appropriate). Use Harmony safely and defensively. Avoid static constructors for initialization that might run too early; use
StaticConstructorOnStartup
or appropriate game initialization hooks. Use DefOf
pattern for referencing Defs safely. Avoid hardcoded strings for user-facing text; use translation keys and structure for localization. Utilize version control (e.g., Git) effectively with clear commit messages and branching (e.g., main
, develop
, release-1.5
).
-
Localization: Design with localization in mind from the start. Use translation keys (`Keyed` folder) for all user-facing strings. Use `DefInjected` for patching Def labels/descriptions. Provide English base files and encourage community translations. Structure files logically (e.g., `Languages/English/Keyed/ModName.xml`).
-
Inter-Mod Communication (API/IMC): Consider exposing minimal, stable data points or hooks (e.g., via static methods or a dedicated class) for other mods to optionally query pawn states influenced by this patch, facilitating deeper ecosystem integration without creating hard dependencies. Document any such features clearly.
Community & Feedback
-
Feedback Channels: Establish and actively monitor clear channels (e.g., GitHub Issues, Steam Workshop comments, dedicated Discord channel/forum thread) for bug reports, suggestions, and balance feedback. Use templates for bug reports to ensure necessary information (logs, mod list, reproduction steps) is provided.
-
Contribution: Encourage community contributions via pull requests (with clear guidelines on code style, testing, and scope) or detailed issue reporting. Be responsive to contributions and feedback.
-
Transparency: Communicate development progress, known issues, and future plans openly (e.g., via GitHub Projects/Milestones, regular updates on Steam/forums). Maintain a public roadmap if feasible.
Future Plans
- Address any reported compatibility issues promptly.
-
Investigate potential integrations with other relevant RJW add-ons or popular mods (e.g., Dubs Bad Hygiene, Children School and Learning, Psychology, HAR races, potentially animation frameworks like RN Rapers for visual consistency) based on user feedback and observed interactions, potentially as optional modules or configuration toggles, always respecting the core scope. Explore API integrations if parent or related mods offer them.
-
Refine existing patches for better balance, performance, or smoother
interaction based on ongoing testing and feedback.
-
Expand Mod Settings options based on user requests and feasibility, prioritizing high-impact or frequently requested features that align with the patch's scope.
-
Keep compatibility updated with new versions of RimWorld and required mods in a timely manner.
- Improve localization support and encourage community translations by providing necessary infrastructure and base files.
- Explore providing optional, performance-conscious visual indicators for combined states.
- Consider adding configuration presets for different playstyles or performance targets.
Contributing
Contributions are welcome! Please feel free to fork the repository, make
changes, and submit a pull request adhering to the project's coding style and contribution guidelines (if available). You can also report issues or
suggest features via the GitHub issue tracker or designated community channels. Consider joining any associated community Discord or forum for discussion. Please use bug report templates when submitting issues.
License
[Specify License - e.g., MIT, Creative Commons Attribution-ShareAlike 4.0 International]