Touhou Little Maid:Love & Loathe

"A maid behavior mod where trust and fear decide between loyalty, rebellion, obsession, or cold detachment."

 

# Love & Loathing (爱憎分明)

An expansion mod for Touhou Little Maid that adds emotion, hunger, broadcast commands, and AI interaction systems. Supports Minecraft 1.20.1 (Forge) and 1.21.1 (NeoForge).

---

- **Minecraft 1.20.1**: Requires `Forge 47.x` + `Touhou Little Maid 1.20.x`
- **Minecraft 1.21.1**: Requires `NeoForge 21.x` + `Touhou Little Maid 1.5.3+`
- **Dependency**: Touhou Little Maid

## Items

### Emotion Book (数值调整器)

| Registry Name | `callresponse:emotion_book` |
| Max Stack | 1 |
| Obtain | Creative tab / `/give @p callresponse:emotion_book` |

**Usage:**
- Right-click a maid → opens a GUI to view and adjust values
- GUI contains three input fields: Trust (0-100), Fear (0-100), Hunger (0-100)
- Click "Confirm" to apply changes, "Cancel" to close
- Only the maid's owner can modify values

---

## Hunger System

Maids have an independent hunger value ranging from 0 to 100, defaulting to 50. Hunger affects movement speed, healing, and survival.

### Hunger Levels

| Range | Level | Effect |
|-------|-------|--------|
| 0 ~ 9 | Starving | 2 damage/second, greatly reduced speed |
| 10 ~ 25 | Very Hungry | Increased dialogue frequency, reduced speed |
| 26 ~ 40 | Hungry | Auto-eat threshold (triggers below 35) |
| 41 ~ 74 | Satisfied | 1 HP heal/second, increased speed, **optimal state** |
| 75 ~ 90 | Full | Reduced speed |
| 91 ~ 100 | Overfed | 1 damage/second, greatly reduced speed |

### Hunger Changes

| Method | Change |
|--------|--------|
| Natural decay | -1 every 30 seconds |
| Eating food (items) | +food nutrition value |
| Eating edible blocks (cake, etc.) | +6 |
| Consumption healing | -2 hunger → +1 HP every 2 seconds (auto when not full HP) |

### Auto-Eating

When hunger < 35, maids automatically search their backpack for food and eat it.

### Hunger Dialogue

| Condition | Dialogue Type |
|-----------|---------------|
| Hunger ≤ 9 | Dying of hunger, desperate pain |
| Hunger ≤ 25 | Stomach growling, hungry |
| Hunger ≥ 91 | Too full, bloated and uncomfortable |

---

## Broadcast System

When a player sends a chat message starting with `#全体 ` (configurable), nearby maids will respond and execute commands or trigger AI dialogue.

### Activation

**Player command**: Chat input `#全体 <command>`

### Available Commands

| Keyword | Action | Under Doting Mode |
|---------|--------|-------------------|
| `集合` / `过来` (gather/come) | Maid walks to owner and sits | ❌ Rejected |
| `开饭` / `拿食物` (meal/food) | Maid takes food from owner's hand | ❌ Rejected |
| `打起来` / `攻击` / `打架` / `决斗` (fight/attack) | Maid attacks nearby maids | ❌ Rejected |
| `停战` / `停止攻击` (ceasefire/stop) | Stop attacking | ✅ Always allowed |
| `站起来` / `起立` (stand up) | Stand up | ❌ Rejected |
| `坐下` (sit down) | Sit down | ❌ Rejected |

### Broadcast Config

Configurable in `config/callresponse.toml`:

| Option | Default | Description |
|--------|---------|-------------|
| `debugEnabled` | `false` | Show debug messages in chat |
| `triggerPrefix` | `"#全体 "` | Broadcast trigger prefix |
| `baseChance` | `0.4` | Base response chance per maid |
| `searchRadius` | `16` | Search radius for maids (blocks) |
| `nameMentionBonus` | `0.5` | Extra chance when name is mentioned |
| `maxResponders` | `5` | Maximum responding maids at once |

Note: The baseChance and nameMentionBonus features are not yet implemented, so these two options can be ignored.

---

## Emotion System

Each maid has independent **Trust** and **Fear** values (0-100) for each owner. Default: Trust 40, Fear 10.

---

## Doting Mode

