Developer Mode: Difference between revisions

From OniGalore
Jump to navigation Jump to search
mNo edit summary
Line 1: Line 1:
{|align=right
{|align=right
|+Label on a crate in<br>Syndicate Warehouse
|+Label on a crate in<br>Syndicate Warehouse<br>(an [[Easter eggs|Easter egg]])
|http://geyser.oni2.net/Developer_Mode/TheDayIsMine.png
|http://geyser.oni2.net/Developer_Mode/TheDayIsMine.png
|http://geyser.oni2.net/Developer_Mode/TheDayIsMine0.png
|http://geyser.oni2.net/Developer_Mode/TheDayIsMine0.png
|}
|}
==thedayismine==
The developer mode is a bundle of features (a set of hotkeys, plus console input/output) that was available via the '''thedayismine''' cheatcode in beta and pre-beta versions of Oni, up to beta 4.
It was very much of a myth ever since Oni was released. Random game sites around the web kept posting overviews of Oni's [[Cheats|cheat codes]] with stuff like :
;(this one from [http://oni.planets.gamespy.com/info/cheats.shtml Oni Online])
:'''Cheat codes'''
:*...
:*thedayismine - Developer Mode
:
:'''Developer Mode Commands'''
:While in developer mode, you can use certain key combinations and access the command console. These are the keys I have found (in dev mode):
:*Cntl-Shift-Y = FPS Counter (works always, not only in dev)
:*F7 = Cycle through all possible weapons
:*F8 = Change character
:*F9 = Start recording
:*F10 = Stop recording
:*F11 = Playback recording
:*Cntl-Shift-G = toggles between slow motion and normal modes
:*Cntl-Shift-S = toggles textures on some objects
:*Cntl-Shift-B = shows your current opponent logic
:*` = brings up the cmd prompt
:
:Command prompt is perhaps the most interesting thing out there. You can execute script commands from there or assign values to internal variables. The best way to find out what commands/variable are there is to type at the cmd prompt: dump_docs. This command will dump all known docs and variables (sometimes with comments!) to the text file. CMD prompt has autocompletion feature, to accept the suggestion it gives you, use Tab key. Up and down arrows scrolls through the command history.
:Some handy commands:
:*door_ignore_locks = 1 unlocks all doors for you
:*ai2_kill kills all nearby AI
:*chr_nocollision 0 1 'noclip' mode, allows you to walk through avoid jumping. The designed levels are beautiful.
:More stuff can be found in the docs file created by dump_docs command.
:Special thanks to:
:Dr.Qwerty, nop, Mary
W.O.W. , right? One would rush to one's PC (or Mac), type in "thedayismine"...


and...                     :D :) :| :(
Until recently, it was believed that the developer mode was completely cut from beta 5 and later. However, the developer mode is actually present in ''all'' available versions of Oni. It just needs to be unlocked (e.g. made available via a cheat).


It just didn't work. No matter what one did. One has tried to call up the console through scripting, but without any success.
The developer mode was first unlocked on the Russian & English PC versions by SFeLi in January 2006. Since all other versions (Mac and PC demo) have [[PC vs Mac|other limitations]] (e.g. no console-related scripting commands), it was believed the developer was only present in the retail PC versions.


So, as years flew by, it looked more and more like the Developer Mode was left out of the retail version of Oni, and those lucky bastards at Oni Online (and elsewhere) were either repeating each other's BS without having actually used the Dev Mode, or they had gotten their hands on the beta or pre-beta version... or something.
Then, in June 2006, [[User:Geyser|I]] looked at the PC demo version, and noticed that the developer mode ''was'' there. All Mac versions (demo, OS9 retail, OSX port) followed within a few hours (with a little help from [http://edt.oni2.net EdT]).


(maybe add links to frustrated forum talk etc)
Below you will find download links, unlocking instructions, and finally an overview of the Developer Mode's features.
==Getting it to work==
===Download it...===
====PC retail====
You can get the patched executable here (English version, patched with [[Troubleshooting/Blam|Ian's patch]], then patched by [[User:Geyser|myself]] according to SFeli's instructions) :
*[http://geyser.oni2.net/proggies/OniDev.zip English retail version]
In the PC retail, '''thedayismine''' is available as a separate cheat (thus '''killmequick''' is spared, even if it doesn't have any effect...).


It looked like we were screwed.
I also reverse-engineered [[Troubleshooting/Blam|Ian's patch]] a little bit : it disables a lot of output routines, including dev console output...
 
====PC demo====
Until...
Same as above, but I was too lazy to make a separate cheat : the dev mode is activated/deactivated when you type '''killmequick''', and you get "Ultra Mode" confirmation messages.
 
*[http://geyser.oni2.net/proggies/OniDemoDev.zip English demo] - COMING SOON
==January 21, 2006==
====Mac demo====
http://geyser.oni2.net/Developer_Mode/Screenshot.jpg
Not sure is executables I edit will be valid Mac applications. (Maybe giving them the .appl extension would work? EdT?)
 
====Mac retail (OS9)====
[http://sfeli.oni2.net SFeli] came around. He rediscovered the Developer Mode, reenabled it, and there was much rejoicing.
Same thing
 
====Mac OSX port====
Below is a slightly reformatted version of his [http://geyser.oni2.net/Developer_Mode/DevMode.txt "dev diary"]
Same thing
;Enabling Developer Mode (console):22-01-2006
===...or do it yourself===
It is so simple, that I'm wondering why it wasn't done yet.
You may want to read this if your version of Oni is not covered by the above downloads (e.g. if you have an odd language version).
 
Two years ago I've read on Bungie's Oni site, that there was developer mode in Oni. It could be activated by the cheat code ("thedayismine").  But  this  cheat
code didn't work for me, because Bungie had removed it before releasing Oni...
 
Look at the cheat table entry structure:
struct ONI_CHEAT_ENTRY                ;FASM-style structure declaration.
  lpszCheatName  dd ?                ;Address of "magic" word.
  lpszDescOn      dd ?                ;Address of "Cheat is enabled" message.
  lpszDescOff    dd ?                ;Address of "Cheat is disabled" message.
  nFnIndex        dd ?                ;Index in in CcLocations array.
ends
At the address  0x005533f8  (real 0x001533f8)  in  OniEn,  0x0054dea8  (real 0x0014dea8) in OniRu,  there  is an array of ONI_CHEAT_ENTRY structures (used by one of the core functions).


First, get a good hex editor. Ideally, it should allow you to search for sequences containing joker characters. One such editor for PC is [http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm XVI32]. Dunno for Mac.
====Cheat code lookup tables====
{|align=right
|+Cheats : "magic words" and IDs
|
{|border=1 cellspacing=0
{|border=1 cellspacing=0
|+The whole array
|
!colspan=4|ONI_CHEAT_ENTRY
|-
|
!lpszCheatName!!lpszDescOn!!lpszDescOff!!nFnIndex
|-
!shapeshifter
!shapeshifter
|szShapeShifter||szShapeShiftOn||szShapeShiftOff||0x00
|0x00
|-
|-
!liveforever
!liveforever
|szLive4Ever||szLive4EverOn||szLive4EverOff||0x01
|0x01
|-
|-
!touchofdeath
!touchofdeath
|szTouchOfDeath||szTODOn||szTODOff||0x02
|0x02
|-
|-
!canttouchthis
!canttouchthis
|szCantTouch||szCantTouchOn||szCantTouchOff||0x03
|0x03
|-
|-
!fatloot ''(1)''
!''fatloot''
|szFatLoot||szFatLootOn||0||0x04
|0x04
|-
|-
!glassworld
!glassworld
|szGlassWorld||szGlassWorldOn||szGlassWorldOff||0x05
|0x05
|-
|-
!winlevel ''(2)''
!''winlevel''
|szWinLevel||szWinLevelOn||0||0x06
|0x06
|-
|-
!loselevel ''(2)''
!''loselevel''
|szLoseLevel||szLoseLevelOff||0||0x07
|0x07
|-
|-
!bighead
!bighead
|szBigHead||szBigHeadOn||szBigHeadOff||0x08
|0x08
|-
|-
!minime
!minime
|szMiniMe||szMiniMeOn||szMiniMeOff||0x09
|0x09
|-
|-
!superammo
!superammo
|szSuperAmmo||szSuperAmmoOn||szSuperAmmoOff||0x0a
|0x0A
|}
|
{|border=1 cellspacing=0
!thedayismine
|0x0B
|-
|-
!reservoirdogs
!reservoirdogs
|szResDogs||szResDogsOn||szResDogsOff||0x0c
|0x0C
|-
|-
!roughjustice
!roughjustice
|szRoughJustice||szRJOn||szRJOff||0x0d
|0x0D
|-
|-
!chenille
!chenille
|szChenille||szChenilleOn||szChenilleOff||0x0e
|0x0E
|-
|-
!behemoth
!behemoth
|szBehemoth||szBehemothOn||szBehemothOff||0x0f
|0x0F
|-
|-
!elderrune
!elderrune
|szElderrune||szElderruneOn||szElderruneOff||0x10
|0x10
|-
|-
!moonshadow
!moonshadow
|szMoonShadow||szMoonShadowOn||szMoonShadowOff||0x11
|0x11
|-
|-
!munitionfrenzy ''(2)''
!''munitionfrenzy''
|szMunitionFrenzy||szMunFrenOn||0||0x12
|0x12
|-
|-
!fistsoflegend
!fistsoflegend
|szFistsOfLegend||szFistsOn||szFistsOff||0x13
|0x13
|-
|-
!killmequick
!killmequick
|szKillMeQuick||szKillMeQOn||szKillMeQOff||0x14
|0x14
|-
|-
!carousel
!carousel
|szCarousel||szCarouselOn||szCarouselOff||0x15
|0x15
|- 
!''(3)''
|0||0||0||0
|}
|}
#you can't undo '''fatloot''', so no "disabled" message
|}
#no undo for '''winlevel''', '''loselevel''' or '''munitionfrenzy''', either
First, a little information for the nerds :
#Null entry (see below)
;Magic words and IDs
Look  at the 'superammo' cheat, then at the 'reservoirdogs' cheat. Something strange? Their .nFnIndex'es are 0x0a and 0x0c.
:There are 22 cheat events in every version of Oni, indexed from 0 to 21 (from 0x00 to 0x15 in hexadecimal).
:The indexation is the same in every version, so we can refer to the cheats by that ID, or by the "magic word" originally used to activate the cheat event (which is also version-independent).
:The correspondence is shown in the little table on the right : all the cheats can be enabled and disabled, except for the 4 in italics ('''fatloot''', '''winlevel''', '''loselevel''', '''munitionfrenzy''').
 
;Cheat lookup table
:When you type characters in the "pause screen", the text you enter is compared with a set of "magic words".
:When and if there is a match, the appropriate confirmation message is displayed (except for '''fatloot''', '''winlevel''', '''loselevel''' and '''munitionfrenzy'''), there are two messages to choose from), and the corresponding cheat event is launched.
:This logic appears in an Oni executable in the form of a table
;An element of that table consists of
:a pointer to the "magic word"
:a pointer to the "enabled" message
:a pointer to the "disabled" message (if any)
:the ID of the cheat event to launch
There is an element for every cheat, and they appear by order of increasing ID. The developer mode (ID 0x0B) is simply "skipped" : '''reservoirdogs''' (0x0C) comes right after '''superammo''' (0x0A).
;Data size on different platforms
:On PC, PC demo and Mac OSX : every element 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 Mac OSX); if a cheat has no "disabled" message, the third pointer is null
:On Mac OS9 beta and retail : every element of the lookup table takes up 12 bytes; the 3 pointers and the ID are 3-byte data words (Big Endian); if a cheat has no disabled message, the last byte of the third pointer field is taken up by the ID (the remaining 2 bytes are garbage, as well as the ID field)
:On Mac OS9 demo : the pointers and the ID are 2-byte words (Big Endian); regular elements take up 8 bytes; if a cheat has no "disabled" message, weird stuff happens to the third pointer and to the ID, and the element takes up 10 bytes (yes, 10, not 6)... the ID can be found in what would be the first byte of the ID field.
 
====killmequick====
On PC, PC demo and Mac OSX, there's extra space at the end of the lookup table and where the cheatcodes/messages are stored, so one can ''add'' '''thedayismine''' as a extra cheat. On Mac OS9, 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. The following mini-tutorial will explain how to bind the developer mode to the "ultra mode" cheat AKA '''killmequick'''.
====Finding the lookup table====
Open the executable (or the data fork of the executable on Mac), after backing it up of course... We shall look for the last three elements of the table, corresponding to '''fistsoflegend''', '''killmequick''' and '''carousel'''.
;On PC and PC demo : look for '''13 00 00 00 ## ## ## ## ## ## ## ## ## ## ## ## 14 00 00 00 ## ## ## ## ## ## ## ## ## ## ## ## 15 00 00 00'''
;On Mac OSX : look for '''00 00 00 13 ## ## ## ## ## ## ## ## ## ## ## ## 00 00 00 14 ## ## ## ## ## ## ## ## ## ## ## ## 00 00 00 15'''
;On Mac OS9 beta/retail : look for '''00 00 13 ## ## ## ## ## ## ## ## ## 00 00 14 ## ## ## ## ## ## ## ## ## 00 00 15'''
;On Mac OS9 demo : look for '''00 13 ## ## ## ## ## ## 00 14 ## ## ## ## ## ## 00 15'''
where the ## are joker chars. 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 [[Cheats|HERE]]
 
Let's say cheats are enabled and the developer mode has been made available ''via'' the '''thedayismine''' cheatcode (or '''killmequick''' or '''x''' or whatever).


Guess why?
Just type the developer mode cheat and watch for the confirmation message.
Yes, it's because Bungie have commented element 0x0b  of  cheats array  in  the game  source-code (Oni_GameState.c) before  building the  release  version.
However, it is likely that you won't notice anything special when you get back to the game.
Below are a few quick ways to test the developer mode's functionality.
====Hotkeys====
The quickest way to tell whether it works at all, right after you get the confirmation message, is : to exit the pausescreen; to press '''End'''. That should teleport you to where the camera is (usually back and up, possibly through walls and ceilings).


What  was  that  cheat?
'''End''' is one of the many hotkeys available in Developer Mode. You can also try '''Enter'''. A full list is provided below.
Developer mode, of course!!! :-)
And since  cheats array  was fixed-size (0x16) elements  --  we have a zero entry  at the end  of array.
Fill  it  with  correct szCheatName, szDescOn, szDescOff pointers,  set  nFnIndex  to 0x0b  and you will have working developer mode cheat code.


About  cheat function with  index  0x0b  (CcCaseDevMode). Actually it's not a function -- it's part of CcDispatcher's switch-case statement (CcLocations array is a jumptable for it), and it is part of  CcDispatcher  in  OniEn version -- it uses step-by-step compare instead of jumptable (less compiler optimization ;-)).
Here's another quick test, meant to see if the Control and Alt buttons work fine (on Mac, they should be replaced with "Apple" and "Option", respectively).
Ctrl+Shift+U and Ctrl+Alt+U should both perform the "unstick" action : the player makes a small no-clipping step forward (overriding collision).


You can find CcCaseDevMode at  the address 0x004f5da5/0x004f2297  (En/Ru). It inverts value of the flag bfDevMode at 0x005ece8e/0x005e87e6 and then  registers (binds)  additional  actions (calling CcBindDevActions at 0x0404730/0x00404610).
====Console output====
In developer mode, Oni prints debug messages about ingame events along the bottom line 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).


Here is complete list of bound actions:
The easiest way to check whether that output works at all is to press '''F8''' : the character class (skin) change is acknowledged with a console message.
*'profile_toggle'        to ONI_KEY_BSLASH    ;Backslash.
*'console'               to '`'               ;'~' key (tilde).
*'unstick'              to 'u'
*'cutscene1'            to ONI_KEY_F2
*'cutscene2'            to ONI_KEY_F3
*'f4'                    to ONI_KEY_F4
*'f5'                    to ONI_KEY_F5
*'f6'                    to ONI_KEY_F6
*'f7'                    to ONI_KEY_F7
*'f8'                    to ONI_KEY_F8
*'start_record'          to ONI_KEY_F9
*'stop_record'          to ONI_KEY_F10
*'play_record'          to ONI_KEY_F11
*'camera_record'        to 'n'
*'camera_stop'          to 'm'
*'camera_play'          to ONI_KEY_COMMA
*'record_screen'        to 'l'
*'addflag'              to ONI_KEY_INS        ;NumPad Insert.
*'deleteflag'            to ONI_KEY_DEL        ;NumPad Delete.
*'man_cam_move_up'      to ONI_KEY_SUB        ;NumPad Subtract.
*'man_cam_move_down'    to ONI_KEY_ADD        ;NumPad Add.
*'man_cam_move_left'    to ONI_KEY_NUM1
*'man_cam_move_right'    to ONI_KEY_NUM3
*'man_cam_move_forward'  to ONI_KEY_NUM8
*'man_cam_move_backward' to ONI_KEY_NUM5
*'man_cam_pan_left'      to ONI_KEY_NUM6
*'man_cam_pan_right'    to ONI_KEY_NUM4
*'man_cam_pan_up'        to ONI_KEY_UP        ;Up Arrow.
*'man_cam_pan_down'      to ONI_KEY_DOWN      ;Down Arrow.
*'place_quad'            to ONI_KEY_COMMA
*'place_quad_mode'      to ONI_KEY_PERIOD
Some of them don't work, but I'm working on this now. ;-)


Key '`'  (twiddle) activates  console.
You can also run around one of the original levels with developer mode on : you're guaranteed to see debug messages dumped to the console output.
Press  'Tab' to cycle  through  all available commands / autocomplete command that you've started to type in.


==Developer Mode==
If you don't see anything, that means console output is unfortunately disabled in your version of Oni.
Yeah, Developer Mode... it's ''there'' after all.
:If you're on PC retail, you may have applied [[Troubleshooting/Blam|Ian's patch]] (aka XP patch), which disables console output.
That's when we all say W.O.W. and hurry to our PCs.
:On PC demo, both console output and console input are invisible (i.e. you can enter script commands, but you're "blindfolded"). No can do.
:Same thing for Mac, probably (please confirm)


Yeah, it's a sorry thing for Mac users, but Dev Mode was completely [[PC vs Mac|cut from the Mac build]].
====Console input====
===Enabling the cheat===
By default, Oni auto-binds the "console" event to the "tilde" key ("~", usually located below Escape). On non-US keyboards, that key may not be recognized. Just add the line "bind leftalt to console" (or "bind leftoption to console") to '''key_config.txt''' in your Oni folder.
Get the patched executable here (English version, patched with Ian's patch, then patched by [[User:Geyser|myself]] according to SFeli's instructions) :
===Features===
*[http://geyser.oni2.net/proggies/OniDev.zip OniDev.zip]
====Hotkeys====
(I've packed the cheat-code strings together, so that they don't take any extra space)
Complete overview of hotkeys coming soon...
====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.


(I also had to reverse-engineer Ian's stuff a little bit : Ian's patch disables a lot of output routines, including dev console output...)
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.


You can also follow [http://geyser.oni2.net/Developer_Mode/DevMode.txt SFeli's instructions] and patch it yourself...
If a function/variable was succesfully registered by Oni during level load, you will be able to refer to them from the console.


===Binding extra functions===
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.
One event you absolutely want to bind is "console" (if you don't have a US keyboard, the automatic binding to "apostrophe" may not work for you).


As for the other ones... some of them are already bindable ''without'' the Dev Mode. Some others will be bound automatically and will work without you having to edit you key_config.txt.
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'''.


A few of them don't work out as nicely as expected. We'll tell you more about them in the near future.
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.
===Enjoying===
Type in "thedayismine" as you'd type in any other cheat. Use [[OSGE|OSGE]] to enable cheats if you haven't finished the game and don't want to hack '''persist.dat''' manually.
Go back to the game and hit the "console" key.


Filling in...
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 [[PC vs Mac|HERE]] for details).

Revision as of 23:21, 13 June 2006

Label on a crate in
Syndicate Warehouse
(an Easter egg)
TheDayIsMine.png TheDayIsMine0.png

The developer mode is a bundle of features (a set of hotkeys, plus console input/output) that was available via the thedayismine cheatcode in beta and pre-beta versions of Oni, up to beta 4.

Until recently, it was believed that the developer mode was completely cut from beta 5 and later. However, the developer mode is actually present in all available versions of Oni. It just needs to be unlocked (e.g. made available via a cheat).

The developer mode was first unlocked on the Russian & English PC versions by SFeLi in January 2006. Since all other versions (Mac and PC demo) have other limitations (e.g. no console-related scripting commands), it was believed the developer was only present in the retail PC versions.

Then, in June 2006, I looked at the PC demo version, and noticed that the developer mode was there. All Mac versions (demo, OS9 retail, OSX port) followed within a few hours (with a little help from EdT).

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

Getting it to work

Download it...

PC retail

You can get the patched executable here (English version, patched with Ian's patch, then patched by myself according to SFeli's instructions) :

In the PC retail, thedayismine is available as a separate cheat (thus killmequick is spared, even if it doesn't have any effect...).

I also reverse-engineered Ian's patch a little bit : it disables a lot of output routines, including dev console output...

PC demo

Same as above, but I was too lazy to make a separate cheat : the dev mode is activated/deactivated when you type killmequick, and you get "Ultra Mode" confirmation messages.

Mac demo

Not sure is executables I edit will be valid Mac applications. (Maybe giving them the .appl extension would work? EdT?)

Mac retail (OS9)

Same thing

Mac OSX port

Same thing

...or do it yourself

You may want to read this if your version of Oni is not covered by the above downloads (e.g. if you have an odd language version).

First, get a good hex editor. Ideally, it should allow you to search for sequences containing joker characters. One such editor for PC is XVI32. Dunno for Mac.

Cheat code lookup tables

Cheats : "magic words" and IDs
shapeshifter 0x00
liveforever 0x01
touchofdeath 0x02
canttouchthis 0x03
fatloot 0x04
glassworld 0x05
winlevel 0x06
loselevel 0x07
bighead 0x08
minime 0x09
superammo 0x0A
thedayismine 0x0B
reservoirdogs 0x0C
roughjustice 0x0D
chenille 0x0E
behemoth 0x0F
elderrune 0x10
moonshadow 0x11
munitionfrenzy 0x12
fistsoflegend 0x13
killmequick 0x14
carousel 0x15

First, a little information for the nerds :

Magic words and IDs
There are 22 cheat events in every version of Oni, indexed from 0 to 21 (from 0x00 to 0x15 in hexadecimal).
The indexation is the same in every version, so we can refer to the cheats by that ID, or by the "magic word" originally used to activate the cheat event (which is also version-independent).
The correspondence is shown in the little table on the right : all the cheats can be enabled and disabled, except for the 4 in italics (fatloot, winlevel, loselevel, munitionfrenzy).
Cheat lookup table
When you type characters in the "pause screen", the text you enter is compared with a set of "magic words".
When and if there is a match, the appropriate confirmation message is displayed (except for fatloot, winlevel, loselevel and munitionfrenzy), there are two messages to choose from), and the corresponding cheat event is launched.
This logic appears in an Oni executable in the form of a table
An element of that table consists of
a pointer to the "magic word"
a pointer to the "enabled" message
a pointer to the "disabled" message (if any)
the ID of the cheat event to launch

There is an element for every cheat, and they appear by order of increasing ID. The developer mode (ID 0x0B) is simply "skipped" : reservoirdogs (0x0C) comes right after superammo (0x0A).

Data size on different platforms
On PC, PC demo and Mac OSX : every element 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 Mac OSX); if a cheat has no "disabled" message, the third pointer is null
On Mac OS9 beta and retail : every element of the lookup table takes up 12 bytes; the 3 pointers and the ID are 3-byte data words (Big Endian); if a cheat has no disabled message, the last byte of the third pointer field is taken up by the ID (the remaining 2 bytes are garbage, as well as the ID field)
On Mac OS9 demo : the pointers and the ID are 2-byte words (Big Endian); regular elements take up 8 bytes; if a cheat has no "disabled" message, weird stuff happens to the third pointer and to the ID, and the element takes up 10 bytes (yes, 10, not 6)... the ID can be found in what would be the first byte of the ID field.

killmequick

On PC, PC demo and Mac OSX, there's extra space at the end of the lookup table and where the cheatcodes/messages are stored, so one can add thedayismine as a extra cheat. On Mac OS9, 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. The following mini-tutorial will explain how to bind the developer mode to the "ultra mode" cheat AKA killmequick.

Finding the lookup table

Open the executable (or the data fork of the executable on Mac), after backing it up of course... We shall look for the last three elements of the table, corresponding to fistsoflegend, killmequick and carousel.

On PC and PC demo
look for 13 00 00 00 ## ## ## ## ## ## ## ## ## ## ## ## 14 00 00 00 ## ## ## ## ## ## ## ## ## ## ## ## 15 00 00 00
On Mac OSX
look for 00 00 00 13 ## ## ## ## ## ## ## ## ## ## ## ## 00 00 00 14 ## ## ## ## ## ## ## ## ## ## ## ## 00 00 00 15
On Mac OS9 beta/retail
look for 00 00 13 ## ## ## ## ## ## ## ## ## 00 00 14 ## ## ## ## ## ## ## ## ## 00 00 15
On Mac OS9 demo
look for 00 13 ## ## ## ## ## ## 00 14 ## ## ## ## ## ## 00 15

where the ## are joker chars. 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 the developer mode has been made available via the thedayismine cheatcode (or killmequick or x or whatever).

Just type the developer mode cheat and watch for the confirmation message. However, it is likely that you won't notice anything special when you get back to the game. Below are a few quick ways to test the developer mode's functionality.

Hotkeys

The quickest way to tell whether it works at all, right after you get the confirmation message, is : to exit the pausescreen; to press End. That should teleport you to where the camera is (usually back and up, possibly through walls and ceilings).

End is one of the many hotkeys available in Developer Mode. You can also try Enter. A full list is provided below.

Here's another quick test, meant to see if the Control and Alt buttons work fine (on Mac, they should be replaced with "Apple" and "Option", respectively). Ctrl+Shift+U and Ctrl+Alt+U should both perform the "unstick" action : the player makes a small no-clipping step forward (overriding collision).

Console output

In developer mode, Oni prints debug messages about ingame events along the bottom line 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).

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

You can also run around one of the original levels with developer mode on : you're guaranteed to see debug messages dumped to the console output.

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"). No can do.
Same thing for Mac, probably (please confirm)

Console input

By default, Oni auto-binds the "console" event to the "tilde" key ("~", usually located below Escape). On non-US keyboards, that key may not be recognized. Just add the line "bind leftalt to console" (or "bind leftoption to console") to key_config.txt in your Oni folder.

Features

Hotkeys

Complete overview of hotkeys coming soon...

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).