元编程参考文档

故事

29 个节点

本页内容 29

添加成就

函数

A story with an achievement, which Achieve grants and the Achievements screen lists.

签名
添加成就 -> Story
    故事: Story
    ID: 文本
    标题: 文本
    描述: 文本
    隐藏: 真否
Story AddAchievement(
    Story story,
    string id,
    string title,
    string description = "",
    bool hidden = false)

参数

名称类型默认值说明
故事Story—The story.
ID文本—What Achieve names it by.
标题文本—Its name on the Achievements screen.
描述文本—What earns it.
隐藏真否FalseKept secret until it is earned.

返回

故事Story
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
故事
所属包
Novella 视觉小说

添加音频名称

函数

A story with a name for an audio file, so lines can play theme rather than its path.

签名
添加音频名称(故事: Story, 名称: 文本, 文件: 文本) -> Story
Story AddAudioName(Story story, string name, string file)

参数

名称类型默认值说明
故事Story—
名称文本—
文件文本—

返回

故事Story
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
故事
所属包
Novella 视觉小说

添加声道

函数

A story with an audio channel of its own, beside music, sound, voice and ambience.

签名
添加声道 -> Story
    故事: Story
    名称: 文本
    混音通道: 文本
    循环: 真否
    加载时恢复: 真否
    淡出: 数字
Story AddChannel(
    Story story,
    string name,
    string mixer = "sfx",
    bool loop = false,
    bool restoreOnLoad = true,
    double fadeOut = 0)

参数

名称类型默认值说明
故事Story—The story.
名称文本—The channel's name.
混音通道文本sfxThe volume slider it follows: music, sfx or voice.
循环真否FalseWhether what plays on it loops unless told otherwise.
加载时恢复真否TrueWhether it starts again when a save is loaded.
淡出数字0Seconds of fade when what plays is replaced or stopped.

返回

故事Story
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
故事
所属包
Novella 视觉小说

添加角色

函数

A story with a character added.

签名
添加角色(故事: Story, 字符: Character Definition) -> Story
Story AddCharacter(Story story, CharacterDefinition character)

参数

名称类型默认值说明
故事Story—
字符Character Definition—

返回

故事Story
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
故事
所属包
Novella 视觉小说

添加常量

函数

A story with a constant, set when a game starts and again after a load so a changed value reaches old saves.

签名
添加常量(故事: Story, 名称: 文本, 值: 文本) -> Story
Story AddConstant(Story story, string name, string value)

参数

名称类型默认值说明
故事Story—
名称文本—
值文本—

返回

故事Story
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
故事
所属包
Novella 视觉小说

添加默认值

函数

A story with a variable's starting value: affection and 0.

签名
添加默认值(故事: Story, 变量: 文本, 值: 文本) -> Story
Story AddDefault(Story story, string variable, string value)

参数

名称类型默认值说明
故事Story—
变量文本—
值文本—

返回

故事Story
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
故事
所属包
Novella 视觉小说

添加画廊条目

函数

A story with a gallery entry, unlocked once its pictures have been seen.

签名
添加画廊条目 -> Story
    故事: Story
    ID: 文本
    标题: 文本
    图像: 文本
Story AddGalleryEntry(
    Story story,
    string id,
    string title,
    string images)

参数

名称类型默认值说明
故事Story—The story.
ID文本—The entry's id.
标题文本—Its name in the Gallery.
图像文本—The images it shows, by name and separated by commas: cg red_thread, or cg guqin, cg river_lanterns. The first is the thumbnail.

返回

故事Story
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
故事
所属包
Novella 视觉小说

条件添加画廊条目

函数

A story with a gallery entry unlocked when a condition holds, rather than when its pictures have been seen.

签名
条件添加画廊条目 -> Story
    故事: Story
    ID: 文本
    标题: 文本
    图像: 文本
    条件: Condition
Story AddGalleryEntryWhen(
    Story story,
    string id,
    string title,
    string images,
    Condition when)

参数

名称类型默认值说明
故事Story—
ID文本—
标题文本—
图像文本—
条件Condition—

返回

故事Story
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
故事
所属包
Novella 视觉小说

