Jump to content

Lorebook Diagnostics

From example
Revision as of 18:18, 17 October 2025 by M4tsuri (talk | contribs) (创建 Lorebook 诊断页面用于排查问题)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Lorebook 诊断页面

这个页面用于诊断 Lorebook 系统的问题。

1. 检查扩展

访问 Special:Version 查看是否安装了:

  • ✓ Scribunto
  • ✓ Semantic MediaWiki

2. 检查属性

以下属性应该存在:

3. 查询概念数量

3 个概念已创建

4. 查询 Farlandia 的概念

 PlistPrimary keysKey mode
Farlandia:Monsters[Farlandia's monsters: slimes, dragons]monstersconstant
Mossford[Mossford(The town of Moss): town, mossy buildings, moss used for(magic, power), has(tavern, bank, inn, castle), kind people, wealthy]Mossford,town,mossconditional
Slime[slime: enemy, slimeball, made of gelatin, bounces to move, annoyance]slime,slimesconditional

5. 测试模块调用

Test 1: 无参数调用

[Farlandia's monsters: slimes, dragons]
[slime: enemy, slimeball, made of gelatin, bounces to move, annoyance]

{{user}}: Slime?
{{char}}: "Oh... Those things." She blushes, remembering their first battle.

Test 2: 指定世界但无上下文

[Farlandia's monsters: slimes, dragons]
[slime: enemy, slimeball, made of gelatin, bounces to move, annoyance]

{{user}}: Slime?
{{char}}: "Oh... Those things." She blushes, remembering their first battle.

Test 3: 指定世界和上下文

[slime: enemy, slimeball, made of gelatin, bounces to move, annoyance]
[Farlandia's monsters: slimes, dragons]

{{user}}: Slime?
{{char}}: "Oh... Those things." She blushes, remembering their first battle.

Test 4: 完整测试

[slime: enemy, slimeball, made of gelatin, bounces to move, annoyance]
[Mossford(The town of Moss): town, mossy buildings, moss used for(magic, power), has(tavern, bank, inn, castle), kind people, wealthy]
[Farlandia's monsters: slimes, dragons]

{{user}}: Slime?
{{char}}: "Oh... Those things." She blushes, remembering their first battle.

Test 5: 导出 JSON

{{#invoke:Lorebook|export|world=Farlandia}}

6. 检查错误

✓ 没有错误

7. 列出所有概念页面

8. 检查世界页面

诊断建议

如果上述测试失败,请按以下顺序排查:

  1. 检查扩展: 确保 Scribunto 和 SMW 已安装
  2. 创建属性: 手动创建所有必需的 Property 页面
  3. 重新保存页面: 访问每个概念页面,点击编辑并保存(不修改内容)
  4. 清除缓存: 在页面 URL 后添加 ?action=purge
  5. 查看日志: 检查 MediaWiki 错误日志

详细说明请参考项目中的 DEBUG_GUIDE.md 文件。