Console commands

From Hammerwatch 2 Wiki
Jump to navigation Jump to search

The commands below are available by opening the console using the tilde (~) key. This key is usually located below the escape key. These commands don't save to your configuration file so they will not stick once you close the game.
To save a command to your HW2.exe.cfg file you can either add the command manually by editing the file or type save your command & argument or save_curr your command.
Example:
save ui_scale 0.75
save_curr ui_scale

Game config commands

Game config commands
r_hdr Enables or disables the use of HDR rendering.
g_laser_sight Changes the Aim Guide option. 1 for on, 0 of off, -1 for Auto.
g_local_player_marker Adds a colored circle below your character's sprite. True or False.
g_mousemove_speed Multiplier for the speed of the mouse cursor movement on gamepads.
g_movedir_snap Snap angle for the movement direction on gamepads.
g_potion_delay Add a delay before you can reuse your potion. This can prevent rogue keyboards.
g_richpresence Enable or disable rich presence for discord and steam.
r_shadows Shadow quality. 0 = off, 1 = sun only, 2 = all.
r_smooth_scrolling Enables or disables smooth camera scrolling.
rg_brightness Brightness of the game.
rg_contrast Contrast of the colors.
rg_gamma Gamma value of the colors.
rg_crt_curve Multiplier for the CRT curve effect.
rg_pixel_perfect Whether the scene needs to render in pixel perfect mode or not. Pixel perfect in this sense means that the game will be rendered in 1x sprite scale and then upscaled (faster). If it's disabled, the game is rendered in its full size and sprites are scaled instead (slower). Disabling pixel perfect allows for a few smoother effects like shadows.

Video config commands

Video config commands
v_resolution Affects the games resolution. Example: v_resolution 1600x900
v_fullscreen Enables or disables fullscreen. Use 0 or 1
v_vsync Enables or disables vsync. True or False
v_forced_aspect_ratio Set the aspect ratio for the game. This can be used to achieve a zoomed out view.

Console config commands

Console config commands
cs_bgcolor Background color of the console. Set as a vec4: *cs_bgcolor 1 0 0 0.5* for a red transparent console background.
cs_fgcolor Text color of the console. Set as a vec4.
cs_enabled Enable or disable the use of the console entirely. Useful if you need the console toggle button for something else.
cs_height The height of the console window, in a multiplier of the screen height: 0.5 means 50% of the screen height.
cs_show_build Whether to show the game's build ID in the bottom left of the screen.
cs_show_log Shows recent log additions as an overlay at the top of the screen
cs_show_log_count The amount of recent lines to be displayed for cs_show_log
cs_speed The speed for the console toggle animation. The higher the faster.
condump Dumps the contents of the console to a file, doesn't include timestamps, format is condump "filename".

Cheat commands

Cheat commands
e_cheats e_cheats is required for any of these commands to work. Once toggled on, a red text will appear top right. Cheats are only available on modded profiles.
change_level change/load level to the chosen relative path argument. ex: levels/testDoodad.lvl
g_scale Changes the scaling of the game. The default for a 16:9 resolution would have a game scale of 4.
g_timescale Affects the game speed.
cht_change_weather Change the current weather, options are fair windy rain_2 rain_3 snow_1 snow_2
cht_clear_flags Clears all currently set flags - will probably break your save
cht_clear_inventory Clears all inventory items, including key items
cht_clear_skills Resets all skill point allocations
cht_explore_level Uncovers the entire map
cht_finish_quest <quest-id> will mark the specified quest as completed
cht_give_item <id> <amount> will give the amount of the specified item
cht_give_and_equip_item <id> will give and equip the specified item
cht_give_experience <amount> grants the specified amount of experience
cht_give_gold <amount> grants the specified amount of gold
cht_give_health <amount> grants the specified amount of health
cht_give_mana <amount> grants the specified amount of mana
cht_give_many_equipment <slot> <quality> <tier> <amount> 0 = random gives many equipment with the specified parameters
cht_give_random_equipment <amount> gives the specified amount of random equipment
cht_give_tier <tier> grants the specified tier, apprentice, adept, expert, master
cht_give_uniques <slot> <tier> <amount> <tag> grants many unique items with the specified parameters, and tags.
cht_god Toggles godmode.
cht_killall Will kill all enemies on the current level
cht_levelup <amount> Will level your character up by the specified amount of levels.
cht_list_all_items Will print all items and ids in the game to the console/log
cht_list_flags Lists all currently set flags
cht_list_quests Lists all quests and their IDs
cht_noclip Toggles noclip
cht_play_music <value> Plays specified track.
cht_play_ambience <value> Plays specified track.
cht_plr_hidden when true, hides the character on screen
cht_plr_level_progress <level> Sets the character to the specified level, with the correct tier and key items for that level as well as a random selection of level appropriate gear
cht_refil_potions Refills your potions
cht_revive Revivies you
cht_set_flag <flag> <value> <persistent> Can be used to set/unset a flag
cht_show_tailor Opens the Tailor UI to chance character colors
cht_solve_quest <id> Marks the specified quest as solved
cht_start_quest <id> Starts the specified Quest

Debug commands

Debug commands (* denotes e_cheats is required)
cs_show_menu* Displays a menu at the top of the screen with many debug options and useful information about the current save
list_flags Lists the current flags in the console
r_draw_scripts* Displays scripts on screen.
r_draw_scripts_compact* When scripts are being drawn, this will toggle whether they are compact or not.
r_draw_scripts_lines* When scripts are being drawn, this will toggle whether connecting lines are drawn.
r_draw_collision* Draws object collision.
r_draw_physics* Draws object physics.
r_draw_raycasts* Shows raycasts.
r_draw_pathfinds* Shows pathfind information
r_draw_line_of_sight Toggles the line of sight visibility/fog of war effect
debug_widgets useful for debugging on screen widgets.
ui_cursor_unit Displays unit name when the mouse is over it.
dump_level_save* dump the level in a file in the game repository
res_dump_generated 1 this has to be set in your config file, but will write all files generated at runtime to a temp folder in the game directory.

Editor config commands

Editor config commands
r_script_line_alpha Configure the alpha of the script lines.
r_script_line_scroll Whether script links should be animated and scroll. The higher the faster.
r_draw_scripts_lines_head The size of the arrow head for script links
ed_grid_color Changes the RGBA of the grid. Ex: 0.5,0.1,0.1,0.8 will make it red.
ed_grid_width Changes the pixel width of the grid. default 1.
ed_history_limit The limit of changes that the editor will remember.

Multiplayer/Lobby commands

Multiplayer/Lobby commands
lobby_say Send a chat message via the console.

Sound commands

Sound commands
snd_volume Master sound volume scale.
snd_volume_env Environment sounds volume scale.
snd_volume_music Music volume scale.
snd_volume_sfx Sound effects volume scale.
snd_volume_ui UI sounds volume scale.
snd_volume_voice Voice sounds volume scale.

UI commands

UI commands
ui_bars_visibility Whether to show the health/mana bars in the middle of the screen. -1 = never, 0 = only when health or mana is not full, 1 = always.
ui_draw_plr_names Whether to show player names above player heads. -1 = never, 0 = only in town, 1 = always.
ui_draw_plr_names_real Whether to show player's Steam/GOG names instead of their character names above their heads.
ui_scale The scale multiplier of the entire UI.

unsorted commands

Unsorted Commands
bind can be used to set custom keybinds, for example bind f4 "killall" binds the console command killall to the f4 key
track MYVAR See in real-time the MYVAR console variable value. To remove you can restart your game, or use "cs_show_vars 0" to hide all.
plot 60 MYVAR See in real-time the MYVAR console variable value as a plot. The first argument value seems to be (the number of frame times 2) that the values are kept. To remove you can restart your game, or use "cs_show_vars 0" to hide all.


All commands

