This wiki is a read-only version of the Stardew Valley Wiki. The official editable wiki maintained by ConcernedApe can be found at stardewvalleywiki.com

Talk:Artifacts

From Stardew Valley Wiki
Jump to: navigation, search
This talk page is for discussing Artifacts.
  • Sign and date your posts by typing four tildes (~~~~).
  • Put new text below old text.
  • Be polite.
  • Assume good faith.
  • Don't delete discussions.

Dwarf Scrolls from monsters in mine

data from Monsters.xnb (v1.06) used in monsterDrop() function

   Scroll I   (0.5%): Green Slime, Bat, Stone Golem, Grub, Fly, Ghost, Duggy, Rock Crab, Bug
   Scroll II  (0.5%): Dust Spirit, Frost Bat, Frost Jelly, Ghost, Skeleton Warrior
   Scroll III (0.1%): Green Slime, Dust Spirit, Bat, Frost Bat, Lava Bat, Stone Golem, Grub, Fly, 
                    Frost Jelly, Sludge, Shadow Guy, Ghost, Duggy, Rock Crab, Lava Crab, Squid Kid, 
                    Skeleton Warrior, Shadow Brute, Shadow Shaman, Metal Head, Bug, Mummy, Big Slime
   Scroll IV  (0.5%): Lava Bat, Frost Jelly, Sludge, Shadow Guy, Lava Crab, Squid Kid, Shadow Brute, Shadow Shaman, Metal Head

Dwarf Scrolls from hoeing in mine

data from game code (v1.06), only scrolls 1,2 and 4 can be found by digging

  • Dwarf Scroll I : All levels
  • Dwarf Scroll II : Level 40-79
  • Dwarf Scroll IV : Level 80+
   if rnd(0-99) < 15:
       if rnd(0-99) < 7:
           if rnd(0-99) < 75:
               roll D5
                   1: Dwarf Scroll I
                   2: Lost Book
                   3: Rusty Spoon
                   4: Rusty Cog
                   5: Skeletal Tail
           else 
               if rnd(0-99) < 75:
                   if mineArea 0 to 40
                       roll D2
                           1: Dwarf Gadget
                           2: Gold Bar
                   if mineArea 40 to 80
                       roll D2
                           1: Dwarvish Helm
                           2: Dwarf Scroll II
                   if mineArea == 80
                       Dwarf Scroll IV
               else
                   roll D2
                   1: Strange Doll(126)
                   2: Strange Doll(127)
       else
           other stuff
This code can be found in MineShaft::checkForBuriedItem. As of v1.3.14, it is largely unchanged from the v1.06 code posted above by unsigned. margotbean (talk) 23:30, 2 June 2018 (BST)

Dwarf Scroll Reporting

Prehistoric Bones

Found a Prehistoric Tibia at the Train Station. Jaldy (talk) 16:14, 10 March 2016 (EST) Found a Skeletal Hand in the area above your farm that leads to the mountain. Omnigamer (talk) 00:40, 13 April 2016 (EDT)

Fishing Chest Finds (Not listed on Wiki)

Bone Flute from an Ocean chest. Jaldy (talk) 16:30, 10 March 2016 (EST)

Digging for artifacts (worms) mechancis

DIG WORMS FUNCTION (v1.06)

   reward = -1
   for each object in "ObjectInformation.xnb" with object.Data[3] = "Arch"
       if player location == object.Data[5].location:
           if rnd[0.00-0.99] < object.Data[5].location.chance:
               reward = object.ID
               break(for)
   if rnd(0.00-0.99) < 0.2
       reward = 102 (lost book)
       if all books are found
           reward = 770 (wild seeds)
   if reward != -1
       create object(reward)
       gainEXP(25)
       END FUNCTION
   if NOT winter
       for each object in current locationData[8] in "Loations.xnb"
           if random(0.00-0.99) < object.chance
           if object.Data contains "Arch"
               reward = object.ID
               if reward = 102 (lost book) and all books are found
                   reward = 770 (wild seeds)
               create object(reward)
               END FUNTION
           else
               create multiple.object(reward, random(1-4))
               END FUNTION
   if winter
       if rnd[0.00-0.99] < 0.2
           create object(416) (Winter Root)
       else
           create object(412) (Wild Jam)
       END FUNTION

--Ashpool (talk) 09:33, 2 April 2016


1.1 Farm Layout Artifacts

Got the Rusty Spur artifact from a worm tile. Hilltop farm layout. Carlotta4th (talk) 05:25, 12 October 2016 (BST)

Got the Chicken Statue artifact from worm tiles several times in the Hilltop farm layout.--Tuhalu (talk) 06:46, 16 November 2016 (UTC)

Artifact Spot Mechanics

Are largely unchanged from the v1.06 code posted above. As of v1.3.28, this code can be found at GameLocation::digUpArtifactSpot.

