SpelunkyFan wiki

Crate

Verified against the spelunky.ai port v0.1.10 on .

For the chest of gems, see Chest.

The Crate is a carryable item in Spelunky Classic that opens, with up and the attack key, into one free item, most often bombs or ropes.

Each Crate holds one item, picked when it's opened, mostly a Bomb Bag or a Rope Pile, but sometimes equipment or a weapon that shops sell for thousands. It's heavy, so it's carried high and thrown short, and the player can open it wherever he stands on it.

Usage

#
Clip not rendered yet
Crate opened. The player picks up a crate and, still holding it, presses up and the attack key. It vanishes in a puff, leaving a pitcher's mitt at his feet, which he picks up and puts on.

Pressing up and the attack key while the player stands on a Crate opens it: the Crate vanishes in a puff of smoke and its item appears in its place, free [1]. On the game's own levels, it adds to the lifetime count of crates opened [2]. In the clip, the player opens a Crate he's holding, which leaves his hands empty, and it holds a Pitcher's Mitt, which he picks up and puts on [3]. The item comes from one roll down this list, each roll made only if the ones before it fail [4]:

ItemChance
Jetpack1 in 500[5]
Cape1 in 200[6]
Shotgun1 in 100[7]
Mattock1 in 100[8]
Teleporter1 in 100[9]
Climbing Gloves1 in 90[10]
Spectacles1 in 90[11]
Web Cannon1 in 80[12]
Pistol1 in 80[13]
Pitcher's Mitt1 in 80[14]
Paste1 in 60[15]
Spring Shoes1 in 60[16]
Spike Shoes1 in 60[17]
Machete1 in 60[18]
Bomb Box1 in 40[19]
Bow1 in 40[20]
Compass1 in 20[21]
Parachute1 in 10[22]
Rope Pile1 in 2[23]
Bomb BagOtherwise[24]

The Crate in the Tutorial always holds a Bomb Bag [25]. The player stands on the item when it appears, so a Bomb Bag or a Rope Pile, which are collected by touch, are collected at once: in the second clip, a Crate's Rope Pile gives him 3 more ropes on the step he opens it [26] [27] [28].

A Crate is heavy: the player carries it higher than other items, and throws it at 4 pixels a step plus his own speed, rising at 2, or at 4 upward [29] [30]. Thrown faster than 2 pixels a step, it hurts a monster as any thrown item does [31].

Locations

#
  • Level generation, in every area: in a nook one block high with a wall beside it, a 1 in 10 chance, once the rolls for a web and, on the level that has one, the Udjat Eye's locked chest fail [32].
  • The Temple: some of its rooms have a tile that's a Crate or a Chest, one chance in two each [33].
  • Olmec's Lair: a 1 in 10 chance on some of its tiles, once rolls for a Chest, gold and big gems fail [34].
  • The Megamouth: four Crates burst out of one when it dies [35].
  • The Tutorial, which has one [36].
  • The level editor's C tile [37].

Interactions

#
  • Holding it. The player can open a Crate he's holding, as he stands where it is; his hands are empty after [38] [3].
  • Shops. A Crate's item is free wherever it's opened: the code sets its price to nothing [39].
  • Bombs. An explosion throws a Crate away from it without breaking it [40].
  • Exits. The player sets down a heavy item, a Crate among them, when he takes an exit, so a Crate can't be carried to the next level [41].

Tips

#
  • A Crate is best opened where its item can't fall away: the item appears where the Crate is, and has no speed of its own.
  • Most Crates hold a Bomb Bag or a Rope Pile: the rolls before them all fail about 69 times in 100 (the product of each roll's chance of failing, 499 in 500 by 199 in 200 and so on).

Trivia

#
  • The code that opens a Crate stores it in a variable named chest, the same one the code for opening a Chest uses [42] [43].

FAQ

#
What's in a Crate in Spelunky Classic?

One item. A Crate rolls down a list, from a Jetpack (1 in 500) to a Parachute (1 in 10), each roll made only if the ones before it fail; if all fail, it's a Rope Pile or a Bomb Bag, one chance in two each.

How do you open a Crate in Spelunky Classic?

Stand on it and press up and the attack key. It vanishes and leaves its item, free, even inside a shop and even if the player is holding the Crate.

Can you buy a Crate's item from a shop in Spelunky Classic?

There's nothing to buy: a Crate's item is always free, and shops don't sell Crates.

Where do you find Crates in Spelunky Classic?

In every area, in nooks one block high, and in some of the Temple's rooms and Olmec's Lair. A Megamouth lets out four when it dies, and the Tutorial has one.

#
Clip not rendered yet
Crate opened into ropes. The player walks onto a crate and opens it. It holds a pile of rope, which appears under him and is collected at once: his ropes go from 4 to 7.

See also

#

References

#
  1. objects/oPlayer1/step.gml:612-647
  2. objects/oPlayer1/step.gml:614
  3. Clip crate/open
  4. objects/oPlayer1/step.gml:616-636
  5. objects/oPlayer1/step.gml:617
  6. objects/oPlayer1/step.gml:618
  7. objects/oPlayer1/step.gml:619
  8. objects/oPlayer1/step.gml:620
  9. objects/oPlayer1/step.gml:621
  10. objects/oPlayer1/step.gml:622
  11. objects/oPlayer1/step.gml:623
  12. objects/oPlayer1/step.gml:624
  13. objects/oPlayer1/step.gml:625
  14. objects/oPlayer1/step.gml:626
  15. objects/oPlayer1/step.gml:627
  16. objects/oPlayer1/step.gml:628
  17. objects/oPlayer1/step.gml:629
  18. objects/oPlayer1/step.gml:630
  19. objects/oPlayer1/step.gml:631
  20. objects/oPlayer1/step.gml:632
  21. objects/oPlayer1/step.gml:633
  22. objects/oPlayer1/step.gml:634
  23. objects/oPlayer1/step.gml:635
  24. objects/oPlayer1/step.gml:636
  25. objects/oPlayer1/step.gml:616
  26. objects/oPlayer1/step.gml:2020-2023
  27. objects/oPlayer1/step.gml:2052-2055
  28. Clip crate/rope
  29. objects/oItem/step.gml:44-56
  30. scripts/scrUseItem.gml:609-635
  31. objects/oItem/step.gml:256-350
  32. scripts/scrTreasureGen.gml:47-68
  33. scripts/scrRoomGen4.gml:359-363
  34. scripts/scrRoomGen5.gml:177-184
  35. objects/oJaws/step.gml:23-28
  36. Room rTutorial, as the room editor placed it
  37. scripts/scrCreateTileObj.gml:289-292
  38. objects/oPlayer1/step.gml:639-643
  39. objects/oPlayer1/step.gml:637
  40. objects/oExplosion/collision_oItem.gml:30-36
  41. objects/oPlayer1/step.gml:815-820
  42. objects/oPlayer1/step.gml:564
  43. objects/oPlayer1/step.gml:615

Source code

  • objects/oCrate/create.gml
  • objects/oPlayer1/step.gml
  • objects/oItem/step.gml
  • scripts/scrUseItem.gml
  • scripts/scrTreasureGen.gml
#