元編程參考文件

故事

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 視覺小說