Stonehearth

Stonehearth

Cannacat Feb 16, 2017 @ 12:00pm
Alpha 20 Console Commands
Hi Everyone!

I don't know if someone has done a complete list yet or not, but I have searched around and I haven't found a complete list of console commands yet. Thought this might be useful.

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

I don't know what every function does. I also don't know how to obtain the id's of items. I just thought having a full list of commands would help some people out.

Enjoy!


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.
Last edited by Cannacat; Mar 17, 2017 @ 1:37pm
< >
Showing 1-11 of 11 comments
Lord_Greyscale Mar 17, 2017 @ 5:27am 
Thank you kindly!

@moderator I suggest this be stickied, for ease of reference if nothing else.
I hadn't known about the add_citizen, reproduce, grow, and renew commands.
Cannacat Mar 17, 2017 @ 1:38pm 
You're welcome!
purple™ Mar 29, 2017 @ 10:46am 
toggle_select_building_subpart doesn't actually tell us what it does, it was just copy-pasted. pls fix
Cannacat Mar 30, 2017 @ 10:37am 
I already stated that I didn't know what all the commands did, that I simply copied and pasted them from the the list so that everyone could see them without having to type help first. So you coukd copy and paste from here into your game. I also said that I didn't see a complete list of commands anywhere so I just put it here. Sorry if this list isn't helpful to you.
purple™ Mar 30, 2017 @ 6:15pm 
List is very helpful (have it bookmarked on Chrome to assist.) Just was a little curious as to why some were copy-pasted.
Kul Do Od Dec 4, 2017 @ 1:50am 
Only a few of these work
Lord_Greyscale Dec 12, 2017 @ 11:49am 
Originally posted by Kul Do Od:
Only a few of these work
As I'm not currently on the computer with Stonehearth actually installed, I'm just going to ask if you have DEBUG MODE toggled "ON" in Stonehearth?

As dumb as this may sound, even when Alpha 20 was new, most of these commands required debug mode to work. (and, as a side-note, the game was in Alpha 21 at the time I used this list, I've got no idea what it's up to now)

I'd offer to guide you through it, but the last time I needed to toggle that on was literally half a year ago, (note that this list is only a month shy of a year old), and I've actually forgotten how to do that.
MeMeMan Jul 26, 2018 @ 8:32am 
if [set_happiness] then what do i write after, it does nothing
Zero Mutt May 4, 2019 @ 1:50pm 
anyway to revive?
YetiChow May 7, 2019 @ 5:40am 
Originally posted by Zero:
anyway to revive?
Revive a dead hearthling? No. You can, however, "replace" a dead hearthling either by stamping in a new one using the item stamper, or by using the campaign browser to trigger the daily immigration check. You can then use commands to change this new hearthling's stats, name, experience, gear etc. to match the lost hearthling if you so wish.
Kul Do Od Sep 12, 2019 @ 10:23pm 
Originally posted by MeMeMan:
if [set_happiness] then what do i write after, it does nothing

i believe you place a number to represent what lvl of happiness you want them at?
< >
Showing 1-11 of 11 comments
Per page: 1530 50