phoenight Posted 9 hours ago Posted 9 hours ago (edited) View File [1.6]RJW-Condom Expansion # RJW-Condom Expansion **Author:** Saden · **RimWorld 1.6** · Requires **RimJobWorld** and **Harmony** --- Have you ever wished you could actually control when condoms get used in RimJobWorld? In vanilla RJW, the logic is simple — if there's a condom nearby, someone will grab it. You have virtually no say in the matter. This mod changes that completely. RJW-Condom Expansion replaces RJW's default condom behavior with a **three-tier rule engine** that puts you in charge. You decide exactly who uses condoms, with whom, and under what circumstances. Every sex act in your colony passes through your rules before a condom is used — or not. Beyond the rule system, you can tell your colonists and animals how many condoms to carry on them, and they'll automatically restock when running low or drop the excess. Used condoms now show the male participant's name right on the item label, so you always know whose sperm is inside. And the vanilla "take condom from room" behavior? Completely disabled. ## How to access the rules There are two ways to open the settings. The first is the **"Condom" text button** at the bottom-right of RJW's main window — this opens the global rules panel. The second is through any pawn's command bar: select a human or animal, and you'll see a **condom icon button** labeled "Condom Rule" in their gizmos. Clicking it opens the rules panel with that pawn already selected. Right next to it is a carry/drop button that shows how many condoms the pawn is carrying versus how many they should carry — and lets you fix the gap with one click. ## How the three-tier rule engine works When a sex act occurs, the mod checks your rules in this order, and the **first tier that produces a definite result wins**. Lower tiers are only consulted if all higher tiers have nothing to say about this particular situation. The top tier is **Individual Rules**. These apply to one specific pawn you choose from a list. They always have the highest priority and cannot be deleted or moved — they're the ultimate override. If you want a particular colonist to always use condoms with slaves, or a specific animal to never use them, this is where you set it. Below that are the **Mid-Tier Rules**. This is where you create rules that apply to categories of pawns. There are fifteen types to choose from: All Humans, Colonists, Prisoners, Slaves, Allies, Visitors, Rapist, Rape Victim, All Animals, Colony Animals, Non-Colony Animals, Venerated Animals, Non-Venerated Animals, Pen Animals, and Non-Pen Animals. You click the **"Create Rule" button** and pick a type — once created, that rule gets its own full editor with enable/disable, condition groups, and carry settings. You can create as many or as few types as you need, reorder their priority with up/down arrows, and delete ones you no longer want. Already-created types show as greyed out in the creation menu so you don't accidentally duplicate them. The bottom tier is the **Global Rule**, which applies to everyone as a last resort. It always sits at the lowest priority. Here's the key design decision: the Global rule comes with a **locked catch-all condition group** that says "Anytime → Don't Use." This means if you open the mod and change nothing at all, your colony will *never* use condoms. You must actively create condition groups above the catch-all to enable condom use in specific situations. This prevents the mod from silently changing your gameplay — you opt in deliberately. ## The twenty-five match dimensions Every sex act is analyzed against twenty-five possible dimensions that describe what's happening. The resulting set of matched dimensions is what your condition groups work with. The first dimension is **Anytime**, which always matches. It's your universal trigger. Then there are dimensions based on the sex type itself: Masturbation, Consensual, Rape Aggressor, and Rape Victim. These let you distinguish between voluntary and violent acts, and between the aggressor's and victim's perspectives. If the partner is human, the mod checks relationship dimensions — Lover and Spouse — using RimWorld's built-in relationship tracking. It also checks faction and identity dimensions: Colonist (both participants must be colonists), Prisoner, Slave, Enemy (partner's faction is hostile), Ally (goodwill of 75 or higher), and Visitor (allied or neutral faction members who aren't colonists). If the partner matches none of these, they fall into **Stranger (Wild Man)** — the catch-all for factionless wanderers. If the partner is an animal, a different set of dimensions kicks in. All Animals matches any animal. Colony Animal and Non-Colony Animal split by faction ownership. Bonded Being checks both directions — a human bonded to the animal, or an animal bonded to the human — so it works regardless of who's the initiator. Venerated Animal uses the Ideology DLC's API. Pen Animal uses RimWorld's official `RaceProperties.Roamer` flag to identify animals that are confined by fences. Finally, there's the **With Specified Pawn** dimension. Any condition group can maintain a whitelist of specific pawns. If the partner is on that list, this dimension matches. The whitelist is checked across all three rule tiers, so an Individual rule's whitelist is just as valid as a Global one. Crucially, dimensions are never mutually exclusive. A single sex act can match Colonist, Lover, and Consensual all at once. This gives you enormous combinatorial flexibility in your condition groups. ## Condition groups: AND, OR, and priority Each rule tier holds an ordered list of condition groups. When evaluating a sex act, the groups are checked from top to bottom. The first group that finds at least one of its non-ignored dimensions matching will produce a result — Use or Don't Use. If a group's dimensions don't match anything in the current act, it's skipped and the next group is checked. Every dimension in a group can be set to one of three values. **Ignore** (grey) means the dimension doesn't affect this group's decision at all. **Use** (green) means if this dimension matches, it supports using a condom. **Don't Use** (red) means if this dimension matches, it opposes using a condom. Groups have a combination mode that determines how the matched dimensions are aggregated. In **OR mode** (labeled "Match Any"), a single Use dimension matching is enough to make the whole group vote Use, even if other dimensions match as Don't Use. In **AND mode** (labeled "Match All"), *every* non-ignored dimension must match its expected value — one mismatch swings the group to Don't Use. The priority of a group is simply its position in the list. Use the up/down arrows to reorder. This is how you build layered logic: put specific exception groups at the top and broad fallback groups at the bottom. Groups can be collapsed into a compact summary with the triangle toggle. The summary shows three lines: Use items in green, Don't Use items in red, and any specified pawns. Ignored dimensions are hidden to keep it clean. You can also give each group a custom name via the rename button — named groups appear in blue, unnamed ones show a grey placeholder. The Global tier's catch-all group is special. It's locked with an orange title, cannot be renamed, deleted, collapsed, or reordered, and its dimensions are read-only. Any new groups you add to the Global tier are inserted above it, never below. ## Hard pre-checks Before any rules are evaluated, two fast checks run. First, if there are no male participants at all, condom evaluation stops — no point. Second, if no one in the act is carrying any condoms, it stops as well. These checks save processing and avoid nonsense scenarios. ## Specified partner whitelist When you set the "With Specified Pawn" dimension to Use or Don't Use in any condition group, a whitelist editor appears below the dimension grid. It shows selected pawns with an X to remove them, and a "Add Pawn..." button that opens a two-level picker. The first level lets you choose a category — Colonists, Colony Animals, Non-Colony Humans, or Non-Colony Animals. The second level lists specific pawns in that category. The current pawn is excluded so you can't target yourself, and already-added pawns don't appear. The whitelist is checked across all three rule tiers during evaluation. ## Smart carry and drop system Every colony pawn — colonists, colony animals, colony mechanoids — always has a carry/drop button in their command bar. The button shows three lines: the target count versus the current count, and an action line that changes depending on the situation. If the pawn has fewer condoms than the target, the action says "Grab X now" and clicking it makes the pawn drop everything and run to the nearest condom stack. If they have more, it says "Drop X now" and they'll immediately discard the excess at their feet. If they have exactly the target, it says "Full" and clicking it just confirms they're good. In Developer Mode, hovering over this button shows a countdown to the next auto-restock check — something like "auto in 10.2h." Behind the scenes, the mod runs an auto-restock scan every in-game hour. For each colony pawn, if they're below their target, a haul job is queued — but it's queued politely, without interrupting whatever they're currently doing. If they're above their target, a drop job is queued the same way. Both actions show in the pawn's job queue like any normal task. The target carry count for each pawn is determined by searching through the tiers from top to bottom. The first tier that has the **"Override carry settings"** checkbox enabled supplies the target. If no tier has this checked, the target is zero and the pawn won't auto-manage condoms at all. The Global tier is intentionally excluded from this system — otherwise, hostile pawns might path into your base to grab condoms, which nobody wants. Each tier's carry system has four independent controls: the override checkbox itself, the target count (0–999), an auto-restock enable toggle (separate from rule evaluation), and the restock interval in hours (0.5–720, defaulting to 12). ## Sperm labeling on used condoms After sex with a condom, the used condom item that spawns is not the generic RJW one. It's labeled with the male participant's name — "Used Condom (Zhang San's sperm)." The inspect pane also shows the sperm owner. The interesting part is that the label always uses the male participant, regardless of whose inventory the condom actually came from. If the male had no condoms but the female had three, the female's condom is consumed, but the label still shows the male's name — because that's whose sperm it contains. This works through a custom ThingComp injected into RJW's UsedCondom item definition via XML patching. No DLL edits to RJW itself. ## What was disabled Vanilla RJW lets pawns "take condom from room" during sex — they just magically grab one from the environment. This mod disables that completely via a Harmony patch. Condoms must be physically carried in a pawn's inventory and consumed from there. If everyone in the act is out of condoms, the hard pre-check catches it and no condom is used. ## UI features worth mentioning The rules window is laid out in three columns. On the left is the Individual rules panel with a grouped pawn list — colonists first, then colony animals, then non-colony humans, then non-colony animals, each group sorted alphabetically. Pawns with active individual rules get a small green marker. When you open the window from a pawn's gizmo button, that pawn is pre-selected. The center column holds the mid-tier rules with the create button and the list of active rules. The right column is the Global rules editor with the catch-all group. The window can be closed with ESC, dragged by the title bar, and resized from the bottom-right corner. It opens at 1440 by 810 pixels, suitable for 1080p screens. Condition groups have collapsible summaries, custom naming, and color-coded dimension values so you can scan your rules at a glance. The catch-all group on the Global tier has a distinctive locked appearance with an orange title to make it visually obvious that it's not a normal group. ## Under the hood Five Harmony patches handle the integration. One disables room condom pickup. One intercepts RJW's condom-use decision and routes it through the three-tier evaluator instead. One customizes the used condom spawn after sex. One adds the gizmo buttons to every pawn. One adds the Condom button to RJW's main window. All settings are saved per savefile through RimWorld's Scribe system. Old saves from earlier versions are automatically normalized. The evaluation runs once per sex act and is cached so both participants don't trigger separate evaluations. The auto-restock scan is a lightweight pawn iteration every hour. ## Installation Install Harmony and RimJobWorld first, then drop RJW-Condom Expansion into your Mods folder. Make sure RJW loads before this mod in the mod list. Harmony handles itself. # RJW-Condom Expansion **作者:** Saden · **RimWorld 1.6** · 需要 **RimJobWorld** 和 **Harmony** --- 你有没有想过,要是能真正控制 RimJobWorld 里避孕套什么时候用就好了?原版 RJW 的逻辑很简单,玩家几乎插不上手。这个模组彻底改变了这一点。 RJW-Condom Expansion 用一套**三层规则引擎**替换了 RJW 默认的避孕套行为,让你完全掌控局面。谁用、和谁用、什么情况下用——全由你定。殖民地里的每一次性行为都会经过你设定的规则裁决之后,才会决定用不用套。 除了规则系统,你还可以让殖民者和动物随身携带一定数量的避孕套,少了自动去拿,多了自动放下。用过的避孕套上会标注男性参与者的名字,一眼就知道是谁的精液。至于原版那个"从房间取用避孕套"的功能?直接禁掉了。 ## 怎么打开规则设置 有两个入口。第一个是 RJW 主窗口右下角的**「避孕套」文字按钮**,点击打开全局规则面板。第二个是通过任意角色的命令栏:选中人或动物,左下角 Gizmo 栏会出现一个**避孕套图标按钮**,写着"避孕套规则"。点击后打开规则面板,并且自动选中这个角色。旁边还有一个携带按钮,显示当前带了几个、应该带几个,一键补足差额。 ## 三层规则引擎怎么运作 性行为发生时,模组按层级从上到下检查规则。**第一个给出确定结果的层级直接生效**,后面的不再看。只有高层全都没命中时,才往下找。 最顶层是**个体规则**。它只针对你从列表里选中的那一个特定角色。优先级永远最高,不可删除不可移动——它是终极覆盖。如果你想让某个殖民者和奴隶做爱时必须戴套,或者某只特定动物永远不戴套,就在这里设。 往下一层是**中间规则**。这一层让你按类型创建规则,覆盖某一类角色。一共十五种可选:所有人类、殖民者、囚犯、奴隶、友军、访客、施暴方、受害方、所有动物、殖民地动物、非殖民地动物、圣兽、非圣兽、畜栏动物、非畜栏动物。点击**「创建规则」按钮**,选一种类型——创建后它就拥有完整的编辑器,开关、条件组、携带设置一应俱全。想建几种就建几种,不想用了就删掉,删完还能建别的。已创建的类型在菜单里显示为灰色,防止重复创建。中间规则可以用上下箭调整优先级。 最底层是**全局规则**,对所有人生效,作为最后的兜底。它永远排在最低优先级,不可删除不可调序。这里有一个关键的设计决定:全局规则自带一个**锁定不可修改的兜底条件组**,内容是「任何时候 → 不使用」。也就是说,如果你装上这个模组之后什么都不设,殖民地里的避孕套**一次都不会被使用**。你必须主动在兜底组上方创建条件组,才能在特定情况下启用避孕套。这样一来,模组不会悄悄改变你的玩法——你用不用、怎么用,都是你自己选择的。 ## 二十五个匹配维度 每次性行为会被分解成二十五个维度来描述"发生了什么"。命中的维度集合就是你的条件组用来裁决的依据。 第一个维度是**任何时候**,永远命中,是你的万能触发器。然后是按性行为类型区分的维度:自慰、和姦、施暴方、受害方。这些让你能够区分自愿行为和暴力行为,以及施暴者和受害者各自视角。 如果对象是人类,模组会检查关系维度——情人和配偶——用的是环世界内置的关系系统。同时检查派系和身份维度:殖民者(双方都是)、囚犯、奴隶、敌人(对象派系敌对)、友军(好感 ≥ 75)、访客(盟友或中立派系的非殖民者)。如果对象不符合以上任何一种,就归到**陌生人(野人)**——无派系的流浪者专属。 如果对象是动物,则适用另一套维度。所有动物命中任何动物。殖民地动物和非殖民地动物按是否属于玩家派系区分。牵绊对象做的是**双向检测**——人类对动物的牵绊、动物对人类的牵绊都能命中,不管谁发起。圣兽使用 Ideology DLC 的 API。畜栏动物使用环世界官方的 `RaceProperties.Roamer` 属性来判断是否被栅栏限制。 最后是**与指定角色做爱**维度。任何条件组都可以维护一个角色白名单。对象在白名单中,这个维度就命中。白名单跨三级检查——个体规则里的白名单、中间规则里的白名单、全局规则里的白名单,全都会生效。 这里有个重点:维度之间从来不是互斥的。一场性行为可能同时命中殖民者、情人、和姦三个维度。这给了你巨大的组合灵活性。 ## 条件组:与或逻辑和优先级 每个规则层级里有一个有序的条件组列表。评估时从上往下依次检查。第一个有维度命中的条件组就会给出结果——使用或不使用。如果某个条件组的所有维度在当前性行为中都没命中,就跳过,看下一个。 每个维度可以设为三种值。**忽略**(灰色)——不参与该组的判断。**使用**(绿色)——命中则支持用套。**不使用**(红色)——命中则反对用套。 条件组有一种组合模式来决定命中的维度怎么汇总。**满足任一**(OR 模式):只要有一个维度命中且设为使用,整组就投使用,哪怕其他维度设的是不使用。**全部满足**(AND 模式):所有非忽略的维度都必须命中且符合预设值——有一个不满足,整组就投不使用。 条件组的优先级就是它在这个列表里的位置。用上下箭头调整排序。这就是构建分层逻辑的方式:把例外情况放在上面,把兜底规则放在下面。 条件组可以折叠成三行缩略摘要——使用项目绿色显示,不使用项目红色显示,指定角色单独一行。忽略的维度不显示,保持清爽。你还可以给条件组起自定义名字,起过的显示蓝色,没起的显示灰色占位。 全局规则的兜底条件组是特殊的。🔒 锁定,橙色标题,不可重命名、不可删除、不可折叠、不可调序,维度只读。你在全局规则里新建的条件组永远插入到它上面,不会跑到它下面。 ## 前置硬检查 规则评估之前先跑两个快速检查。第一,没有任何男性参与者——跳过,没必要。第二,所有参与者身上都没有避孕套——跳过,没套可用。这两个检查省性能也省逻辑。 ## 指定角色白名单 当你在任何条件组里把「与指定角色做爱」设为使用或不使用之后,维度网格下方会展开一个白名单编辑器。已选角色列在后面,带 ✕ 可以移除。点击「+ 添加角色...」按钮弹出两级选择器:第一级选分类(殖民者 / 殖民地动物 / 非殖民地角色 / 非殖民地动物),第二级选具体角色。自己不会出现,已添加的不会重复。白名单在评估时跨三级检查。 ## 智能携带和放下系统 每个殖民地角色——殖民者、殖民地动物、殖民地机械体——的命令栏始终显示一个携带按钮。按钮上显示三行信息:目标数和当前数,以及根据情况变化的操作行。如果带的比目标少,操作行显示「立即拿 X 个」,点击后角色会打断当前行动立刻去最近的避孕套堆拿。如果带的比目标多,显示「立即放下 X 个」,多余的立刻丢在脚下。如果正好,显示「已满」,点击只是确认数量够了。 打开开发者模式后,鼠标悬停在这个按钮上会显示自动补货倒计时,比如 `auto in 10.2h`。 在背后,模组每个游戏小时扫描一次殖民地角色。带少了就排一个搬运任务——但是排队执行,不打断当前工作。带多了就排一个放下任务。两种任务都像普通任务一样显示在角色队列里。 每个角色应该带几个避孕套,是按层级从上往下查找第一个勾选了**「☑ 覆盖携带设置」**的层级来决定的。个体规则有这个勾就按个体的,个体没勾就往下找中间规则,按优先级第一个匹配且勾了的生效。如果全都没勾,目标数就是零,不自动管理。全局规则被刻意排除在携带系统之外——否则敌对 NPC 可能会闯进你家拿套。 每个层级的携带系统有四个独立控件:覆盖开关本身、目标数量(0–999)、启用自动补货/放下的勾选框(独立于规则评估开关)、以及补货间隔(0.5–720 小时,默认 12 小时)。 ## 已使用避孕套的精液标签 戴套的性行为结束后,生成的不是普通的"用过的套套",而是标注了男性参与者名字的版本——「用过的套套(张三的精液)」。检查窗格也会显示精液所属人。有意思的地方是:标签永远写男性参与者的名字,不管套是从谁身上扣的。如果男性身上没套但女性带了三个,扣的是女性的套,但标签仍然写男性的名字——因为里面的精液是他的。 这是通过一个自定义 ThingComp 注入到 RJW 的 UsedCondom 物品定义中实现的,没有修改 RJW 本身的 DLL。 ## 被禁掉的功能 原版 RJW 允许角色在性行为中"从房间取用避孕套"——凭空从环境里抓一个来用。本模组通过 Harmony 补丁彻底禁掉了这个行为。避孕套必须由角色实实在在地带在身上,从物品栏里消耗。如果参与者身上都没套,前置硬检查就直接拦住。 ## 值得一提的 UI 特性 规则窗口是三列布局。左边是个体规则面板,角色列表按四组排列——殖民者、殖民地动物、非殖民地角色、非殖民地动物——组内按字母排序。有启用个体规则的角色左侧有绿色小标记。从角色 Gizmo 按钮打开窗口时,该角色自动被选中。中间一列是中间规则,显示创建按钮和已创建的规则列表。右边是全局规则编辑器,兜底条件组在下方。 窗口可以用 ESC 关闭、拖拽标题栏移动、右下角拖拽缩放。默认打开尺寸 1440×810,适合 1080p 屏幕。 条件组有可折叠的缩略摘要、自定义命名、以及颜色编码的维度值,让你能一眼扫过规则全貌。全局规则的兜底条件组有独特的🔒锁定外观和橙色标题,一看就知道它不是普通条件组。 ## 底层实现 五个 Harmony 补丁完成集成。一个禁用房间取避孕套。一个拦截 RJW 的用套决策,改走三层规则引擎。一个在性行为结束后自定义生成带精液标签的已使用避孕套。一个给每个角色添加 Gizmo 按钮。一个给 RJW 主窗口添加「避孕套」文字按钮。 所有设置随存档通过 Scribe 系统保存。旧版殖民地规则架构升级到中间规则架构的旧存档会自动修正。规则评估每个性行为只跑一次,用缓存避免双方各调一次。自动补货每小时扫描一次,轻量遍历。 ## 安装方式 先装 Harmony 和 RimJobWorld,然后把 RJW-Condom Expansion 放进 Mods 文件夹。加载顺序确保 RJW 在本模组前面。Harmony 自己会处理。 # RJW-Condom Expansion — Changelog --- ## v1.0.1 (2026-08-25) ### Fixed - **New mod compatibility:** The rule engine now detects sex jobs using `JobDriver_SexBaseInitiator` (the parent class) instead of `JobDriver_Sex`. This means all custom sex job drivers from other mods — such as lewd animal training/taming — are now fully compatible with the condom rule system. Previously, only vanilla RJW sex jobs were recognized. - **Duplicate used condoms:** Fixed an issue where sex with a condom would sometimes spawn two used condoms — one unlabeled from RJW and one labeled from this mod. RJW now handles spawning as normal, and this mod writes the sperm label afterward without interfering with RJW's own logic or statistics. --- ## v1.0.0 (2026-08-24) ### Initial Release - Three-tier rule engine: Individual → Mid-Tier Rules (15 types) → Global - 25 match dimensions (sex type, partner identity, faction, animal attributes, exact whitelist) - AND/OR condition groups with priority ordering, collapse/expand, custom naming - Specified partner whitelist with two-level category → pawn picker - Smart carry & drop system with configurable auto-restock intervals - Sperm labeling on used condoms (custom ThingComp via XML patching) - Hard pre-checks: no male → skip, no condoms → skip - Room condom pickup disabled via Harmony patch - Three-column UI with grouped pawn list, ESC to close - 6 language support: English, 简体中文, 繁體中文, 日本語, 한국어, Русский --- # RJW-Condom Expansion — 更新日志 --- ## v1.0.1 (2026-08-25) ### 修复 - **新 MOD 兼容性:** 规则引擎现在使用 `JobDriver_SexBaseInitiator`(父类)代替 `JobDriver_Sex` 来检测性行为驱动。其他 MOD 新增的自定义性工作(如动物驯服/训练类)现在完全兼容避孕套规则系统。之前仅原版 RJW 的性行为能被识别。 - **重复生成的已使用避孕套:** 修复了戴套性行为后有时会生成两个已使用避孕套的问题(一个来自 RJW 的无标签套,一个来自本模组的有标签套)。现在 RJW 正常负责生成,本模组只在其后写入精液标签,不干扰 RJW 自身逻辑和统计。 --- ## v1.0.0 (2026-08-24) ### 首次发布 - 三层规则引擎:个体 → 中间规则(15 种类型)→ 全局 - 25 个匹配维度(性类型、对象身份、派系、动物属性、精确白名单) - AND/OR 条件组,支持优先级排序、折叠展开、自定义命名 - 指定角色白名单,两级选择器(分类 → 具体角色) - 智能携带 & 放下系统,可配置自动补货间隔 - 已使用避孕套精液标签(通过 XML Patch 注入自定义 ThingComp) - 前置硬检查:无男性 → 跳过,无套 → 跳过 - 禁用「从房间取用避孕套」行为 - 三列 UI + 分组角色列表,ESC 关闭窗口 - 6 种语言支持:English, 简体中文, 繁體中文, 日本語, 한국어, Русский Submitter phoenight Submitted 08/24/26 Category Rimworld Requirements Install Instructions Edited 1 hour ago by phoenight 更新版本至1.0.1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now