subsystem_History

This contains the source code documentation of the class subsystem_History.

subsystem_History

Inherits: DialogicSubsystem

Subsystem that manages history storing.

Properties


Methods

ReturnsMethod
voidclose_history ( )
Dictionaryget_saved_visited_history ( )
Arrayget_simple_history ( )
boolhas_event_been_visited ( event_index: int = <unknown>, timeline: DialogicTimeline = <unknown> )
boolhas_last_event_been_visited ( )
voidload_visited_history ( )
voidmark_event_as_visited ( _event: DialogicEvent )
voidopen_history ( )
voidpost_install ( )
voidreset_visited_history ( reset_property: bool = true )
voidsave_visited_history ( )
voidstore_full_event ( event: DialogicEvent )
voidstore_simple_history_entry ( text: String, event_type: String, extra_info: Dictionary = <unknown> )

Signals

signal close_requested ( )

No description available.


signal full_event_history_changed ( )

Emitted if a new event has been inserted into the full event history.


signal open_requested ( )

No description available.


signal simple_history_changed ( )

No description available.


signal unvisited_event ( )

Emitted if an encountered timeline event has not been visited before.


signal visited_event ( )

Emitted if an encountered timeline event has been inserted into the visited event history. This will trigger only once per unique event instance.


Property Descriptions

var full_event_history_content =

The full history of all Dialogic events encountered. Requires full_event_history_enabled to be true.


var full_event_history_enabled = false

Whether to keep a history of every Dialogic event encountered.


var save_visited_history_on_autosave = false

Whether to automatically save the already-visited history on auto-save.


var save_visited_history_on_save = false

Whether to automatically save the already-visited history on manual save.


var simple_history_content =

No description available.


var simple_history_enabled = true

Simple history that stores limited information Used for the history display


var visited_event_history_content =

A history of visited Dialogic events.


var visited_event_history_enabled = false

Read text history Stores which text events and choices have already been visited


var visited_event_save_key = "visited_event_history_content"

Used to store visited_event_history_content in the global info file. You can change this to a custom name if you want to use a different key in the global save info file.


Method Descriptions

func close_history ( ) ⇒ void

No description available.


func get_saved_visited_history ( ) ⇒ Dictionary

Returns the saved already-visited history from the global info save file. If none exist in the global info file, returns an empty dictionary. Relies on the Save subsystem.


func get_simple_history ( ) ⇒ Array

No description available.


func has_event_been_visited ( event_index: int = <unknown>, timeline: DialogicTimeline = <unknown> ) ⇒ bool

If called with with no arguments, the method will return whether the last encountered event was visited before. Otherwise, if event_index and timeline are passed, the method will check if the event from that given timeline has been visited yet. If no timeline is passed, the current timeline will be used. If there is no current timeline, false will be returned. If no event_index is passed, the current event index will be used.


func has_last_event_been_visited ( ) ⇒ bool

Whether the last event has been visited for the first time or not. This will return true exactly once for each unique timeline event instance.


func load_visited_history ( ) ⇒ void

Loads the seen events from the global info save file. Calling this when a game gets loaded may be useful. Relies on the Save subsystem.


func mark_event_as_visited ( _event: DialogicEvent ) ⇒ void

No description available.


func open_history ( ) ⇒ void

No description available.


func post_install ( ) ⇒ void

No description available.


func reset_visited_history ( reset_property: bool = true ) ⇒ void

Resets the already-visited history in the global info save file. If reset_property is true, it will also reset the already-visited history in the Dialogic Autoload. Relies on the Save subsystem.


func save_visited_history ( ) ⇒ void

Saves all seen events to the global info file. This can be useful when the player saves the game. In visual novels, callings this at the end of a route can be useful, as the player may not save the game. Be aware, this won't add any events but completely overwrite the already saved ones. Relies on the Save subsystem.


func store_full_event ( event: DialogicEvent ) ⇒ void

Called on each event.


func store_simple_history_entry ( text: String, event_type: String, extra_info: Dictionary = <unknown> ) ⇒ void

No description available.