Developer Mode

From OniGalore
Jump to: navigation, search
Found on a crate in
Syndicate Warehouse

Developer Mode is a bundle of features created by Bungie West to help them develop Oni: a console line for entering scripting commands, manual camera controls, and various debugging features. It is enabled by the cheat code thedayismine (see "Download it..." below before trying the code).

Despite being hinted at by a crate texture (right) and leaked as part of a list of cheat codes during beta testing, this cheat code did not work upon Oni's release, and it was long believed that Developer Mode had been cut from retail versions of Oni. However, Dev Mode is actually present in all available versions of Oni (except PS2). It just needed to be unlocked, as the community learned back in 2006.

Below you will find download links, unlocking instructions, and finally an overview of the Developer Mode's features.

Getting it to work

Download it...

In Windows, you can install the Daodan DLL to unlock Developer Mode; note that the Anniversary Edition installs the Daodan DLL automatically.
On the Mac, the Intel build of Oni already has Dev Mode unlocked; note that the Anniversary Edition installs the Intel build automatically.

Using it

First check

Cheats are normally unavailable until you finish the full version of the game, and Developer Mode can only be activated through a cheat code. For unlocking cheats "manually" (especially necessary with the demos), see HERE. However, cheats are enabled all the time when the Daodan DLL is installed in Windows or when using the Mac Intel build.

Enter the Pause screen (default key F1) and look for a confirmation message after typing the Developer Mode cheat (thedayismine, or killmequick if you followed the DIY tutorial, or just x -- the DLL and Intel build provide that shortcut). However, you may not notice anything special when you get back to the game (although there should be occasional console messages appearing at the bottom-left).

The quickest way to tell whether Dev Mode definitely works, right after you get the confirmation message, is to exit the Diary screen and to press End. That should teleport you to where the camera is (usually back and up, possibly through walls and ceilings).

Here's another quick test, meant to see if the Control and Alt keys work fine (on Mac, use the Option key instead of Alt): Ctrl+Shift+U and Ctrl+Alt+U should both perform the "unstick" action; Konoko will shift forward by a small amount.

Console output

In Developer Mode, Oni prints debug messages about in-game events along the bottom-left of the screen. Past messages scroll up across the screen and fade. In some situations, messages don't fade (e.g. if character debugging is enabled or you are currently using the console line).

The easiest way to check whether that output works at all is to press F8: the character class change is acknowledged with a console message.

If you don't see anything, that means console output is unfortunately disabled in your version of Oni. If you're using the Windows version of Oni and you applied Ian's patch (the old WinXP patch, no longer offered because it is superseded by the Daodan DLL), that may be what disabled console output. In Windows demo Oni, both console output and console input are invisible (i.e. you can enter script commands, but you're "blindfolded").

Console input

