debug functions

The new Heroes games produced by Ubisoft. Please specify which game you are referring to in your post.
User avatar
zero_ant
Leprechaun
Leprechaun
Posts: 13
Joined: 28 Aug 2006

debug functions

Unread postby zero_ant » 21 Sep 2006, 22:18

While venturing through my Heroes V user profile files, I stumble upon an uncommon object. I found it there, old and dusty, a file named INPUT.CFG.BAK. I said to myself, what on earth happened to this thing, because I remember at the time I got my v1.1 the thing was not there. It's only there after I apply the next patches, namely v1.2 and v1.3 simultaneously. I don't know which of the two patches brings the old man here, I think it's v1.2 for the blame.

As I got my hand to the file, I started my surgery on both the old and the new INPUT.CFG, resulting in some noticeable differences. The new one have the debug parts removed from their body, crippling their debugging ability.

Below is the list of removed parts which failed to make their appearance to the new keymapping file. Note that I edited the EDITLINE_COPY and EDITLINE_CUT part.

Code: Select all

//===========================================================================
// Common section (always active)
//===========================================================================

// console
bind console_run_cmd 'ENTER'
bind console_run_cmd 'NUM_ENTER'
bind console_next_cmd 'DOWN'
bind console_prev_cmd 'UP'
bind console_next_string 'HOME'
bind console_prev_string 'END'
bind console_first_string 'LCTRL' + 'HOME'
bind console_last_string 'LCTRL' + 'END'

// seems line not used
//bind editline_return 'ENTER'
//bind editline_return 'NUM_ENTER'
//bind editline_escape 'ESC'
//bind editline_tab 'TAB'
//bind editline_back 'BACKSPACE'
//bind editline_delete 'DELETE'
//bind editline_left 'LEFT'
//bind editline_right 'RIGHT'
//bind editline_wordleft 'CTRL' + 'LEFT'
//bind editline_wordright 'CTRL' + 'RIGHT'
//bind editline_begin 'HOME'
//bind editline_end 'END'
//bind editline_select_all 'CTRL' + 'A'
//bind editline_paste 'CTRL' + 'V'
//bind editline_paste 'SHIFT' + 'INSERT'
//bind editline_copy 'CTRL' + 'C'
//bind editline_copy 'CTRL' + 'INSERT'
//bind editline_cut 'CTRL' + 'X'
//bind editline_cut 'SHIFT' + 'DELETE'

//debug keys
bind show_console '`'
bind screenshotHQ 'SYSRQ' + 'CTRL'
bind showfps 'SCROLL'
bind showcam 'CTRL' + 'SCROLL'
bind show_ai_geometry 'CTRL' + 'SHIFT' + 'A'
bind show_blocked_slayers 'CTRL' + 'B'
bind hide_interface 'CTRL' + 'I'
bind close_interface 'ALT' + 'X'
bind toggle_rp 'CTRL' + 'Y'
bind toggle_fog 'CTRL' + 'F'
bind toggle_transp 'CTRL' + 'P'
bind fog_of_war 'CTRL' + 'SHIFT' + 'E'
bind wireframe 'CTRL' + 'W'
bind dump_memory 'CTRL' + 'SHIFT' + 'M'
bind remove_part 'CTRL' + 'SHIFT' + 'R'
bind remove_all_parts 'CTRL' + 'SHIFT' + 'R'

bind debug_ai_playforhumans 'CTRL' + 'SHIFT' + 'J'
bind debug_ai_startstop 'CTRL' + 'SHIFT' + 'K'
bind debug_ai_step 'CTRL' + 'SHIFT' + 'L'

bind show_ai_value_bars 'CTRL' + 'SHIFT' + 'V'
bind show_ai_threats 'CTRL' + 'SHIFT' + 'B'

bind exit 'ALT' + 'Q'
bind exit 'CTRL' + 'Q'
bind dsave 'ALT' + 'F6'
bind dload 'ALT' + 'F9'
bind +right_mouse_button 'MOUSE_BUTTON1'
//END debug keys

//===========================================================================
// Interface-specific sections
//===========================================================================

// adventure :: bindsection adventure_screen
//adventure debug
bind adventure_teleport 'CTRL' + 'SHIFT' + 'T'
bind adventure_remove_object 'CTRL' + 'D'
//END adventure debug

// combat - fight mode :: bindsection combat_screen
//combat debug
bind combat_killcreature 'CTRL' + 'D'
bind combat_creaturegiveturn 'CTRL' + 'F'
//end combat debug

//END
Notes:
- You can disable a command by adding a comment sign '//' (double slash) in the front of the line, thus commenting them. Remove the comment sign to enable them.
- 'SYSRQ' is the Print Screen keyboard key.
- The adventure and combat key bindings must be placed in their respective section of the file.


Now, let's discuss what are they and what their function are. Briefly.

* = means that the line is not needed because the game itself already recognize the key for the binded function internally.

*bind console_run_cmd 'ENTER'
*bind console_run_cmd 'NUM_ENTER'
*bind console_next_cmd 'DOWN'
*bind console_prev_cmd 'UP'
bind console_next_string 'HOME'
bind console_prev_string 'END'
bind console_first_string 'LCTRL' + 'HOME'
bind console_last_string 'LCTRL' + 'END'

