Skip to content

Commit

Permalink
Add Dev Menu pages
Browse files Browse the repository at this point in the history
  • Loading branch information
MegAmi24 committed Sep 21, 2024
1 parent 0ec6d51 commit d3799eb
Show file tree
Hide file tree
Showing 9 changed files with 185 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/Guides/RSDKv3/Decompilation/ModSetup.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ mods/

## Using the Mod Loader

[Enable the Dev Menu](TODO), then while the decompilation is running, press ++escape++ to open the Dev Menu. You can also select it in the pause menu or the Help & Options menu.
[Enable the Dev Menu](/RSDKv3/Overview/DevMenu.md#rsdkv3-decompilation), then while the decompilation is running, press ++escape++ to open the Dev Menu. You can also select it in the pause menu or the Help & Options menu.

When the Dev Menu is open, choose `MODS` to open the Mod List.

Expand Down
2 changes: 1 addition & 1 deletion docs/Guides/RSDKv4/Decompilation/ModSetup.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ mods/

## Using the Mod Loader

[Enable the Dev Menu](TODO), then while the decompilation is running, press ++escape++ to open the Dev Menu. You can also select it in the pause menu or the Help & Options menu.
[Enable the Dev Menu](/RSDKv4/Overview/DevMenu.md#enabling), then while the decompilation is running, press ++escape++ to open the Dev Menu. You can also select it in the pause menu or the Help & Options menu.

When the Dev Menu is open, choose `MODS` to open the Mod List.

Expand Down
3 changes: 2 additions & 1 deletion docs/Guides/RSDKv5/Decompilation/ModSetup.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@ mods/
└── Mod Folder/
├── Data/
│ └── [data assets]
├── [logic file]
└── mod.ini
```

## Using the Mod Loader

[Enable the Dev Menu](TODO), then while the decompilation is running, press ++escape++ to open the Dev Menu. You can also click/touch the top left corner of the window/screen.
[Enable the Dev Menu](/RSDKv5/Overview/DevMenu.md#enabling), then while the decompilation is running, press ++escape++ to open the Dev Menu. You can also click/touch the top left corner of the window/screen.

When the Dev Menu is open, choose `Mods` to open the Manage Mods menu.

Expand Down
57 changes: 57 additions & 0 deletions docs/RSDKv3/Overview/DevMenu.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Dev Menu

![Dev Menu](/assets/images/SonicCD/DevMenu/MainMenu-Blit.png){ align=right , width="30%" }

The Dev Menu is a debug menu included with [RSDKv3](../README.md), disabled by default. The menu includes several features useful for debugging games in the engine.

## Enabling
=== "Blit"

The Dev Menu can be enabled by editing the game's `GameConfig.bin` file to set the default value of the `Options.DevMenuFlag` global variable to 1 (`true`).

=== "RSDKv3 Decompilation"

The Dev Menu can be enabled by setting `DevMenu` to `true` in the settings.ini file, like so:

<div class="annotate" markdown>

``` ini hl_lines="3"
[Dev]
; Enable this flag to activate dev menu via the ESC key
DevMenu=true (1)
; Enable this flag to activate features used for debugging the engine (may result in slightly slower game speed)
EngineDebugMode=false
; Enable this flag to force the engine to load from the scripts folder instead of from bytecode
TxtScripts=false
...
```

</div>

1. Make sure that the decomp is not running while editing settings.ini; otherwise, your changes will be reverted upon closing the decomp.

## Decomp Debug Controls

| Key | Command |
| ------------------------------------ | ----------------------------------------------------------------------------------------------------- |
| ++escape++ | Opens the Dev Menu. |
| ++backspace++ | While held down, speeds up the game to 8x speed. |
| ++f12++ / ++pause++ (++f7++ on Mac) | Toggles step-over mode. |
| ++f11++ / ++insert++ (++f6++ on Mac) | If in step-over mode, steps over to the next frame. |
| ++f1++ | Loads the first scene in the Presentation stage list. |
| ++f2++ | Loads the previous scene in the scene list. If pressed in the first scene, it will load the last one. |
| ++f3++ | Loads the next scene in the scene list. If pressed in the last scene, it will load the first one. |
| ++f5++ | Reloads the current scene. Holding ++control++ while pressing this will also reload all active mods. |
| ++f8++ | Toggles visualizing active touchscreen hitboxes. |
| ++f9++ | Toggles visualizing active hitboxes. |
| ++f10++ | Toggles displaying the currently loaded palettes. |

## Menu

You can open the Dev Menu in Sonic CD by selecting it the pause menu, as well as the Help & Options menu in the mobile version. In the [RSDKv3 Decompilation](../Decompilation.md), you can also open it at any time by pressing ++escape++.

TODO: explain each submenu

## Other Effects

When the Dev Menu is enabled, the global variable `Options.DevMenuFlag` is set to `true` upon loading the GameConfig, if such global variable exists.
52 changes: 52 additions & 0 deletions docs/RSDKv4/Overview/DevMenu.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Dev Menu

![Dev Menu](/assets/images/SonicMania/DevMenu/MainMenu.png){ align=right , width="50%" }

The Dev Menu is a debug menu included with [RSDKv4](../README.md), disabled by default. The menu includes several features useful for debugging games in the engine.
TODO: Get a proper screenshot, preferably from an official build if possible

## Enabling
The Dev Menu is normally inaccessible, however in the [RSDKv4 Decompilation](../Decompilation.md), it can be enabled by setting `DevMenu` to `true` in the settings.ini file, like so:

<div class="annotate" markdown>

``` ini hl_lines="3"
[Dev]
; Enable this flag to activate dev menu via the ESC key
DevMenu=true (1)
; Enable this flag to activate features used for debugging the engine (may result in slightly slower game speed)
EngineDebugMode=false
; Enable this flag to force the engine to load from the scripts folder instead of from bytecode
TxtScripts=false
...
```

</div>

1. Make sure that the decomp is not running while editing settings.ini; otherwise, your changes will be reverted upon closing the decomp.

## Decomp Debug Controls

| Key | Command |
| ------------------------------------ | ----------------------------------------------------------------------------------------------------- |
| ++escape++ | Opens the Dev Menu. |
| ++backspace++ | While held down, speeds up the game to 8x speed. |
| ++f12++ / ++pause++ (++f7++ on Mac) | Toggles step-over mode. |
| ++f11++ / ++insert++ (++f6++ on Mac) | If in step-over mode, steps over to the next frame. |
| ++f1++ | Loads the first scene in the Presentation stage list. |
| ++f2++ | Loads the previous scene in the scene list. If pressed in the first scene, it will load the last one. |
| ++f3++ | Loads the next scene in the scene list. If pressed in the last scene, it will load the first one. |
| ++f5++ | Reloads the current scene. Holding ++control++ while pressing this will also reload all active mods. |
| ++f8++ | Toggles visualizing active touchscreen hitboxes. |
| ++f9++ | Toggles visualizing active hitboxes. |
| ++f10++ | Toggles displaying the currently loaded palettes. |

## Menu

You can open the Dev Menu at any time in the [RSDKv4 Decompilation](../Decompilation.md) by pressing ++escape++ or by selecting it in the Help & Options or pause menus.

TODO: explain each submenu

## Other Effects

When the Dev Menu is enabled in the [RSDKv4 Decompilation](../Decompilation.md), the global variable `options.devMenuFlag` is set to `true` upon loading the GameConfig, if such global variable exists.
63 changes: 63 additions & 0 deletions docs/RSDKv5/Overview/DevMenu.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Dev Menu

![Dev Menu](/assets/images/SonicMania/DevMenu/MainMenu-Steam.png){ align=right , width="50%" }

The Dev Menu is a debug menu included with [RSDKv5](../README.md), disabled by default. The menu includes several features useful for debugging games in the engine. When the Dev Menu is enabled, other developer features are accessible as well.

## Enabling

The Dev Menu can be enabled by adding the line `devMenu=y` under the `Game` category of the engine's settings.ini file, like so:

<div class="annotate" markdown>

``` ini hl_lines="4"
; Retro Engine Config File

[Game]
devMenu=y (1)
language=0

...
```

</div>

1. The setting names in settings.ini are case-sensitive; the Dev Menu setting will not apply if the capitalization is incorrect.

Alternatively, running the game in [Data Folder Mode](TODO) will automatically enable the Dev Menu.

!!! note
The entirety of the Dev Menu is removed in [Sonic Origins](/Games/SonicOrigins/README.md); as such, it's not possible to enable it normally. However, you can use the [OriginsDevMode](https://gamebanana.com/mods/473043) mod to restore it. Read the mod's description for more information and known issues.

## Debug Controls

### General
| Key | Command |
| -------------------- | --------------------------------------------------- |
| ++escape++ | Opens/closes the Dev Menu. |
| ++backspace++ | While held down, speeds up the game to 8x speed. |
| ++f12++ / ++pause++ | Toggles step-over mode. |
| ++f11++ / ++insert++ | If in step-over mode, steps over to the next frame. |

### Decomp Only
| Key | Command |
| ------- | ----------------------------------------------------------------------------------------------------- |
| ++f1++ | Loads the previous scene in the scene list. If pressed in the first scene, it will load the last one. |
| ++f2++ | Loads the next scene in the scene list. If pressed in the last scene, it will load the first one. |
| ++f4++ | Toggles displaying object info for visible entities. Not available in v5U's Legacy Modes. |
| ++f5++ | Reloads the current scene. Holding ++control++ while pressing this will also reload all active mods. |
| ++f6++ | Decrements the screen count by 1. |
| ++f7++ | Increments the screen count by 1. |
| ++f8++ | Toggles visualizing update ranges for visible entities. Not available in v5U's Legacy Modes. |
| ++f9++ | Toggles visualizing active hitboxes. |
| ++f10++ | Toggles displaying the currently loaded palettes. |

## Menu

You can open the Dev Menu at any time in-game by pressing ++escape++. In the [RSDKv5(U) Decompilation](../Decompilation.md), you can also tap/click the top left corner of the screen.

TODO: explain each submenu

## Other Effects

When the Dev Menu is enabled, `SceneInfo->debugMode` is set to `true` upon engine initialization.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 9 additions & 3 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ nav:
- RSDKv3/README.md
- Decompilation: RSDKv3/Decompilation.md
- Documentation:
- Overview: RSDKv3/Overview/README.md
- Overview:
- RSDKv3/Overview/README.md
- Dev Menu: RSDKv3/Overview/DevMenu.md
- Subs: RSDKv3/Subs.md
- Functions:
- RSDKv3/Functions/README.md
Expand Down Expand Up @@ -234,7 +236,9 @@ nav:
- RSDKv4/README.md
- Decompilation: RSDKv4/Decompilation.md
- Documentation:
- Overview: RSDKv4/Overview/README.md
- Overview:
- RSDKv4/Overview/README.md
- Dev Menu: RSDKv4/Overview/DevMenu.md
- Events: RSDKv4/Events.md
- Functions:
- RSDKv4/Functions/README.md
Expand Down Expand Up @@ -394,7 +398,9 @@ nav:
- RSDKv5/README.md
- Decompilation: RSDKv5/Decompilation.md
- Documentation:
- Overview: RSDKv5/Overview/README.md
- Overview:
- RSDKv5/Overview/README.md
- Dev Menu: RSDKv5/Overview/DevMenu.md
- Events:
- RSDKv5/Events/README.md
- Update: RSDKv5/Events/Update.md
Expand Down

0 comments on commit d3799eb

Please sign in to comment.