By default, Oni auto-binds the "console" toggle to the key to the left of the numeric row. On U.S. QWERTY keyboards, this is the key with a ` in the lowercase position and a tilde, ~, in the uppercase position. It is usually called the "tilde key" by users, and perhaps even elsewhere on this wiki; however, you would have to hold Shift to type a tilde, and the console is activated by just pressing the key without Shift, thus it is actually the "grave accent key" which activates the console.

On non-U.S. keyboards, that key may not be recognized. Just add a line like "bind leftalt to console" to key_config.txt in your Oni folder and you'll be able to open the console with that key. In some cases, this bound key will not close the console; however, pressing the grave accent key, oddly enough, may work. Or you can press the appropriate key for your layout:

Danish QWERTY: The ½ key to the left of the numeric row.

German QWERTZ: The circumflex accent key, ^. In Windows, if playing Oni in windowed mode, you should use "rightalt" as your alternative console binding because "leftalt" activates the window's menu, stealing Oni's controls.

Features

Many of the features listed below no longer work as intended, or work at all, either due to changes to the code made at the end of development or the absence in retail Oni of resources that the features were intended to call upon, such as level0_Tools. Nevertheless, some of these features are helpful for modders, most notably the camera controls and dev console.

Hotkeys

Below are Oni's hardcoded mappings for Developer Mode functions. The Alt key (Option key on Macs) can be used in placed of Ctrl.

The "U.S. QWERTY" column gives the standard hotkeys (the keys intended by the American developers to be pressed), and the "German QWERTZ" column only lists the hotkeys that are different from U.S. QWERTY on German QWERTZ keyboards; note that on German keyboards, the "Ctrl" key is named "Strg". Support for additional keyboard layouts would be a welcome addition if you have another type of keyboard that you would like to have incorporated into the table. If a hotkey's functionality has been restored in Windows using the Daodan DLL, it will be checked off here.

U.S. QWERTY German QWERTZ Description Windows Mac
` (grave accent) ^ Displays console
Checkmark 16px blue.png
Checkmark 16px blue.png
Ctrl+Shift+o Hide non-(visually-)occluding quads (1)
Checkmark 16px blue.png
Ctrl+Shift+s Hide non-sound-occluding quads (2)
Checkmark 16px blue.png
Ctrl+Shift+i Draw invisible quads
Checkmark 16px blue.png
Ctrl+Shift+y Ctrl+Shift+z Performance display (includes FPS)
Checkmark 16px blue.png
Checkmark 16px blue.png
Ctrl+Shift+t Draw only character-colliding geometry
Checkmark 16px blue.png
Ctrl+Shift+r Draw only object-colliding geometry
Checkmark 16px blue.png
Ctrl+Shift+f Fast Mode (runs Oni at up to 24x)
Checkmark 16px blue.png
Checkmark 16px blue.png
Ctrl+Shift+g Draw Every Frame Mode
Checkmark 16px blue.png
(3)
Ctrl+Shift+x Toggle show trigger volumes (formerly "Secret X")
Checkmark 16px blue.png
Checkmark 16px blue.png
Ctrl+Shift+y Secret Y
Ctrl+Shift+z Secret Z
Ctrl+Shift+Ins Add flag
Checkmark 16px blue.png
(4)
Ctrl+Shift+Del Delete flag
Checkmark 16px blue.png
Checkmark 16px blue.png
Ctrl+Shift+u Unstick player
Checkmark 16px blue.png
Checkmark 16px blue.png
Ctrl+Shift+n Camera recording start
Ctrl+Shift+m Camera recording stop
Ctrl+Shift+, Camera recording playback
? Place quad
?
?
? Place quad mode
?
?
Ctrl+Shift+\ Ctrl+Shift+# Profile toggle (doesn't seem to have any effect)
Checkmark 16px blue.png
Ctrl+Shift+l Dumps a screenshot every frame
Checkmark 16px blue.png
Checkmark 16px blue.png
Ctrl+Shift+1 Test One
Ctrl+Shift+2 Test Two
Ctrl+Shift+3 Test Three
Ctrl+Shift+4 Test Four
. (period) Single Step Mode
Checkmark 16px blue.png
Checkmark 16px blue.png
/ - Advance one step (when in Single Step Mode)
Checkmark 16px blue.png
Checkmark 16px blue.png
.+/ .+- Exit Single Step Mode (press keys simultaneously)
Checkmark 16px blue.png
Checkmark 16px blue.png
Ctrl+Shift+Home Cycle active camera
Checkmark 16px blue.png
End Warp to camera
Checkmark 16px blue.png
Checkmark 16px blue.png
Ctrl+Shift+k Kill particles
Backspace Enter AI debugger
7 Explode One
8 Explode Two
9 Explode Three
0 Explode Four
Ctrl+Shift+j Reset particles
Ctrl+Shift+w Drop flag and add waypoint
Ctrl+Shift+b Shows current opponent's logic
Checkmark 16px blue.png
Checkmark 16px blue.png
] ~ Freeze (now causes camera drift while on;
stopping Freeze mode teleports to camera location)
Checkmark 16px blue.png
Checkmark 16px blue.png
[ Frame Advance (now renders Konoko at camera location)
Checkmark 16px blue.png
Checkmark 16px blue.png
F8, Shift+F8 Cycle characters
Checkmark 16px blue.png
Checkmark 16px blue.png
Ctrl+Shift+p Display particle performance
Ctrl+Shift+; Lock particle performance display
F2 Cutscene Animation 1
Checkmark 16px blue.png
Checkmark 16px blue.png
F3 Cutscene Animation 2
Checkmark 16px blue.png
Checkmark 16px blue.png
F6 Kill all AIs
Checkmark 16px blue.png
Checkmark 16px blue.png
Ctrl+F7 Play dead
Checkmark 16px blue.png
Checkmark 16px blue.png
F7, Shift+F7 Cycle weapons (holster to get second weapon)
Checkmark 16px blue.png
Checkmark 16px blue.png
F9 Start recording
Checkmark 16px blue.png
Checkmark 16px blue.png
F10 Stop recording
Checkmark 16px blue.png
Checkmark 16px blue.png
F11 Playback recording
Checkmark 16px blue.png
Checkmark 16px blue.png
Return/Enter Cycle camera modes (see table below for camera controls):
1. Normal
2. Detached A - mouse still controls character aim
3. Detached B - mouse aims camera
Checkmark 16px blue.png
Checkmark 16px blue.png

(1) This dev feature does not fully function in Windows, so the only non-occluding quads that disappear are console screens.

(2) This dev feature does not fully function in Windows, so the non-sound-occluding quads remain visible. However, the second aspect of this feature, which marks furniture with a red texture to indicate that it is partially sound-occluding, still works.

(3) On Macs, Draw Every Frame Mode speeds up the game almost to the extent of Fast Mode, but with glitchy animations.

(4) Please see talk page section "Insert key on Macs".

Camera controls

Note that the camera controls have default mappings, given below, but unlike the developer hotkeys, they are custom-bindable. In fact, on Macs, the default numpad bindings need to be customized or they won't work at all. See note HERE about how to bind these keys and fix the Mac numpad controls. Also, the definitions of panning left and right are reversed, as NumPad4 will turn the camera to the left, but its action is called "man_cam_pan_right", and vice versa for NumPad6....

After detaching the camera with Enter and flying it away from Konoko, the End key teleports Konoko to the camera position and attaches the camera to her position again. If you turn off collision with "chr_nocollision 0 1" before teleporting, Konoko will not fall out of the air when teleported to the camera position (just don't jump with collision off...).

Windows
Key Result
NumPad 1/3 Move camera left/right
NumPad 8/5 Move camera forward/backward
NumPad -/+ Move camera up/down
NumPad 6/4 Pan camera left/right
Up/Down Arrow Pan camera up/down
Mac
Key Result
Left/Right Arrow Move camera left/right
Up/Down Arrow Move camera forward/backward
Page Up/Down Move camera up/down
NumPad 6/4 Pan camera left/right
NumPad 8/2 Pan camera up/down

Runtime scripting

Basic idea

(Almost) anything you write in scripts you can enter at runtime with the console. The only thing you can't do is register new variables and functions.

You can call existing functions, check on the values of existing variables. "Existing" means either built-in ones, or part of the original level logic, or part of your own scripts for the given level.

If a function/variable was succesfully registered by Oni during level load, you will be able to refer to them from the console.

You will even be able to browse the registered variables/functions with the Tab key, while typing at the console. Tab autocompletes the command being typed, then cycles through all available commands in (hex)alphabetical order (A...Z come before a...z). Shift+Tab lets you go back.

Previous commands can be navigated with up and down arrows. You can't insert/delete text in the middle of a command; you have to use Backspace.

The only keys that have an effect while the console is active are: Escape, Enter, Backspace, (Shift+)Tab, ASCII character keys and the arrow keys.

If you press an illegal key during console input (such as F1), the input display will freeze; hit Tab a few times to fix.

Limitations

Obviously, if you have no console output, it's a bit frustrating. Even more so if console input is invisible -- you're in for some blindfolded scripting then. Still, there are a few commands which you can type in as complements to regular cheats:

chr_nocollision 0 1 and chr_nocollision 0 0 enable/disable no-clipping. When in no-clipping mode, you can't fall down; thus, jumping makes you flail in midair, and eventually you die (so be careful about that)
give_powerup shield gives you a force shield (which you can't have with fatloot)
dump_docs prints all the registered commands/variables to a file in your Oni folder (so you know just what you can type)
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox