Text formatting
Text can be formatted and stylized very easily in ChoiceScript, which supports bold and italic text, as well as hyperlinks. 在 ChoiceScript 中,文本可以非常容易地进行格式化和样式设置,它支持粗体和斜体文本,以及超链接。
Stylizing text
文本样式化
Italic text
斜体文本
You can use italic text for any narrative text, *choice #Options text, and for such as section headers on your Stats screen. You can also use italic text for the specific text added to *page_break or *finish button commands.
您可以将斜体文本用于任何叙述性文字、*choice #选项文本,以及状态屏幕上的章节标题等。您还可以将斜体文本用于添加到 *page_break 或 *finish 按钮命令中的特定文本。
Adding italic text in ChoiceScript is easy. All you have to do is add [i] before the text you wish to turn into italics, and a [/i] at the end of that section of text, so if you do this in a ChoiceScript file:
在 ChoiceScript 中添加斜体文本非常简单。您只需在希望转换为斜体的文本前添加 [i],并在该段文本的末尾添加 [/i]。因此,如果您在 ChoiceScript 文件中这样做:
This is normal text, and [i]this is Italic text.[/i]this will be the output: 这将输出:
This is normal text, and _this is Italic text_.Example of italic text use within a *choice option:
*选择选项中使用斜体文本的示例:
*choice
#Run away, as fast as my little legs can carry me.
*goto flee_orc
#CHAAAAAAARGE! [i]Attack the Orc Chieftain with all my might![/i]
*goto attack_orcBold text
粗体文本
Just as italic text, bold text can be used for any narrative text, *choice #Option text and the specific text used on such as *page_break or *finish buttons (though the text on the buttons already being bold, the difference is minimal). It is commonly used to create section headers on the Stats screen.
正如斜体文本一样,粗体文本可用于任何叙述性文本、*choice #Option文本以及特定文本,例如 *page_break 或 *finish 按钮上的文字(尽管按钮上的文字本身已是粗体,差异很小)。它通常用于在属性屏幕上创建章节标题。
Adding bold text in ChoiceScript is easy. All you have to do is add [b] before the text you wish to bold, and a [/b] at the end of that section of text, so if you do this in a ChoiceScript file:
在 ChoiceScript 中添加粗体文本很简单。你只需在想加粗的文本前添加 [b],并在该段文本末尾添加 [/b],因此如果你在 ChoiceScript 文件中这样操作:
this will be the output: 将会得到如下输出:
Example of bold text use within a *choice option:
*选择项中使用粗体文本的示例:
Underline and strikethrough
下划线和删除线
There is currently no way to underline or strikethrough text in ChoiceScript. 目前无法在 ChoiceScript 中为文本添加下划线或删除线。
Hyperlinks
超链接
Hyperlinks can be inserted anywhere through the use of the *link command, as follows:
超链接可以通过使用 *link 命令在任何地方插入,如下所示:
this will show: 这将显示:
The *link command can also be used the following way to hyperlink text:
*link 命令也可以按以下方式使用,为文本添加超链接:
which will make the link look like this: 这将使链接显示如下:
Note that the *link command will not work in combination with the *page_break and *finish commands.
请注意,*link 命令无法与 *page_break 和 *finish 命令结合使用。
Font, text and link color
字体、文本与链接颜色
By default, the font used by the game will be Georgia, "Times New Roman". This can be changed by editing the style.css file, as can the overall color of the text.
默认情况下,游戏使用的字体将是 Georgia 和 "Times New Roman"。这可以通过编辑 style.css 文件来更改,文本的整体颜色也可通过此方式调整。
Text placement
文本位置
Aligning text
文本对齐
There is currently no way to control text placement in ChoiceScript, such as centering or aligning text to the right or left. Bear in mind that HTML tags such as <center> or <p style="text-align:right"> do not work in ChoiceScript.
目前,在 ChoiceScript 中无法控制文本位置,例如居中或将文本对齐到右侧或左侧。请记住,像 <center> 或 <p style="text-align:right"> 这样的 HTML 标签在 ChoiceScript 中不起作用。
Some have worked around this for chapter titles by using images (inserted with the *image command), that can be aligned to the center, left or right.
对于章节标题,一些人通过使用图片(通过 *image 命令插入)来变通解决,这些图片可以居中、左对齐或右对齐。
Carriage return
回车换行
The *line_break command can be used to force a carriage return, getting text to start on a new line instead of the same line. This is especially useful on the Stats screen, and with conditional text.
*line_break 命令可用于强制换行,使文本在新的一行开始,而非同一行。这在状态屏幕以及条件文本中尤其有用。
For example, if you just type the following in choicescript_stats.txt or any scene file:
例如,如果你在 choicescript_stats.txt 或任何 scene 文件中直接输入以下内容:
It will actually display in-game all on one line as, e.g. 实际上,它在游戏中会全部显示在一行上,例如:
Which is hardly the desired effect! However, using *line_break . . .
这几乎不是想要的效果!然而,使用 *line_break . . .
you can force it to display as intended, so it actually looks like this: 你可以强制它按预期显示,所以它实际上看起来像这样:
"Next" and "Next Chapter" buttons
“下一页”与“下一章”按钮
The *page_break command is used to break up longer sections of narrative into two or more pages (thereby reducing the off-putting "wall of text" effect), or sometimes simply to heighten story suspense.
*page_break 命令用于将较长的叙事段落分割成两页或更多页(从而减少令人望而生畏的“文字墙”效应),有时也仅用于增强故事悬念。
The *finish command moves the narrative to the next sequential scene.
*finish 命令将叙事推进到下一个连续场景。
By default, both of these commands display a button with the simple word "Next" (in the case of *page_break) or "Next Chapter" (in the case of *finish).
默认情况下,这两个命令都会显示一个按钮,上面简单地写着“下一页”(针对 *page_break)或“下一章”(针对 *finish)。
However, you can change the button wording to anything you like, simply by adding the required text to the command itself, as follows: 不过,您可以通过在命令本身中添加所需文本来随意更改按钮的措辞,如下所示:
Note that the button text can also be italic or bold text on these buttons. 请注意,这些按钮上的文本也可以是斜体或粗体。
The Next buttons can further be customized by editing the style.css file.
通过编辑 style.css 文件,可以进一步自定义“下一步”按钮。