# velius.gd
Extends: Node
# Description
WARNING
This document gets automatically generated using the GDScript Docs Maker (opens new window)
The Velius class represents the whole backend of the game.
It also works as the API between themes and MysterMaker project files.
To acces it when developing a theme, please use the official Velius-Engine SDK.
To access it when developing a mystery, you can use Velius.<PROPERTY/METHOD>
in your scripts.
# Property Descriptions
# next
var next: Dictionary
- Setter:
set_next
Contains the current dialogue
# json_data
var json_data: Dictionary
# current_json_path
var current_json_path: String
# current_json_location
var current_json_location: String
# current_chapter_id
var current_chapter_id: int
# current_dialogue_id
var current_dialogue_id: int
# current_location_id
var current_location_id: int
# Method Descriptions
# set_next
func set_next(new_next: Dictionary) -> void
# get_dialogue_by_id
func get_dialogue_by_id(id: int, chapter_id) -> Dictionary
Returns Dictionary containing the dialogue's data If id not found: returns empty Dictionary
# get_action
func get_action(id: int) -> String
Returns a choice's action string
# start_chapter
func start_chapter(json_path: String, chapterID: int, dialogue_id = 0) -> var
Loads a Mystery's data and theme After loading the given chapter will get displayed
# run_dialogue
func run_dialogue(data: Dictionary) -> void
Runs a dialogue with the given data Replaces all '@'-variables with their string value
# run_location
func run_location(l: Dictionary) -> void
Run location view TODO: Implement
# go_next
func go_next() -> void
Jumps to the next dialogue TODO: Implement
# end
func end() -> void
Ends the mystery processing
# go
func go(id: int) -> void
Go to current chapter's dialogue with given id
# go_chapter
func go_chapter(chapter_id: int, dialogue_id = 0) -> void
Switches to chapter with given id and directly jumps to given dialogue_id
# choice_made
func choice_made(id: int) -> void
Called when player made a choice Runs the selected choice's script
# open_side_menu
func open_side_menu() -> void
Opens the side menu
# get_mystery_resource_path
func get_mystery_resource_path(relative_path: String) -> String
Returns a mystery resources full virtual path
# mystery_resource_exists
func mystery_resource_exists(relative_path: String) -> bool
Returns if a mystery resource exists
# png_to_tex
func png_to_tex(local_res_path: String) -> ImageTexture
Returns ImageTexture of a given local png path
# import
func import(path = "all", dlc = false) -> void
Imports the mystery package located at the given path If path is not given all packages get imported that are located at user://DLC The dlc parameter determines if the packages is displayed in the dlc or the debug category If no arguments are given, all DLC in user://DLC get imported as DLC
# erase_from
func erase_from(dict: Dictionary, from: String) -> Dictionary
Removes a dictionary's from property if equal to given value Only works on the first layer (non-recursive)
# get_key_by_from
func get_key_by_from(dict: Dictionary, from: String) -> String
Returns the key of a object the given from value
# evaluate_value
func evaluate_value(input: String)
Returns a given string value in its type
# Signals
- signal new_dialogue(data): Called when a new dialogue is fired Returns a Dictionary