Random Seed

From Stardew Valley Wiki
Jump to navigation Jump to search
Article Stub

This article is marked as a stub for the following reason:

When creating a new game, the player has the opportunity to configure a Random Seed numerical value in the Advanced Options menu. If the player does not set a Random Seed, a number is chosen randomly.

The resulting value becomes the game save's "uniqueID" (uniqueIDForThisGame), and is suffixed to the filename of the game save.

Effect On Gameplay

The Random Seed value affects many of the game's random number generation (RNG) rolls (whether the Seed has been manually specified by the player or not). Game features seeded using the Random Seed are said to be "repeatable" or "deterministic" because the result of these random rolls are predetermined/preordained from the game save's creation. All of these rolls are (in principle) repeatable, as long as the same basic conditions are met (generally day, time, and location). It is often possible for the player to exploit this behavior by observing what's going to happen on a given day and then restarting the day to exercise foresight regarding the day's opportunities.

Not all of the games random number generation is seeded with the Random Seed, so those aspects of the game are "nonrepeatable" or "nondeterministic".

Differences exist in how RNG is calculated on different platforms (i.e., Mobile, Nintendo Switch, PC, Playstation, Xbox) so Random Seed results are not necessarily portable between platforms.

Game Features with Fully-Repeatable RNG

The following game features are deterministic, due to being seeded using the Random Seed. Generally, this means if the player restarts the day, as long as they return to the same point on the map, at the same time, they will observe the same result (specific factors can vary; time and position are not always factors).

These game features can also be repeated by replaying from an older save backup or even starting a new game from the same Random Seed. For example, if Bubble spot appeared in the Mountain on Fall 4 at 12:10 PM, the player can start the entire game over with the same Random Seed and play up through Fall 4 and see the same bubbles will again appear on Fall 4 at 12:10 PM.

Example game features with Fully-Repeatable RNG include:

  • Remixed Bundles[1]
  • Various daily shop inventories, including the Traveling Cart[2] and randomized stock at Pierre's General Store[3], Carpenter's Shop[4], Joja Mart[5], Krobus stock[6] and the Stardew Valley Fair Store[7],
  • Forage is repeatable[8] (assuming no differences caused by forage spawns being blocked)
    • Foraged Quality is also repeatable, but the quality is determined according to the day harvested, meaning that waiting a day to harvest will change the quality.
  • Bubble spots always appear at the same time in the same place, repeatably[9].
  • Whether or not a Help Wanted Quest appears is fully repeatable, but some quest details can be nonrepeatable[9].
  • Results from the Seed Maker[10]. The result is keyed off of the Random Seed, X position, Y position, day, and time that the ingredient was input, so the player needs to be cognizant of the game time when ingredients are input in order to achieve a consistent result. By exploiting this effect, it is possible to exclusively get a 3-seed-per-crop conversion ratio with the seed maker by replaying the day.
  • Results from the Recycling Machine are repeatable[10]. This can be exploited to easily acquire Cloth early on, such as for the Artisan Bundle.
  • Fish Pond produce[11].
  • Crab Pot catch[12]. These results depend on the Random Seed, day, and the coordinates where the player placed the crab pot the day before.
  • Garbage Cans that contain an item are repeatable, but generation of the contained item is sometimes nonrepeatably random[9].
  • Grass Spreading[13]
  • Items requested by the Trash Bear[14]
  • The player's Secret Santa and the item they give[15]. Interestingly, the NPC's X-coordinate also changes the gift they give[16].
  • Overnight Farm Events[17] (such as Meteorite, UFO, etc) are predetermined. The exact placement is also predetermined, but depends on factors such as open tiles.
  • NPC visitors for Island South[18]
  • The time of Train passing through Stardew Valley[19] is repeatable, but the type of train and loot generated is not[20].

Game Features with Nonrepeatable RNG

Many of the game's RNG rolls are fully nondeterministic. For these game features, after restarting the day, the player will not be able to reproduce their previous result reliably.

Example game features with Nonrepeatable RNG include:

Game Features Repeatable Only On the Same Day

This category of game features are actually nondeterministic, but they are calculated just before the game progress saves. This means that reloading the day will not demonstrate any deviation from what the player first saw. Only by reloading a save backup or restarting the game would the player be able to observe a differing result. For example, Spring Onions spawn will not change if the player restarts the day. But if the player starts a new game, even with the same Random Seed, the amount of spring onions spawned will be different. Since spring onions spawn on Spring 1 (the first day after starting a new game), this result is easy to test by creating multiple new games with the same Random Seed.

Example game features that are repeatable only on the same day:

Crop Harvest RNG

The RNG for crop harvesting is seeded with the Random Seed, current day, and the coordinates of the planted crop[33].

Quality of harvested crops is therefore fully repeatable. Chance of better quality is also increased with the player's Farming level as well.

The amount of random extra crops received is repeatable, but also receives a boost from Luck, which is a nonrepeatable factor.

Artifact Spot Placement RNG

