$ show MissedHeart/Degrees-of-Lewdity-DolSims
This repository is a Chinese-language content mod for the Twine/SugarCube game 'Degrees of Lewdity' (DoL). It adds a large expansion including a City Library location, new NPCs (Seath, Alice, Liddell, Zephyr), new weapons, school mechanics (prefect system, free-listening permission), a gym, bicycle transport, live-streaming minigame, parasite/tentacle combat, and book-based traits. The mod is built using DoL ModLoader's patching system (TweeReplacer, ReplacePatcher, DoLTimeWrapperAddon) and injects content into base game passages and JavaScript. The codebase is functional but exhibits significant technical debt: large amounts of commented-out code, disused folders, informal developer comments expressing frustration, incomplete features, and fragile patches targeting specific base-game strings. The mod is primarily maintained by a single developer who acknowledges infrequent GitHub checks. Despite its messiness, the mod demonstrates non-trivial integration with DoL's event system and provides a substantial amount of new gameplay content.
The LLM identified 3 files worth highlighting for reuse:
Central module that registers time-based hooks into DoL's time system using `addonDoLTimeWrapperAddon.addFunctionHook`. It defines arrays of closures (`hookSims0`, `hookSims1`, `hookSims3`) that execute before/after time passes. This pattern is reusable for any DoL mod that needs to run periodic logic (daily purity changes, stat decay protection, NPC discipline/popularity updates, weekly prayer charges, etc.). The module is self-contained and only depends on the addon API, making it extractable for other mods.
Contains utility functions for repairing missing mod NPC data in old saves (`repairMissingModSimsNPC`) and clearing other mod data (`clearOtherModSimsFunc`). These functions wrap DoL's NPC structures (`setup.NPCNameList`, `C.npc`, `initCNPC()`) and rebuild missing fields like `virginity`, `chastity`, `purity`, `corruption`. This pattern is reusable for any DoL mod that introduces new NPCs and needs to handle save compatibility across versions.
Custom CSS module that defines classes with a `Sims` suffix (e.g., `.noclickSims`, `.Sims-*`) to avoid conflicts with base game styles. It also provides disabled-state styling for UI elements. This pattern of namespace-prefixing CSS classes is a reusable best practice for any mod or extension that needs to coexist with an existing stylesheet.