Usage Syntax
Functions can be used in several contexts:Player State Functions
get_player_attribute
Returns a player attribute value.
Returns:
float
Common attributes: "HP", "MaxHP", "STR", "DEX", "INT"
get_value
Retrieves a stored game value by ID.
Returns:
float
get_gold
Returns the player’s current gold amount.int
get_item
Returns the quantity of a specific item.
Returns:
int
get_item_count
Alternative function to get item quantity.
Returns:
int
Character Functions
Character functions use integer IDs to identify characters:get_character_attribute
Returns an attribute for a specific character.
Returns:
float
get_char_attr
Alias forget_character_attribute.
Returns:
float
is_character_dead
Checks if a character is dead.
Returns:
bool
is_own_character
Checks if a character is in the player’s party.
Returns:
bool
Event Functions
is_event_finished
Checks if a specific event has been completed.
Returns:
bool
Global State Functions
get_global_value
Retrieves a global game state value.
Returns:
string
g_str
Gets a global string value.
Returns:
string
g_num
Gets a global numeric value.
Returns:
float
Localization Function
l10n
Retrieves a localized string by key.
Returns:
string
Standard dialogue localization uses
#line:id tags, not this function. The l10n function is for accessing the game’s internal localization table (e.g., UI strings).Cooking Functions
These functions are specific to the cooking system.has_food_ingredient
Checks if player has food ingredients.bool
get_cook_character
Gets the current cooking character.int (character ID)
get_cook_character_dialog
Gets cooking dialogue for a character.
Returns:
string
Common Patterns
Conditional Dialogue Based on Stats
Inventory Checks
Gold Checks
Character State
Event Progression
Important Notes
Related Pages
Visual Commands
Control backgrounds, characters, and effects.
Game Commands
Modify game state with commands.
