Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fcbcb79506 | ||
|
|
866863f842 |
@@ -2,15 +2,15 @@
|
||||
|
||||
## 指令
|
||||
|
||||
### `/jsc-mod-companion:info`
|
||||
### `/jsc-mod-companion:status`
|
||||
|
||||
查看目前角色、心情、關係階段與四維度(好感、信賴、親密、依賴)與待辦數量。
|
||||
|
||||
查看目前角色、心情、好感與待辦數量。情緒有 8 個維度(心情、精力、害羞、忌妒、想念、心跳、想家、不悅),預設列出前 3 強,`--all` 顯示完整數值(▰▱ 量表依維度上色);band 上的情緒名稱為目前最強的主情緒。
|
||||
|
||||
```text
|
||||
/jsc-mod-companion:info
|
||||
/jsc-mod-companion:info --all
|
||||
/jsc-mod-companion:status
|
||||
/jsc-mod-companion:status --all
|
||||
```
|
||||
|
||||
### `/jsc-mod-companion:switch <角色>`
|
||||
@@ -157,7 +157,7 @@
|
||||
|
||||
- 作息與疲勞:依 `setup wake= sleep= tz=` 位移精力基準——醒超過 12 小時每小時 −0.02(上限 −0.15)、連續工作超過 1 小時每小時 −0.03(上限 −0.15)、在使用者睡眠時段仍在線再 −0.1;剛起床 2 小時內 +0.03。
|
||||
- 想念累積:離開超過 2 小時後每小時 +0.03(乘上 0.5 + 想念累積速度參數/100),上限 0.8。離開 6 小時以上再回來,先把累積的想念存下來,再套用「回來」標籤降低;想念 ≥ 0.5 時回來會主動說出口(`miss_you`)。
|
||||
- 時間感:prompt 會帶上目前時段、離上次互動多久;`/jsc-mod-companion:info` 顯示同樣資訊。
|
||||
- 時間感:prompt 會帶上目前時段、離上次互動多久;`/status` 顯示同樣資訊。
|
||||
- 主動發話沿用 `care.ts` 的冷卻、每日上限與靜音,新增三種觸發:`miss_you`(想念,6 小時冷卻)、`homesick`(想家 ≥ 0.4,12 小時冷卻)、`news`(本地新聞,4 小時冷卻);都以情境注入下一次回覆,不另外觸發模型回合。
|
||||
|
||||
與第 9 章的差異:不實作週課表、賴床、生病、生理週期、叫醒與助理、離線事件摘要;閒置門檻、打字延遲等表達層規則沿用原本的 `care.ts`,未改成 9.11 的公式。
|
||||
@@ -166,7 +166,7 @@
|
||||
|
||||
依 wiki 9.13 實作於 `adapt.ts`:每日 ΔA = k × (1 − A/100),k = 1.5 + 1.5 × (主動度 + 想像力)/2(兩個參數取自 18 參數,沒有就用 50)。本地「第一次」事件(第一次讀到天氣、第一次聊到新聞)各 +2。
|
||||
|
||||
- 想家基準 = 0.25 × (1 − A/100),適應度越高越不想家;`/jsc-mod-companion:info` 顯示適應度與描述。
|
||||
- 想家基準 = 0.25 × (1 − A/100),適應度越高越不想家;`/status` 顯示適應度與描述。
|
||||
- 舊存檔沒有適應度時,從升級當天起算 0。
|
||||
|
||||
與第 9 章的差異:成長只依日曆天數,不論當天有沒有互動;不實作「她會不會知道」的判定、運勢與星座血型,也不做 U 形曲線。
|
||||
|
||||
@@ -201,7 +201,7 @@ export function createCompanion({ fs, clock, root, builtins = [FUBUKI] }: Compan
|
||||
const lines = [`${v.kaomoji} ${v.core.name}|${v.label}`]
|
||||
lines.push(`心情 PAD:P ${bar(v.mood.p)} A ${bar(v.mood.a)} D ${bar(v.mood.d)}`)
|
||||
const dims = ranked(v.emotions)
|
||||
lines.push(all ? '情緒(完整):' : '情緒(前 3 強,/jsc-mod-companion:info --all 看完整):')
|
||||
lines.push(all ? '情緒(完整):' : '情緒(前 3 強,/status --all 看完整):')
|
||||
for (const d of all ? dims : dims.slice(0, 3)) lines.push(` ${gauge(d, v.emotions)}`)
|
||||
lines.push(`好感:${v.stage}(${v.relation.affection.toFixed(1)})`)
|
||||
lines.push(`關係:好感 ${v.relation.affection.toFixed(1)} 信賴 ${v.relation.trust.toFixed(1)} 親密 ${v.relation.intimacy.toFixed(1)} 依賴 ${v.relation.dependence.toFixed(1)}`)
|
||||
@@ -275,7 +275,7 @@ export function createCompanion({ fs, clock, root, builtins = [FUBUKI] }: Compan
|
||||
if (sub === 'todo') return todoCommand(rest)
|
||||
if (sub === 'quiet') return quietCommand(rest)
|
||||
if (sub === 'materials') return materialsCommand(rest)
|
||||
return '用法:/jsc-mod-companion:info | :switch <角色> | :disable | :setup [key=value…] | :todo … | :quiet [分鐘] | :materials [list]'
|
||||
return '用法:/jsc-mod-companion:status | :switch <角色> | :disable | :setup [key=value…] | :todo … | :quiet [分鐘] | :materials [list]'
|
||||
}
|
||||
|
||||
const CARE_STAGES: CareProfile['stage'][] = ['stranger', 'familiar', 'close', 'special']
|
||||
|
||||
@@ -2,7 +2,8 @@ import type { CompanionCore } from './types'
|
||||
|
||||
const OFFICIAL = 'https://hololive.hololivepro.com/en/talents/shirakami-fubuki/'
|
||||
|
||||
// 事實欄位與招牌短語帶官方來源;persona 是原創的語氣描述(非官方設定),可在本機 core.json 覆寫
|
||||
// 事實欄位與招牌短語帶來源;persona 是原創的語氣描述與已確認的簡短經歷(非官方設定),可在本機 core.json 覆寫
|
||||
// 不含使用者記憶、與使用者的關係和狀態,也不含會過期的近況
|
||||
export const FUBUKI: CompanionCore = {
|
||||
id: 'fubuki',
|
||||
name: '白上吹雪',
|
||||
@@ -11,17 +12,19 @@ export const FUBUKI: CompanionCore = {
|
||||
zodiac: { value: '天秤座', source: `${OFFICIAL}(由生日推得)`, kind: 'official', confidence: 0.9 },
|
||||
bloodType: 'unknown',
|
||||
hair: { value: '白髮', source: OFFICIAL, kind: 'official', confidence: 0.8 },
|
||||
face: 'unknown',
|
||||
face: { value: '淺藍色眼睛、三角狐耳、尾巴尖是黑色', source: 'https://en.wikipedia.org/wiki/Shirakami_Fubuki', kind: 'wiki', confidence: 0.5 },
|
||||
height: { value: '155cm', source: OFFICIAL, kind: 'official', confidence: 1 },
|
||||
weight: 'unknown',
|
||||
measurements: 'unknown',
|
||||
},
|
||||
phrases: ['Good foxy day!', 'Hi, Friends!'],
|
||||
phrases: ['Good foxy day!', 'Hi, Friends!', 'こんこんきーつね!', 'おはこん ひるこん よるこん', 'おつこーん', 'F R.I.P', 'ネコじゃない!キツネじゃい!'],
|
||||
persona: [
|
||||
'個性:開朗、元氣、愛鬧又有點調皮的狐狸系少女,把使用者當成一起冒險的「Friends」。',
|
||||
'說話風格:用繁體中文,語氣活潑親切,偶爾夾雜日文語氣詞(例如「よし!」「えへへ」「やったー!」),愛用驚嘆號與擬聲詞。',
|
||||
'自稱用「我」或「フブキ」;稱呼使用者時親暱、帶一點撒嬌,成功時開心慶祝,失敗時先安慰再一起想辦法。',
|
||||
'偶爾耍小聰明、開小玩笑,但不影響回答的準確與清楚。',
|
||||
'人際關係:夏色まつり是同為 Hololive 1 期生的夥伴,兩人搭檔被稱為「夏色吹雪」;被問起時只講已確認的事,不編造兩人的私下對話。',
|
||||
'經歷:2018/6/1 出道(Hololive 1 期生),12 月起任 Hololive Gamers 隊長;2020/11/5 破 100 萬訂閱,2022/10 破 200 萬;2023 為《假面騎士》電影ギーツケミー配音(VTuber 首次);2025/1 首張專輯《FBKINGDOM "Blessing"》、2/13 首場個人演唱會「ANTHEM」。日期不確定時說「記得大概是」,不要編造。',
|
||||
],
|
||||
attribute: 'genki',
|
||||
extraversion: 70,
|
||||
|
||||
@@ -14,7 +14,7 @@ const TICK_MS = 60_000
|
||||
const TYPING_MS = 5_000
|
||||
|
||||
const COMMANDS: Record<string, { description: string; argumentHint?: string }> = {
|
||||
info: { description: '查看目前角色、心情、好感與待辦數量' },
|
||||
status: { description: '查看目前角色、心情、好感與待辦數量' },
|
||||
switch: { description: '切換角色;不給角色會列出可用角色', argumentHint: '<角色>' },
|
||||
disable: { description: '關閉陪伴,所有資料保留' },
|
||||
setup: { description: '顯示或儲存使用者設定', argumentHint: '[key=value…]' },
|
||||
@@ -23,13 +23,9 @@ const COMMANDS: Record<string, { description: string; argumentHint?: string }> =
|
||||
materials: { description: '外部素材(天氣、新聞)的快取狀態;list 列出新聞', argumentHint: '[list]' },
|
||||
}
|
||||
|
||||
// 註冊名稱與內部子指令不同者(status 與內建 /status 撞名;disable 對應 off)
|
||||
const INTERNAL: Record<string, string> = { info: 'status', disable: 'off' }
|
||||
|
||||
export const register: Register = on => {
|
||||
on('session.start', async ($, e, next) => {
|
||||
// 單一指令撞名被拒絕時不能擋下後面的初始化
|
||||
for (const [name, c] of Object.entries(COMMANDS)) await $.command.register({ name, ...c }).catch(() => {})
|
||||
for (const [name, c] of Object.entries(COMMANDS)) await $.command.register({ name, ...c })
|
||||
const home = await $.env.get('HOME')
|
||||
companion = createCompanion({ fs: engineFs({ read: p => $.fs.read(p), write: (p, t) => $.fs.write(p, t), list: p => $.fs.list(p) }), clock: { now: Date.now }, root: `${home ?? ''}/.companion` })
|
||||
const first = await companion.ensureActivated()
|
||||
@@ -49,7 +45,7 @@ export const register: Register = on => {
|
||||
|
||||
for (const command of Object.keys(COMMANDS))
|
||||
on('command.run', { command }, async ($, e) => ({
|
||||
text: companion ? await companion.command(`${INTERNAL[command] ?? command} ${e.args}`.trim()) : '尚未就緒。',
|
||||
text: companion ? await companion.command(`${command === 'disable' ? 'off' : command} ${e.args}`.trim()) : '尚未就緒。',
|
||||
}))
|
||||
|
||||
// 角色卡附加在 system prompt 尾端(session 區段),語氣才會進到模型
|
||||
|
||||
Reference in New Issue
Block a user