**Trigger**: Trust ≥ 90 AND Fear ≤ 10

In doting mode, maids develop strong possessiveness and attachment:

### Daily Behaviors

| Behavior | Weight | Description |
|----------|--------|-------------|
| Steal from owner | 0.4 | Randomly take an item from owner's inventory/hands |
| Search chests | 0.3 | Search nearby chests/barrels/shulker boxes, take 1 item |
| Plant flowers | 0.3 | Plant a flower near the owner |

Each behavior triggers an AI dialogue (whining / righteous / bragging).

### Chasing Away Other Maids

Doting maids attack other maids within 3 blocks of the owner (visual only + knockback, no damage), triggering possessive dialogue every 10 seconds.

### Command Refusal

Under doting mode, maids refuse: **gather, take food, attack, stand up, sit down**. Only the **ceasefire** command is always allowed.

---

## Betrayal Mode

**Trigger**: Trust ≤ 10 AND Fear ≥ 90 for 10 seconds

Betraying maids rebel against their owner:

### Betrayal Behavior

1. **Clear owner**: `setOwnerUUID(null)`, no longer tamed
2. **Switch to attack**: Force switch to attack task
3. **Target priority**: Original owner → any other maid
4. No target: Destroy chests/barrels/shulker boxes within 10 blocks
5. **Death explosion**: Power 6.0 explosion

### Victim Reaction

Maids attacked by a betrayer:
- Tiered dialogue by hit count: 1st / 2-4 / near death
- Force flee
- Sit down

---

## Devoted Mode

**Trigger**: Trust ≥ 80 AND Fear ≥ 80 (conflicted tendency enters special state)

Devoted maids are extremely loyal, willing to give their lives:

### Stat Bonuses

| Stat | Bonus |
|------|-------|
| Attack | +5.0 |
| Movement Speed | +0.1 |
| Damage Reduction | 30% |

### Owner Critical Healing

