What are the Debugging keys?

From OHRRPGCE-Wiki
(Redirected from Debug key)
Jump to navigation Jump to search

Debugging keys are special function keys that you can use to test certain things out in Game. The debugging keys can be disabled in the General bitsets menu in Custom to prevent cheating. You may find the debugging keys helpful when testing out your game, but you will probably want to disable them before you distribute your game.

Walkabout (on-map) Debugging Keys[edit]

This help is also available by pressing F8 to access the debug menu, and then pressing F1.

  • F1 Show Minimap (See Also: Even if I disable the minimap, I can still display it with F1)
  • CTRL+F1 Pick a spot on the minimap of any map to teleport to.
  • F2 Quicksave anywhere
  • F3 Quickload anywhere (Warning: Do not quicksave or load during a script, especially if the suspend player command has been issued. The script will not continue when you quickload later)
  • F4 Calls up the Tag-debug screen, which shows you which tags are OFF and which are ON, and lets you change them (+ and - scroll, CTRL+ sets and CTRL- unsets)
  • CTRL+F4 Edit the slice tree (in the Slice Collection Editor). You can even save the slice tree to file.
  • F5 Menu for forcing reloading of edited data while running Game using "Test Game". If you are not editing while you play then this menu is only useful for reloading the map to undo changes made by scripts.
  • F6 Draw NPC type ID and reference numbers on top of NPCs. ID numbers on top, reference numbers below. The reference numbers are shown without the negative signs. Negative ID numbers means an NPC that is hidden due to tag conditions.
  • CTRL+F7 Realign hero 0 with the tile grid
  • F8 Bring up the #debug menu
  • F10 Toggle script-debugging mode. Press once to draw some information on-screen while continuing to play, twice to pause and enter the script debugger, three times to exit.
  • CTRL+F10 Enable script trigger logging. Every time a script is triggered by an event like a keypress it is logged to a text file called script_log.txt. Also displays when triggered scripts are paused by a wait or finish, however this won't work for scripts started before the bdebug key was pressed (restart the game if needed).
  • F11 Toggle walking through walls (and other obstructions)
  • F12 Take a screenshot. See below.
  • CTRL + slows down and CTRL - speeds up the frame rate (adjusts milliseconds per tick).
  • Holding down SHIFT+TAB increases the framerate greatly.

Debug menu[edit]

In callipygous pressing F8 brings up a menu with all of the above, and several additional options:

  • List slices to g_debug.txt: Write a textual dump of the whole slice tree to g_debug.txt, next to the .rpg file.
  • Edit backcompat bitsets: Lets you toggle backcompat bitsets to fix games broken by recent OHRRPGCE versions. It's not always possible for the engine to automatically turn on the correct bits.
  • Show/test battle formations: Display the battle formation set for the tile the hero is standing on, and start any of the battles in it.
  • Manipulate gen() array: Raw-edit gen(), for engine developers. This gives you direct access to the data represented in the General Game Data menu, as well as an assortment of other data. Press Esc to exit.
  • Manipulate gmap() array: Raw-edit gmap(), for engine developers. This gives you direct access to the data represented in the General Map Data submenu of the map editor.
  • Email saved game (Only on Android): Saves the current game and then attaches it to an email to the game developer (opens an email client).
  • Switch to debug/release mode: This toggles whether script and other errors are displayed. Games usually default to Release because lots of errors might occur in old games, but when playtesting it's better to use Debug mode.

In-Battle Debugging Keys[edit]

  • Ctrl+F4 Instantly Run (even from inescapable enemies)
  • F4 Toggle tag debug screen
  • F5 Gain a million Experience Points
  • F6 Toggle between turn-based and active-time-based battle systems
  • F7 Kill all enemies which are targetable and need to killed to win
  • F8 Show the debug menu, with these keys documented.
  • F10 Display Enemy ready-meters and state-variables, and again to hide.
  • F11 Show queued attacks, and again to hide.

Non-debugging Keys[edit]

The following keys work even if debug keys are disabled:

  • F12 Take a screenshot, typically saved either in BMP or PNG format, depending on the graphics backend. It will be saved as "nameofyourrpgfile000x.bmp/png" inside your game folder. If you are using gfx_directx, then you can adjust the file format in the backend Options menu by clicking on the window icon (top left of the window). Works everywhere in Game and Custom.
  • CTRL+~ (Ctrl and tilde) displays the current framerate. Works everywhere in Game and Custom.

See Also[edit]