添加图像

函数

A story with an image defined: a name and a file (or a colour such as #000).

签名
添加图像(故事: Story, 名称: 文本, 文件: 文本) -> Story
Story AddImage(Story story, string name, string file)

参数

名称类型默认值说明
故事Story—
名称文本—
文件文本—

返回

故事Story
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
故事
所属包
Novella 视觉小说

从源添加图像

函数

A story with an image from a source made by the Images nodes: a movie, a filtered or composite picture, a switch.

签名
从源添加图像(故事: Story, 名称: 文本, 源: Image Source) -> Story
Story AddImageFromSource(
    Story story,
    string name,
    ImageSource source)

参数

名称类型默认值说明
故事Story—
名称文本—
源Image Source—

返回

故事Story
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
故事
所属包
Novella 视觉小说

添加标签

函数

A story with a label added, replacing one of the same name.

签名
添加标签(故事: Story, 标签: Label) -> Story
Story AddLabel(Story story, Label label)

参数

名称类型默认值说明
故事Story—
标签Label—

返回

故事Story
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
故事
所属包
Novella 视觉小说

添加分层图像

函数

A story with a layered image, assembled with Start Layered Image and the layer nodes.

签名
添加分层图像(故事: Story, 图像: Layered Image) -> Story
Story AddLayeredImage(Story story, LayeredImage image)

参数

名称类型默认值说明
故事Story—
图像Layered Image—

返回

故事Story
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
故事
所属包
Novella 视觉小说

添加音乐曲目

函数

A story with a track for the music room, unlocked once heard, or when a condition holds.

签名
添加音乐曲目 -> Story
    故事: Story
    文件: 文本
    标题: 文本
    条件: Condition
Story AddMusicTrack(
    Story story,
    string file,
    string title,
    Condition when)

参数

名称类型默认值说明
故事Story—
文件文本—
标题文本—
条件Condition—

返回

故事Story
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
故事
所属包
Novella 视觉小说

添加 Python 定义

函数

A story with Python run once when a game starts: the functions it defines can be called from any condition, text or effect, as [title_for(trust)].

签名
添加 Python 定义(故事: Story, 代码: 文本) -> Story
Story AddPythonDefinitions(Story story, string code)

参数

名称类型默认值说明
故事Story—
代码文本—

返回

故事Story
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
故事
所属包
Novella 视觉小说

添加画面

函数

A story with a screen laid out by the Screens nodes, which Show Screen and Call Screen find by its name.

签名
添加画面(故事: Story, 屏幕: Screen Layout) -> Story
Story AddScreen(Story story, ScreenLayout screen)

参数

名称类型默认值说明
故事Story—
屏幕Screen Layout—

返回

故事Story
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
故事
所属包
Novella 视觉小说

添加样式

函数

A story with a style made by the Styles nodes: a look of its own, or, under one of Novella's own names, a restyling of that part of the game.

签名
添加样式(故事: Story, 样式: Style Look) -> Story
Story AddStyle(Story story, StyleLook style)

参数

名称类型默认值说明
故事Story—
样式Style Look—

返回

故事Story
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
故事
所属包
Novella 视觉小说

添加转场

函数

A story with a named transition, made from a built-in one: slow as dissolve(2).

签名
添加转场(故事: Story, 名称: 文本, 转场: 文本) -> Story
Story AddTransition(Story story, string name, string transition)

参数

名称类型默认值说明
故事Story—The story.
名称文本—The transition's name.
转场文本—What it is, from the Transitions nodes or as written after with.

返回

故事Story
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
故事
所属包
Novella 视觉小说

检查故事

函数

Checks a story without its files: undefined labels, characters, transforms and transitions.

签名
检查故事(故事: Story) -> 文本数组
string[] CheckStory(Story story)

参数

名称类型默认值说明
故事Story—

返回

问题文本数组
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
故事
所属包
Novella 视觉小说

合并故事

函数

Two stories as one: the second's labels and definitions added to the first's.

签名
合并故事(第一个: Story, 第二个: Story) -> Story
Story CombineStories(Story first, Story second)

参数

名称类型默认值说明
第一个Story—
第二个Story—

返回

故事Story
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
故事
所属包
Novella 视觉小说

标签名称

函数

The labels a story has, in order.

签名
标签名称(故事: Story) -> 文本数组
string[] LabelNames(Story story)

参数

名称类型默认值说明
故事Story—

返回

标签文本数组
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
故事
所属包
Novella 视觉小说

创建标签

函数

A label: a named place in the story, holding a sequence.

签名
创建标签(名称: 文本, 序列: Sequence) -> Label
Label MakeLabel(string name, Sequence sequence)

参数

名称类型默认值说明
名称文本—The label's name; the game starts at start.
序列Sequence—What happens there.

返回

标签Label
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
故事
所属包
Novella 视觉小说

创建带参数的标签

函数

A label that takes arguments, which Call With Arguments passes and the label reads as variables.

签名
创建带参数的标签 -> Label
    名称: 文本
    参数: 文本
    序列: Sequence
Label MakeLabelWithParameters(
    string name,
    string parameters,
    Sequence sequence)

参数

名称类型默认值说明
名称文本—The label's name.
参数文本—Its parameters, separated by commas, each with an optional default: who, times=1.
序列Sequence—What happens there.

返回

标签Label
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
故事
所属包
Novella 视觉小说

开始故事

函数

An empty story to add labels and characters to.

签名
开始故事() -> Story
Story StartStory()

返回

故事Story
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
故事
所属包
Novella 视觉小说

从库加载故事

函数

Reads a story from a script file in the document's library.

签名
从库加载故事 -> Story
    _library: IDivookaAssetLibrary
    路径: 文本
Story StoryFromLibrary(
    IDivookaAssetLibrary _library,
    string path)

参数

名称类型默认值说明
_libraryIDivookaAssetLibrary—The document's library (supplied automatically).
路径文本—The script's path in the library.

返回

故事Story
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
故事
所属包
Novella 视觉小说

从脚本生成故事

函数

Reads a story from script text.

签名
从脚本生成故事(脚本: 文本, 名称: 文本) -> Story
Story StoryFromScript(
    string script,
    string name = "script.novella")

参数

名称类型默认值说明
脚本文本—Novella script.
名称文本script.novellaA name for error messages.

返回

故事Story
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
故事
所属包
Novella 视觉小说

故事转为脚本

函数

A story written as script.

签名
故事转为脚本(故事: Story) -> 文本
string StoryToScript(Story story)

参数

名称类型默认值说明
故事Story—

返回

脚本文本
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
故事
所属包
Novella 视觉小说

翻译台词

函数

A story with a line translated, found by the label it is in, who says it and what it says.

签名
翻译台词 -> Story
    故事: Story
    语言: 文本
    标签: 文本
    说话人: 文本
    原图: 文本
    译文: 文本
Story TranslateLine(
    Story story,
    string language,
    string label,
    string speaker,
    string original,
    string translated)

参数

名称类型默认值说明
故事Story—The story.
语言文本—The language, such as zh-Hans.
标签文本—The label the line is in.
说话人文本—The speaking character's id; empty for narration.
原图文本—The line as written.
译文文本—The line in the language; empty removes it there.

返回

故事Story
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
故事
所属包
Novella 视觉小说

按 ID 翻译台词

函数

A story with a line translated by the id Say Line gave it.

签名
按 ID 翻译台词 -> Story
    故事: Story
    语言: 文本
    ID: 文本
    译文: 文本
Story TranslateLineById(
    Story story,
    string language,
    string id,
    string translated)

参数

名称类型默认值说明
故事Story—
语言文本—
ID文本—
译文文本—

返回

故事Story
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
故事
所属包
Novella 视觉小说

翻译文本

函数

A story with any other text translated: a choice, a name, a prompt, a notification.

签名
翻译文本 -> Story
    故事: Story
    语言: 文本
    原图: 文本
    译文: 文本
Story TranslateString(
    Story story,
    string language,
    string original,
    string translated)

参数

名称类型默认值说明
故事Story—
语言文本—
原图文本—
译文文本—

返回

故事Story
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
故事
所属包
Novella 视觉小说