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

A Hat in Time (Windows, Mac OS X)/Unused Object Code

From The Cutting Room Floor
Jump to navigation Jump to search

This is a sub-page of A Hat in Time (Windows, Mac OS X).

To do:
Get videos and/or pictures of more of these coding features in action.
Better explain some of these.
There's more bits of unused coding that need further investigation.

When the game first launched, there was quite a bit of leftover script code from earlier versions of the game for a variety of things. Scrapped mechanics, alternate ways of calculating values, play-testing and debug code, and more. Note that this page will only cover unused coding in the initial release of the game. Any unused coding added after release shall be covered in the Object Code Differences section of the Version Differences page. Also do note that some of this unused coding has been removed in updates for the game.


AHatIntime MinionAppearAnimation.gif
Level Objects
Where do you teleport if you don't have a destination set?
System Objects
The Sixteen Commandments (plus several others)

HUD Elements and Menus

Base HUD

In the base class file for all HUD elements and menus, the Sand 'n Sails red rim post process effect still exists and has a couple functions dedicated to activating and deactivating it.
There's also functions that support the unused Forest Fire Smoke Post Process effect, and although the coding for it still exists in the current final game, the post process effect itself was removed from the player's post process chain, making it worthless without a mod to add it back in.

DJ Endorsement HUD

There's a commented-out variable for a texture referred to by the class file as "DJGrooves". It's unknown what it was meant for, and doesn't show up anywhere else in the class file. It might've been intended for a 2D image of DJ Grooves to appear on the screen during the endorsement instead of actually appearing in the level next to Hat Kid, much like how the audience that appears is 2D.

High Score HUD

The HUD that appears when the player completes either of the Conductor's levels or DJ Grooves' levels has a fail-safe where if a string variable fails to return the proper names for the characters included in the level, it'll return "No one lol" as a default. This never happens in-game.

Diva HUD

The HUD that appears in Picture Perfect that shows the size of the player's fanclub has commented-out coding in the 'Render' function to draw "FANCLUB" onscreen. In the final game, this is its own unique texture instead.

Health HUD

Much like in the Beta builds, there are still leftovers from the Alpha Update 5 HUD defined in the class's default properties. These would later be removed in an update, however.
And again, like in the Beta builds, there's still leftover, unused coding to actually draw a generic number in the center of the HUD, which originates from a design of the health HUD from after the Alpha builds but before the Beta builds. This health HUD design can be seen in Habboi's developer footage of the Twilight Dungeon from Sand 'n Sails.

Island Telescope HUD

The HUD originally made for the telescopes in Sand 'n Sails before being repurposed for Alpine Skyline, the class file had a lot of commented-out leftovers from the Sand 'n Sails version at the game's release, and just about all of it would be removed later on in an update. The telescopes originally had far more functionality than they ended up having in the final game. Most of the unused coding directly references Sand 'n Sails mechanics, like informing the player of how many Water Flasks it would take to reach a Sand Island within the player's view, allowing the player to look closer at set locations, and opening the unused Sand Travel Map HUD. However, not all of the necessary coding appears to be present in the class file, hinting that some parts were deleted, as some functions try to reference variables that are not found anywhere in the class file.

There is no coding functionality for looking closer with the telescopes, but there is a button hint set to appear at the bottom right of the screen while using the telescope. The biggest function of the leftovers, called 'RenderScanning', would draw additional elements on the screen, like naming the Sand Islands the telescope could see and drawing reticules that would zero in on the location in-game that the Sand Island was at. If the player had already claimed that Sand Island's Time Piece, it would tell them how many Water Flasks it would take from their current Sand Island to get there, otherwise it would say "Time Piece Detected!". The reticules that would appear on-screen actually can't render in the final game due to a missing function that would draw them. This function could only be found in the Beta builds, and works just fine if implemented into the final game for this HUD element.

Loading Screen HUD

There's some commented-out coding in the 'OnOpenHUD' function that is leftover from the Beta's loading screen, even still referencing the planet texture that Hat Kid would stand on.

Main Menu HUD

There's an unused file card icon of Mustache Girl's face that was set up to be used as an icon on a save file, but it's impossible to have her show up on one in the final game. Jonas mentioned in early 2022 that it's a remnant from the Gamescom Demo, or the plans for it, at least, as the icon still doesn't show up in said demo. It's possible that a third level was planned for the demo, one that involved Mustache Girl or one that would use the icon.

Mail Delivery HUD

There's some unused debug code that's commented-out which would draw a cylinder around collision for the path a mail projectile would take when fired.

The Big Parade HUD

