Home > Stonehearth > Stonehearth: Console Commands (Cheat Codes)

Stonehearth: Console Commands (Cheat Codes)

In Stonehearth, you pioneer a living world full of warmth, heroism, and mystery. Help a small group of settlers build a home for themselves in a forgotten land. You’ll need to establish a food supply, build shelter, defend your people, monitor their moods, and find a way to grow and expand, facing challenges at every step.

The heart of the game is city building and management. When you’re just starting out, you’ll need to juggle tasks like obtaining a sustainable food supply, building shelter, and defending your fledgling settlement from raiders and other threats.

Stonehearth Console Commands

Press Ctrl + C and select the item and enter command, or just type a command.

get_cost – Get the cost of the selected building, or arg 0. Usage: get_cost object://game/12345

query_pf – Runs the query pathfinder command. No arguments.

collect_cpu_profile – Collects a profile of the LUA code for the specified duration, in ms. Default is 30s. Usage: collect_cpu_profile 150000

toggle_profile_long_ticks – Enables/disables per-game-tick profiling of the LUA code (recorded whenever lua evaluation takes more than a game tick.)

set_time – Sets the game time to the time passed in. Usage: set_time 1:25PM

world_seed – Returns the world seed of the current world. Usage: world_seed

reset – Resets the entity’s location to a proper one on the ground. Usage: reset

get_game_mode – Displays the game mode of the current game. Usually either peaceful or normal

set_blink – Make your hearthlings move a little bit faster….

dump_inaccessible_items – Dumps all the items in a town’s inventory that are not in the world or in storage. These items will be dumped around the town banner.

teleport – Teleports the selected entity, or the passed in entity id. Will bring up a UI to select a location Usage: teleport 12345

spawn_effect – Spawns an effect on the selected entity, with the option to loop the effect indefinitely. Can add a delay between spawn loops (in ms). Usage: spawn_effect /stonehearth/data/effects/level_up true 1000

set_amenity – Changes player amenity/relationship with the selected entity’s faction (friendly, neutral, or hostile). Usage: set_amenity hostile

destroy_scaffolding – Destroys the scaffolding for the selected building, or arg 0. Usage: destroy_scaffolding object://game/12345

add_gold – Adds gold to the current player’s inventory. A negative value will subtract gold. Usage: add_gold 1000

add_exp – Adds experience points to the currently selected entity’s job. If no exp amount is given, will level up to the next level. Usage: add_exp 1000

set_attr – Sets the attribute on the selected entity to the specified value. Usage: set_attr health 10

set – Sets the attribute on the selected entity to the specified value. Usage: set health 10

set_game_speed – Sets the game speed to the default game speed multiplied by the specified amount. Usage: set_game_speed 5

reset_location – Resets the entity’s location to a proper one on the ground. Can also pass in a new location. Usage: reset_location {optional x y z}

change_score – Changes the specified score on the selected entity by the specified amount. Usage: change_score nutrition -10

reset_scores – Resets all the scores on the selected entity to their starting values. Usage: reset_scores

add_buff – Add the specified buff uri to the currently selected entity. Usage: add_buff stonehearth:buffs:starving

add_thought – Add the specified thought key (format is mod_name:thoughts:category:..) to the currently selected entity. Usage: add_thought stonehearth:thoughts:hunger:hungry

remove_thought – Remove the specified thought key (format is mod_name:thought_type:category:name) from the currently selected entity. Usage: remove_thought stonehearth:thoughts:hunger:hungry

set_happiness – Sets the current happiness of the currently selected entity.

remove_buff – Remove the specified buff uri from the currently selected entity. Usage: remove_buff stonehearth:buffs:starving

promote_to – Instantly promote the selected hearthling to the specified job. Usage: promote_to footman

add_citizen – Add a new hearthling to your town. Usage: add_citizen opt_promote_to

dump_backpack – Instantly drops on to the ground all items in the selected hearthling’s backpack. Usage: dump_backpack

show_untranslated – Use to display untranslated strings with *** around them. Usage: show_untranslated true/false

hot_reload – Clears the json cache so that changed json files on the client will reload again. Usage: hot_reload

add_journal – Force add a journal entry for the selected hearthling. Usage: add_journal dreams

reproduce – Select a pasture and force that pasture to reproduce an animal. Usage: reproduce

grow – Tells the selected entity to grow. Either farm crops or animals Ex: Make a lamb grow into a sheep. Usage: grow

renew – Tells the selected entity to renew its resource. Ex: Make sheep grow wool again or depleeted silkweed grow. Usage: renew

show_item_ids – Makes it so item palettes will show a list of all the item ids in its list of items. Usage: show_item_ids

decay – Make a food decay immediately. Usage: decay

get_entity_info – Return info about an entity, even if the entity has been destroyed. Pass in id of the entity. Usage: get_entity_info 82215

get_score – Get the town’s score for specified score type. Usage: get_score military_strength

make_hungry – Makes the selected entity hungry if the entity has the calories attribute. The entity will try to eat if it has a calorie observer. Usage: make_hungry

make_full – Makes the selected entity full if the entity has the calories attribute. If no entity selected, sets attribute to every citizen in your town. Usage: make_full

make_sleepy – Makes the selected entity exhaustedly sleepy if the entity has the sleepiness attribute. The entity will try to sleep if it has a sleepiness observer. Usage: make_sleepy

hotload_manifest – hot load a manifest

load_entity_tracker – Tells the debugtools entity tracker to load up all the entities. you can then inspect them in the object browser after typing ‘debugtools’

make_hostile – Makes the player hostile with the selected entity’s faction

make_neutral – Makes the player hostile with the selected entity’s faction

make_friendly – Makes the player hostile with the selected entity’s faction

destroy_immediately – Destroy an entity immediately. Might not run other code that normally runs when someone is killed, like drop loot, etc. Arg 0 is id of the entity. If no argument is provided, destroys the currently selected entity. Usage: destroy_immediately 12345

destroy_npc_stockpiles – Destroys stockpiles of the npc player (Arg 0). If no argument is provided, destroys stockpiles of all npcs. Usage: destroy_npc_stockpiles goblins

release – releases the pet in a bait trap

get_global_vision – Returns list of all objects in global vision of the caller’s population

get_current_interaction – Gets current interaction of selected entity

ai_reconsider – Calls reconsider on the selected entity

fill_storage – Fills the selected storage with the specified uri. If no uri specified, defaults to oak logs. Usage: fill_storage stonehearth:resources:wood:oak_log

now – Returns radiant.gamestate.now()

spawn_encounter – Spawns the encounter specified. WARNING: Only for testing purposes, may cause lasting issues if game is saved after using cmd. Arguments should be: campaign, encounter, arc. Usage: spawn_encounter ambient_threats create_necromancer_crypt trigger

increase_city_tier – Increases the city tier of the settlement by 1

fixup_components – If there are any components missing on this entity, we will attempt to add them

select_storage – Select’s the storage that contains the entity, if it has one.

unlock – Manually unlocks the given crop or recipe for the given job. Example usage: unlock pumpkin stonehearth:jobs:farmer

toggle_select_building_subpart – Manually unlocks the given crop or recipe for the given job. Example usage: unlock pumpkin stonehearth:jobs:farmer

print_ai_stack – prints the ai’s current coroutine stack trace

dump_cache_stats – Displays spatial cache stats.

dump_memory_stats – Dumps a table of all tracked client and server memory

dump_trace_stats – Dumps a table of all tracked client and server memory

destroy_all – Destroy all entities with the same uri as the selected entity. Note: Must load up the Entity Tracker first.

Leave a Comment