If you appreciate the work done within the wiki, please consider supporting The Cutting Room Floor on Patreon. Thanks for all your support!

Ratatouille (GameCube, Wii, PlayStation 2, Xbox, Windows)/Debugging Features

From The Cutting Room Floor
Jump to navigation Jump to search

This is a sub-page of Ratatouille (GameCube, Wii, PlayStation 2, Xbox, Windows).

This game has debugging features typical for Asobo Studio's Zouna engine games (popup menu, console window and debug commands), and on top of that, it also introduces the Debug Tools - a series of cheat codes that either activate commands or exclusive debug features.

Engine Debugging Features

Popup Menu

Ratatouille PC PopupMenu.png

The Popup Menu is a debug menu. To access it in the Windows version, hex edit 0x0026631E from 53 to 00 (overlay.exe, US version) and right click anywhere on the screen to open it up. In the console versions, it's instead activated by running an EnablePopupMenu command (by TSC editing, using the console window or PS2User.tsc) and holding the top face button. Various debugging features include the Debug Cam (the free movement mode) and options to force off the real-time cinematics and such.

It has to be noted that the Windows version "overwrites" the console versions' Popup Menu behavior with the right-click version. If you wish to restore the console behavior, then at 0x0026A05A and 0x0026ABF8 replace the instances of F8 0F 73 with 20 EA 72. Do not forget to run the EnablePopupMenu command. The keyboard controls for this menu are: hold Esc to use the menu, and press the arrow keys to move around, forward or back and select or deselect options.

(Source: SabeMP)

Console Window

Selecting Show Console in the Popup Menu normally does nothing. The Console window does exist in the Windows version of the game with partial functionality: you can enter commands and view the output log (similar to the Ingame Console), which can be filtered with that "B" button. The Console window can be reactivated with this Frida .js script:

const CONSOLE_FLAG = 0x40;
const FLAG_MEMBER_OFFSET = 0x00006C6C;
const WINDOW_HANDLE_MEMBER_OFFSET = 0x00006C8C;
const SET_FLAG_ADDRESS = new NativePointer("0x0066A2E0");
const CLEAR_FLAG_ADDRESS = new NativePointer("0x005FBF30");
const POPUP_MENU_PATCH = new NativePointer("0x0066631E");

const SHOW_WINDOW_FUNCTION = new NativeFunction(Module.findExportByName("User32.dll", "ShowWindow"), "bool", ["uint32", "uint32"], "stdcall");

const module = Process.enumerateModules()[0];
Memory.protect(module.base, module.size, "rwx");

Interceptor.replace(SET_FLAG_ADDRESS, new NativeCallback(function (winconsole, flag) {
    var flag_member = winconsole.add(FLAG_MEMBER_OFFSET).readU32();
    flag_member |= flag;
    winconsole.add(FLAG_MEMBER_OFFSET).writeU32(flag_member);
    if ((flag & CONSOLE_FLAG) != 0) {
        var window_handle_member = winconsole.add(WINDOW_HANDLE_MEMBER_OFFSET).readU32();
        SHOW_WINDOW_FUNCTION(window_handle_member, 1);
    }
}, "void", ["pointer", "uint32"], "thiscall"));

Interceptor.replace(CLEAR_FLAG_ADDRESS, new NativeCallback(function (winconsole, flag) {
    var flag_member = winconsole.add(FLAG_MEMBER_OFFSET).readU32();
    flag_member &= ~flag;
    winconsole.add(FLAG_MEMBER_OFFSET).writeU32(flag_member);
    if ((flag & CONSOLE_FLAG) != 0) {
        var window_handle_member = winconsole.add(WINDOW_HANDLE_MEMBER_OFFSET).readU32();
        SHOW_WINDOW_FUNCTION(window_handle_member, 0);
    }
}, "void", ["pointer", "uint32"], "thiscall"));

POPUP_MENU_PATCH.writeU8(0x00);
(Source: widberg, SabeMP)

Debug Commands

Hmmm...
To do:
Check the ScreenShot command in this game.

