---
type: "lore"
source: "workshop"
title: "主动事件"
canonical: "https://daoyuan.mayuworld.com/lore/workshop/01a0afc0-6b40-74b8-a14f-74dc14a23818"
package: "红尘情劫"
packageId: "mod:pub_v1_fda6f62bd1e5bbe6fe9b665a506b8ec7.nailongxinzuop"
packageUrl: "https://daoyuan.mayuworld.com/lore/workshop?package=mod%3Apub_v1_fda6f62bd1e5bbe6fe9b665a506b8ec7.nailongxinzuop"
workshopUrl: "https://daoyuan.mayuworld.com/workshop/packages/mod%3Apub_v1_fda6f62bd1e5bbe6fe9b665a506b8ec7.nailongxinzuop"
sourceVersion: "1.0.0"
aliases:
  - "主动事件路由器"
keywords:
  - "主动找上门"
  - "想念"
  - "邀约"
  - "求助"
  - "催债"
  - "挑战"
  - "报复"
category: "叙事机制"
---

# 主动事件

## Metadata

- Source: Workshop package 红尘情劫 (`mod:pub_v1_fda6f62bd1e5bbe6fe9b665a506b8ec7.nailongxinzuop`), release 1.0.0
- Canonical: https://daoyuan.mayuworld.com/lore/workshop/01a0afc0-6b40-74b8-a14f-74dc14a23818
- Package: https://daoyuan.mayuworld.com/lore/workshop?package=mod%3Apub_v1_fda6f62bd1e5bbe6fe9b665a506b8ec7.nailongxinzuop
- Workshop: https://daoyuan.mayuworld.com/workshop/packages/mod%3Apub_v1_fda6f62bd1e5bbe6fe9b665a506b8ec7.nailongxinzuop
- Aliases: 主动事件路由器
- Keywords: 主动找上门, 想念, 邀约, 求助, 催债, 挑战, 报复
- Category: 叙事机制

## Summary

偶尔会有相识的人为了自己的事找来，或是想念、邀约，或是求助、催债，也可能是来挑战寻仇。

## Entry

@@preload
@@preprocessing
<%
define("hcqRecent", function(messages) {
 const arr=Array.isArray(messages)?messages.slice(-16).map(x=>String(x||"")):[];
 return arr.join("\n");
});
define("hcqRelFacts", function(personName) {
 const o={person:String(personName||""),stage:"",favor:null,isCompanion:false,intimacy:null,personality:"",desc:""};
 try{
 const v=(typeof getAllVariables==="function"?getAllVariables():null);
 const s=v&&v.stat_data&&typeof v.stat_data==="object"?v.stat_data:null;
 if(!s||!o.person)return o;
 const p=s["人物"]&&s["人物"][o.person];
 if(p&&typeof p==="object"){
 o.stage=String(p["关系阶段"]||"");o.personality=String(p["性格"]||"");o.desc=String(p["描述"]||"");
 const f=Number(p["好感"]);if(Number.isFinite(f))o.favor=f;
 }
 const m=s["道侣"]&&s["道侣"][o.person];
 if(m&&typeof m==="object"){o.isCompanion=true;o.stage="道侣";const i=Number(m["亲密"]);if(Number.isFinite(i))o.intimacy=i;}
 }catch(_e){}
 return o;
});
define("hcqKnownPeople", function() {
 const out=[];
 try{
 const v=(typeof getAllVariables==="function"?getAllVariables():null);
 const s=v&&v.stat_data&&typeof v.stat_data==="object"?v.stat_data:null;
 if(!s)return out;
 for(const scope of ["人物","道侣"]){
 const box=s[scope];
 if(box&&typeof box==="object")for(const n of Object.keys(box))if(n&&!out.includes(n))out.push(n);
 }
 }catch(_e){}
 return out;
});
define("hcqInitiativeGate", function(messages) {
 const text=hcqRecent(messages);
 const hardBlock=["正在渡劫","突破关键","生死战","激战正酣","不可分心"];
 if(hardBlock.some(x=>text.includes(x)))return "";
 /* 不靠NPC姓名或恋爱关键词；只给模型一个“检查是否存在主动事件”的机会。
 具体主动者必须来自本体当前可确认人物/道侣或本体剧情已经正常生成的人物。 */
 return "[红尘情劫·本轮检查] 仅从本体已存在NPC中判断：现在是否有人因自身目标、关系、职责、利益、兴趣、威胁判断或已知的{{user}}事迹，有充分理由主动行动？有：最多选择1人，按人物卡行动。危险人物可调查、设局、伏击或强取，但只声明尝试，结果交本体裁定。无：不要生成私人事件。禁止新增人物。";
});
%>
[红尘情劫·性格执行补充] NPC一旦被选为本轮行动者，行动方式优先服从其本体性格偏置；性格只决定手段，不制造动机。
[红尘情劫·生活事件补充] 若本轮允许主动事件，理由也可来自NPC自己的小事/职责：想念、分享、邀约、求助、还债催债、约定、组队、传唤、招揽、挑战、报复。无真实理由则不触发。