There's quite a bit of unused coding for a completely different design for measuring the player's progress of the parade, with it drawing a line along the bottom and using otherwise unused textures. All of this coding is fully functional and is not commented-out, meaning that it can be restored and used in a custom version of the HUD.

Spooky Mafia HUD

The little HUD that appears around the borders of the screen when you first begin scaring Goofy Mafia has commented-out coding to render a texture in some way. No texture for this is defined anywhere in the class file, however.

Swap Hat HUD

The HUD that appears when quickly swapping hats has unused coding for elements found in Badges, including rendering the flies around 'crappy' Badges. All the coding for this is commented-out, and is most likely a leftover from a point where Badges occupied this quick select screen, instead of Hats.

Confirmation Box HUD

If opened with the command "playtest_rate_level", it opens a menu that asks the player to rate the level. The player can choose "Very good!", "It was decent.", "Meh...", and "Not too good!". The menu doesn't appear to have any other functionality, and no information is sent to Gears For Breakfast.

AHatInTime PlayTestMenu.PNG

Loadout Menu HUD

There's several leftovers from elements of the Beta's loadout menu, including but not limited to the left and right arrows. All of it is, of course, completely commented-out.

Main Menu HUD

There's coding in the 'OnOpenHUD' function that checks if the build is a prerelease build, such as the Speedrun builds or the Gamescom build. Although these will never normally trigger in the final game for obvious reasons, the coding for these checks are fully intact, and will modify the main menu accordingly without issue.

Time Rift Roulette HUD

There is a commented-out piece of coding that would've drawn "AND RE-ROLL" instead of "RE-ROLL".

Chapter 2 Stand-off HUD

There's is commented-out coding in the 'RenderToHUD' function that would draw a blue rectangle behind everything else this HUD draws.

Abilities and Items

Fox Mask Post Process Settings

Originally, using the Fox Mask would impact the bloom post process effects around the player, but all settings for it were commented-out.

Hookshot Ziplining Camera

While using the Ziplines in Alpine Skyline, the camera would originally not move left and right as much as it does in the final. The coding for limiting the camera movement was commented-out.

Sprint Hat Vehicle Variable

The Sprint Hat Ability has an unused variable called 'VehicleClass', which may be a leftover from the scrapped Scooter Hat, as the scooter Hat Kid rides was originally a vehicle object rather than a status effect.

Hat_Collectable_BadgePart Preset Rotation Code