There are 3 basic branches to the code. The first checks a random number against every artifact in ObjectInformation.xnb. The second branch sets the artifact found to "Lost Book" 20% of the time (or Mixed Seeds). This will overwrite any artifact found in the first branch. The third branch executes under specific conditions, and checks index 8 of Locations.xnb.

The location percentages listed on this page, and on the individual pages, come from ObjectInformation.xnb. They are somewhat misleading, since they can be overwritten with Lost Book/Mixed Seeds 20% of the time.

Locations listed without percentages come from Locations.xnb. Although there are percentages listed in index 8, after enumerating through every artifact in ObjectInformation, and passing the 20% check for Lost Books, the chance of finding these artifacts won't be exactly what is in Locations.xnb.

I may or may not attempt to summarize all this on every artifact's individual page. margotbean (talk) 17:59, 9 June 2018 (BST)

Based on a couple of posts in the support forum, I have deduced that, for several artifacts, the location & percentage in ObjectInformation.xnb is in the wrong index, so the first branch of the code will never spawn those artifacts. This makes the percentages listed on this page (and the individual pages) even more misleading for those artifacts. Fixing the affected pages is now on my "to do" list.
I still question whether or not I should adjust the % listed in ObjectInformation.xnb for the other artifacts by 20%, or not. margotbean (talk) 19:18, 22 September 2018 (BST)
I've removed locations and percentages from 11 artifacts that cannot be found by data in ObjectInformation.xnb. I've kept locations that can be found by data in Locations.xnb. I don't have plans to calculate percentages for those artifacts, or for adjusting for the 20% chance of lost book/mixed seeds for any artifact. Anyone else so inclined is free to do so! Just please make a comment here explaining the details of how you arrived at the new percentages. Thanks, margotbean (talk) 21:05, 26 September 2018 (BST)
Should I add a section noting the bug on those 11 artifacts? I can see it's still in the game's current version. Geonigma (talk) 01:13, 11 May 2019 (BST)
I think these notes on the talk page suffice. There's too much information to summarize on the main page, and it's pretty technical. margotbean (talk) 01:29, 11 May 2019 (BST)
Hrm, I would like to do something because I didn't realize this was bugged and the pages don't mention anything. I never saw these notes until I started investigating the manner myself. Maybe I will look into calculating them for the working locations like you mentioned above.--Geonigma (talk) 17:36, 11 May 2019 (BST)
So I have an app that tells me when the artifacts will spawn on what day, but I translated it onto a google sheet for your convenience: https://docs.google.com/spreadsheets/d/1_nmKqzw-fvysABUHq5Zw0XbGS8guAc_veAYHPg1Uuvc/edit?usp=sharing
take a look and let me know what you think. I could put the percentage on the page like you mentioned. --Geonigma (talk) 19:38, 11 May 2019 (BST)
I'd say that's an impressive amount of work and I'm blown away! I'd also say that I don't have near enough time to verify all of what you did, but I'm willing to accept that it's good information. You can add it to the page, and to the individual artifacts' pages, if you like. If you ever analyze the other 5 artifacts, feel free to add in the same way. And please don't ever delete that spreadsheet without providing some kind of backup that the wiki can refer to! Thanks so much, margotbean (talk) 21:46, 11 May 2019 (BST)
Haha, thanks Margotbean. It actually didn't take too long. I already built the app because I'm on my third year and haven't found 3 artifacts. Thanks for your help with this and dealing with me because I'm new here :) --Geonigma (talk) 15:32, 12 May 2019 (BST)

As documentation of the numbers I've added/altered on the article for chances of finding artifacts at artifact spots:

For every map, I assembled a list of all possible items/chances from ObjectInformation.xnb and Locations.xnb. I added a 20% for Lost Books at the top of the list (even though the code handles it later in the function, it overrides any other item, so it is functionally equivalent to just processing it first). I initialized noitem_chance to 1. Then I just looped through the entire list in order: each item's chance is multiplied by noitem_chance to get the actual chance; then noitem_chance is multiplied by (1-chance).

This calculation intentionally ignores the effect of Snow Yams/Winter Roots/Rice Shoots. Only chances coming from Locations.xnb are affected, and only in Winter/Spring. The most extreme impact is in winter, when the chance is 50% less than the initially calculated value. So I've printed those values with the min/max range and added a reference explaining that they're season-dependent.

There's a couple other quirks in GameLocation::digUpArtifactSpot that are specific to Lost Books (102) and Clay (330), but they don't affect any artifacts. Nebulous Maestress (talk) 04:58, 31 August 2020 (UTC)

Tilling in mines

The number for tilling in mines are in a table on The Mines page. The numbers were calculated on this spreadsheet: https://docs.google.com/spreadsheets/d/1BdMKgytVSk50158d_jKT46lBMkR8EPHTa6bY50aFybc/edit?usp=sharing BlaDe (talk) 22:23, 13 May 2019 (BST)

