Game State Queries
BETAS adds 48 new Game State Queries for you
to use. Some were made primarily with the intent to use them alongside the new triggers or new trigger actions added by BETAS, but they can all be used in whatever Condition
fields
you see fit. If a parameter is wrapped in < >
then it is a required parameter. If the
parameter is wrapped in []
then it is an optional parameter. If the parameter has a
+
after it, that means you can provide multiple of that parameter separated by spaces.
These game state queries, unless otherwise stated, support the Tokenizable Strings added by BETAS.
Game State Queries by Category:
MISC
CONDITION | EFFECT |
---|---|
Spiderbuttons.BETAS_HAS_MOD
[<ModId]>+ | Whether or not a mod that matches any ModId is found and loaded |
Spiderbuttons.BETAS_TOTAL_CROPS
[<Min]>+ [<Max]>+ [<ItemId]>+ | Whether or not the total number of crops fully grown in the world is between Min and
Max (default unlimited) inclusively. Set Max to -1 to make it unlimited
when providing an ItemId . If an ItemId is specified, this will only count crops
corresponding to that ID. You can specify the ItemId of the seed or the crop the seed grows into |
Spiderbuttons.BETAS_TOTAL_PETS
[<Min]>+ [<Max]>+ [<PetType]>+ | Whether or not the number of pets on the farm or in the farmhouse/cabins is between Min and
Max (default unlimited) inclusively. Set Max to -1 to make it unlimited
when providing a PetType . If a PetType is specified, this will only count pets with
a matching type (e.g. Cat or Turtle ) |
Spiderbuttons.BETAS_ITEM_IN_WORLD
[<ItemId]>+ | Whether or not an item with a matching ItemId exists anywhere in the world. This searches
inventories, chests, placed furniture, equipped items, etc. |
Spiderbuttons.BETAS_VOLUME
[<Category]>+ [<Min]>+ [<Max]>+ | Whether or not the volume level of the given Category is set between Min and
Max (default unlimited). The Category can be Music , Sound ,
Ambient , or Footstep |
Spiderbuttons.BETAS_CURRENT_SONG
[<SongName]>+ | Whether or not the name of the currently playing song matches any given SongName . If a SongName
is not provided, this checks whether any song is currently playing |
Spiderbuttons.BETAS_SALOON_DISH
[<ItemId]>+ | Whether or not the dish of the day at the Saloon matches any given ItemId |
Spiderbuttons.BETAS_USING_SEPARATE_WALLETS
[<ItemId]>+ | Whether or not the current save file is using separate wallets for different farmers |
Spiderbuttons.BETAS_GOLD_CLOCK_ACTIVE | Whether or not a Gold Clock is both built and turned on. |
Spiderbuttons.BETAS_GRANDPA_SCORE
[<Scoring]>+ [<Min]>+ [<Max]>+ | Whether or not the farm's score, as evaluated by dearly departed Grandpa, is between Min and Max (default unlimited). The Scoring parameter must be either Score or Candles . The former checks the raw score (see Utility.getGrandpaScore() in the decompile) and the latter checks how many candles dearly departed Grandpa thinks he should light. This query can be used before dearly departed Grandpa actually lights the candles. |
Spiderbuttons.BETAS_WEATHER_FOR_TOMORROW
[<ContextID]>+ [<Weather]>+ | Whether or not any Weather matches the weather forecast for tomorrow for the given location ContextID . |
MOD DATA
CONDITION | EFFECT |
---|---|
Spiderbuttons.BETAS_ITEM_MOD_DATA
[<Item]>+ [<Key]>+ [<Value]>+ | Whether or not the specified
item has a mod data entry with the given Key and Value . If no Value
is given, this query checks whether the Key exists at all |
Spiderbuttons.BETAS_ITEM_MOD_DATA_RANGE
[<Item]>+ [<Key]>+ [<Min]>+ [<Max]>+ | If the specified item
has a mod data entry with the given Key and the Value is an integer, this query
checks whether that Value is between the Min and Max (default
unlimited) |
Spiderbuttons.BETAS_ITEM_MOD_DATA_CONTAINS
[<Item]>+ [<Key]>+ [<Value]>+ | If the specified item
has a mod data entry with the given Key and the Value is a space- or comma-delimited
list, this query checks whether that list contains any given Value |
Spiderbuttons.BETAS_PLAYER_MOD_DATA
[<Player]>+ [<Key]>+ [<Value]>+ | Whether or not the specified
player has a mod data entry with the given Key and Value . If no
Value is given, this query checks whether the Key exists at all |
Spiderbuttons.BETAS_PLAYER_MOD_DATA_RANGE
[<Player]>+ [<Key]>+ [<Min]>+ [<Max]>+ | If the specified player
has a mod data entry with the given Key and the Value is an integer, this query
checks whether that Value is between the Min and Max (default
unlimited) |
Spiderbuttons.BETAS_PLAYER_MOD_DATA_CONTAINS
[<Player]>+ [<Key]>+ [<Value]>+ | If the specified player
has a mod data entry with the given Key and the Value is a space- or comma-delimited
list, this query checks whether that list contains any given Value |
Spiderbuttons.BETAS_LOCATION_MOD_DATA
[<Location]>+ [<Key]>+ [<Value]>+ | Whether or not the specified
location has a mod data entry with the given Key and Value . If no
Value is given, this query checks whether the Key exists at all |
Spiderbuttons.BETAS_LOCATION_MOD_DATA_RANGE
[<Location]>+ [<Key]>+ [<Min]>+ [<Max]>+ | If the specified
location has a mod data entry with the given Key and the Value is an integer,
this query checks whether that Value is between the Min and Max
(default unlimited) |
Spiderbuttons.BETAS_LOCATION_MOD_DATA_CONTAINS
[<Location]>+ [<Key]>+ [<Value]>+ | If the specified
location has a mod data entry with the given Key and the Value is a space- or
comma-delimited list, this query checks whether that list contains any given Value |
PLAYER
CONDITION | EFFECT |
---|---|
Spiderbuttons.BETAS_PLAYER_DAYS_MARRIED
[<Player]>+ [<Min]>+ [<Max]>+ | Whether or not the specified
player has been married for at least Min days and at most Max days (default
unlimited) |
Spiderbuttons.BETAS_PLAYER_SPEED
[<Player]>+ [<Min]>+ [<Max]>+ | Whether or not the specified
player has a speed between Min and Max (default unlimited). For this query,
Min and Max are floats |
Spiderbuttons.BETAS_PLAYER_SPOUSE_GENDER
[<Player]>+ [<Gender]>+ | Whether or not the specified
player has a spouse that is Female , Male , or Undefined |
Spiderbuttons.BETAS_PLAYER_MOUNTED
[<Player]>+ | Whether or not the specified player is currently riding a horse or other mount |
Spiderbuttons.BETAS_PLAYER_STARDROPS_FOUND
[<Player]>+ [<Min]>+ [<Max]>+ | Whether or not the specified
player has found at least Min Stardrops and at most Max Stardrops (default
unlimited) |
Spiderbuttons.BETAS_PLAYER_HELD_ITEM
[<Player]>+ [<ItemId]>+ | Whether or not the specified
player is currently holding an item with a matching ItemId . The item does not need to be held
above their head but simply held in their hands (i.e. selected on the hotbar) to account for things
such as tools or furniture |
Spiderbuttons.BETAS_PLAYER_WEDDING_TODAY
[<Player]>+ | Whether or not the specified player has a wedding today |
Spiderbuttons.BETAS_PLAYER_ANNIVERSARY_TODAY
[<Player]>+ | Whether or not the specified player has a wedding anniversary today |
Spiderbuttons.BETAS_PLAYER_HEALTH
[<Player]>+ [<Min]>+ [<Max]>+ | Whether or not the current health of the specified player is between
the Min and Max (default unlimited) |
Spiderbuttons.BETAS_PLAYER_MAX_HEALTH
[<Player]>+ [<Min]>+ [<Max]>+ | Whether or not the maximum health of the specified player is between
the Min and Max (default unlimited) |
Spiderbuttons.BETAS_PLAYER_STAMINA
[<Player]>+ [<Min]>+ [<Max]>+ | Whether or not the current stamina of the specified player is between
the Min and Max (default unlimited) |
Spiderbuttons.BETAS_PLAYER_MAX_STAMINA
[<Player]>+ [<Min]>+ [<Max]>+ | Whether or not the maximum stamina of the specified player is between
the Min and Max (default unlimited) |
Spiderbuttons.BETAS_PLAYER_SWIMMING
[<Player]>+ | Whether or not the specified player is currently swimming |
Spiderbuttons.BETAS_PLAYER_BACKPACK_SIZE
[<Player]>+ [<Min]>+ [<Max]>+ | Whether or not the backpack size of the specified player is between
the Min and Max (default unlimited) |
Spiderbuttons.BETAS_PLAYER_EMPTY_INVENTORY_SLOTS
[<Player]>+ [<Min]>+ [<Max]>+ | Whether or not the number of empty inventory slots in the backpack of the specified player is between
the Min and Max (default unlimited) |
Spiderbuttons.BETAS_PLAYER_FULL_INVENTORY_SLOTS
[<Player]>+ [<Min]>+ [<Max]>+ | Whether or not the number of full inventory slots in the backpack of the specified player is between
the Min and Max (default unlimited) |
Spiderbuttons.BETAS_PLAYER_PERFECTION_ITEMS_SHIPPED
[<Player]>+ [<Calculation]>+ [<Min]>+ [<Max]>+ | Whether or not the perfection progress for shipped items of the specified player is between
the Min and Max (default unlimited). Calculation can be either Raw
or Percent . If set to Raw , this will check the number of distinct items the player
has shipped. If set to Percent , this will check the percentage of distinct items shipped out of
the total number of shippable items in the game. |
Spiderbuttons.BETAS_PLAYER_PERFECTION_FISH_CAUGHT
[<Player]>+ [<Calculation]>+ [<Min]>+ [<Max]>+ | Whether or not the perfection progress for fish caught of the specified player is between
the Min and Max (default unlimited). Calculation can be either Raw
or Percent . If set to Raw , this will check the number of distinct fish the player
has caught. If set to Percent , this will check the percentage of distinct fish caught out of
the total number of fish in the game. |
Spiderbuttons.BETAS_PLAYER_PERFECTION_RECIPES_COOKED
[<Player]>+ [<Calculation]>+ [<Min]>+ [<Max]>+ | Whether or not the perfection progress for recipes cooked of the specified player is between
the Min and Max (default unlimited). Calculation can be either Raw
or Percent . If set to Raw , this will check the number of distinct recipes the player
has cooked. If set to Percent , this will check the percentage of distinct recipes cooked out of
the total number of cooking recipes in the game. |
Spiderbuttons.BETAS_PLAYER_PERFECTION_RECIPES_CRAFTED
[<Player]>+ [<Calculation]>+ [<Min]>+ [<Max]>+ | Whether or not the perfection progress for recipes crafted of the specified player is between
the Min and Max (default unlimited). Calculation can be either Raw
or Percent . If set to Raw , this will check the number of distinct recipes the player
has crafted. If set to Percent , this will check the percentage of distinct recipes crafted out of
the total number of crafting recipes in the game. |
Spiderbuttons.BETAS_PLAYER_PERFECTION_FRIENDSHIP
[<Player]>+ [<Calculation]>+ [<Min]>+ [<Max]>+ | Whether or not the perfection progress for friendships maxed of the specified player is between
the Min and Max (default unlimited). Calculation can be either Raw
or Percent . If set to Raw , this will check the number of maxed friendships the player
has. If set to Percent , this will check the percentage of maxed friendships the player has out of
the total number of socializable NPCs in the game. |
NPCs
CONDITION | EFFECT |
---|---|
Spiderbuttons.BETAS_NPC_LOCATION
[<NPC]>+ [<Location]>+ | Whether or not the given NPC is currently in any given Location . If you put Any
instead of an NPC name, this query will check whether there is any NPC in any given Location |
Spiderbuttons.BETAS_NPC_NEAR_PLAYER
[<Player]>+ [<Radius]>+ [<NPC]>+ | Whether or not any given NPC is within the given Radius of the specified
player. If no NPC is given, this query checks whether there is any NPC at all within the
Radius (in tiles) of the player. For Farmhands, this is only accurate for the
Current player or players in the same location as them |
Spiderbuttons.BETAS_NPC_NEAR_NPC
[<TargetNPC]>+ [<Radius]>+ [<NPC]>+ | Whether or not any given NPC is within the given Radius (in tiles) of the TargetNPC .
If no NPC is given, this query checks whether there is any NPC at all within the
Radius of the TargetNPC |
Spiderbuttons.BETAS_NPC_NEAR_AREA
[<Location]>+ [<X]>+ [<Y]>+ [<Radius]>+ [<NPC]>+ | Whether or mot any given NPC is within the given Radius (in tiles) of the
X and Y coordinates of the given Location . If no NPC is
given, this query checks whether there is any NPC at all within the Radius of the given
X and Y coordinates |
LOCATIONS
CONDITION | EFFECT |
---|---|
Spiderbuttons.BETAS_LOCATION_HAS_FURNITURE
[<Location]>+ [<FurnitureID]>+ | Whether or not the specified
location has any furniture placed in it that matches any given FurnitureID .
You may use Any or All for the Location parameter in addition to the
usual ways of specifying locations |
Spiderbuttons.BETAS_LOCATION_HAS_NPC
[<Location]>+ [<NPC]>+ | Whether or not the specified
location has any given NPC in it. If no NPC is
given, this query checks whether there is any NPC at all within the Location |
FOR ITEMS ONLY
CONDITION | EFFECT |
---|---|
Spiderbuttons.BETAS_ITEM_ENCHANTMENTS
[<Item]>+ [<Enchantment]>+ | Whether the specified
item
has an enchantment on it that matches the name of any given Enchantment . If no
Enchantment is specified, this checks whether the item has any enchantment on it at all |