Skip to content

doc: 用claude 和 gpt 弥合了下现有脚本和实际文档的区别#90

Open
starrybamboo wants to merge 2 commits into
OpenWebGAL:mainfrom
starrybamboo:docs/complete-script-reference-gaps
Open

doc: 用claude 和 gpt 弥合了下现有脚本和实际文档的区别#90
starrybamboo wants to merge 2 commits into
OpenWebGAL:mainfrom
starrybamboo:docs/complete-script-reference-gaps

Conversation

@starrybamboo
Copy link
Copy Markdown

新增页面

src/script-reference/commands/callSteam.md

  • 新增 callSteam 命令说明。
  • 说明用途是通过 Electron / Steam 桥接解锁 Steam 成就。
  • 参数为 achievementId
  • 明确普通网页部署不会生效,避免误导为通用网页能力。

参数补全

src/script-reference/commands/changeBg.md

  • 新增 enterDuration:背景入场动画时长。
  • 新增 exitDuration:背景退场动画时长。

src/script-reference/commands/changeFigure.md

  • 新增 enterDuration:立绘入场动画时长。
  • 新增 exitDuration:立绘退场动画时长。
  • 新增 blendMode:立绘混合模式。
  • 修正 animationFlag 的说明:当前云端引擎会保存该值,但未发现后续逻辑读取它本身,因此不承诺它可驱动实际效果。

src/script-reference/commands/intro.md

  • 将错误参数名 useForward 修正为云端代码实际读取的 userForward

src/script-reference/commands/playEffect.md

  • 新增 volume 参数,说明范围为 0 到 100。

src/script-reference/commands/setTransform.md

  • 新增 ease 参数。

src/script-reference/commands/getUserInput.md

  • 补充说明:玩家空输入确认时会写入 defaultValue;没有 defaultValue 时写入一个空格。
  • 补充确认后的行为:写入变量、关闭输入框,并继续执行下一句;校验失败时停留在输入框。

src/script-reference/commands/intro.md

  • 补充全屏文字结束后的作者侧行为:结束后会自动关闭,不会遮挡后续对话;连续 intro 只显示当前内容。

src/script-reference/commands/choose.md

  • 补充选择后的作者侧行为:选择前暂停后续剧情和自动播放,点击后选项消失并跳转到对应目标。

src/script-reference/commands/setTextbox.md

  • 补充 setTextbox:on / setTextbox:show 都可恢复显示。
  • 示例改成 setTextbox:on;,与现有教程页保持一致。

语法与工作流补充

src/webgal-script/base.md

  • 新增“特殊符号转义”章节。
  • 覆盖 :,.;| 的反斜杠转义写法。
  • 补充文本拓展 CSS 中分号也要转义。

src/script-reference/commands/choose.md

  • 新增“条件展示和条件启用”章节。
  • 说明 (条件表达式) 控制显示,[条件表达式] 控制可点击,-> 分隔条件前缀和选项内容。
  • 交叉引用通用参数 -when 和特殊符号转义。

src/script-reference/commands/jumpLabel.md

  • 新增 jumpLabel -when 条件跳转示例。

src/script-reference/commands/say.md

  • 新增嘴型同步工作流提示,链接到动画教程中的完整说明。

src/webgal-script/animation.md

  • 补齐云端 game/animation/animationTable.json 中的预设动画清单。
  • 新增电影类滤镜和冲击波动画:oldFilmdotFilmreflectionFilmglitchFilmrgbFilmgodrayFilmremoveFilmshockwaveInshockwaveOut
  • 新增图片立绘嘴型同步完整章节,包含差分准备、changeFigure 注册、say -vocal 驱动、位置立绘示例和限制说明。

UI 样式补充

src/script-reference/commands/applyStyle.md

  • 新增选择枝常用可替换样式名:
    • Choose_Main
    • Choose_item_outer
    • Choose_item
    • Choose_item_disabled

这些名称来自云端 WebGAL 默认模板和 choose 组件代码,不是 Terre-only 内容。

Config 与导航

src/config.md

  • 新增 Steam_AppID

src/.vuepress/sidebar/zh.ts

  • 在中文命令参考导航中加入 callSteam

Copilot AI review requested due to automatic review settings May 28, 2026 08:44
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the WebGAL script documentation. It introduces the new callSteam command for Steam integration, documents new parameters such as enterDuration, exitDuration, blendMode, and volume, and details advanced features like conditional choices, text input defaults, and mouth synchronization workflows. The review feedback points out a documentation inconsistency in changeFigure.md regarding the default value of duration (stated as 300 in one place and 1000 in another), which should be clarified.

- 单位:毫秒
- 范围:0 到正无穷

入场动画时长。若未填写,默认取 `duration` 的值(默认 300)。
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

在第 101 行中提到 duration 的默认值为 300(“默认取 duration 的值(默认 300)”),但本文件中第 85 行(未在此 diff 中修改)指出 duration 的默认值为 1000(“作用于默认入场退场动画,默认值为 1000”)。这存在表述上的矛盾。\n\n如果立绘的默认动画时长确实是 300 毫秒(而背景是 1000 毫秒),建议在后续修改中将第 85 行的默认值也同步修正为 300,以避免误导开发者。

@MakinoharaShoko
Copy link
Copy Markdown
Member

请补充一下其他语言的翻译

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants