Talk:Developer Mode: Difference between revisions

From OniGalore
Jump to navigation Jump to search
mNo edit summary
 
m (+cat)
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Previous version : incomplete, inaccurate, verbose
==More testing needed==
----
At some point, someone should review what hotkeys definitely work on the Windows side, because this questionable PC I'm testing on does not seem to do some of the things Windows is supposed to do (and in some cases things the Mac can do), like Single Step mode, f2/f3-binding, screenshots, and adding flags (actually, I seem to be able to add a flag, but show_flags is not displaying flags so I can't confirm; all I know is that hitting Delete Flag after hitting Add Flag does not return an error about not being close enough to a flag). In some cases I have marked these things as working just because I'm told they are supposed to work in Windows. --[[User:Iritscen|Iritscen]] ([[User talk:Iritscen|talk]]) 01:04, 7 May 2013 (CEST)
==thedayismine==
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 :) :| :(
: I seem to recall the f2/f3 binding works only when you are recording a movie. Those keys were used in the arena levels. I may have time tomorrow to give it a try on the Mac. [[User:EdT|EdT]] ([[User talk:EdT|talk]])
::Ah, that's it! I don't remember reading that anywhere... maybe I missed it. I see these actually work on Mac too, nice. --[[User:Iritscen|Iritscen]] ([[User talk:Iritscen|talk]]) 16:06, 7 May 2013 (CEST)
::: It is written in the arena_menu_bsl "F2 and F3 are only active when Oni is recording a movie" [[User:EdT|EdT]] ([[User talk:EdT|talk]])
::::geyser did in fact document this on the Binding page, I just didn't read carefully enough. --[[User:Iritscen|Iritscen]] ([[User talk:Iritscen|talk]]) 16:46, 7 May 2013 (CEST)


It just didn't work. No matter what one did. One has tried to call up the console through scripting, but without any success.
==Insert key on Macs==
''Putting this extension to the article here to allow responses to it, but also because it only interests Mac users who want to place flags in Dev Mode; a rather niche audience.''


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.
The Insert key never matters at all to a Mac user until one day it becomes the most important key on the keyboard. That is because Mac keyboards have for years lacked any key that says '''Insert''' or '''Ins'''. Well, modern apps tend to not use this key, so it only matters in certain situations. In Oni, the DevMode "addflag" key is '''Ctrl+Shift+Ins'''. Now, admittedly adding flags is not that useful when you can't save the flag location into the game data as Bungie once could. But I thought I would gather some information on how to reproduce the "Insert" key, and just leave it here for anyone who's interested, because it's a rather confusing subject. The following keys or combinations have been claimed by various parties, including Apple, to produce an Insert-key event on certain systems (or then again, it may all be an elaborate prank). And remember, you have to add '''Ctrl+Shift''' to Insert in order for it to become the "addflag" key Oni is looking for:
*Help (don't have a Help key? Me neither...)
*fn+Help
*Ctrl+fn+m (I think Ctrl may be unneeded on each of these combos, but just for thoroughness' sake...)
*Ctrl+fn+Home
*Ctrl+fn+Return
*Ctrl+fn+Enter
*Shift+Clear (to turn off numlock), then NumPad0
*fn+NumPad0
*Shift+Option+Command+NumPad0 (now surely you must be joking, right?)
Well, lots of options, that's, uh, nice, right? However, none of these seem to work on my Mac (mid-2011 iMac). It's difficult to even know what app to test these in, as I can't know if they are even coded to look for a key that isn't supposed to exist on Macs. But I'd love to hear feedback from other Mac users on what works for them. --[[User:Iritscen|Iritscen]] ([[User talk:Iritscen|talk]]) 04:38, 7 May 2013 (CEST)


(maybe add links to frustrated forum talk etc)
:I have a keyboard that has the Ins key which is the same as the Help key except I need to press the fn key along with the help key. However pressing the Ctrl+Shift+Ins or Ctrl+Shift+Ins+fn has no effect, no message in the console and no flags appear. [[User:EdT|EdT]] ([[User talk:EdT|talk]])
::I didn't remember to mention this above, but I assume you did "show_flags=1" first? It actually won't print a message to console whether it succeeds or fails, so you have to be able to see flags to know if it works. --[[User:Iritscen|Iritscen]] ([[User talk:Iritscen|talk]]) 16:06, 7 May 2013 (CEST)
:::Of course I used show_flags=1.  Also I did the same test as you did, insert flag then delete flag, however I got the message "not close enough to flag" so that shows a flag was not added.  [[User:EdT|EdT]] ([[User talk:EdT|talk]])
::::Okay, then Oni probably just doesn't recognize Insert on Macs (probably a side effect of how we have to simulate the Ins key event instead of pushing the actual key, but who knows). Since flags can't be written to disk anyway, this is a fairly useless feature. --[[User:Iritscen|Iritscen]] ([[User talk:Iritscen|talk]]) 16:46, 7 May 2013 (CEST)


It looked like we were screwed.
==Playing dead and camera cycling==
I'm surprised to see that this works for EdT, since on my Mac, Ctrl+F7 has the same effect as F7 -- it cycles weapons. --[[User:Iritscen|Iritscen]] ([[User talk:Iritscen|talk]]) 16:46, 7 May 2013 (CEST)
: Playing dead has worked on the Mac since the PPC version was patched to enable Dev Mode. Also Cycle active camera has worked since then too. [[User:EdT|EdT]] ([[User talk:EdT|talk]])
::Strange, I wonder what gives with my Mac, then, since it only seems to cycle weapons for me. Oh well, it's a more amusing feature than a useful one. I'll try the Active Camera tip you mentioned when I'm back on my Mac. --[[User:Iritscen|Iritscen]] ([[User talk:Iritscen|talk]]) 21:06, 7 May 2013 (CEST)
::Aha! I had hit the Cycle Active Camera button by accident a couple times while trying to plant flags and wondered why half the level had gone invisible :-) Mystery solved. I guess what happens is that the occlusion solution of the normal camera is preserved and not updated when you switch to the secondary camera, so you are able to see what polys were being drawn while the player's view was oriented a certain way. Neat. --[[User:Iritscen|Iritscen]] ([[User talk:Iritscen|talk]]) 01:29, 8 May 2013 (CEST)


Until...
[[Category:Engine docs]]
 
==January 21, 2006==
http://geyser.oni2.net/Developer_Mode/Screenshot.jpg
 
[http://sfeli.oni2.net SFeli] came around. He rediscovered the Developer Mode, reenabled it, and there was much rejoicing.
 
Below is a slightly reformatted version of his [http://geyser.oni2.net/Developer_Mode/DevMode.txt "dev diary"]
;Enabling Developer Mode (console):22-01-2006
It is so simple, that I'm wondering why it wasn't done yet.
 
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).
 
{|border=1 cellspacing=0
|+The whole array
|
!colspan=4|ONI_CHEAT_ENTRY
|-
|
!lpszCheatName!!lpszDescOn!!lpszDescOff!!nFnIndex
|-
!shapeshifter
|szShapeShifter||szShapeShiftOn||szShapeShiftOff||0x00
|-
!liveforever
|szLive4Ever||szLive4EverOn||szLive4EverOff||0x01
|-
!touchofdeath
|szTouchOfDeath||szTODOn||szTODOff||0x02
|-
!canttouchthis
|szCantTouch||szCantTouchOn||szCantTouchOff||0x03
|-
!fatloot ''(1)''
|szFatLoot||szFatLootOn||0||0x04
|-
!glassworld
|szGlassWorld||szGlassWorldOn||szGlassWorldOff||0x05
|-
!winlevel ''(2)''
|szWinLevel||szWinLevelOn||0||0x06
|-
!loselevel ''(2)''
|szLoseLevel||szLoseLevelOff||0||0x07
|-
!bighead
|szBigHead||szBigHeadOn||szBigHeadOff||0x08
|-
!minime
|szMiniMe||szMiniMeOn||szMiniMeOff||0x09
|-
!superammo
|szSuperAmmo||szSuperAmmoOn||szSuperAmmoOff||0x0a
|-
!reservoirdogs
|szResDogs||szResDogsOn||szResDogsOff||0x0c
|-
!roughjustice
|szRoughJustice||szRJOn||szRJOff||0x0d
|-
!chenille
|szChenille||szChenilleOn||szChenilleOff||0x0e
|-
!behemoth
|szBehemoth||szBehemothOn||szBehemothOff||0x0f
|-
!elderrune
|szElderrune||szElderruneOn||szElderruneOff||0x10
|-
!moonshadow
|szMoonShadow||szMoonShadowOn||szMoonShadowOff||0x11
|-
!munitionfrenzy ''(2)''
|szMunitionFrenzy||szMunFrenOn||0||0x12
|-
!fistsoflegend
|szFistsOfLegend||szFistsOn||szFistsOff||0x13
|-
!killmequick
|szKillMeQuick||szKillMeQOn||szKillMeQOff||0x14
|-
!carousel
|szCarousel||szCarouselOn||szCarouselOff||0x15
|- 
!''(3)''
|0||0||0||0
|}
#you can't undo '''fatloot''', so no "disabled" message
#no undo for '''winlevel''', '''loselevel''' or '''munitionfrenzy''', either
#Null entry (see below)
Look  at the 'superammo' cheat,  then at the 'reservoirdogs' cheat.  Something strange? Their .nFnIndex'es are 0x0a and 0x0c.
 
Guess why?
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.
 
What  was  that  cheat?
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 ;-)).
 
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).
 
Here is complete list of bound actions:
*'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.
Press  'Tab'  to  cycle  through  all available commands / autocomplete command that you've started to type in.
 
==Developer Mode==
Yeah, Developer Mode... it's ''there'' after all.
That's when we all say W.O.W. and hurry to our PCs.
 
Yeah, it's a sorry thing for Mac users, but Dev Mode was completely [[PC vs Mac|cut from the Mac build]].
===Enabling the cheat===
Get the patched executable here (English version, patched with Ian's patch, then patched by [[User:Geyser|myself]] according to SFeli's instructions) :
*[http://geyser.oni2.net/proggies/OniDev.zip OniDev.zip]
(I've packed the cheat-code strings together, so that they don't take any extra space)
 
(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 also follow [http://geyser.oni2.net/Developer_Mode/DevMode.txt SFeli's instructions] and patch it yourself...
 
===Binding extra functions===
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.
 
A few of them don't work out as nicely as expected. We'll tell you more about them in the near future.
===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...

Latest revision as of 01:01, 4 May 2022

More testing needed

At some point, someone should review what hotkeys definitely work on the Windows side, because this questionable PC I'm testing on does not seem to do some of the things Windows is supposed to do (and in some cases things the Mac can do), like Single Step mode, f2/f3-binding, screenshots, and adding flags (actually, I seem to be able to add a flag, but show_flags is not displaying flags so I can't confirm; all I know is that hitting Delete Flag after hitting Add Flag does not return an error about not being close enough to a flag). In some cases I have marked these things as working just because I'm told they are supposed to work in Windows. --Iritscen (talk) 01:04, 7 May 2013 (CEST)

I seem to recall the f2/f3 binding works only when you are recording a movie. Those keys were used in the arena levels. I may have time tomorrow to give it a try on the Mac. EdT (talk)
Ah, that's it! I don't remember reading that anywhere... maybe I missed it. I see these actually work on Mac too, nice. --Iritscen (talk) 16:06, 7 May 2013 (CEST)
It is written in the arena_menu_bsl "F2 and F3 are only active when Oni is recording a movie" EdT (talk)
geyser did in fact document this on the Binding page, I just didn't read carefully enough. --Iritscen (talk) 16:46, 7 May 2013 (CEST)

Insert key on Macs

Putting this extension to the article here to allow responses to it, but also because it only interests Mac users who want to place flags in Dev Mode; a rather niche audience.

The Insert key never matters at all to a Mac user until one day it becomes the most important key on the keyboard. That is because Mac keyboards have for years lacked any key that says Insert or Ins. Well, modern apps tend to not use this key, so it only matters in certain situations. In Oni, the DevMode "addflag" key is Ctrl+Shift+Ins. Now, admittedly adding flags is not that useful when you can't save the flag location into the game data as Bungie once could. But I thought I would gather some information on how to reproduce the "Insert" key, and just leave it here for anyone who's interested, because it's a rather confusing subject. The following keys or combinations have been claimed by various parties, including Apple, to produce an Insert-key event on certain systems (or then again, it may all be an elaborate prank). And remember, you have to add Ctrl+Shift to Insert in order for it to become the "addflag" key Oni is looking for:

  • Help (don't have a Help key? Me neither...)
  • fn+Help
  • Ctrl+fn+m (I think Ctrl may be unneeded on each of these combos, but just for thoroughness' sake...)
  • Ctrl+fn+Home
  • Ctrl+fn+Return
  • Ctrl+fn+Enter
  • Shift+Clear (to turn off numlock), then NumPad0
  • fn+NumPad0
  • Shift+Option+Command+NumPad0 (now surely you must be joking, right?)

Well, lots of options, that's, uh, nice, right? However, none of these seem to work on my Mac (mid-2011 iMac). It's difficult to even know what app to test these in, as I can't know if they are even coded to look for a key that isn't supposed to exist on Macs. But I'd love to hear feedback from other Mac users on what works for them. --Iritscen (talk) 04:38, 7 May 2013 (CEST)

I have a keyboard that has the Ins key which is the same as the Help key except I need to press the fn key along with the help key. However pressing the Ctrl+Shift+Ins or Ctrl+Shift+Ins+fn has no effect, no message in the console and no flags appear. EdT (talk)
I didn't remember to mention this above, but I assume you did "show_flags=1" first? It actually won't print a message to console whether it succeeds or fails, so you have to be able to see flags to know if it works. --Iritscen (talk) 16:06, 7 May 2013 (CEST)
Of course I used show_flags=1. Also I did the same test as you did, insert flag then delete flag, however I got the message "not close enough to flag" so that shows a flag was not added. EdT (talk)
Okay, then Oni probably just doesn't recognize Insert on Macs (probably a side effect of how we have to simulate the Ins key event instead of pushing the actual key, but who knows). Since flags can't be written to disk anyway, this is a fairly useless feature. --Iritscen (talk) 16:46, 7 May 2013 (CEST)

Playing dead and camera cycling

I'm surprised to see that this works for EdT, since on my Mac, Ctrl+F7 has the same effect as F7 -- it cycles weapons. --Iritscen (talk) 16:46, 7 May 2013 (CEST)

Playing dead has worked on the Mac since the PPC version was patched to enable Dev Mode. Also Cycle active camera has worked since then too. EdT (talk)
Strange, I wonder what gives with my Mac, then, since it only seems to cycle weapons for me. Oh well, it's a more amusing feature than a useful one. I'll try the Active Camera tip you mentioned when I'm back on my Mac. --Iritscen (talk) 21:06, 7 May 2013 (CEST)
Aha! I had hit the Cycle Active Camera button by accident a couple times while trying to plant flags and wondered why half the level had gone invisible :-) Mystery solved. I guess what happens is that the occlusion solution of the normal camera is preserved and not updated when you switch to the secondary camera, so you are able to see what polys were being drawn while the player's view was oriented a certain way. Neat. --Iritscen (talk) 01:29, 8 May 2013 (CEST)