top of page

LCCrashBandicootCratesMod

"Add 27 different crates from Crash Bandicoot as spawnable scrap!"

This mod started off with just one crate, before realizing that I could reuse the system to create many crates, as well as have those crates spawn items with unique functionality.

​​

So, it was a great exercise for designing a pipeline, as well as designing new features.

IconSketch1.jpg
LCCrashBandicootCratesMod: With the goal of adding many crates came the requirement of making this easy to do, with the added bonus of still custom-coding unique items

Reusable System:
At the start of development, I created one crate, the TNT Crate, to try to figure out every interaction it needed to do:

​

First, act like any other item in the game, but also have collision, react to being bounced off or attacked, and spawn an explosion upon breaking.

Code of the abstract CrateGrabbableObject class bouncing players off, playing particles and sound effects, spawning contents, and invoking events

I coded all this in a test script and compiled it into one prefab with this script component, the vanilla item scripts, BoxColliders for collision, and for triggers to check if the player is on top of the crate, to bounce them off.

Prefab of the TNT Crate, with all its visuals, audio, colliders, and MonoBehaviours

With this crate doing everything I needed, I realized these interactions wouldn't be any different for other crates, just like the original Crash Bandicoot.

 

So, I repurposed the script to take out the TNT-specific parts, and rewrote the spawning of explosions to allow spawning of items and other prefabs with their own special script that could spawn enemies, non-item power-ups, or special effects such as pausing time.

Code of the Wumpa Fruit, using an InventoryMergeable interface to check if it can merge with other items in the player's inventory, and what to do if it can

New items:
These special prefabs allowed me to let loose: the crates would work the same, but these prefabs would all be wildly different.

 

For example, most crates spawn Crash Bandicoot's Wumpa Fruit. Crates can spawn many of them at once, so to allow players to take them along, Wumpa stack in the player's inventory.

 

Another crate, the Aku Aku Crate would spawn Crash Bandicoot's Aku Aku, to protect against one hit from enemies, and levels up per Aku the player finds.

 

And finally, the 1-Up Crate, spawns extra lives. However, since Lethal Company doesn't have lives, I coded it to negate one death penalty per 1-Up. With all these features I tried to stay true to the original while fitting the game.

Video demo of Aku Aku in this game, protecting you and leveling up

On top of that, I set myself the goal to communicate each crate’s function as clearly as possible, by recycling the game’s HUD tooltips to show a crate’s feature in an extremely concise format.

​

This was aimed at testing if confusion about new items could be prevented, one very common point of feedback with LCGoldScrapMod. But sadly, this didn't seem to work, as nobody looks to the top-right for descriptions of features in Lethal Company.

Tooltips in the topright of the screen, explaining what currently held crates do, to try to prevent players not understanding if a crate is good or bad, like with LCGoldScrapMod
CrashCrates tooltips 1.png
CrashCrates tooltips 2.png
CrashCrates tooltips 3.png

Highlights:

I also added two major items, the first being the Fruit Bazooka. This weapon would fire the Wumpa players collect, to damage enemies from a safe distance.

 

Additionally, I made it so it splatters onto surfaces it hits, and added support to fire different projectiles, such as Crash Team Racing's Bowling Bomb.

Video of the Fruit Bazooka, attacking and splattering onto enemies
Video of the Kart, driving players and items around and hitting enemies

And finally, the best item I made was the Kart. This was actually just a go-kart, just like in Crash Team Racing.

 

I made this kart in only 3 days, but managed to get it fully functioning by knowing where to look to do research on vehicles and WheelColliders, uses for debug tools, and rapidly testing iterations made.

 

And it was worth it, because this kart is a great fun tool used to run away from enemies, run over enemies, carry items, carry players, or, of course, run over players.

Video of my friends' first interaction with the kart, quickly understanding how to drive it around, including indoors

Cross-Mod Compatibility:
In a beta version of this mod, I implemented compatibility with LCGoldScrapMod by making this mod check if GoldScrao was installed, and then loading an otherwise unused special gold crate.

 

This was inefficient, so I wanted to rework the system to allow any other mod to tell this mod to generate an all-new crate using the custom parameters described above.

This turned into the Create-A-Crate class, along with a handful of methods that allowed the creation of new crates and even of new projectiles for the Fruit Bazooka.

 

To make getting started easier, I created template methods with default paramaters and put them in a Usage-document to copy-paste into other mods. Now the crates mod had a collection of new crates to create.

CratesUsageMethods.png
List of all methods CreateACrate provides to make, register, or retrieve custom crates and projectiles
Video demo of modded crates added through LCGoldScrapMod and LCSplatBombGrenadeMod, including custom parameters for which object to spawn and how many, and registering custom projectiles

One issue however, was not being able to create new, static GameObjects at runtime to spawn instances of. So I decided on a different solution: one special crate that camouflages itself into the crates it needs to be.

 

This so-called Modded Crate takes the given parameters and saves them in a Dictionary with a ScriptableObject for what crate it needs to be and its rarity, and then upon spawning determines what crate to turn into, and then changes its materials, bounce-interactions, and spawnable contents based on that data.

 

This gives the illusion of being different objects, but is just one object using parameters in different ways.

bottom of page