30

Hey everyone. Hope the weekend has been kind to you all. This week I chugged along with my playthrough of the Persona 3 remake, I am in the final month if the game. I am still having a great time with it but the dungeon crawling has become very tedious. Hope everybody has a good week ahead!

you are viewing a single comment's thread
view the rest of the comments
[-] AernaLingus@hexbear.net 5 points 2 weeks ago* (last edited 2 weeks ago)

Since I got terrible luck on my playthrough, I decided to dig into the code for Dampé's Heart-Pounding Gravedigging Tour; looking at the OoT decomp, we can see the five possible rewards:

s32 rewardParams[] = {
    ITEM00_RUPEE_GREEN, ITEM00_RUPEE_BLUE, ITEM00_RUPEE_RED, ITEM00_RUPEE_PURPLE, ITEM00_HEART_PIECE,
};

and the logic which determines what reward you get, which I've annotated with explanations of how it works.

Reward code

s32 EnTk_ChooseReward(EnTk* this) {
    f32 luck;
    s32 reward;

    luck = Rand_ZeroOne();

    // 40% chance of Green Rupee
    // 30% chance of Blue Rupee
    // 20% chance of Red Rupee
    // 10% chance of Purple Rupee/Piece of Heart
    if (luck < 0.4f) {
        reward = 0;
    } else if (luck < 0.7) {
        reward = 1;
    } else if (luck < 0.9) {
        reward = 2;
    } else {
        reward = 3;
    }

    // This code looks at how many times you've already received a particular reward. If it's below
    // a certain threshold, you just get the expected reward and increment the counter.
    // But if it's reached the threshold, the reward is chosen by the next section of code.
    // Thresholds:
    // Green Rupee: 8x
    // Blue Rupee:  4x
    // Red Rupee:   2x
    // Purple Rupee/Piece of Heart: 1x
    switch (reward) {
        case 0:
            if (this->rewardCount[0] < 8) {
                this->rewardCount[0] += 1;
                return reward;
            }
            break;
        case 1:
            if (this->rewardCount[1] < 4) {
                this->rewardCount[1] += 1;
                return reward;
            }
            break;
        case 2:
            if (this->rewardCount[2] < 2) {
                this->rewardCount[2] += 1;
                return reward;
            }
            break;
        case 3:
            if (this->rewardCount[3] < 1) {
                this->rewardCount[3] += 1;
                return reward;
            }
            break;
    }

    // You can think of this code like a champagne glass tower cascade, where the higher (in this case, lower value)
    // glasses must fill up before the champagne can flow to the next layer. It checks each of the above
    // rewards in ascending order of value. If the above-mentioned threshold for an item has already been met,
    // it skips to the next item. If the threshold hasn't been met, it increments the count and grants that reward.
    // This has two effects:
    // 	1.  You are guaranteed to get the purple rupee (or Piece of Heart, the first time)
    // 	    by the (8 + 4 + 2 + 1) = 15th try.
    // 	2a. It actually punishes "early" good luck—e.g., if you roll a random number that would grant you a Red Rupee
    //       three times in a row, you'll end up with a Green Rupee the third time thanks to that waterfall design. 
    // 	    So in the case where you hit the mercy rule, you will always have received exactly 8 Green Rupees,
    //       4 Blue Rupees, and 2 Red Rupees before getting the top reward.
    // 	2b. More generally, the reward counters are only reset after you've collected 15 rewards—so even if you get
    // 	    the top reward on the first roll, you'd need to get the aforementioned collection of 14 Rupees before
    //       you could possibly get it again.
    if (this->rewardCount[0] < 8) {
        this->rewardCount[0] += 1;
        reward = 0;
    } else if (this->rewardCount[1] < 4) {
        this->rewardCount[1] += 1;
        reward = 1;
    } else if (this->rewardCount[2] < 2) {
        this->rewardCount[2] += 1;
        reward = 2;
    } else if (this->rewardCount[3] < 1) {
        this->rewardCount[3] += 1;
        reward = 3;
    } else {
        reward = 0;
        this->rewardCount[0] = 1;
        this->rewardCount[1] = 0;
        this->rewardCount[2] = 0;
        this->rewardCount[3] = 0;
    }

    return reward;
}

It also means that the net earnings for 15 attempts will always be exactly the same:

(1(8) + 5(4) + 20(2)) - 10(15)
= 68 - 150
= -82 Rupees for the Piece of Heart case, or -32 Rupees for the Purple Rupee case.

It does seem a little mean to have it set up that way, but if you had the same odds with replacement, you'd have a positive expected value on each attempt, which would now be independent:

1(0.4) + 5(0.3) + 20(0.2) + 50(0.1) - 10
= 10.9 - 10
= +0.9 Rupees/dig

So I guess they just wanted to ensure that it tended towards being a money sink.