The game's scripting system includes various debug commands. Simply add one on a new line to any .TSC text file (such as User.tsc, which is the one that gets loaded on startup and has instructions to load other stuff) or enter one into the debug console.

  • MakeAVI and CloseAVI are leftovers from a video recording feature, which would pop up the Windows video compression dialogue and then start recording a video into "C:\Temp\zob.avi". In this game it does not work.
  • SwitchCameraUser 0 activates the Debug Cam, an option that's also available in the Popup Menu.
  • PosPersoDebug activates a coordinate display in the top-left.
  • DisplayFPS activates the performance display at the bottom.
  • EnablePopupMenu activates the Popup Menu, which is a debug menu, in the console versions.
  • EnableL2R2 activates an interesting feature: when both Shift keys and both Ctrl keys (or all shoulder buttons on console) are simultaneously pressed, the game runs the script PS2User.tsc, which is normally not part of the retail game, but can be created and filled with any commands.
  • PersoSPEED activates a more fancy coordinate display at the top.
  • EnableDebugTools and DisableDebugTools toggle the state of the Debug Tools (see the respective section).
  • DisableIngameConsole, contrary to its name, enables the in-game console, which is a display in the top-left side of the screen displaying commands that have been recently run, and other data.

Debug Tools

Ratatouille gc unused41.png

The Debug Tools are a set of debugging cheats that can be entered with the directions, allowing you to either run certain TSC commands or exclusive debug features. They can be activated after issuing an EnableDebugTools command. A list of them follows.

Main Menu

  • Left, Left, Right - open level select
  • Left, Up, Right, Down - run the SetAutoCompletion command (speeds up the game and skips through the missions one after another)
  • Down, Right, Up, Left - run the DisplayFPS command (performance display)

Extras

  • Up, Down, Left, Right - unlock all in section
Ratatouille gc unused43.png

Pause Menu

  • Left, Left, Right - open level select
  • Left, Up, Right, Down - open the "flags menu" (see the respective section below)
  • Right, Right, Left - run the WinCurrentMission command (self-explanatory)
  • Up, Up, Down - run the PersoSPEED command (coordinate and speed display)
  • Right, Right, Right, Right - open level select (again...)
(Source: widberg)

Internal Progress Flags List

Ratatouille gc unused42.png

By opening this menu, one can access all of the save flags that the game uses to record the player's progress throughout the game, and subsequently set or activate them at will (though this usually has disastrous side effects on a given save file, including setting the player back to the very start of the game, so edit at your own risk). When a flag is red, it is inactive, and the world will reflect this status. When a flag is set, it turns green, meaning the effects of the flag are currently present in the world to be interacted with, such as NPCs or objects. When a flag is yellow, it has been fully cleared and logged into the player's game progress, usually including a cutscene or mission complete dialogue. Once a flag has been set, it cannot be deactivated, so care must be taken while handling them.

Below is a full list of each flag and what it triggers within the game.

