Devlog: Adapting the SteamWorld Heist loot mechanics

In my quest to shamelessy “get inspired by” every mechanic from Steamworld Heist one was missing: The Loot System. Specifically: Delayed Gratification.

The “Mystery Bag” Philosophy

In Diablo, loot is instant. In Into The Deep, you don’t pick up guns; you pick up Loot Tokens. Dirty sacks and heavy crates. You know that you found something, but not what.

This creates immediate tension. When you see a glowing chest across the room while under fire, you have to ask: Is it worth risking my Sniper’s life for a mystery item? (Spoiler: Yes.)

The Logic: Hybrid RNG

To make this fair for hardcore players, I implemented a Hybrid Resolution System in the LootRewardResolver.

  • Quality (Rarity) is influenced by luck and specific difficulty tiers.
  • Quantity (Currency) scales directly with your risk.

Here is the actual C# logic running under the hood when a token is “unwrapped”:

C#
// From LootRewardResolver.cs
public static ILootReward ResolveToken(LootToken token, LootProgressionTable table)
{
    // 1. QUANTITY (Greed): Scales with Difficulty
    // Playing on 'Elite' means 50% more currency in every bag.
    float lootMultiplier = LevelStateManager.GetCurrentLootMultiplier();
    
    // 2. QUALITY (Luck): Biased by Difficulty
    // We use a "Fuzzy Logic" roll that shifts based on the difficulty enum.
    MissionDifficulty difficulty = LevelStateManager.GetCurrentDifficulty();
    int rolledTier = RollTierWithOffset(token.levelTier, difficulty);

    // The Reveal logic
    if (token.rarity == LootRarity.Epic)
    {
        // High Tier Loot!
        var epicItem = GameAssetDatabase.Instance.GetRandomLootItem(rolledTier, LootRarity.Epic);
        return new ItemReward(epicItem, LootRarity.Epic);
    }
    
    // Standard Loot (Currency)
    int baseCurrency = table.RollCurrencyAmount(rolledTier);
    int finalCurrency = Mathf.RoundToInt(baseCurrency * lootMultiplier);
    
    return new CurrencyReward(finalCurrency);
}

The Reveal (The “Juice”)

Since the reward is delayed, the reveal needs to be an event. I sorted the loot queue to open Common items first, building anticipation for the Rares at the end.

Check out the current state of the “Shake & Burst” animation:

It’s a small detail, but getting this right turns the end of a stressful mission into a moment of pure relief. It’s a prototype and needs polishing, but it’s infinitely better than my previous approach, where the chests content showed in a popup and distracted you from the gameplay.

Like the project?

Support the development by adding "Into the Deep" to your Steam Wishlist!

Leave a Comment