Incidentally, does anyone who's good with probability know how you'd model the actual expected value given the constraints? It's sort of like a really janky version of drawing without replacement—e.g., once you draw your 8th Green Rupee, if you haven't drawn four Blue Rupees yet, the probability of getting one of those will suddenly jump from .3 to .7, but it doesn't affect the probability of drawing the a Red Rupee or Purple Rupee/Piece of Heart at all. The easiest thing would be to just run the actual code for a million trials and derive it empirically (which I'll probably end up doing anyway), but I'm genuinely curious about the theoretical approach, since it's beyond the bounds of my own probability and statistics knowledge.

[-] Demifriend@hexbear.net 3 points 2 weeks ago

Fun fact, if Dampé digs up the Piece of Heart and you leave without collecting it, it's gone forever. They "fixed" this in OoT3D by making it so the Piece of Heart stays in the reward pool even after it's been dug up, meaning you can keep collecting it over and over again if you want. There's a joke speedrun called Dampé's Valentine where they get all 20 hearts just from that Piece of Heart.

[-] AernaLingus@hexbear.net 2 points 2 weeks ago

They "fixed" this in OoT3D by making it so the Piece of Heart stays in the reward pool even after it's been dug up

Lmao, talk about phoning it in. I guess it's better than not fixing it at all, though—maybe one of those situations where it's like, "This might break even worse if we mess with it too much, so let's just comment out the line that marks it as collected and call it a day." I'll probably get around to playing OoT3D at some point just to see what they changed; from what I remember hearing, besides the obvious graphical makeover, it's mostly just small quality-of-life fixes rather than major changes?

There's a joke speedrun called Dampé's Valentine where they get all 20 hearts just from that Piece of Heart.

Love me some joke speedruns. I just learned about a regular OoT speedrun today where you use the Reverse Bottle Adventure glitch to obtain the maximum number of Small Keys possible (37 keys in the Water Temple, apparently). Oh, and related: I was surprised that in the April 1999 Issue #119 of Nintendo Power they showcased a major glitch (as well as a minor exploit that is coincidentally similar to the one OoT3D introduced):

Image descriptionA cropped scan taken from the 'Classified Information' section of the April 1999 Issue #119 of Nintendo Power. It the Ocarina of Time logo at the top and is mostly text, with three screenshots illustrating each trick (described below after each containing section)

Hyrulean Hyrulean

Hyrule is home to many things, and codes aren't one of them. Even so, Link has a few tricks up his sleeves, tunic or wherever else a Hero of Time could hide an extra Skulltula, rupee or bottle. If your inventory has got you down, get a boost from one of these item-amassing tricks.

100-plus Skulltulas

Play the Song of Storms at the tree in front of Hyrule Castle (near Malon) to enter the lair of a Skulltula. Retrieve its token with your boomerang, but before catching it, backflip onto the warp platform. If you return to the hole, the spider will still be there, but you'll get credit for its token.

[A screenshot of Young Link facing a wall with a Gold Skulltula, his back close to a warp platform.]

21 Bottles

To exceed the supposed four-bottle limit, swing a bottle at a fish, but before you capture it, pause the game, then replace your bottle with a new CButton item. Note: The item you chose will be gone, but another bottle will have taken its place.

[A screenshot of Link's inventory after multiple glitches have been performed. In the 3 x 3 section of items in the upper left, instead of the usual loadout (including such items as the Deku Stick, the Boomerang, and Bombs), it is filled with nine bottles containing fish.]

Raking in the Rupees

A bug captured in a bottle will become many bugs when you release it. To earn rupees, free a bottled bug, catch the numerous bugs that flee, then sell the mites to the bug buyer in the Market or in Kakariko Village. Keep one bug to bring back whenever you need to tap into this unlimited source of money.

[A screenshot of Young Link in Hyrule Castle Town showing the contents of his bottle to the Buyer NPC, with the text box showing the dialogue "Oh, it's a cute little Bug! I'll buy it for 50 Rupees! All sales final, OK?"]

They also printed instructions for the Safari Zone glitch in February 1999, which is barely a step removed from the legendary old man glitch that allows you to encounter glitch Pokémon like Missingno, so they're clearly more willing to publicize glitches in their own games than I expected!

Completely tangential, but I found this neat video that proposes an interesting theory about the location of the Ice Arrows and Iron Boots being swapped late in development (although information in the comments makes it seem a lot less plausible). Regardless, that video taught me that

spoileryou can jump over the broke Gerudo Valley bridge with Epona instead of using the Longshot, which I had no idea was possible, and also that you can freeze the Blade Traps. And from a different video, I learned that you can jump over the back walls of Lon Lon Ranch to escape instead of jumping over the gate (and Ingo) which is what I did instinctively.

I'm sure I'll discover many more little secrets of the game as I continue to learn about it via secondary sources and subsequent playthroughs!

[-] HexReplyBot@hexbear.net 1 points 2 weeks ago

I found a YouTube link in your comment. Here are links to the same video on alternative frontends that protect your privacy:

this post was submitted on 28 Jun 2026
30 points (100.0% liked)

Games

21346 readers
192 users here now

Tabletop, DnD, board games, and minecraft. Also Animal Crossing.

Rules

founded 6 years ago
MODERATORS