This contains the source code documentation of the class subsystem_History
.
subsystem_History
Inherits: DialogicSubsystem
Subsystem that manages history storing.
Properties
Name | Type | Default |
---|---|---|
simple_history_enabled | bool | false |
simple_history_save | bool | false |
simple_history_content | Dictionary[] | [] |
full_event_history_enabled | bool | false |
full_event_history_save | bool | false |
full_event_history_content | DialogicEvent[] | [] |
visited_event_history_enabled | bool | false |
visited_event_history_content | Dictionary | {} |
visited_event_save_key | String | "visited_event_history_content" |
save_visited_history_on_autosave | bool | false |
save_visited_history_on_save | bool | false |
Methods
Returns | Method |
---|---|
void | post_install ( ) |
void | clear_game_state ( clear_flag : int = 0 ) |
void | load_game_state ( load_flag : int = 0 ) |
void | save_game_state ( ) |
void | open_history ( ) |
void | close_history ( ) |
void | store_simple_history_entry ( text : String, event_type : String, extra_info : Dictionary = {} ) |
Array | get_simple_history ( ) |
void | store_full_event ( event : DialogicEvent ) |
void | mark_event_as_visited ( event_index : int = <unknown> , timeline : DialogicTimeline = <unknown> ) |
bool | has_last_event_been_visited ( ) |
bool | has_event_been_visited ( event_index : int = <unknown> , timeline : DialogicTimeline = <unknown> ) |
void | save_visited_history ( ) |
void | load_visited_history ( ) |
Dictionary | get_saved_visited_history ( ) |
void | reset_visited_history ( reset_property : bool = true ) |
Signals
No description available.
No description available.
signal simple_history_changed ( )
No description available.
signal full_event_history_changed ( )
Emitted if a new event has been inserted into the full event history.
Emitted if an encountered timeline event has been inserted into the visited event history. This will trigger only once per unique event instance.
Emitted if an encountered timeline event has not been visited before.
Property Descriptions
var simple_history_enabled = false
Simple history that stores limited information Used for the history display
var simple_history_save = false
No description available.
var simple_history_content = []
No description available.
var full_event_history_enabled = false
Whether to keep a history of every Dialogic event encountered.
var full_event_history_save = false
No description available.
var full_event_history_content = []
The full history of all Dialogic events encountered. Requires full_event_history_enabled
to be true.
var visited_event_history_enabled = false
Read text history Stores which text events and choices have already been visited
var visited_event_history_content = {}
A history of visited Dialogic events.
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.
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.
Method Descriptions
No description available.
func clear_game_state ( clear_flag
: int = 0
) ⇒ void
No description available.
func load_game_state ( load_flag
: int = 0
) ⇒ void
No description available.
func save_game_state ( ) ⇒ void
No description available.
No description available.
No description available.
func store_simple_history_entry ( text
: String, event_type
: String, extra_info
: Dictionary = {}
) ⇒ void
No description available.
func get_simple_history ( ) ⇒ Array
No description available.
func store_full_event ( event
: DialogicEvent ) ⇒ void
Called on each event.
func mark_event_as_visited ( event_index
: int = <unknown>
, timeline
: DialogicTimeline = <unknown>
) ⇒ void
Called if an event is marked as visited.
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 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 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 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 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 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.