ARGH!!!! Thanks so much for telling me; I'll put them back as soon as I can (unless you get to it first). margotbean (talk) 22:35, 13 May 2019 (BST)
Done. I've been so busy with 5 new languages, my brain is turning to mush. Thanks again! margotbean (talk) 23:01, 13 May 2019 (BST)

Locations and probabilities changed in 1.4?

I have been playing 1.4 a bit and I immediately found two artifacts that I had not turned in for the museum collection before, so that raised my eyebrow. After looking at the source code and data files, I wonder if locations and probabilities have been changed in 1.4.

One example: The data from ObjectInformation for Trilobite shows Beach .03 Mountain .03 Forest .03 (so a 3% chance for each location, after all the other code branches are passed), but the Artifacts page shows only that it can be found at the beach.

I do unfortunately not have any pre-1.4 files, so I can't compare. I would not be surprised if a lot got changed there. TheBlackOne (talk) 20:14, 28 November 2019 (UTC)

Yep, there was a bug in ObjectInformation.xnb that affected 11 artifacts: Prehistoric Scapula, Tibia, Skull, Rib, Vertebra, Skeletal Hand, Tail, Nautilus Fossil, Amphibian Fossil, Palm Fossil, Trilobite. It's in the change notes, and is on my "to do" list, but as you may (or may not) have noticed, the wiki exploded on the 26th, so I haven't had time to make all the changes to the pages. Of course, the wiki was changed to account for the bug (and the reduced spawn chances) shortly before the bug got fixed, otherwise it would be accurate now. ha ha o_o margotbean (talk) 20:24, 28 November 2019 (UTC)

Spawn chance based on iteration order of Game1.objectInformation?

I've noticed that, if I understand the code correctly, the spawn chance of artifacts from artifact spots is influenced by the iteration order of Game1.objectInformation. Game1.objectInformation is of type IEnumerable, which does not guarantee order of iteration, which in turn should mean that either the order is as it is in ObjectInformation.xnb, or it might be randomized every time you start the game, or it might be randomized, but the same every time.

I might be gravely overlooking something since I'm not highly proficient in C#, but the code does not show any randomization of the order which means that, among other issues, when two objects share the same probability at a certain location, the object that comes first in Game1.objectInformation will always be chosen over the latter one.

Here's a pseudo code snippet of the pertaining function, the real code can be found in StardewValley.GameLocation::digUpArtifactSpot

[...]

Random random = new Random(...);
int objectIndex = -1;

foreach (pair in Game1.objectInformation)
{
  string[] fields = pair.Value.Split('/');
  
  if (fields[3].Contains("Arch"))
  {
    string[] locations = fields[6].Split(' ');
	
    for (int i = 0; i < locations.Length; i += 2)
    {
      string location = locations[i];
      double probability = asDouble(locations[i + 1];
	  
      if (location.Equals(this.name) && random.NextDouble() < probability)
      {
        objectIndex = pair.Key;
        break;
      }
    }
  }
  
  if (objectIndex != -1)
  {
    break;
  }
}

[...]

Marv (talk) 20:51, 25 December 2019 (UTC)

These are definitely the types of obscure details that can be easily overlooked and end up messing up all the inferred numbers. Plus these coding elements are reused so often throughout the game code that other articles would be affected, too. But I think (cross my fingers) the details are right in the numbers I've posted on the article.
Early items don't always get picked because random.NextDouble returns a new (different) random number every time it's called. So itemA can fail its 10% probability test, but itemB can pass the exact same test. Therefore the order of processing doesn't eliminate later items... but the order does still matter, because later items become less likely.
The question of whether the order of the items is guaranteed becomes more complicated. Yes, IEnumerable (or IDictionary) are not "supposed" to be used as ordered lists. Meaning that if you're writing code in which processing order makes a difference, you shouldn't use IDictionary. But we're not writing code: we're trying to figure out whether or not the existing code will reliably do the same thing every time it's run. In other words, practically speaking what does happen, instead of theoretically what could.
All evidence says that yes, the listed items will always be in the same order, namely the order found in the input file. That's the standard behavior; to quote one summary statement from a discussion on the topic: "the current implementation preserves insertion ordering so long as you never delete anything - but you must not rely on this". In the game code, the item list is created once and never modified, so insertion ordering should hold.
As for real proof, the most effective one I'm aware of is the fact that there are prediction tools capable of predicting (for a given save file) what artifact will be found at a given artifact spot. If the item order were ever randomized, or even slightly different than expected, those prediction tools would be useless. I've only done a handful of tests of these tools myself, but I assume the collective community would have noticed if the prediction tools were regularly failing.
So, as far as I can tell, the order is fixed, and therefore the chances of finding items later in the list will be consistently smaller than the chances for items earlier in the list. At least for current compilers/platforms/etc. No guarantee it will stay that way in the future, but that's tomorrow's problem. Nebulous Maestress (talk) 05:31, 31 August 2020 (UTC)