Some findings & bugs on how Skill Level & the RNG work for Farming & Foraging

Discussion in 'General Discussion' started by Xenonex, Jan 9, 2017.

  1. Xenonex

    Xenonex Void-Bound Voyager

    MORE UPDATES!

    So it turns out this issue is a much bigger problem than I initially thought. After it was pointed out in the code on the subreddit by /u/rabidcow, I confirmed through several tests on multiple characters that outside of the partial benefit from Basic/Quality Fertilizer, the game either considers you to be at Farming Level 10, or Farming Level 0, with no other possible values.

    Just to clarify, as confirmed by my tests, this means that when you are at Farming Level 0, or 1, or 2, up to level 9, you get no benefit from your Farming Level, and all your crops will always be 97% regular, 2% silver, and 1% gold. When you hit farming Level 10, suddenly your crops jump to 46% regular, 33% silver, and 21% gold. And then using buffs to go beyond Farming Level 10, the game still only considers you being at Farming Level 10. So outside of fertilizers, these are the only two quality chances for crops used by the game.

    More details in this thread.

    END OF UPDATE

    So a little while ago I was looking all over for a breakdown on just what the various skills (Farming, Fishing, Foraging, Mining, Combat) actually do, aside from the obvious crafting recipe unlocks and 0.1 energy reduction on tool use. The little information I did find on the topic was rife with speculation and rumors, so I finally bit the bullet and started running tests myself.

    So far I've only really tested very specific aspects of Farming & Foraging, and I haven't looked at Luck at all since I only run tests on "Neutral Spirits" days, but have enough evidence to show the following, and confirmed it through testing:
    • The RNG for the quality for each particular crop appears to get set at the moment you sleep the previous night. This means that continually reloading the save file for the same day over and over always yields the exact same proportions of normal/silver/gold quality crops.
    • This RNG gets reset each night when you go to sleep, so leaving ripe crops in the ground and sleeping into the next Neutral Spirits day will get you a similar, but slightly different proportions of normal/silver/gold quality.
    • These rules also apply to forageables (Daffodils, Wild Horseradish, etc.) whether in the wild or planted on your farm, as well as wood/seeds/sap/Hardwood from chopping down trees.
    • However, Spring Onions are an exception to this for some reason, and their RNG for quality gets reset each time you load a save, so every time you harvest them it can be slightly different.
    Things get a little more interesting once you introduce Skill Levels into the equation, however:
    • For crops, forageables, and chopping down trees, an "experienced" character with Level 10 Farming and Foraging has measurably improved quality of crops & forageables, and gets more wood from trees, compared to a new character with Level 1 Farming & Foraging. I assume this is due to the difference in Skill Level, but it could conceivably be due to other factors.
    • Eating + Foraging food increases the overall quality of foraged items & amount of wood from trees, but doesn't reroll the RNG. I.E., reloading the same save over and over and eating a + 3 Foraging skill food each time will result in the exact same improvement in quality over a non-food harvest every time (except for Spring Onions, which reroll their RNG with every reload). This works even when you character is already at Level 10 in the skill, temporarily granting them an effective "Level 13" if eating a +3 skill food. For example, at Foraging Level 10, berry bushes yield 3 berries each, but eating a +2 Foraging food will cause all berry bushes to yield 4 berries each. (You gain + 1 Wild berry harvesting every 4 levels, not just at level 4)
    • Regular crops on the farm gain no benefit from + Farming skill foods whatsoever, whether the food is eaten while planting, harvesting, or the night before harvesting. I assume this to be a bug, given how + Foraging skill foods do boost forageables on harvest, including forageables grown on the farm using Spring/Summer/Fall/Winter seeds. UPDATE: It seems that + Farming Skill foods can have an effect, but only when used with Basic/Quality Fertilizer, and even then, only roughly half of the expected effect.
    I plucked around 2000 parsnips for crops, chopped a few hundred trees, and collected a hundred or so foragables, but if you wanted a ballpark idea of the effect of skill levels, here is an average of my results at Farming/Foraging Skill Levels 1, 10, and 10 +3 food buff.


    Percentage of normal/silver/gold quality items harvested at various Skill Levels:
    Farming (crops) =
    ~96%/2%/2% @ Level 1, ~45%/34%/21% @ Level 10, ~45%/34%/21% @ Level 10 + 3 (no change)
    Foraging (forageables) =
    ~96%/2%/2% @ Level 1, ~20%/40%/40% @ Level 10, ~5%/45%/50%% @ Level 10 + 3
    Foraging (trees) =
    17.5 wood per tree @ Level 1, 20 wood per tree @ Level 10, 21 wood per tree @ Level 10 + 3
    Tree seeds and Hardwood (with Lumberjack profession) remained steady at ~1 seed and ~0.5 Hardwood per tree, and trees always drop exactly 6 sap

    If necessary I can post the exact data from each of the tests, but I'm gonna avoid tidying & formatting all of that if I can help it. The basic methodology of the tests were:


    All tests done during Spring on 'Neutral Spirits" days to eliminate Luck as a factor. Tests were done both on my 53 hour "main character" with a 10 in Farming & Foraging, and a new "test character" with a 1 in Farming & Foraging.
    Farming: I used 150 Parsnips planted on Deluxe Speed Grow (to shorten testing time). Since simply reloading the save always yields identical harvests, I would continually sleep until the TV showed another "Neutral Spirits" day in order to roll a new set of results. For each potential variable I tested (such as Skill Level, eating food before planting, before harvesting, etc.), I would usually do 3 rolls (of 150 parsnips each) and average the results.
    Foraging: I harvested the exact same patches of 28 Spring Onions, or harvested the same set of 12 forageables spread across Cindersap Forest, The Bus Stop, & Pelican Town. Since simply reloading the save always yields identical harvests (except for Spring Onions), I repeated on a few different days and averaged the results. For Spring Onions I repeated about 6 times for each variable, and averaged the results.
    Trees: I chopped down the same set of 20 pine trees. Since simply reloading the save always yields identical harvests, I repeated on a few different days and averaged the results.

    Well, I'm a little "tested out" from the past couple days, but am still very, very, curious about what things Skill Levels do & don't affect. Do Farming Skill & Foraging Skill have any other hidden effects, or just these ones I happened to find out? What about the other Skills? Does Mining Skill improve the drops from stones? I hear Fishing Skill increases the size of the green fishing bar, but does it improve anything else?

    Also, is there somewhere I should report a bug about the + Farming Skill food not working?

    I'd love it if the game mentioned what exactly these Skills do in something like a tooltip, "Living off the Land" episode, or Library book, etc. E.G.:
    "The higher your Foraging Skill, the more high-quality forageables you will harvest, and the more wood trees will drop! Try eating a + Foraging boosting food before foraging and felling trees!"
    I'm still partway through the game, but as far as I know, all it tells you about is the reduced energy use with tools part, and a vague mention that eating the right food is necessary to catching Legendary fish.

    In the meantime, before I work up the energy to start any more tests, does anybody happen to know any solid info about what the Skills do? Maybe from looking at the game code or something? I'd really appreciate it!

    UPDATE: Just for clarity's sake, I performed another test showing that even when your Farming Skill is below 10, eating + Farming Skill foods don't provide a quality benefit (while the + Skill foods do work for Foraging, at least).
    In this test, I had my new character with Level 4 Farming Skill harvest 50 Parsnips, which yielded 49 regular parsnips and 1 silver parsnip. As explained before, this repeats exactly every time I reload that save, including which particular parsnip is the silver one (it happened to be one next to my scarecrow). After confirming the result a few times just to be safe, on the next 3 reloads I ate a Hashbrowns (+1 Farming Skill) before harvesting. I still get 49 regular Parsnips and 1 silver Parsnip each time, and it's always the Parsnip next to my scarecrow which is the silver one. The + Farming Skill buff has no effect.


    UPDATE #2, Stardew Boogaloo: After some more testing involving different fertilizers, it seems that + Farming Skill foods can have an effect, but only when used with Basic/Quality Fertilizer, and even then, only roughly half of the expected effect. More details here.

    UPDATE #3, Return of the Bugs:
    Well this whole issue is actually quite a bit bigger in scope than I thought. I turns out that the game ignores your Farming Skill entirely (aside from partially with Basic/Quality Fertilizers) until you reach Farming Level 10. More details in this thread.
     
      Last edited: Jan 31, 2017
    • Obesius

      Obesius Big Damn Hero

      The cap is at level 10, eating anything after level 10 will only increase the tooltip number.

      The fishing gets really easy when you level it up, partially due to the new fishing rods and the option of Bait+Tricket
      Mining gets you more ores and gems.
      Combat raising the life bar.
      The thing is that we may soon have an update, this can change some numbers and screw up the testing process.
      I would recomend waiting for a new patch once Localization (And hopefully Multiplayer) are done.
       
      • Xenonex

        Xenonex Void-Bound Voyager

        I'd heard that the skills get hard-capped at 10 too, but had also heard that food buffs can temporarily push you over 10. Getting past all these rumors and finding the truth of how these things work is part of the reason I decided to do these tests in the first place.

        Just to clarify, in my tests with the Foraging Skill, eating a +3 Forging Skill food does indeed cause a significant, measurable improvement in foraged item quality and amount of wood dropped, which is listed under the Spoiler for Overall Skil Effects in the main post, but I will copy them here:
        While this alone is evidence that skill levels can temporarily go past level 10 with food buffs, for the sake of confirming that the + Farming skill foods are indeed bugged and it's not some case of only the farming skill being hard-capped at level 10, I performed another test to demonstrate it.

        In this test, I had my new character with Level 4 Farming Skill harvest 50 Parsnips, which yielded 49 regular parsnips and 1 silver parsnip. As explained before, this repeats exactly every time I reload that save, including which particular parsnip is the silver one (it happened to be one next to my scarecrow). After confirming the result a few times just to be safe, on the next 3 reloads I ate a Hashbrowns (+1 Farming Skill) before harvesting. I still get 49 regular Parsnips and 1 silver Parsnip each time, and it's always the Parsnip next to my scarecrow which is the silver one. The + Farming Skill buff has no effect.

        And just to clarify, I don't mind that an upcoming patch may shuffle some of the values and numbers around. I'm not so interested in exactly how much the skills boost things. I just want to know what things the skills boost, since there seems to be widespread misinformation about what things they do or don't boost, whether they are hard-capped at Level 10, etc.
         
        • Obesius

          Obesius Big Damn Hero

          Oh i think i got what you were talking about:
          Food don't work on farming because the result's are rolled in the night before, maybe eating a hasbrown before sleeping can do something?
           
          • Xenonex

            Xenonex Void-Bound Voyager

            Yes, from my testing I determined that crop quality rolls are set the night before, when going to sleep, as already explained in the very first bullet point of the main post. However, this is also true for forageables (except Spring Onions), and drops from chopping trees, while foods still manage to work for them, as I also already explained in the main post. I mention in bullet point #7 of the main post that I already conducted a series of tests involving eating food before sleeping the night before harvesting, with no significant effect.

            The issue is that while the quality rolls for crops, forageables, and trees are all set the night before, eating + Foraging skill foods still does increase the quality of forageables and amount of wood dropped from trees (possibly by adding a fixed value to the preset quality roll, or by some other method). Eating + Farming Skill food, however, does not.
             
              Last edited: Jan 9, 2017
            • ari462

              ari462 Subatomic Cosmonaut

              Ok so something strange happened to me when I tested some stuff with harvesting crops. So I had several crops, but 2 of them were ancient fruit and wheat (just using 2 to keep it simple). With the wheat, I planted 10(seemed like a decent test since I didn't have the resources to test a ton with each crop) and I only had 1 ancient fruit plant, so I harvested that.

              With the wheat, it was like you said, always having 1 silver star and 9 normal. In fact, the 1 starred crop was always in the same spot, which was like what you said. On the ancient fruit though, I mostly got a default fruit with no star, BUT a couple times it came out as gold star. Was a bit odd, any idea why this may be? The wheat which had more plants had no variation while the singke ancient fruit had a little bit.
               
              • Xenonex

                Xenonex Void-Bound Voyager

                I actually haven't gotten far enough into the game to get Ancient Fruit yet, but possibly Ancient Fruit may use similar coding as Spring Onions? As I mentioned in bullet point #4 of the main post, my tests with Spring Onions also would get re-rolled each time I loaded the save, similar to what seems to be happening with your Ancient Fruit. Perhaps someone with knowledge of the game code could tell whether they work similarly "under the hood"?
                 
                  Last edited: Jan 9, 2017
                • ari462

                  ari462 Subatomic Cosmonaut

                  I apologize, I'm totally being one of those people who just reads part of what you posted before posting. I tried to read it all but skimmed parts since I didn't have a tone of time so I missed that, again I'm so sorry because I hate when other people do this lol. So yeah I wonder why certain ones change...
                   
                  • Xenonex

                    Xenonex Void-Bound Voyager

                    Haha no need to apologize! :) I didn't mean to imply you hadn't read it; I just felt like pointing out how interesting it was that we both came across a similar thing and apparently communicated it poorly :p And to be fair I recognize that the wall of text up there is kinda daunting.

                    At this point I'm purely speculating, but for the Spring Onions I wonder if their RNG not being set the night before is related to how they spawn differently from all the other forageables, e.g. they spawn in clusters in one specific place, while other forageables seem to share the same code for spawning, relegated to particular maps. Perhaps they were just programmed a little differently because they had to be added separately? Perhaps it's a bug? I'm not really sure, but in practice the typical player will never notice anything unusual about them, unless they do a lot of save-scumming (like I did while running these tests), so I 'm not overly concerned about it.
                     
                    • Baruch_S

                      Baruch_S Big Damn Hero

                      This is interesting. I had noticed that I pulled significantly more gold and silver star crops (even without using fertilizer) once my farming skill was higher. I had suspected that farming skill increased crop quality, and you've pretty well confirmed that.

                      Now my question is how fertilizer interacts with the farming skill. Does it set override the effect of farming skill on crop quality, add to your farming skill, or act as an additional modifier?
                       
                      • Xenonex

                        Xenonex Void-Bound Voyager

                        Yup, that was actually my next question as well! All my tests were with Deluxe Speed Grow (to reduce testing time), but I'd be interested in comparing crops on Basic/Quality Fertilizer at various Farming Skill Levels. I may do just that, eventually, but it's now been a few days since I've actually played Stardew Valley, as opposed to playing Stardew Valley Diagnostic Testing, so I may hold off for a while.

                        Also, I'd heard some people had looked into the game code to find various things, such as the OP in this thread, or the creators of the Crop Planner. I have no programming experience, but it'd be a huge boon if somebody with the know-how could take a (presumably) quick peek at how Skills are handled in the code, to hopefully give us a much more thorough understanding of how they work, and without doing all this lengthy testing, which can still miss effects that I'm not actively looking for.
                         
                        • ari462

                          ari462 Subatomic Cosmonaut

                          I wonder if Geode breaking works similarly, like when the contents are set.
                           
                          • Xenonex

                            Xenonex Void-Bound Voyager

                            Huh, that's an interesting thought! Well, I saved up 30 geodes to check, and it looks like you're right! I opened all 30, took a screenshot, then reloaded the save and did it again, and I got the exact same items out! However, the order in which you break the geodes matters. In my test, I opened 10 Frozen geodes, then 17 Omni Geodes. Each time I reloaded and opened them in that order, I get the same items. On the other hand, if I reload and open 5 Frozen geodes, then 5 Omni geodes, then 5 frozen geodes again, I'll get the same first 5 items as in my previous test, but the next 10 items I get will be different. Presumably this is because of the way that each geode-opening event "consumes" the next "random" number from the same list that was set the night before.
                             
                            • Tigerle

                              Tigerle Subatomic Cosmonaut

                              Yes, i think it is independent from certain skills. You get the same stuff with all skills at zero and with skills at 10. You can only affect the possibility to find geodes.
                               
                              • Baruch_S

                                Baruch_S Big Damn Hero

                                Now that's interesting. It sounds like the game generates a table of random numbers each night and then works through it in order. Whatever number is next on the list determines the geode's contents, with each random number corresponding to different items from the specific geode type's loot pool.
                                 
                                • Tigerle

                                  Tigerle Subatomic Cosmonaut

                                  As a computer science student and hobby programmer, who had bothers about RNGs, i would definitively say: No!
                                  There will be somewhere a RNG with an internal state which will be saved over night. A RNG don`t produce random numbers. It produces a row of numbers depending on its internal state. And when the RNG on two different timelines is the same state it will produce the same numbers. There is no need to save a row of random numbers beforehand.
                                   
                                  • Obesius

                                    Obesius Big Damn Hero

                                    @Tigerle Unless CA did not wanted people reseting the game to get better drops.
                                    It can be made, just isn't the way most games go.
                                     
                                    • Xenonex

                                      Xenonex Void-Bound Voyager

                                      So I got a response on the subreddit where somebody has apparently looked into the game code a little to hopefully find an answer on this! According to what rabidcow showed in his post, it looks like fertilizer is actually a multiplicative bonus to the chance for gold/silver crops, and not a complete override to the chances, as the wiki currently states. Additionally, his findings on the % chance for quality items based on skill level appear to match very closely with my test results.

                                      Also, I did a side-test to confirm that Foraging Skill grants +1 Wild Berry harvesting every 4 levels (@ lvl 4, lvl8, and lvl 10+2), not just at lvl 4 as the game/wiki indicate.

                                      My ultimate goal is to be able to fully complete a list of what each Skill does, such as the following:
                                      All Skills:
                                      Each level reduces associated tool energy use by 0.1 per use (to my knowledge, this is the only effect explained in-game)
                                      Buffs from + Skill foods can temporarily push the Skill past effective Level 10 (+ Farming Skill foods currently bugged) [Confirmed in my tests]

                                      Farming:
                                      Each level improves the chances to harvest silver/gold quality crops [Confirmed in my tests]
                                      ???Each level may increase the chance to get premium or silver/gold animal products?? [Unconfirmed]
                                      ???Other effects???

                                      Foraging:
                                      Each level improves the chances to harvest silver/gold quality forageables [Confirmed in my tests]
                                      Each level increases the amount of wood dropped from chopped trees [Confirmed in my tests]
                                      Every 4 levels increases the # of berries from berry bushes by 1, up to 4 berries per bush with effective level 12 (obtainable by eating + Foraging food) [Confirmed in my tests]
                                      ???Other effects???

                                      Fishing:

                                      Every even level increases your maximum casting distance by 1
                                      ???Each level may increase the chance to catch silver/gold quality fish??? [Unconfirmed]
                                      ???Each level may increase the size of the green fishing bar??? [Unconfirmed]
                                      ???Each level may reduce speed / amount that fish "thrash about" whole catching??? [Unconfirmed]
                                      ???Other effects???

                                      Mining:

                                      ???Each level may increase the chance find ore/coal/geodes when mining rocks??? [Unconfirmed]
                                      ???Other effects???

                                      Combat:

                                      Each level increases your maximum HP by 5
                                      ???Other effects???

                                      Of course, ideally I'd love it if the game mentioned what these Skills do in-game with something like a tooltip, "Living off the Land" episode, or Library book, etc. E.G.:
                                      "The higher your Foraging Skill, the more high-quality forageables you will harvest, the more berries you will find on bushes, and the more wood you will get from trees! Try eating a + Foraging boosting food before foraging and felling trees!"
                                      I'm still partway through the game, but as far as I know, all it tells you about is the reduced energy use with tools part, and a vague mention that eating the right food may be necessary for catching Legendary fish.

                                      As far as the issue with + Farming Skill foods appearing to be bugged, I had made a post in the Support section of the forums, but am not sure if that is the best way to report it? Is there some other method of submitting bug reports?
                                       
                                        Last edited: Jan 11, 2017
                                      • Obesius

                                        Obesius Big Damn Hero

                                        To add on Foraging, i created a new char, and colecter foraging as usual, when salmonberry's got out i was picking one per bush.
                                        I passed the first level (Went to lv 2)
                                        Grabbed 2 salmonberry's on each bush.

                                        So maybe the upgrade start's at lvl 2:
                                        2, 6, 10 and 14?
                                         
                                        • Xenonex

                                          Xenonex Void-Bound Voyager

                                          Hmmm, interesting! You weren't under the effects of any Foraging boosting food, like Pancakes, were you? I haven't run tests at those low levels yet, but here are the data points I have so far:

                                          Level 0 = 1 berry
                                          Level 4, 5, 6 = 2 berries
                                          Level 8 (6+2) = 3 berries
                                          Level 10 = 3 berries
                                          Level 12 (10+2) = 4 berries
                                          Level 13 (10+3) = 4 berries

                                          I can try checking at the lower levels too, to see when it first changes over from 1 berry to 2 berries.

                                          Also, I don't where to put it, but just wanted to add that I did tsome testing to confirm that Farming XP is granted per harvest action, not per # of crops harvested. Meaning that crops which yield multiple items on harvest (blueberries, cranberries, coffee beans, potatoes sometimes) don't give you multiple times the Farming XP. In practice this just means that harvesting a 3 x 3 piece of farm seeded with Bok Choy gives you the exact same amount of XP as harvesting a 3 x 3 piece of farm seeded with cranberries, since they both give 14 Farming XP per harvest, even though you get about twice as many actual cranberries to sell as bok choy to sell.

                                          The implication just being that you get more Farming XP from harvesting crops which have a higher base value per-crop, ignoring how many crops may be harvested at a time. And of course crops harvested with a Scythe still grant 0 XP from a bug :p.
                                           

                                          Share This Page