MB Flag IDs Context
M MB TUTORIAL1 Activates "How to Walk" in Somewhere in France.
M MB TUTORIAL2 Activates "How to Jump" and clears "How to Walk".
M MB TUTORIAL3 Activates "How to Climb Walls" and clears "How to Jump".
M MB TUTORIAL4 Activates "How to Carry Objects" and clears "How to Climb Walls".
M MB TUTORIAL5 Activates "How to Swing on Poles" and clears "How to Carry Objects".
M MB TUTORIAL6 Activates "Finding Apples in the Dark" and clears "How to Swing on Poles".
M MB TUTORIAL7 Activates "How to Rat on Ball" and clears "Finding Apples in the Dark".
M MB TUTORIAL8 Activates "How to Tightrope" and clears "How to Rat on Ball".
M MB TUTORIAL9 Activates "How to Beam Run" and clears "How to Tightrope".
M MB TUTORIAL10 Activates "How to Point Jump" and clears "How to Beam Run".
M MB TUTORIAL11 Activates "Hidden and Dangerous" and clears "How to Point Jump".
M MB TUTORIAL12 Activates "How to Spoon Swing" and clears "Hidden and Dangerous".
M MB TUTORIAL13 Activates "How to Raft" and clears "How to Spoon Swing".
M MB SWITCH1 Clears all missions in the world and activates the warp to Destiny River.
MB_RIVER Flag IDs Context
M MB_RIVER RAFT1 Activates Destiny River. Once cleared, it sets "M SW COLONY1" and "M SW COLLECT1", as well as opening up Paris Streets.
SW Flag IDs Context
M SW SWITCH1 Enables the cutscene where Remy reunites with Django and Emile. Sets "M SW SWITCH10", "M CT SWITCH17", "M CT COLLECT1", "M CT COLONY1", "M CT CONTAINER2", "M CT SWITCH4", "M CT SWITCH2", "M CT SWITCH5", "M CT SWITCH6", "M CT SWITCH7", "M CT SWITCH8", "M CT DREAM1", "M CT DREAM2", "M CT DREAM3", "M Dream01 COLLECT1", "M Dream02 COLLECT1", and "M Dream03 COLLECT1".
M SW SWITCH2 Adds the darts to the colony dartboard. Once the player returns to the hub, the "all darts collected" cutscene plays and the flag is cleared.
M SW SWITCH3 Turns on the bubble machine and blows bubbles throughout the colony. Clears the flag and plays the cutscene upon returning to the hub.
M SW SWITCH4 Makes the colony radio play music. Rewards the player with the mission complete cutscene and clears the flag upon the player's next arrival.
M SW SWITCH5 Turns on the giant CRT television for the colony to watch. Just as usual, it clears the flag and plays the appropriate cutscene.
M SW SWITCH6 Toggles the glowing garlands of lights in the colony. Plays the corresponding cutscene and clears the flag once the player returns to the hub.
M SW SWITCH7 The sewer grate blocking the fan vent by Gusteau's that leads to The Desserted Kitchen gets removed by this flag, and Django appears outside the opening to give Remy a briefing about the mission ahead.
M SW SWITCH8 Unlocks the giant door that leads out into the colony hub, places Django by the entrance to Little Chef - Big Kitchen for the world briefing, and removes the sewer grate blocking the entrance.
M SW SWITCH9 Django appears outside of The City Market, and the grate blocking the way gets taken down.
M SW SWITCH10 Activates the world briefing for The City of Lights and moves the boxes that block the passage in the wall to the floor above so they block the entrance to Paris Streets.
M SW SWITCH11 Plays the Gusteau fly-over cutscene the next time the player enters the hub. Also removes the sewer grate blocking the way back to the hub's starting area where Paris Streets is found (though now blocked off itself by this point).
M SW SWITCH12 Once "M SW SWITCH" flags 2-6 have been cleared, this flag is set. It plays a cutscene showing how Remy's resourceful efforts have improved the colony for the better.
M SW COLONY1 Activates the lightbulb quest. Sets "M SW SWITCH6".
M SW RAFT1 Enables the loading zone for Oh Smelly Water.
M SW COLLECT1 Home Stink Home's 100 gold stars mission.
CT_MUR Flag IDs Context
M CT_MUR COOKINGSOUPYESNO1

