Developer Mode: Difference between revisions

continuing the rewrite for Intel Macs
mNo edit summary
(continuing the rewrite for Intel Macs)
Line 4: Line 4:
|http://geyser.oni2.net/Developer_Mode/TheDayIsMine0.png
|http://geyser.oni2.net/Developer_Mode/TheDayIsMine0.png
|}
|}
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 is available via the '''thedayismine''' cheat code. 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 around the time of Oni's beta testing. However, the this mode is actually present in ''all'' available versions of Oni (except PS2). It just needs to be unlocked, as the community learned [[History_of_Oni_modding/The_tale_of_Dev_Mode|back in 2006]].
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, right). 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 around the time of 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 [[History_of_Oni_modding/The_tale_of_Dev_Mode|back in 2006]].


Below you will find download links, unlocking instructions, and finally an overview of the Developer Mode's features.
Below you will find download links, unlocking instructions, and finally an overview of the Developer Mode's features.
Line 16: Line 16:
You may want to read this if your version of Oni is not covered by the above DLL (e.g. if you have an odd language version).
You may want to read this if your version of Oni is not covered by the above DLL (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 [http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm XVI32]. Dunno for Mac.
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 [http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm XVI32]. On Macs, [http://www.ufsexplorer.com/cihex.php CI Hex Viewer] is free, powerful, and can perform the search you need, but [http://ridiculousfish.com/hexfiend/ 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 code lookup tables====
{|style="float:right"
{|style="float:right"
|+Cheats : "magic words" and IDs
|+Cheat codes and IDs
|
|
{|border=1 cellspacing=0
{|border=1 cellspacing=0
!shapeshifter
|-
|shapeshifter
|0x00
|0x00
|-
|-
!liveforever
|liveforever
|0x01
|0x01
|-
|-
!touchofdeath
|touchofdeath
|0x02
|0x02
|-
|-
!canttouchthis
|canttouchthis
|0x03
|0x03
|-
|-
!''fatloot''
|fatloot
|0x04
|0x04
|-
|-
!glassworld
|glassworld
|0x05
|0x05
|-
|-
!''winlevel''
|winlevel
|0x06
|0x06
|-
|-
!''loselevel''
|loselevel
|0x07
|0x07
|-
|-
!bighead
|bighead
|0x08
|0x08
|-
|-
!minime
|minime
|0x09
|0x09
|-
|-
!superammo
|superammo
|0x0A
|0x0A
|}
|}
|
|
{|border=1 cellspacing=0
{|border=1 cellspacing=0
!thedayismine
|-
|'''thedayismine'''
|0x0B
|0x0B
|-
|-
!reservoirdogs
|reservoirdogs
|0x0C
|0x0C
|-
|-
!roughjustice
|roughjustice
|0x0D
|0x0D
|-
|-
!chenille
|chenille
|0x0E
|0x0E
|-
|-
!behemoth
|behemoth
|0x0F
|0x0F
|-
|-
!elderrune
|elderrune
|0x10
|0x10
|-
|-
!moonshadow
|moonshadow
|0x11
|0x11
|-
|-
!''munitionfrenzy''
|munitionfrenzy
|0x12
|0x12
|-
|-
!fistsoflegend
|fistsoflegend
|0x13
|0x13
|-
|-
!killmequick
|killmequick
|0x14
|0x14
|-
|-
!carousel
|carousel
|0x15
|0x15
|}
|}
|}
|}
First, a little information for the nerds :
 
;Magic words and IDs
;Cheat overview
:There are 22 cheat events in every version of Oni, indexed from 0 to 21 (from 0x00 to 0x15 in hexadecimal).
: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 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 order is the same in every version, so we can refer to the cheats by that ID, or by the cheat code used to activate the cheat event.
: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
;Cheat lookup table
:When you type characters in the "pause screen", the text you enter is compared with a set of "magic words".
: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 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.
:When and if there is a match, the appropriate confirmation message is displayed for enablement or disablement (except for one-way cheats '''fatloot''', '''winlevel''', '''loselevel''' and '''munitionfrenzy''', which just have a recognition message), and the corresponding cheat event is launched when the Pause screen is closed.
:This logic appears in an Oni executable in the form of a table
;In full, each row of the cheat table consists of:
;An element of that table consists of
:a pointer to the cheat code string
:a pointer to the "magic word"
:a pointer to the "enabled"/recognition message
:a pointer to the "enabled" message
:a pointer to the "disabled" message (if any)
:a pointer to the "disabled" message (if any)
:the ID of the cheat event to launch
:the internal 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).
There is an 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
;Data size on different platforms
:On PC, PC demo and Mac OS X : 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 OS X); if a cheat has no "disabled" message, the third pointer is null
: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
:On Mac OS 9 retail and demo : 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)
:In the Mac OS 9 retail and demo, every row 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 element is taken up by the ID (the remaining 2 bytes are garbage, as well as the ID field)
:On Mac OS 9 beta : 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.
:In the Mac OS 9 beta, 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... the ID can be found in what would be the first byte of the ID field.


====killmequick====
====killmequick====
On PC, PC demo and Mac OS X, there's extra space at the end of the lookup table and where the cheatcodes/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. The following mini-tutorial will explain how to bind the developer mode to the "ultra mode" cheat AKA '''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====
====Finding the lookup table====