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
- Various daily shop inventories, including the Traveling Cart and randomized stock at Pierre's General Store, Carpenter's Shop, Joja Mart, Krobus stock and the Stardew Valley Fair Store,
- Forage is repeatable (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.
- Whether or not a Help Wanted Quest appears is fully repeatable, but some quest details can be nonrepeatable.
- Results from the Seed Maker. 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. This can be exploited to easily acquire Cloth early on, such as for the Artisan Bundle.
- Fish Pond produce.
- Crab Pot catch. 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.
- Grass Spreading
- Items requested by the Trash Bear
- The player's Secret Santa and the item they give. Interestingly, the NPC's X-coordinate also changes the gift they give.
- Overnight Farm Events (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
- The time of Train passing through Stardew Valley is repeatable, but the type of train and loot generated is not.
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:
- Output from the Bone Mill, Slime Egg-Press, Worm Bin, and chance of doubling on the Loom (which behave in contrast to the Seed Maker and Recycling Machine)
- Farm Cave Forage Items
- Truffles found by Pigs. The friendship check is seeded from farmer ID, day and time, but the main roll for truffle-finding is nonrepeatable and so the resulting number of truffles is not repeatable.
- Results from Fishing, with certain exceptions such as when finding the Snake Skull.
- Mixed Seeds or Fiber dropped from cutting Weeds. Also note that Luck Does not increase the odds of these dropping.
- Monster drops.
- Critical hits from the player's attack.
- Randomized Secret Notes.
- Ambience features such as randomized sounds, animations, animals
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:
- Daily luck
- Weather for tomorrow
- Spring Onion spawns.
- The Dish of the Day at The Stardrop Saloon
- Overnight spawning of Weeds and Stones
- Overnight Crow Spawns.
- Overnight drops from Coop animals are seeded with the player's ID and current day, but are also boosted by daily luck.
- Artifact Spots are removed nightly with a 15% nonrepeatable roll.
Crop Harvest RNG
The RNG for crop harvesting is seeded with the Random Seed, current day, and the coordinates of the planted crop.
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 (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 contents appear in predetermined sequence seeded by the Random Seed and advanced by each geode cracked, 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.
- Ladders (and shafts) are discovered according to a random roll as the player breaks each stone. 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..
- Which floors are "Infested", "Prehistoric", or "Slime-Infested" is fully repeatable. 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. However, given that the odds of finding a shaft on a given floor are not repeatable, 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 and their associated rewards are nonrepeatable.
Slime Mating RNG
- See StardewValley.Game1.GenerateBundles
- See StardewValley.Locations.Forest::checkAction
- See StardewValley.Locations.SeedShop::shopStock
- See StardewValley.Utility::getCarpenterStock
- See StardewValley.Utility::getJojaStock
- See StardewValley.Locations.sewer::generatekrobusstock
- See StardewValley.Event::checkAction
- See StardewValley.GameLocation::spawnObjects
- See StardewValley.Locations.Town::checkActions
- See StardewValley.Object::performObjectDropInAction
- See StardewValley.FishPond::dayUpdate
- See StardewValley.Objects.CrabPot::DayUpdate
- See StardewValley.TerrainFeatures.Grass::performToolActions
- See StardewValley.TrashBear::updateItemWanted
- See StardewValley.Event::setUpPlayerControlSequence
- See StardewValley.Utility::getGiftFromNPC
- See StardewValley.Events.SoundInTheNightEvent::setUp
- See StardewValley.Areas.IslandSouth::setupislandschedules
- See StardewValley.GameLocation::performTenMinuteUpdate
- See StardewValley.BellsAndWhistles.Train::Train
- See StardewValley.Locations.FarmCave::DayUpdate
- See StardewValley.FarmAnimal::behaviors
- See StardewValley.GameLocation::getFish
- See StardewValley.Areas.IslandWest::getFish
- See StardewValley.Object::cutWeed
- See StardewValley.GameLocation::monsterDrop
- See StardewValley.GameLocation::damageMonster
- See StardewValley.Game1._newDayAfterFades
- See StardewValley.Locations.Forest::DayUpdate
- See StardewValley.GameLocation::spawnWeeds
- See StardewValley.Farm::addCrows
- See StardewValley.FarmAnimal::behaviors
- See StardewValley.Crop::harvest
- See StardewValley.Utility::getTreasureFromGeode
- See StardewValley.Locations.GetReplacementChestItems
- See StardewValley.Mineshaft::checkStoneForItems
- See StardewValley.Mineshaft::populateLevel
- See StardewValley.Mineshaft::chooseLevelType
- See StardewValley.Mineshaft::enterMineShaft
- See StardewValley.Mineshaft::loadLevel
- See StardewValley.Mineshaft::addLevelChests
- See StardewValley.Monsters.GreenSlime::mateWith
- See StardewValley.Utility::getBlendedColor