Soupy Assistance{SOUPY ASSISTANCE

Unlocks Soupy Assistance at the top of Paris Streets. Sets "M PIPE_KN GLISSADE1" and "M PIPE_KN COLLECT1".
CT Flag IDs Context
M CT SWITCH17 Enables the introductory cutscene for The City of Lights.
M CT COLLECT1 The city's 100 gold stars mission.
M CT COLONY1 The colony darts quest. Sets "M SW SWITCH2".
M CT CONTAINER2

Pre-heist1{PRE-HEIST 1

Toggles whether or not Twitch is present to start "How Now Bowwow".
M CT SWITCH4 Determines the state of the trash can that holds the dog bone.
M CT SWITCH2 Controls the presence of the guard dog in front of the courtyard. If the flag is activated, the dog vanishes and Git appears. Sets "M CT CONTAINER1".
M CT SWITCH1

Pre-heist3{PRE-HEIST 3

Activates "Magpie Madness" and causes Celine to appear. Sets "M CT HEIST1".
M CT CONTAINER1

Pre-heist2{PRE-HEIST 2

The "Doggy Distraction" mission with Git. Sets "M CT SWITCH1".
M CT SWITCH5 Determines whether or not the player has knocked down the spool of thread by the courtyard archway.
M CT SWITCH6 Checks the status of the spool of thread on Gusteau's rooftop.
M CT SWITCH7 Controls the giant ladder on the rooftops behind Gusteau's.
M CT SWITCH8 Checks for the final spool of thread by the rooftop patio.
M CT DREAM1

That's a Loot of Fruit{THAT'S A LOOT OF FRUIT

As the name implies. If this is set, That's a loot of Fruit is open for business.
M CT DREAM2

This is a Steakout!{THIS IS A STEAKOUT

Toggles the availability of This is a Steakout!
M CT DREAM3

Say Cheese!{SAY CHEESE

Take a wild guess.
M CT HEIST1 Once set, The Bucket O' Slop becomes available to tackle. Upon completion, it sets "M CT CHASE1".
M CT GLISSADE1

Leaky Pipes{LEAKY PIPES

This flag checks to see if the player has cleared Leaky Pipes yet or not. If they haven't, but the flag is set for the stage to be played, then the game will utilize an odd failsafe and lock the player out of The City of Lights and force them to beat Leaky Pipes before they can return. Sets "M SW SWITCH11".
M CT CHASE1 Gets set once the heist is cleared. It looks for completion of the How'd You Make That? chase, then sets the "M CT GLISSADE1" and "M PIPE_CT COLLECT1" flags once the criteria has been met. It also sets "M SW SWITCH8", as well as quite a few flags for Little Chef - Big Kitchen, being "M KD SWITCH1", "M KD DREAM04", "M KD COLONY1", "M KD COLLECT1", "M KD SWITCH11", "M KD SWITCH12", "M KD SWITCH13", "M KD SWITCH14", and "M Dream04 COLLECT1".
KD Flag IDs Context
M KD SWITCH1

Pre-heist1{PRE-HEIST 1

Activates "Gaseous Distractions" with Twitch by the kitchen office. Sets "M KD LINGUINIMAKING1" and " M KD SWITCH2".
M KD LINGUINIMAKING1 Checks the clear status of the first set of Linguini cooking minigames.
M MD SWITCH2

Pre-heist2{PRE-HEIST 2

Enables "Heave-n-Ho" to be played, and makes Git appear near the closet door to start the mission. Sets "M KD LINGUINIMAKING2" and "M KD SWITCH3".
M KD LINGUINIMAKING2 Checks the clear status of the second set of Linguini cooking minigames.
M KD SWITCH3

Pre-heist3{PRE-HEIST 3

Activates Serge and "The Key to my Success" on the rack near the storage cooler. Sets "M KD LINGUINIMAKING3" and "M KD HEIST1".
M KD LINGUINIMAKING3 Checks the clear status of the third set of Linguini cooking minigames.
M KD DREAM4

Dirty Dish Fright{DIRTY DISH FRIGHT

Opens the Dirty Dish Fright dream world for play.
M KD HEIST1 Sets up the kitchen's heist, and places Emile by the courtyard doors. Sets the "M KD CHASE1" flag.
M KD COLONY1 Starts the soap bottle quest. Sets "M SW SWITCH3".
M KD COLLECT1 Little Chef - Big Kitchen's 100 gold stars collectathon mission.
M KD CHASE1 Places the player into "Chop Chop Chase". Upon completion, sets "M SW SWITCH9", "M KD GLISSADE1", "M PIPE_SW COLLECT1" and many flags from The City Market, including "M MK COLLECT1", "M MK COLONY1", "M MK CONTAINER3", "M MK SWITCH9", "M MK SWITCH5", "M MK SWITCH1", "M MK SWITCH6", "M MK SWITCH7", "M MK SWITCH8", "M MK SWITCH10", "M MK SWITCH11", "M MK SWITCH12", "M MK SWITCH13", "M MK DREAM5", "M MK DREAM6", "M MK DREAM7", "M Dream05 COLLECT1", "M Dream06 COLLECT1", and "M Dream07 COLLECT1". Oddly though, it also sets a flag for a dream from The Desserted Kitchen, being "M Dream08 COLLECT1".
M KD GLISSADE1

Underground Fun{UNDERGROUND FUN

Checks to see if the player has cleared Underground Fun. If so, the main world is unlocked for exploration again.
M KD SWITCH11 Toggles the spool of thread atop the kitchen office.
M KD SWITCH12 Controls the spool of thread on the stovetop next to where Lalo is cutting veggies.
M KD SWITCH13 Activates the spool of thread by the soup canopy.
M KD SWITCH14 Determines whether or not the storage cooler key has been knocked down yet.
MK Flag IDs Context
M MK COLLECT1 Enables The City Market's 100 gold stars.
M MK COLONY1 Starts the batteries quest. Sets "M SW SWITCH4".
M MK CONTAINER3

Pre-heist1{PRE-HEIST 1

Adds Twitch next to the forklift and enables "Fuse Quest". Sets "M MK CONTAINER1".
M MK SWITCH9 Determines whether or not the latched door under the conveyer belt is open.
M MK SWITCH5 Currently unknown. Doesn't appear to have any noticeable effects in the world. Gets cleared along with "M MK CONTAINER3" once "Fuse Quest" is completed.
M MK MK GLISSADE1

The Slide of Your Life{THE SLIDE OF YOUR LIFE

Checks the clear status of The Slide of Your Life. If it has been cleared, access to the main world is regranted.
M MK CONTAINER1

Pre-heist{PRE-HEIST 2

Enables "French Food" and Git appears accordingly. Sets "M MK CONTAINER2".
M MK SWITCH1 Toggles the hanging/fallen state of the prize meat. Sets "M MK SWITCH2".
M MK SWITCH2 Keeps track of the resting/knocked over state of the prize muffin. Sets "M MK SWITCH3".
M MK SWITCH3 Checks the resting/fallen state of the prize fish.
M MK CONTAINER2

Pre-heist3{PRE-HEIST 3

Activates "Basket Breakout", and Celine shows up waiting nearby Mabel. Sets "M MK HEIST1".
M MK SWITCH6 Checks to see if the prize meat is in Mabel's bag. Sets both "M MK SWITCH7" and "M MK SWITCH8".
M MK SWITCH7 Controls the status of the prize muffin relating to Mabel's bag.
M MK SWITCH8 Toggles the state related to Mabel's bag for the prize fish.
M MK SWITCH10 Controls the spool of thread in the seafood section.
M MK SWITCH11 Checks the status of the spool of thread on the high shelves behind the bread stands.
M MK SWITCH12 Controls the spool of thread behind the meat stand.
M MK SWITCH13 Toggles the spool of thread behind the giant muffin.
M MK HEIST1 Opens the world's heist and adds Emile. Sets "M MK CHASE1".
M MK DREAM5

Pasta Persuasion{PASTA PERSUASION

Unlocks Pasta Persuasion for play.
M MK DREAM6

Desserted Wonderland{DESSERTED WONDERLAND

Opens access to Desserted Wonderland.
M MK DREAM7

Veggie Vault{VEGGIE VAULT

Enables the player to enter Veggie Vault.
M MK CHASE1 Checks to see if "Harried Grocery Havoc" needs to be cleared next. Sets "M SW SWITCH7", "M MK GLISSADE1", "M PIPE_MK COLLECT1", "M KN CONTAINER1", "M KN COLLECT1", "M KN COLONY1", "M KN KN DREAM8", "M KN SWITCH15", "M KN SWITCH16", "M KN SWITCH17", "M KN SWITCH18", "M KN SWITCH19", "M KN DREAM10", "M KN DREAM11", "M Dream10 COLLECT1", and "M Dream11 COLLECT1".
KN Flag IDs Context
M KN CONTAINER1

Pre-heist1{PRE-HEIST 1

Activates "Skinner to Storage" in The Desserted Kitchen, and also controls the open/closed state of the closet door. Sets "M KN CONTAINER2".
M KN CONTAINTER2

Pre-heist{PRE-HEIST 2

Enables "Rat Trap Whack!". Sets "M KN SWITCH9".
M KN SWITCH9

Pre-heist{PRE-HEIST 3

Activates "Who Took the Book?". Sets "M KN HEIST1" and clears "M KN SWITCH19".
M KN HEIST1 Places Emile and Colette by the cake table, ready to start the final heist. Sets "M KN CHASE1".
M KN COLLECT1 Starts The Desserted Kitchen's 100 gold stars mission.
M KN COLONY1 Begins the colony's fuse collection quest. Sets "M SW SWITCH5".
M KN DREAM8

Soaring Strawberries{SOARING STRAWBERRIES

Enables Soaring Strawberries to be played.
M KN SWITCH15 Triggers the spool of thread behind where Linguini sits by the soup canopy.
M KN SWITCH16 Controls the state of the spool of thread on top of the kitchen office.
M KN SWITCH17 Toggles the spool of thread atop the cart that Soaring Strawberries is resting on.
M KN SWITCH18 Switches the state of the spool of thread on the central stovetop.
M KN SWITCH19 Adds the wooden spoons around the map for Remy to utilize.
M KN DREAM10

Kitchen Chaos{KITCHEN CHAOS

Opens access to Kitchen Chaos.
M KN DREAM11

Sausage Shenanigan{SAUSAGE SHENANIGAN

Makes Sausage Shenanigan available to the player.
M KN CHASE1 The game's final mission, "Was the Food That Bad?". Unlike the other chase scenes, because this is the final mission, this flag sets nothing once cleared.
Multi01 Flag IDs Context
M Multi01 MULTI_RACE1

Home Stink Home{HOME STINK HOME

Activates Rat Race for multiplayer.
MultiKN Flag IDs Context
M MultiKN MULTI_COLLECT1

Little Chef - Big Kitchen{LITTLE CHEF - BIG KITCHEN

Enables Closet Collection in the multiplayer minigames. Amusingly, even though the internal flag lists Little Chef - Big Kitchen as the world associated with this minigame, the scenery more closely resembles The Desserted Kitchen instead.
MultiBAL Flag IDs Context
M MultiBAL MULTI_BALL1

Rat on balls{RAT ON BALL

Makes Last Rat Standing available for play in multiplayer. It seems "Rat on Ball" was an early name for this minigame.
MultiROP Flag IDs Context
M MultiROP MULTI_ROPE1

Last Rat Standing{LAST RAT STANDING

Activates Tightrope Chaos in the multiplayer menu. There seems to be a naming mishap here, as "Last Rat Standing" is the name for the ball rolling minigame, and not the tightrope minigame.
DREAM01 Flag IDs Context
M Dream01 COLLECT1 Activates That's a Loot of Fruit's 100 gold stars.
DREAM02 Flag IDs Context
M Dream02 COLLECT1 Activates This is a Steakout!'s 100 gold stars.
DREAM03 Flag IDs Context
M Dream03 COLLECT1 Activates Say Cheese!'s 100 gold stars.
DREAM04 Flag IDs Context
M Dream04 COLLECT1 Activates Dirty Dish Fright's 100 gold stars.
DREAM05 Flag IDs Context
M Dream05 COLLECT1 Activates Pasta Persuasion's 100 gold stars.
DREAM06 Flag IDs Context
M Dream06 COLLECT1 Activates Desserted Wonderland's 100 gold stars.
DREAM07 Flag IDs Context
M Dream07 COLLECT1 Activates Veggie Vault's 100 gold stars.
DREAM08 Flag IDs Context
M Dream08 COLLECT1 Activates Soaring Strawberries's 100 gold stars.
DREAM10 Flag IDs Context
M Dream10 COLLECT1 Activates Kitchen Chaos's 100 gold stars.
DREAM11 Flag IDs Context
M Dream11 COLLECT1 Activates Sausage Shenanigan's 100 gold stars.
PIPE_SW Flag IDs Context
M PIPE_SW COLLECT1

Underground Fun{UNDERGROUND FUN

Activates Underground Fun's 100 gold stars.
PIPE_CT Flag IDs Context
M PIPE_CT COLLECT1

Leaky Pipes{LEAKY PIPES

Activates Leaky Pipes's 100 gold stars.
PIPE_MK Flag IDs Context
M PIPE_MK COLLECT1

The Slide of Your Life{THE SLIDE OF YOUR LIFE

Activates The Slide of Your Life's 100 gold stars.
PIPE_KN Flag IDs Context
M PIPE_KN GLISSADE1

Kitchen Pipe{KITCHEN PIPE

Activates Kitchen Pipe. Sets "M SW SWITCH1", "M SW SWITCH10", "M SW RAFT1", and "M RAFT_SW COLLECT1".
M PIPE_KN COLLECT1 Activates Kitchen Pipe's 100 gold stars.
RAFT_SW Flag IDs Context
M RAFT_SW COLLECT1 Activates Oh Smelly Water's 100 gold stars.