Daoyuan WIKI Lore

Lore

主动事件

Workshop 1.0.0叙事机制
  • 主动事件路由器
  • 主动找上门
  • 想念
  • 邀约
  • 求助
  • 催债
  • 挑战
  • 报复
Summary
偶尔会有相识的人为了自己的事找来,或是想念、邀约,或是求助、催债,也可能是来挑战寻仇。

@@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自己的小事/职责:想念、分享、邀约、求助、还债催债、约定、组队、传唤、招揽、挑战、报复。无真实理由则不触发。

Workshop