Developer Mode
Developer Mode is a bundle of features created by Bungie West to help them develop Oni -- a console, camera controls, and various debugging features -- that was associated with the cheat code thedayismine (see picture above for related Easter egg). 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; it had only been observed to work in the Mac beta that was leaked during Oni's beta testing. However, this mode is actually present in all available versions of Oni (except PS2). It just needs 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. On the Mac, the Intel build already has Dev Mode unlocked; it can be found HERE.
...or do it yourself
You may want to read this if your Windows version of Oni is not covered by the above DLL (e.g. if you have an odd language version) or if your Mac is not running the Intel build (though a Dev Mode-enabled version of the last PPC build is HERE).
First, get a good hex editor. Ideally, it should allow you to search for sequences containing joker characters (that is, wildcards or bit masks). One such editor for PC is XVI32. On Macs, CI Hex Viewer is free, powerful, and can perform the search you need, but Hex Fiend has a better comparison function so you can check your work afterward (open original and edited binaries and choose File>Compare "Oni" and "Oni").
Cheat code lookup tables
|
|
- Cheat overview
- There are 22 cheat events in every version of Oni, indexed from 0 to 21 (or 0x00 to 0x15 in hexadecimal). See table on right; the cheat code omitted by Bungie, thedayismine, is in bold. The four italicized cheat codes are "one-way" cheats that do not have on/off states, which affects the table described below.
- The order is the same in every version, so we can refer to the cheats by their ID, or by the cheat code used to activate them.
- Cheat lookup table
- When you type characters in the "pause screen", the text you enter is progressively compared with all the strings in the cheat table.
- When and if there is a match, the corresponding confirmation message is displayed for enablement/confirmation or for disablement if the cheat was already on, and the corresponding cheat event takes effect when the Pause screen is closed.
- In full, each row of the cheat table consists of:
- a pointer to the cheat code string
- a pointer to the "enabled"/recognition message
- a pointer to the "disabled" message (if any)
- the internal ID of the cheat event to launch
There is a row for every cheat, and they appear by order of increasing ID. In most Oni builds, the developer mode cheat (ID 0x0B) is simply skipped over; reservoirdogs (0x0C) comes right after superammo (0x0A).
- Data size on different platforms
- In the PC, PC demo and Mac OS X (PPC) builds, every row of the lookup table takes up 16 bytes; the 3 pointers and the ID are 4-byte data words (Little Endian on PC, Big Endian on PPC Macs); if a cheat has no "disabled" message, the row's third pointer is null.
- In the Mac OS 9 builds, the pointers and the ID are 2-byte words (Big Endian); regular rows take up 8 bytes; for one-way cheats with no "disabled" message, weird stuff happens to the third pointer and to the ID, and the row takes up 10 bytes... the ID can be found in what would be the first byte of the ID field instead of the second, and the remaining 3 bytes are garbage. An additional garbage byte is added between consecutive one-way cheats (0x06 and 0x07).
Let's kill killmequick
In the PC, PC demo and Mac OS X (PPC) builds, there's extra space at the end of the lookup table and where the cheat codes/messages are stored, so one can add thedayismine as an extra cheat. On Mac OS 9, the data is packed tighter (and the text strings are stored together with their size), so the only easy way is to replace an existing cheat. Since replacing an existing cheat is the only solution that works on all platforms, the following mini-tutorial will explain how to bind the Developer Mode cheat event to the Ultra Mode cheat code killmequick (since hardly anyone uses that cheat).
Finding the lookup table
Open the executable (or the data fork of the executable in the Mac OS 9 build), after backing it up of course.... We shall look for the last three elements of the table, corresponding to fistsoflegend, killmequick and carousel.
- In the PC retail and PC demo builds, look for 13 00 00 00 ## ## ## ## ## ## ## ## ## ## ## ## 14 00 00 00 ## ## ## ## ## ## ## ## ## ## ## ## 15 00 00 00
- In the Mac OS X (PPC) build, look for 00 00 00 13 ## ## ## ## ## ## ## ## ## ## ## ## 00 00 00 14 ## ## ## ## ## ## ## ## ## ## ## ## 00 00 00 15 (sample pic)
- In the Mac OS 9 builds, look for 00 13 ## ## ## ## ## ## 00 14 ## ## ## ## ## ## 00 15 (sample pic)
where the ## are joker characters (wildcard bytes). Once you've found that data (make sure it occurs only once in the file), replace the 14 with a 0B.
Developer Mode will now be enabled/disabled every time you type killmequick at the Pause screen; you'll get "Ultra Mode Enabled" and "Ultra Mode Disabled" as confirmation messages.
Using it
First check
Cheats are normally unlocked when you finish the full version of the game. For unlocking cheats "manually" (especially necessary with the demos), see HERE
Let's say cheats are enabled and Developer Mode has been made available via the thedayismine cheatcode (or simply x with Daodan DLL or Mac Intel build).
Just type the Developer Mode cheat and watch for the confirmation message. 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 on PC retail, you may have applied Ian's patch (aka XP patch), which disables console output. On PC demo, 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 which on U.S. keyboards has a grave accent, `, 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.
Usage
Hotkeys
(1) On Macs, Draw Every Frame mode speeds up the game almost to the extent of Fast mode, but with glitchy animations.
(2) On Macs, these keys will not work without custom key bindings. See note HERE about how to bind these keys.
German hotkeys
"Cntl" = "Strg"
German Windows version uses ^ by default for console access. On Windows with window mode on you should use rightalt as alternative console binding because leftalt has a special function: it's used to show extra options of windows/programs, in this case it will steal Oni's mouse controls until you make a click.
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, you can't fall down : 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)
- other stuff...
Also, the available scripting commands may be limited in your version. The most commands are on PC retail, or on beta 4 and earlier. On Mac, the functionality is much more limited (see HERE for details).