Basic console keys. I don't know what CONSOLE_NEXT_STRING and CONSOLE_PREV_STRING are for, and that's why I disabled them. CONSOLE_FIRST_STRING and CONSOLE_LAST_STRING are for scrolling through the console result window, used in combination with page up/page down key.

*bind editline_return 'ENTER'
*bind editline_return 'NUM_ENTER'
bind editline_escape 'ESC'
*bind editline_tab 'TAB'
*bind editline_back 'BACKSPACE'
*bind editline_delete 'DELETE'
*bind editline_left 'LEFT'
*bind editline_right 'RIGHT'
bind editline_wordleft 'CTRL' + 'LEFT'
bind editline_wordright 'CTRL' + 'RIGHT'
*bind editline_begin 'HOME'
*bind editline_end 'END'
bind editline_select_all 'CTRL' + 'A'
bind editline_paste 'CTRL' + 'V'
bind editline_paste 'SHIFT' + 'INSERT'
bind editline_copy 'CTRL' + 'C'
bind editline_copy 'CTRL' + 'INSERT'
bind editline_cut 'CTRL' + 'X'
bind editline_cut 'SHIFT' + 'DELETE'

Another set of console keys. I can't figure out what EDITLINE_ESCAPE is for. Clipboard functions can be enabled using the last six lines. Text in edit line can be selected/blocked by either using mouse or by pressing Ctrl+A (EDITLINE_SELECT_ALL must be enabled first).


Finally, we come to the fun part. Debug keys. I'll try to explain them one by one (the one I know). I'll use a different format from now on.

show_console
Shows/hides console. Type help for command list. Use tab key to auto complete command or to show possible commands. Use up/down key to view previously executed commands. Use page up/page down key to scroll the console screen. Must be enabled first by adding the following line in either AUTOEXEC.CFG or USER.CFG:

Code: Select all

setvar dev_console_password = schwinge-des-todes
screenshotHQ
Captures current screen and saves the output to a file. Produces a screenshot which size 4x larger than current screen resolution, and consequently makes the file size 16x larger than normal screenshot file. Picture is saved in 32-bit Targa format, located in <game installation folder>\screenshotsHQ.
Example:
- screenshot (normal): 1024x768x32b tga (3MB)
- screenshotHQ: 4096x3072x32b tga (48MB)
Tips for screenshots:
- Use HW cursor to exclude the mouse cursor from screenshots.
- Use Alt+PrintScreen to capture screen directly to clipboard, not file. (Windows)

showfps
Shows/hides statistics. Displays FPS, graphic stat, text stat, sound stat on top-left corner. Displays camera stat and object position on top-right. Displays version number (build number) on the bottom-left.

hide_interface
Hides/shows user interface. Works in adventure screen, town screen, combat screen, cut-scenes, main menu and everywhere else. The button combination can also be used for pausing the game's video, but may result in asynchronous audio for a few seconds.

close_interface
Closes current interface. No confirmation. May break game flow/game logic in some condition. For example, using it in combat screen will make you exit to adventure screen with a busy cursor and unresponsive UI; Using it in adventure screen will make you exit to the main screen with no UI.

toggle_transp
Shows transparent layer/solid layer/both layer. Transparent layer consist of player color signs (on top of towns and mines), "strong" hero trail, smokes, dove animation, glowing effects, fire/burning effects (like in inferno creatures), water flow/splash effects, upper portion of subterranean cave, some foliage (few), some special effects, etc.

wireframe
Shows/hides wireframe. Expect a noticeable slowdown when viewing the 3D world in wireframe. You can also check the effect in the main menu screen.

remove_part & remove_all_parts
Removes object or part of object under the cursor. Resets after changing screens or after a game reload. Can be used to manipulate screenshots. As an example, you can remove a Peasant's Hut from the adventure screen, remove the hair of a Sylvan's Sprites, you can even remove the sunlight effect like the one in the Haven town.

dump_memory
Supposedly to create a memory dump. I haven't tried it though.

exit
Quits to desktop. Asks for confirmation before quitting.


That's all what I know. Hmm..., you know what? I'll list the commands which function is either unknown or unconfirmed. There's also a possibility that the command listed here is not supported anymore in the game. Well, who knows?
[list]// console
console_next_string
console_prev_string

editline_escape

// debug keys
showcam
show_ai_geometry
show_blocked_slayers
toggle_rp
toggle_fog
fog_of_war
dump_memory

debug_ai_playforhumans
debug_ai_startstop
debug_ai_step

show_ai_value_bars
show_ai_threats

dsave
dload
+right_mouse_button 'MOUSE_BUTTON1'

// adventure
adventure_teleport
adventure_remove_object

// combat - fight mode
combat_killcreature
combat_creaturegiveturn[/list]

That's my contribution to the comunity. Comments and corrections are appreciated. Feel free to complete the list too. Thank you ^_^

User avatar
Sir_Toejam
Nightmare
Nightmare
Posts: 1061
Joined: 24 Jul 2006

Unread postby Sir_Toejam » 22 Sep 2006, 21:49

thanks, zero!

that's likely to come in handy.


Return to “Heroes V-VI”

Who is online

Users browsing this forum: No registered users and 2 guests