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)
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): expression should be a string. evaulates the expression with the linked vesselboarded_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 character