Originally, upon collecting certain kinds of items (in the final game's case, Yarn), the item would be set to a preset rotation. This may be leftover from when the class file was exclusively used for Badges, which are no longer collected out in the open like in the Beta and Alpha builds (with one exception in Subcon Forest).

High Score Tokens

There exists a commented-out section of code for the 2D tokens the player can collect in Chapter that indicates they were originally only intended for DJ Grooves, specifically in Picture Perfect, as it was set to always open the DJ Endorsement HUD that appears whenever you touch one in that Act. In the final game, High Score Tokens also appear in The Big Parade, Murder on the Owl Express, and later in Death Wish, in the 10 Seconds Until Self-Destruct contract. They also would've originally added 5 points to the 'fan club' meter in Picture Perfect, whereas in the final they add none.

Vault Codes

A commented-out function exists, called 'FirstTimeCollectible', which a comment above it explains that it would only make the "You got an item" cutscene play once upon collecting a Vault Code, even if the player then goes and collects one of a different color. In the final, each Vault Code color gets its own cutscene the first time the player collects one.

Enemies and Bosses


There's two unused functions in his boss script file, called 'ThrowOutFakeCherryBomb' and 'DestroyAllCherryBombs', which would've been used for his unused prank attack. Both functions are not commented-out, meaning that they would function just fine if they were actually called by anything.
The fake Snatcher that appears when you guess correct in the 'Dark Bite' attack was originally an illusion created by Snatcher Minions, disguised as Hat Kids, stacked on top of each other to form a pyramid. The Snatcher Boss still refers to the fake's location as such: "Vector PyramidLocation".
There's a tiny function that tells Snatcher to play an animation called "SmashTP", of which there is no such animation in any known build of the game. It's never called during the boss fight. In addition to the double minion cluster attack in the boss which he spins around, there's a singular version of the function that would've only created one cluster instead of two. Again, it's never called during the boss.
There's a commented-out call to spawn the Snatcher Minion Audience when he first grabs your hat just before the boss fight begins, indicating that the audience was meant to show up to watch the fight before the transition to the boss arena.

Toilet of Doom

The Toilet's Bot Controller has an unused stage called 'StageD', which is fully commented-out. It didn't seem to do much, other than make the Toilet get angry.

Mafia Boss

Much like the Toilet, Mafia Boss also has an unused stage. Although it's far less interesting. All it does is make him die. Woohoo.
Mafia Boss also has a dedicated function to make him use his unused electrified animation, called 'SetAnimation_Electrified'.

Conductor/DJ Grooves

There's an unused chunk of code in the 'SpawnHazardStageLightsRow' function, which uses an option boolean parameter called 'Cross' to spawn a second set of stage lights going from the front of the arena to the back, which is perpendicular to how the function normally spawns the stage lights. The coding is perfectly functional, but the function is never called with this boolean set to True.

Mustache Girl

Mustache Girl has an unused state called 'PhaseChange', which she would presumably use a few times as the fight progressed. The state is almost completely commented out. It would make her generate a radial distortion effect and look at the player for a few moments. The only part that isn't commented-out is coding to make her drop Health Pons.

Queen Vanessa

There's quite a huge chunk of commented-out movement coding leftover from earlier versions of her Bot Controller class.
There's a commented-out debug function called 'DrawDebug', which draws a cylinder wireframe around her.

Science Owls

The leftover enemies from the Beta builds still have all of their coding intact at this point, though it would all be removed in future updates for the game. The enemy was repurposed into the Express Owl in the final game, and still uses the same class files as the Science Owls did, but it never calls any of the Science Owls' functions.

Sleepy Raccoons

The way the raccoon enemies calculated their acceleration originally was using their ground speed. The original formula was: Normal((TargetLocation - Pawn.Location)*vect(1,1,0))*Pawn.GroundSpeed. The new formula is: ((TargetLocation - Pawn.Location)*vect(1,1,0))*0.5. This code can be found in the 'Idle' state's 'Tick' Event.

Enemy Base Class

Enemies in the game have a commented-out bit of code to allow for spawning the unused and scrapped EXP Bit item when defeated. If code was uncommented-out, the coding for it would work flawlessly.

Mafia Can Drop Ties

Mafia enemies still have all the necessary coding to have a chance to drop a Mafia Tie item upon defeat, but the coding is prevented from executing due to a const. All coding related to Mafia Ties would later be deleted in a game update.

Security Guard Base Class Music Variable

All Security Guard enemies in the final game have an unused variable for a sound or music track that would play when they catch you. The track intended for this is still in the Modding Tools, unused.

Shocking Squid Electric Particle

The Shocking Squid enemies have a variable for a particle system that was made for them, a bright yellow electricity flash, and is used when the squid uses its electric wave attack. However, it is commented-out in the default properties. There's also coding to make the squid damage the player on contact when using its electricity attack, but the coding for it is, you guessed it, commented-out.

Eye Blockades

The Eye Blockades have a Sketchbook component, which would've allowed for them to appear on the scrapped Subcon Forest map system.

Goodie Chasers

Essentially the Mafia that the player defeats at the start of the game just after taking his umbrella, and Goofy Mafia in She Came From Outer Space. This class was originally the scrapped Mafia Robo enemy that could be found in the Beta builds. There are numerous variables and behaviors for it that are still leftover in the final, like the ambient propeller sound and the behavior where it flies off into the sky if not defeated before it reaches the end of its assigned Route.

Goofy Mafia's Oldster Leftovers

Specifically the version you scare in She Came From Outer Space. Originally, a scrapped character called Oldster would've been the victim in this Act, and Goofy Mafia's version of the class file has a hefty amount of leftovers from when it was Oldster in charge. First off, the player is usually covered in mud during the level and when scaring Goofy Mafia, however, if the player uses the Ice Hat after they begin the scare sequence, the mud will be removed from the player. Why is this important? Well, there's unused coding to darken Hat Kid for a few moments every time she spooks Goofy Mafia, something the player wouldn't normally see due to the muddy shader overwriting the effect for each spook. There is unused coding to have this happen to Goofy Mafia as well. Goofy Mafia also has an unused heart model that is never shown in-game. This is likely a leftover from Oldster, although it should be noted that the heart model has been aligned to work for Goofy Mafia, and that if the model for the mafia is replaced with Oldster's for this class, the heart does not line up with his model. The heart would've appeared each time you scared him, and there actually is coding for this, but only for hiding the heart after you scare him. The coding for making the heart visible has presumably been wiped. Lastly, there's unused float variables and a sound variable for a heartbeat sound. The floats would keep track of 'heartattack' progress, and although these variables are used in some calculations in a couple functions, their results are never used for anything. The heartbeat sound also is never set to play at any point.

Charging Mafia

The Mafia that jump on stage in the Mafia Boss fight originally allowed you to jump on their heads harmlessly, but was changed so that touching them at all results in damage.