When the owner's HP drops below 10%, devoted maids:
1. Heal after 1 second delay
2. Restore owner to full HP
3. **Cost**: Maid takes equal damage (owner's missing HP + 1)

### Attacking Betrayers

Devoted maids automatically search for and attack betrayers within 16 blocks, with a 60% chance to steal their armor or curios.

---

## Forgetting System

**Trigger**: Trust ≤ 10 AND Fear ≤ 10 for 10 seconds

When trust is at rock bottom with no fear, maids choose to forget and leave.

### Process

1. Cross-dimension teleport (if in different dimension): teleport to owner's dimension
2. Clear all behavior memories
3. Player receives: `X suddenly appears before you...`
4. AI farewell dialogue (calm and accepting)
5. 200 ticks (10 seconds) later, maid disappears
6. Drops a cake on disappearance
7. Player receives: `X has vanished... leaving only a cake.`

**Note**: If trust or fear rises above the threshold, all forgetting timers reset.

---

## Passive Emotion Changes

Maids react emotionally to their environment and the owner's actions:

| Event | Change | Cooldown |
|-------|--------|----------|
| Maid sleeps | Trust +1 | 10 min |
| Working | Fear -1 | 4 min |
| Resting | Trust +1 | 4 min |
| No owner interaction for 3 min | Trust -1, Fear -1 | 3 min |
| Full armor equipped | Trust +3, Fear -1 | 10 min |
| Owner holds food while looking at maid for 5s | Trust +1 | 1 min |
| Owner holds weapon while looking at maid for 5s | Fear +1 | 1 min |
| Leashed/hooked | Trust -1 | 2 min check |
| Witness another maid leashed | Fear +1 | 2 min check |
| In darkness (light < 6) | Fear +1 | 1 min accumulate |
| In water too long | Trust -1 | 1 min check |
| Seeing fireworks | Trust +1 | 1 min |
| Companion nearby (8 blocks) | Fear -1 | 2 min accumulate |
| Dimension change | Triggers tendency dialogue | Each time |
| Witness maid death | Fear +8, Trust -4 | None |
| Witness owner kill a maid | Tiered dialogue by tendency | 30s |
| Sit down (if enabled in config) | Configurable | Each time |

---

## Princess Carry & Saddle Launch

### Princess Carry (Saddle Pickup)

Right-click a maid with a saddle (mount):
- Maid rides on the player
- **Trust +1**
- Triggers AI dialogue
- Nearby maids (5 blocks) also trigger witness dialogue
- Dialogue cooldown: 10 minutes

### Saddle Launch

Right-click a saddle to pick up a maid → right-click air (not a block) → launch:
- Maid is launched in the player's look direction
- Launch power 2.0, vertical boost 0.8
- **Fear +1**
- Triggers AI dialogue
- Dialogue cooldown: 10 minutes

---

## Lazy Maid Task

New task `callresponse:lazy` - lazy and gluttonous.

### States

| State | Behavior |
|-------|----------|
| Idle | Random wandering |
| Going to rest | Find a maid bed |
| Resting in bed | Rest 5s (Trust +1 / 3 min) |
| Searching for bed | Find nearest maid bed |
| Going to owner | Ask owner for food |
| Eating | Eat food |
| Going to snack source | Find cake-like blocks |
| Searching for snacks | Search nearby snacks |
| Resting (tired) | Sit and rest 5s |
| Going to cake | Walk to cake |
| Watching cake | Sit in front of cake for 20s |

**Probability** (random pick every 30s):

| Need | Chance |
|------|--------|
| Rest | 1/4 |
| Ask owner for food | 1/4 |
| Find snacks | 1/4 |
| Watch cake | 1/4 |
| None | When conditions not met |

**Hit Reaction**:
- Attacked by owner → flee + drop held food
- Fear +0.5
- Triggers upset/angry/scared dialogue

---

## Config

Config files are in `config/`:

### Broadcast Config (`callresponse.toml`)

```toml
# Show debug messages in chat
debugEnabled = false

# Broadcast trigger prefix
triggerPrefix = "#全体 "

# Base response chance per maid (0.0 ~ 1.0)
baseChance = 0.4

# Search radius (blocks)
searchRadius = 16

# Extra chance when maid name is mentioned (0.0 ~ 1.0)
nameMentionBonus = 0.5

# Max responding maids
maxResponders = 5
```

### Passive Emotion Config (`callresponse-emotion-passive.toml`)

```toml
# Enable sitting emotion changes
sitDetectionEnabled = false

# Trust change when sitting (-10 ~ +10)
sitTrustChange = -2

# Fear change when sitting (-10 ~ +10)
sitFearChange = -2
```

---

## Q&A

**Q: My maid won't eat. What should I do?**
A: Make sure the maid has food in her backpack. She will automatically search and eat when hunger drops below 35. You can also use the `#全体 开饭` command to have her take food from your hand.

**Q: My maid is attacking me. What should I do?**
A: Check if betrayal mode was triggered (Trust ≤ 10 AND Fear ≥ 90). Use the Emotion Book to adjust values, or use `#全体 停战` to stop the attack.

**Q: My maid suddenly disappeared.**
A: The forgetting system may have triggered (Trust ≤ 10 AND Fear ≤ 10 for 10 seconds). She will drop a cake when disappearing.

**Q: How do I use the Emotion Book?**
A: Hold it and right-click a maid. Enter values (0-100) in the GUI and click Confirm. Only the maid's owner can modify values.

**Q: Why won't my maid obey broadcast commands?**
A: Possible reasons: no maids within search range, command refused under doting mode, or the maid is currently attacking (use ceasefire first). Note: Currently only global broadcast is supported; targeting specific maids is not yet implemented.

**Q: Why won't the lazy maid work?**
A: The lazy maid's job is to be lazy. She won't do normal maid work. She will wander, sleep, find snacks, watch cake, and occasionally ask you for food.

**Q: What's the difference between the two versions?**
A: The functionality is identical.

# 爱憎分明 - Love & Loathing

一个围绕 Touhou Little Maid 女仆的情感、饱食度、广播对话与 AI 互动的扩展模组。支持 Minecraft 1.20.1 (Forge) 与 1.21.1 (NeoForge)。

---

 

- **Minecraft 1.20.1**:需要 `Forge 47.x` + `Touhou Little Maid 1.20.x`
- **Minecraft 1.21.1**:需要 `NeoForge 21.x` + `Touhou Little Maid 1.5.3+`
- **前置依赖**:Touhou Little Maid(车万女仆)
## 物品

### 数值调整器(Emotion Book)

| 注册名 | `callresponse:emotion_book` |
| 最大堆叠 | 1 |
| 获取方式 | 创造模式物品栏 / `/give @p callresponse:emotion_book` |

**用途:**
- 右键女仆 → 打开 GUI 查看并调整当前数值
- GUI 包含三个输入框:信任值 (0-100)、恐惧值 (0-100)、饥饿值 (0-100)
- 点击"确认"提交修改,"取消"关闭不做修改
- 服务端验证女仆所有权,非主人无法修改

---


## 饥饿值系统

女仆拥有独立的饥饿值数值,范围 0~100,初始默认 50。影响女仆的移速、回血和生存。

### 饥饿值等级

| 区间 | 等级 | 效果 |
|------|------|------|
| 0 ~ 9 | 饿死边缘 | 每秒受到2点伤害,移速大幅降低 |
| 10 ~ 25 | 非常饥饿 | 自发对话频率提高,移速降低 |
| 26 ~ 40 | 饥饿 | 自动进食阈值(低于35触发自动进食) |
| 41 ~ 74 | 饱足 | 每秒回血1,移速增加,**最佳状态** |
| 75 ~ 90 | 很饱 | 移速降低 |
| 91 ~ 100 | 过饱 | 每秒受到1点伤害,移速大幅降低 |

### 饥饿值变化

| 途径 | 变化 |
|------|------|
| 自然衰减 | 每30秒 -1 |
| 吃食物(物品) | +食物营养值(Nutrition) |
| 吃可食用方块(蛋糕等) | +6 |
| 消耗回血 | 每2秒消耗2饱食度,恢复1生命(未满血时自动触发) |

### 自动进食

当饥饿值< 35 时,女仆会自动从背包中搜索食物并进食

### 饥饿值对话

| 条件 | 对话内容类型 |
|------|-------------|
| 饱食度 ≤ 9 | 快要饿死,痛苦绝望 |
| 饱食度 ≤ 25 | 肚子咕咕叫,饥饿 |
| 饱食度 ≥ 91 | 吃太撑,胀得难受 |

---

## 广播系统

玩家在聊天框发送以 `#全体 `(可配置)为前缀的消息时,周围的女仆会响应并执行指令或触发 AI 对话。

### 触发方式

 **玩家主动指令**:聊天输入 `#全体 指令内容`

### 可执行指令

| 关键词 | 动作 | 溺爱模式下 |
|--------|------|-----------|
| `集合` / `过来` | 女仆走到主人身边并坐下 | ❌ 拒绝 |
| `开饭` / `拿食物` | 女仆走到主人处取主人手上的食物 | ❌ 拒绝 |
| `打起来` / `攻击` / `打架` / `决斗` | 女仆攻击周围最近的其他女仆 | ❌ 拒绝 |
| `停战` / `停止攻击` | 停止攻击 | ✅ 始终执行 |
| `站起来` / `起立` | 站起 | ❌ 拒绝 |
| `坐下` | 坐下 | ❌ 拒绝 |

### 广播配置

所有配置项可在 `config/callresponse.toml` 中修改:

| 配置项 | 默认值 | 说明 |
|--------|--------|------|
| `debugEnabled` | `false` | 是否在聊天栏显示调试信息 |
| `triggerPrefix` | `"#全体 "` | 广播触发前缀 |
| `baseChance` | `0.4` | 女仆基础回应概率 |
| `searchRadius` | `16` | 搜索女仆半径(格) |
| `nameMentionBonus` | `0.5` | 提到女仆名字时概率增加 |
| `maxResponders` | `5` | 最多同时回应的女仆数 |
注意:女仆基础回应概率和提到女仆名字时概率增加两个功能目前暂未实装,因此不用管这两个配置项
---
## 情感系统

每位女仆对每位主人有独立的**信任**(Trust)与**恐惧**(Fear)两项数值,范围 0~100。初始默认值为信任 40、恐惧 10。

 

## 溺爱模式

**触发条件**:信任 ≥ 90 且 恐惧 ≤ 10

溺爱模式下女仆对主人会产生强烈的占有欲和依恋,表现为:

### 日常行为

| 行为 | 概率权重 | 描述 |
|------|---------|------|
| 偷主人东西 | 0.4 | 从主人背包/主手/副手随机拿一个物品放自己背包 |
| 偷偷翻箱子 | 0.3 | 搜索10格内的箱子/桶/潜影盒,随机取一格物品 |
| 种花 | 0.3 | 在主人周围5格种一朵花 |

每种行为后女仆会触发对应的 AI 对话(撒娇/理直气壮/邀功)。

### 赶走其他女仆

溺爱女仆会攻击主人周围3格内的其他女仆,但不造成伤害(仅视觉攻击 + 击退),每10秒触发占有欲对话。

### 拒绝指令

溺爱模式下,女仆会拒绝以下广播指令:**集合、拿食物、攻击、站起来、坐下**。只有**停战**指令始终有效。

---

## 背叛模式

**触发条件**:信任 ≤ 10 且 恐惧 ≥ 90,且持续 10 秒

背叛女仆会彻底反叛主人:

### 背叛行为

1. **清除主人**:`setOwnerUUID(null)`,不再认主
2. **转为攻击**:强制切换为攻击任务
3. **攻击目标**:优先攻击原主人 → 其次任意女仆
4. 无目标时:破坏10格内的箱子、桶、潜影盒
5. **死亡时爆炸**:6.0 威力爆炸

### 受害者反应

被背叛女仆攻击的女仆会:
- 按受伤次数触发分级对话:首次 / 2-4次 / 濒死
- 强制逃跑
- 坐下

---

## 死忠模式

**触发条件**:信任 ≥ 80 且 恐惧 ≥ 80(矛盾倾向进入特殊状态)

死忠女仆对主人极度忠诚,甚至愿意付出生命。

### 属性加成

| 属性 | 加成 |
|------|------|
| 攻击力 | +5.0 |
| 移动速度 | +0.1 |
| 减伤 | 受到伤害减少 30% |

### 主人濒死治疗

当主人生命值低于 10% 时,死忠女仆会:
1. 延迟 1 秒后触发治疗
2. 将主人恢复到满血
3. **代价**:女仆承受等量伤害(主人满血所需生命值 +1)

### 攻击背叛女仆

死忠女仆会自动搜索16格内的背叛女仆并发起攻击,攻击时 60% 概率抢夺对方的盔甲或饰品。

---

## 淡忘系统

**触发条件**:信任 ≤ 10 且 恐惧 ≤ 10,且持续 10 秒

当女仆对主人的信任降至冰点且没有任何恐惧时,她会选择淡忘并离开。

### 流程

1. 跨维度传送(如在不同维度):传送到主人所在维度
2. 清除所有行为记忆
3. 玩家收到消息:`X 突然出现在你面前...`
4. 触发 AI 告别对话(平静释然)
5. 200 ticks(10秒)后女仆消失
6. 消失时掉落一块蛋糕
7. 玩家收到消息:`X 消失了... 只留下了一块蛋糕。`

**注意**:一旦信任或恐惧恢复到阈值以上,所有淡忘计时器会重置。

---

## 被动情感变化

女仆会对周围环境和主人的行为产生情感反应,以下事件会自动触发情感变化:

| 事件| 变化 | 冷却 |
|------|------|------|
| 女仆睡觉 | 信任+1 | 10分钟 |
| 工作中(女仆处于工作模式) | 恐惧-1 | 4分钟 |
| 休息中 | 信任+1 | 4分钟 |
| 主人3分钟无任何交互 | 信任-1, 恐惧-1 | 3分钟 |
| 穿满盔甲 | 信任+3, 恐惧-1 | 10分钟 |
| 主人拿食物盯着女仆5秒 | 信任+1 | 1分钟 |
| 主人拿武器盯着女仆5秒 | 恐惧+1 | 1分钟 |
| 被拴绳/鱼钩拴着 | 信任-1 | 2分钟检测 |
| 看到其他女仆被拴 | 恐惧+1 | 2分钟检测 |
| 处于黑暗环境(亮度<6) | 恐惧+1 | 1分钟累积 |
| 泡在水中过久 | 信任-1 | 1分钟检测 |
| 看烟花 | 信任+1 | 1分钟 |
| 同伴在身边(8格内) | 恐惧-1 | 2分钟累积 |
| 切换维度 | 触发对应倾向对话 | 每次 |
| 看到女仆死亡 | 恐惧+8, 信任-4 | 无冷却 |
| 看到主人杀女仆 | 按情感倾向触发分级对话 | 30秒 |
| 坐下(配置中启用) | 信任、恐惧按配置变化 | 每次 |

---

## 公主抱与马鞍发射

### 公主抱(马鞍抱起)

用马鞍右键女仆(骑乘):
- 女仆骑到玩家身上
- **信任+1**
- 触发 AI 对话(感受)
- 周围5格内的其他女仆也会触发旁观对话
- 对话冷却:10分钟

### 马鞍发射

手持马鞍右键抱起女仆后→对着空中右键(非方块)→ 发射女仆:
- 女仆被按玩家视线方向发射
- 发射力度 2.0,垂直加成 0.8
- **恐惧+1**
- 触发 AI 对话(被扔出去的感受)
- 对话冷却:10分钟

---

## 懒女仆任务

新增女仆任务 `callresponse:lazy`,好吃懒做。

包含以下状态:

| 状态 | 行为 |
|------|------|
| 闲逛 | 随机走动 |
| 前往休息 | 找女仆床 |
| 在女仆床上休息 | 休息5秒(信任+1/3分钟) |
| 找床 | 搜索最近女仆床 |
| 走向主人 | 找主人要食物 |
| 吃东西 | 吃东西 |
| 前往零食柜 | 找糕点方块 |
| 找零食柜 | 搜附近零食 |
| 累了休息 | 坐下休息5秒 |
| 前往蛋糕 | 走向蛋糕 |
| 看蛋糕 | 在蛋糕前坐20秒 |

**概率权重**(每30秒随机选):

| 需求 | 概率 |
|------|------|
| 休息 | 1/4 |
| 找主人要食物 | 1/4 |
| 找零食柜 | 1/4 |
| 看蛋糕 | 1/4 |
| 无需求 | 条件不满足时 |

**被打反应**:
- 被主人攻击 → 逃跑 + 掉落手中食物
- 恐惧+0.5
- 触发委屈/生气/害怕对话

---

## 配置

配置文件位于 `config/` 目录:

### 广播配置(`callresponse.toml`)

```toml
# 是否在聊天栏显示调试信息
debugEnabled = false

# 触发广播的前缀
triggerPrefix = "#全体 "

# 每个女仆的基础回应概率(0.0 ~ 1.0)
baseChance = 0.4

# 搜索周围女仆的半径(格)
searchRadius = 16

# 提到女仆名字时概率增加的量(0.0 ~ 1.0)
nameMentionBonus = 0.5

# 最多同时回应的女仆数量
maxResponders = 5
```

### 被动情感配置(`callresponse-emotion-passive.toml`)

```toml
# 是否启用坐姿情感变化
sitDetectionEnabled = false

# 坐下时信任变化值(-10 ~ +10)
sitTrustChange = -2

# 坐下时恐惧变化值(-10 ~ +10)
sitFearChange = -2
```

---

## Q&A

**Q:女仆不吃东西怎么办?**
A:确保女仆背包里有食物。当饱食度低于35时女仆会自动搜索背包并进食。也可使用广播指令 `#全体 开饭` 让女仆来你手上取食物。

**Q:女仆主动打我怎么办?**
A:检查是否信任过低、恐惧过高触发了背叛模式(信任≤10且恐惧≥90)。可以使用数值调整器重新调整数值,或使用 `#全体 停战` 指令停止攻击。

**Q:女仆突然消失了?**
A:可能是触发了淡忘系统(信任≤10且恐惧≤10持续10秒)。女仆消失时会留下一块蛋糕。

**Q:数值调整器怎么用?**
A:手持数值调整器右键女仆,在打开的 GUI 中填入0-100的数值后点击确认。只有女仆的主人可以修改数值。

**Q:为什么广播指令女仆不听?**
A:可能原因:搜索半径内没有女仆、溺爱模式下部分指令被拒绝、发射指令但女仆正在攻击中(先用停战指令)。
注:目前广播模式仅仅拥有全体广播功能,针对其中几个或者一群的指令还未添加

**Q:懒女仆怎么不工作?**
A:懒女仆的任务就是懒,不会做正常女仆的工作。她会自己找床睡觉、找零食吃、看蛋糕发呆,偶尔会来找你要食物。

**Q:两个版本有什么区别?**
A:功能完全相同。
---

 

The Touhou Little Maid:Love & Loathe Team

profile avatar
  • 1
    Projects
  • 382
    Downloads