Command Description
alias
bgfx_debug_ifh
bgfx_debug_stats
bgfx_debug_trace
bgfx_debug_wireframe
bgfx_device_id
bgfx_renderer
bind
change_level
check_static_units
cht_change_weather
cht_clear_flags
cht_clear_inventory
cht_clear_skills
cht_damage
cht_explore_level
cht_finish_quest
cht_give_and_equip_item
cht_give_combo
cht_give_experience
cht_give_gold
cht_give_health
cht_give_item
cht_give_mana
cht_give_many_equipment
cht_give_random_equipment
cht_give_stamina
cht_give_tier
cht_give_uniques
cht_god
cht_god_cannon_game
cht_killall
cht_levelup
cht_list_all_items
cht_list_flags
cht_list_prompts
cht_list_quests
cht_listenemies
cht_lose_cannon_game
cht_noclip
cht_open_interface
cht_play_ambience
cht_play_music
cht_plr_damage_fire
cht_plr_damage_poison
cht_plr_free_health_cost
cht_plr_free_mana_cost
cht_plr_free_stamina_cost
cht_plr_hidden
cht_plr_level_progress
cht_plr_level_skills
cht_plr_reset_cooldowns
cht_print_charcreate_colors
cht_refill_potions
cht_remove_item
cht_revive
cht_set_flag
cht_set_scalar
cht_show_tailor
cht_solve_quest
cht_spawn_equipment
cht_spawn_equipment_usable
cht_spawn_gold
cht_spectate
cht_spectate_next
cht_start_quest
cht_stop_quest
cht_tutorials_unlock
cht_unlock_all_cards
cht_win_cannon_game
clear
clear_debris
condump
countdown
crash
cs_bgcolor
cs_enabled
cs_fgcolor
cs_height
cs_menu_save
cs_show_build
cs_show_cheats
cs_show_log
cs_show_log_count
cs_show_menu
cs_show_script_errors
cs_show_vars
cs_speed
dbg_cht_fill_equipment
dbg_cht_ignore_equipment_requirements
dbg_clear_unit_kills
dbg_list_baseitem_modifiers
dbg_list_existing_modifiers
dbg_list_tags
dbg_list_unit_kills
dbg_print_key_binds
dbg_track_unit_kills
debug_dungeon_prefabs
debug_list_units
debug_merge_count
debug_track_flag_set
debug_unit_compare
debug_widgets
dirty_nav_graph
dump_level_save
dump_script_gc_info
dump_unit_list
dump_unit_type_list
e_cheats
e_debris_limit
e_task_threads
e_threaded_physics
e_threaded_saving
edit
flush_streamed_textures
g_adv_foliage
g_autoequip
g_cam_freecam_speed
g_cam_taut
g_debug_menu
g_debug_mods
g_debug_scripts
g_default_axis_sensitivity
g_disable_saving
g_extra_players
g_frametime_render
g_frametime_swap
g_frametime_total
g_frametime_update
g_gore
g_intro_logos
g_intro_logos_shown
g_language
g_laser_sight
g_load_state_delay
g_local_player_marker
g_mousemove_speed
g_movedir_snap
g_multi_test
g_multiplayer_limit
g_multiplayer_ping_limit
g_player_markers
g_pure
g_quickcast
g_render_pos
g_richpresence
g_save_level_state
g_save_slot
g_scale
g_screenshake
g_show_slideshows
g_simulate_platform
g_sound_listener_height
g_start_difficulty
g_start_level
g_start_sessions
g_start_sessions_controls
g_tile_effects
g_time_hour
g_timeofday
g_timescale
g_vfx_quality
gpu_print_info
help
include
inspect_widget
join_ip
lobby_say
mem_print_info
ms
net_kick_unanswered_pings
net_stat
net_stat_msg
net_stat_singleplayer
net_stat_time
particle_blocks
physics_report
plot
ply_kill
print
quit
r_bottom_padding
r_clear_color
r_debug_render_target
r_draw_bloom
r_draw_bounds
r_draw_collision
r_draw_color_grade
r_draw_effects
r_draw_glow
r_draw_glow_precalc
r_draw_ground_nodes
r_draw_icons_collision
r_draw_icons_lights
r_draw_light_debug
r_draw_lights
r_draw_line_of_sight
r_draw_locators
r_draw_minimap_sprites
r_draw_minimap_texts
r_draw_models
r_draw_nav_data
r_draw_origins
r_draw_outlines
r_draw_particles
r_draw_pathfinds
r_draw_physics
r_draw_physics_aabb
r_draw_physics_centroid
r_draw_physics_queries
r_draw_physics_shape
r_draw_ranges
r_draw_raycasts
r_draw_scripts
r_draw_scripts_compact
r_draw_scripts_debug
r_draw_scripts_lines
r_draw_scripts_lines_back
r_draw_scripts_lines_branch
r_draw_scripts_lines_head
r_draw_scripts_names
r_draw_shadow_shapes
r_draw_sprites
r_draw_statics
r_draw_text
r_draw_text_debug
r_draw_tiles
r_draw_units
r_draw_xray
r_draw_xray_precalc
r_environmental_detail
r_frame_batches
r_frame_environments
r_frame_particles
r_frame_renderables
r_frame_statics
r_frame_triangles
r_frame_units
r_frustum_padding
r_hdr
r_light_decal_proj
r_lighting
r_line_of_sight_anim_speed
r_line_of_sight_blurs
r_line_of_sight_boost
r_line_of_sight_mul
r_line_of_sight_quality
r_masked_shadows
r_merge_textures
r_minimap_scale
r_parallel_rendering
r_particle_max_spawn
r_particle_spawn_rate
r_script_alpha
r_script_alpha_selected
r_script_line_alpha
r_script_line_scroll
r_script_line_thickness
r_shadows
r_sharp_pixels
r_smooth_scrolling
r_stream_unit_producers
r_top_padding
r_use_merge_textures
r_use_z_buffer
r_warn_language_fallback
res_dump_generated
res_use_hints
reset_all_stats
rg_brightness
rg_contrast
rg_crt_curve
rg_gamma
rg_pixel_perfect
rg_post_bloom
rg_post_phosphor
s
s_check_override
s_check_strings
save
save_curr
select_unit
show_menu
snd_debug
snd_driver
snd_volume
snd_volume_env
snd_volume_music
snd_volume_sfx
snd_volume_ui
snd_volume_voice
stat_raycasts
statics_blocks
statics_num
test_screenshot
toggle
toggle_tileset
track
track_comment
track_history
tst_lerp
ui_boss_text_always_visible
ui_buffs
ui_chat_dialog
ui_chat_fade_time
ui_chat_pos
ui_chat_scale
ui_chat_width
ui_cursor_alpha
ui_cursor_health
ui_cursor_health_alpha
ui_cursor_unit
ui_draw_plr_names
ui_draw_plr_names_real
ui_draw_vignette
ui_draw_widgets
ui_flags
ui_format_letters
ui_hardware_cursor
ui_hide_fog
ui_hud_actor_afflictions
ui_hud_actor_states
ui_hud_actor_targets
ui_hud_announce_loot
ui_hud_announce_loot_amount
ui_hud_announce_loot_short_names
ui_hud_announce_loot_tooltip_compare_delay
ui_hud_announce_loot_tooltip_delay
ui_hud_announce_looter
ui_hud_announce_own_loot_category_filter
ui_hud_announce_own_loot_quality_filter
ui_hud_bossbar
ui_hud_bossbar_actors
ui_hud_coop
ui_hud_hpbars_enemy
ui_hud_hpbars_plr
ui_hud_minimap_zoom
ui_hud_overlay_always_visible
ui_hud_scale_art
ui_hud_scale_buffs
ui_hud_scale_left_bars
ui_hud_scale_minimap
ui_hud_scale_overlay
ui_hud_scale_potions
ui_hud_scale_right_bars
ui_hud_scale_skills
ui_hud_skills
ui_hud_stats
ui_hud_survival
ui_hud_topbar
ui_hud_visible
ui_hud_visible_art
ui_hud_visible_buffs
ui_hud_visible_left_bars
ui_hud_visible_minimap
ui_hud_visible_overlay
ui_hud_visible_potions
ui_hud_visible_right_bars
ui_hud_visible_skills
ui_overlay_minimap_alpha
ui_overlay_minimap_scale
ui_player_measure
ui_quests
ui_scale
ui_show_chat
ui_show_controlbinds
ui_show_info_buttons
ui_show_intro
ui_show_mp_mana
ui_show_npc_dialog_icons
ui_show_tutorials
ui_show_use_icon
ui_txt
ui_txt_enemy_heal
ui_txt_enemy_hurt
ui_txt_enemy_hurt_husk
ui_txt_enemy_hurt_local
ui_txt_enemy_immortal
ui_txt_pickup
ui_txt_plr_ammo
ui_txt_plr_ammo_max
ui_txt_plr_armor
ui_txt_plr_heal
ui_txt_plr_hurt
ui_txt_plr_hurt_magic
ui_waypoint_player
ui_waypoint_world
unet_gog
unet_steam
unit_id_high
unit_id_low
unit_id_max
unit_id_min
units_updated
units_updated_native_behaviors
units_updated_potential
units_updated_script_behaviors
v_forced_aspect_ratio
v_fps
v_fps_limit
v_fullscreen
v_interpolate_frames
v_monitor
v_resolution
v_trap_cursor
v_vsync
condump
g_start_sessions_controls
r_draw_icons_collision
r_draw_icons_lights
rg_contrast
ui_show_controlbinds
ui_show_npc_dialog_icons
ui_show_use_icon