Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Enable_Appreciation:true;

如果你同时准备了多语言剧本,需要在脚本中读取当前界面语言,并跳转到对应的场景文件。可以使用内部变量 `$userData.optionData.language`:

```webgal
``` webgal
setVar:lang=($userData.optionData.language);
changeScene:start_zh.txt -when=lang==0;
changeScene:start_en.txt -when=lang==1;
Expand Down
8 changes: 4 additions & 4 deletions src/developers/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ WebGAL 目前使用 yarn 作为包管理器,以及 yarn workspace monorepo 管

如果你没有 yarn ,请输入以下指令安装

```shell
``` bash
npm install yarn -g
```

然后在项目根目录执行

```shell
``` bash
yarn
```
以安装依赖。
Expand All @@ -68,13 +68,13 @@ yarn

你可以通过运行以下脚本启动开发服务器

```shell
``` bash
yarn dev
```

如果你想要构建 WebGAL,请使用

```shell
``` bash
yarn build
```

Expand Down
14 changes: 7 additions & 7 deletions src/developers/terre.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ WebGAL Terre 的仓库在 [WebGAL Terre - GitHub](https://github.com/OpenWebGAL/

### 安装依赖

```bash
``` bash
yarn
```

### 启动开发服务器

```bash
``` bash
yarn dev
```

Expand All @@ -59,13 +59,13 @@ yarn dev

1、Clone WebGAL 引擎项目(推荐在相邻目录 Clone,这样可以使用自动化脚本)

```
``` bash
git clone https://github.com/OpenWebGAL/WebGAL.git
```

2、**(假设你在 Terre 项目的相邻目录 Clone WebGAL 项目,未这样做的开发者请忽略)** 在 WebGAL 引擎仓库运行自动化脚本构建 WebGAL 到 WebGAL Terre

```
``` bash
sh release-to-terre.sh
```

Expand All @@ -75,7 +75,7 @@ sh release-to-terre.sh

2、构建 WebGAL 项目(此步骤在 WebGAL 引擎仓库中执行)

```
``` bash
yarn
yarn build
```
Expand All @@ -84,7 +84,7 @@ yarn build

**此处假设你在 Terre 项目的相邻目录 Clone WebGAL 项目,如果你有不同的目录结构,请根据实际情况修改。**

```
``` bash
# 进入 Terre 目录
cd ../WebGAL_Terre/packages/terre2/assets/templates/WebGAL_Template || exit
# 删除其他文件
Expand Down Expand Up @@ -122,7 +122,7 @@ WebGAL Terre 是一个 TypeScript 全栈项目,使用 OpenAPI 来生成请求

以下代码示例展示了后端接口需要使用的关键注解:

```typescript
``` typescript
@Post('createGame')
@ApiOperation({ summary: 'Create a new game' })
@ApiResponse({ status: 200, description: 'Game creation result.' })
Expand Down
2 changes: 1 addition & 1 deletion src/en/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Enable_Appreciation:true;

If you also prepare multiple script languages, read the current interface language in your script and jump to the corresponding scene file. You can use the internal variable `$userData.optionData.language`:

```webgal
``` webgal
setVar:lang=($userData.optionData.language);
changeScene:start_zh.txt -when=lang==0;
changeScene:start_en.txt -when=lang==1;
Expand Down
8 changes: 4 additions & 4 deletions src/en/developers/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ WebGAL currently uses yarn as a package manager and yarn workspace as a monorepo

If you don't have yarn, please install it using the following command:

```shell
``` bash
npm install yarn -g
```

Then, execute the following command in the project root directory:

```shell
``` bash
yarn
```

Expand All @@ -69,13 +69,13 @@ This project has 3 packages, each corresponding to different functionalities:

You can start the development server by running the following script:

```shell
``` bash
yarn dev
```

If you want to build WebGAL, use:

```shell
``` bash
yarn build
```

Expand Down
14 changes: 7 additions & 7 deletions src/en/developers/terre.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ The WebGAL Terre repository is located at [WebGAL Terre - GitHub](https://github

### Installing Dependencies

```bash
``` bash
yarn
```

### Starting the Development Server

```bash
``` bash
yarn dev
```

Expand All @@ -59,13 +59,13 @@ Generally, we will update the latest version of the engine template to the Terre

1. Clone the WebGAL engine project (it is recommended to clone in the adjacent directory, so that you can use the automation script)

```
``` bash
git clone https://github.com/OpenWebGAL/WebGAL.git
```

2. **(Assuming you cloned the WebGAL project in the directory adjacent to the Terre project, developers who did not do this please ignore)** Run the automation script in the WebGAL engine repository to build WebGAL to WebGAL Terre

```
``` bash
sh release-to-terre.sh
```

Expand All @@ -75,7 +75,7 @@ sh release-to-terre.sh

2. Build the WebGAL project (this step is executed in the WebGAL engine repository)

```
``` bash
yarn
yarn build
```
Expand All @@ -84,7 +84,7 @@ yarn build

**Here we assume that you cloned the WebGAL project in the directory adjacent to the Terre project. If you have a different directory structure, please modify it according to the actual situation.**

```
``` bash
# Enter the Terre directory
cd ../WebGAL_Terre/packages/terre2/assets/templates/WebGAL_Template || exit
# Delete other files
Expand Down Expand Up @@ -122,7 +122,7 @@ To make this process work correctly, pay attention to the following annotations

The following code example demonstrates the key annotations required for backend interfaces:

```typescript
``` typescript
@Post('createGame')
@ApiOperation({ summary: 'Create a new game' })
@ApiResponse({ status: 200, description: 'Game creation result.' })
Expand Down
8 changes: 4 additions & 4 deletions src/en/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,20 @@ Windows 7 users please refer to **[How to start making with Visual Editor on Win

## Method 2: Start debugging from source code (For makers who want higher customization)

``` shell
``` bash
git clone https://github.com/OpenWebGAL/WebGAL.git
```

Install and use yarn to install dependencies

``` shell
``` bash
npm install yarn -g
yarn
```

WebGAL uses vite as a packaging and debugging tool, you can start the development server by running the following script

``` shell
``` bash
yarn dev
```

Expand All @@ -54,7 +54,7 @@ It is recommended to use VS Code for development, and use plugins to achieve syn

If you want to package, please use

``` shell
``` bash
yarn build
```

Expand Down
2 changes: 1 addition & 1 deletion src/en/live2D.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ If you use WebGAL Terre 4.6 portable mode, `[user data directory]` is the `data`

You can use the `-motion=motionName` or `-expression=expressionName` parameters to switch expressions, such as:

```
``` webgal
changeFigure:xxx.json -motion=angry -expression=angry01;
```
6 changes: 3 additions & 3 deletions src/en/script-reference/commands/applyStyle.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ First, create a new style in the UI template. Then use the `applyStyle` command
Connect the original style name and the new style name with `->`. Multiple replacements can be written at once and separated by English commas `,`.
The format is: originalStyle->newStyle,originalStyle2->newStyle2,...

```webgal
``` webgal
; Replace the speaker-name background with red, assuming the new style exists in the UI template
applyStyle:TextBox_ShowName_Background->TextBox_ShowName_Background_Red;
Character:This is a line.;
Expand All @@ -18,7 +18,7 @@ applyStyle:TextBox_ShowName_Background->TextBox_ShowName_Background_Green,TextBo

No matter which new style the original style is replaced with, the replacement still starts from the original style name:

```webgal
``` webgal
applyStyle:OriginalStyleName->NewStyleName1;
applyStyle:NewStyleName1->NewStyleName2; Wrong
applyStyle:OriginalStyleName->NewStyleName2;
Expand All @@ -35,7 +35,7 @@ Choices use the following style names:
| `Choose_item` | Clickable choice |
| `Choose_item_disabled` | Choice whose condition is not met and cannot be clicked |

```webgal
``` webgal
; Replace clickable choices with Choose_item_Red defined in the template
applyStyle:Choose_item->Choose_item_Red;
```
12 changes: 6 additions & 6 deletions src/en/script-reference/commands/bgm.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ A four-in-one command for playing background music, switching background music,
Sets the path of the background music. When the file path is empty or `none`, playback stops.
See [Audio](../../webgal-script/audio.md) for details.

```webgal
``` webgal
; If no BGM exists, this plays BGM.
bgm:01.wav;
; If BGM already exists, this switches BGM.
Expand All @@ -18,7 +18,7 @@ bgm:;

If the background music path stays the same, the music is not interrupted. Instead, the new parameters are applied to the current background music.

```webgal
``` webgal
bgm:morning.wav;
; Adjust volume without interrupting the BGM
bgm:morning.wav -volume=50;
Expand All @@ -27,7 +27,7 @@ bgm:morning.wav -volume=50;
## Parameters

<!-- @include: ../arguments/volume.md -->
```webgal
``` webgal
bgm:01.wav -volume=100;
bgm:01.wav -volume=50; Adjust volume
```
Expand All @@ -40,22 +40,22 @@ bgm:01.wav -volume=50; Adjust volume

The fade-in duration of the background music.

```webgal
``` webgal
bgm:01.wav -enter=1500;
bgm:02.wav -enter=1500;
```

### unlockname
<!-- @include: ../arguments/name-bgm.md -->
If this parameter is omitted or the name is empty, the music will not be collected.
```webgal
``` webgal
bgm:01.wav -unlockname=MyBgm01;
```

### series
<!-- @include: ../arguments/series-bgm.md -->
Writing only `series` will not collect the music. Make sure `unlockname` is also set.

```webgal
``` webgal
bgm:01.wav -unlockname=MyBgm01 -series=MySeries01;
```
6 changes: 3 additions & 3 deletions src/en/script-reference/commands/callSteam.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This command only works in builds that provide Steam / Electron bridge support.

Fill in `Steam_AppID` in `game/config.txt`. WebGAL initializes Steam integration when the game starts.

```text
``` text
Steam_AppID:480;
```

Expand All @@ -27,13 +27,13 @@ There is no statement content. All values are passed through named parameters.

Sets the Steam achievement ID to unlock. It must match the achievement API name configured in the Steam backend.

```webgal
``` webgal
callSteam: -achievementId=ACH_WIN_ONE_GAME;
```

## Example

```webgal
``` webgal
; Unlock achievement
callSteam: -achievementId=ACH_WIN_ONE_GAME;
```
Loading
Loading