Artifact Spot spawns[8] (for both placement and the resulting item) are fully repeatable assuming spawning is not blocked (and assuming there are no differences caused by the player blocking possible spawning destinations with space-occupying items such as a Chest). Even if the player causes a difference, should the player clear out all the artifact spots in the area, the placement pattern will tend to "get back on schedule" and future artifact acquisitions will be similar.

Note, however, that the game's 15% artifact removal chance is actually nonrepeatable, which can create noise in the schedule. For Days with additional Artifact Spawning, this effect can actually change what artifacts spawn in a nonrepeatable way for those days.

Geode RNG

Geode contents appear in predetermined sequence seeded by the Random Seed and advanced by each geode cracked[34], it does not matter where/when the geodes are sourced and the Daily Luck is irrelevant.

The sequence of geode rewards is shared across all geode types, as in, cracking any geode type advances the rewards sequence. The player can replay and crack the same geode types again and observe the exact same rewards sequence. But the specific type of geode constrains the resulting geode item roll. The player can make use of this knowledge to manipulate the odds of getting better drops. The strategy for doing so is to first view the results of cracking all of of the best geode types first. Then, after restarting the day, the player can overshadow some of the poor results by cracking a worse Geode type instead.

Mine And Skull Cavern RNG

  • Remixed Mine Rewards are fully repeatable.[35]
  • Ladders (and shafts) are discovered according to a random roll as the player breaks each stone[36]. These rolls are nonrepeatable.
  • The floor layout of a given floor in the Mines and Skull Cavern is fully repeatable. However, the population of rocks, destructibles, and monsters is nonrepeatable.[37].
  • Which floors are "Infested", "Prehistoric", or "Slime-Infested" is fully repeatable[38]. However, it is also seeded with the player's Mining level. So if the player levels up during the day, they can bypass a monster level that is otherwise recurring.
  • When the player enters a shaft in the Skull Cavern, the number of floors fallen is fully repeatable based on the day, current floor level, and Random Seed[39]. However, given that the odds of finding a shaft on a given floor are not repeatable[36], it is typical that the player is unable to repeat exploring the same floor numbers past the first shaft or two. But should the player happen to explore the same floor number again (on the same day), the number of floors fallen is indeed repeatable.
  • Chance for Treasure rooms in the Skull Cavern[40] and their associated rewards are nonrepeatable[41].

Slime Mating RNG

Slime mating frequency is repeatable[42], but movement behavior and color blending between mates[43] is not repeatable, so the overall results are usually nonrepeatable.


  1. See StardewValley.Game1.GenerateBundles
  2. See StardewValley.Locations.Forest::checkAction
  3. See StardewValley.Locations.SeedShop::shopStock
  4. See StardewValley.Utility::getCarpenterStock
  5. See StardewValley.Utility::getJojaStock
  6. See StardewValley.Locations.sewer::generatekrobusstock
  7. See StardewValley.Event::checkAction
  8. 8.0 8.1 8.2 See StardewValley.GameLocation::spawnObjects
  9. 9.0 9.1 9.2 See StardewValley.Locations.Town::checkActions
  10. 10.0 10.1 10.2 See StardewValley.Object::performObjectDropInAction
  11. See StardewValley.FishPond::dayUpdate
  12. See StardewValley.Objects.CrabPot::DayUpdate
  13. See StardewValley.TerrainFeatures.Grass::performToolActions
  14. See StardewValley.TrashBear::updateItemWanted
  15. See StardewValley.Event::setUpPlayerControlSequence
  16. See StardewValley.Utility::getGiftFromNPC
  17. See StardewValley.Events.SoundInTheNightEvent::setUp
  18. See StardewValley.Areas.IslandSouth::setupislandschedules
  19. See StardewValley.GameLocation::performTenMinuteUpdate
  20. See StardewValley.BellsAndWhistles.Train::Train
  21. See StardewValley.Locations.FarmCave::DayUpdate
  22. See StardewValley.FarmAnimal::behaviors
  23. See StardewValley.GameLocation::getFish
  24. See StardewValley.Areas.IslandWest::getFish
  25. See StardewValley.Object::cutWeed
  26. See StardewValley.GameLocation::monsterDrop
  27. See StardewValley.GameLocation::damageMonster
  28. 28.0 28.1 28.2 See StardewValley.Game1._newDayAfterFades
  29. See StardewValley.Locations.Forest::DayUpdate
  30. See StardewValley.GameLocation::spawnWeeds
  31. See StardewValley.Farm::addCrows
  32. See StardewValley.FarmAnimal::behaviors
  33. See StardewValley.Crop::harvest
  34. See StardewValley.Utility::getTreasureFromGeode
  35. See StardewValley.Locations.GetReplacementChestItems
  36. 36.0 36.1 See StardewValley.Mineshaft::checkStoneForItems
  37. See StardewValley.Mineshaft::populateLevel
  38. See StardewValley.Mineshaft::chooseLevelType
  39. See StardewValley.Mineshaft::enterMineShaft
  40. See StardewValley.Mineshaft::loadLevel
  41. See StardewValley.Mineshaft::addLevelChests
  42. See StardewValley.Monsters.GreenSlime::mateWith
  43. See StardewValley.Utility::getBlendedColor