Expressions
Expressions are represented in yaml as strings. You can use math and boolean comparisons (like >= or ==) in them, and a number of functions. Attributes can be referenced by doing i.e. q:strength to get the strength quality.
1 is treated as true and 0 as false for boolean expressions.
Variables
i:example_itemoritem:example_item: count of itemsq:example_qualityorquality:example_quality: count of qualityc:example_circumstanceorcircumstance:example_circumstance: whether they have that circumstance. returns 1 if they do and 0 if they dont.s:example_steporstep:example_step: count of the steps they have on a path (i think)hidden_flag:example: boolean, whether they have the hidden flagaction_flag:example: boolean, whether they have the action flag (gained when they do the action for the first time. id is the id of the action)outcome_flag:example: boolean, whether they have the outcome flag (gained when they get the outcome for the first time. id is the id of the outcome)item_cap:example: number, maximum amount they can have of the itemquality_cap:example: number, maximum amount they can have of the qualityitem_min_cap:example: number, minimum amount they can have of the itemquality_min_cap:example: number, minimum amount they can have of the qualityworld_enum:example: string, gets the world enumwish:example: boolean, whether the vessel has fulfilled a wish (only usable on vessels)accomodation:example: boolean, whether the vessel has this equipped accomodation (only usable on vessels)linked_vessel_quality:example: number, count of the linked vessel's quality. if there's no linked vessel, returns 0.
Functions
There's a function set for some of the quality, items and such, like q("strength"), so the old code that uses that syntax still works.
undiscovered_outcomes_count(): gets the amount of undiscovered outcomes in the current areahas_stage(stage_id): whether the character has this stage (stages are things qualities can have)max(a, b): returns whichever one is highestmin(a, b): returns whichever one is lowesthunger_sated_by_tag(tag): number of times hunger has been sated by an item with this tag (not implemented)location(): the area_id of the character's current locationvessel_character(expression): expression should be a string. only usable on vessels. evaulates the expression with the vessel's character instead of the vessellinked_vessel(expression, default_value): expression should be a string. evaulates the expression with the linked vessel. returns default_value instead if there's no linked vessel.boarded_vessel(expression): expression should be a string. evaulates the expression with the boarded vesselvoyage_vessel(expression): expression should be a string. evaulates the expression with the vessel they are currently voyaging with (only works during a voyage)characters_vessels_in_area(area_id): amount of vessels the character has deployed in this areacan_set_sail(): boolean, whether the character can currently set sail / start a voyageis_at_sea(): boolean, whether the character is currently at sea / voyagingvessel_in_same_area(): only works on vessels. returns true if the vessel is in the same area as the charactervoyage_current_danger(): only works while on a voyage. get the current danger level.game_testing_tools_enabled(): boolean. returns true if the game testing tools / debug mode are enabledget_world_variable_without_locking(namespace, variable_name, default): gets a world variable in namespace (string), returning default value if it isn't set. doesn't lock, meaning the variable can change between the call of this function and subsequent things in an action. if you're using the return of this value to modify the variable, or another in the same namespace, you should use the version that locks instead.get_world_variable_with_locking(namespace, variable_name, default): gets a world variable in namespace (string), returning default value if it isn't set. locks, meaning that for the rest of this action, anything else will have to wait to modify the variable. you should use this version if you're using the result of this function to modify the same variable, or another in the namespace, later on in the action.