RELEASED Mining at the Farm

Discussion in 'Miscellaneous' started by Nishtra, Oct 28, 2016.

  1. Nishtra

    Nishtra Big Damn Hero

    StardewValley - Mining At The Farm.png
    Update 12.12.2016
    Mining at the Farm v1.6
    Better Quarry v1.2


    All mods require SMAPI
    SMAPI 1.3 allows to use mods without recompiling them specifically for each OS, so these mods should work on Mac and Linux as well as Windows


    Mining at the Farm
    Link to Nexus

    Imrove the quarry of the Hill-Top farm or make your own quarry on any farm map.

    With this mod you can:
    1. Set your own coordinates for the quarry.
    2. Set what types of items you want to spawn. There are ores and geodes that spawned originally, and also gem nodes and mystic stones that didn't.
    3. Set spawn chances.

    The quarry with different coordinates
    DifferentQuarryCoordinates + OresOnDay10 + forageables.jpg

    Standard quarry with 1 day worth of stones
    StandardQuarry 1day.jpg

    Standard quarry at the end of the week
    StandaedQuarry EndOfTheWeek.jpg

    Ore spawning doesn't threaten your crops and can be done on the normal farm map
    2016-11-02_07-37-16 notes mining.jpg

    Exluding areas from spawn in v1.6
    exluding areas from spawn (1).jpg
    exluding areas from spawn (2).jpg



    About the map creation spawning.
    • Unfortunately (or maybe fortunately) SMAPI doesn't allow removing or changing existing methods so there is no way to turn off the spawning at the start.
    About spawn chances.
    • All spawn chances depend on daily luck and most of them on your mining skill.
    • The chances for iridium ore (yes there is a chance for it) and mystic stones are hardcoded as 2% and 0.5% respectively and don't depend on character's mining level.
    • Luck has greater effect on the more rare/valuable items. On the very lucky day (dailyLuck = 0.1 in the game code) it can triple (x3) the chance for iridium ore and quintuple (x5) the chance for mystic stones!
    • More details in the readme file.


    PS Part of the credit for the idea how to make scaling better goes to Lawtonfogle. Upgraded Hill Top Ores


    Better Quarry
    Link to Nexus

    BetterQuarry.jpg

    Almost all the same features from the main "Mining at the Farm" mod for standard Stardew Valley quarry if you want to make more useful or just more interesting. 2 notable differences from "Mining at the Farm": 1) you can set your own chances for Mystic Stone spawn and 2) there is an option to spawn geode minerals alongside ores and gems (mostly to make the quarry look more colorful, since minerals are not really useful).


    Mining with Explosives
    Link to Nexus

    A small and not-really-simple mod that fixes game behavior when using bombs outside of mines would destroy* ores and gems. Now you can use esplosions to clear the quarry at the farm or in the mountains without risking to lose valuable items.
    *technically speaking, just wouldn't spawn them

    Highly reccomended using this mod alongside "Mining at the Farm" and/or "Better Quarry"

    Using bomb at the farm "mini-quarry"
    gif explosion farm.gif

    Using bomb in the mountain quarry
    gif explosion quarry.gif


    If you want special features of the Forest farm in the form of forageable items and close source of hardwood check "Forage at the Farm" thread.
     

      Attached Files:

      Last edited: Dec 12, 2016
    • Nishtra

      Nishtra Big Damn Hero

      Update
      Removed the restriction to Hill-Top Farm map. Now can be used on all farms (still is restricted in config by default. Change the respective setting).
      Added the setting for tile properties where objects can be spawned. Available values "Dirt", "Grass" and "Diggable".
      Fixed the triggering condition.
      Fixed conditional statements that locked the spawn of gems to be dependent on the mine level regardless of the option setting.

      Since the mod can now be used on every farm thread was renamed "Hill-Top Farm Quarry - New and Improved" => "Mining at the Farm"
       
      • TheRingisHot

        TheRingisHot Scruffy Nerf-Herder

        I really like the idea behind this mod. I wonder is it possible to apply the same functionality for the quarry? That said i dont have any idead as to whether the stardew quarry and the hilltop quarry share the same spawn patterns.
         
        • Nishtra

          Nishtra Big Damn Hero

          The algorithms are different, but it's entirely possible to make a similar mod work for quarry with some adjustments to the code. At least I don't see any problems on the surface. The most troublesome part of work would be balancing of spawn chances.
          If there is a request I can make it when I have free time.
           
          • Coolwyngs

            Coolwyngs Giant Laser Beams

            That sounds amazing would please try to make it.
             
            • Lilliput

              Lilliput Supernova

              Interesting. Zen rock garden, anyone?
               
              • TheRingisHot

                TheRingisHot Scruffy Nerf-Herder

                That would be cool
                 
                • Nishtra

                  Nishtra Big Damn Hero

                  Finished with the quarry. Although, I used SMAPI 1.0, so there may be some patches in the future, but in my tests there weren't any problems.
                  I made 2 additional setting to make things more interesting:
                  1. "replaceExistingObjects" - the mod will replace already existing stones/ores with new ones. Now you can lose valuable items if you don't visit the quarry reguraly (except, Mystic Stones. Because they are mystic ...and too rare to lose).
                  2. "spawnMinerals" - spawn the minerals that usually drop from geodes, just to make the quarry more interesting, since they don't sell for much.


                  BetterQuarry Fall_9.jpg BetterQuarry Fall_18.jpg


                  Also, I added a new version of the farm mining mod to use with SMAPI 1.0
                   

                    Attached Files:

                    Last edited: Nov 19, 2016
                    Ardalis, Coolwyngs and TheRingisHot like this.
                  • Koutetsu

                    Koutetsu Scruffy Nerf-Herder

                    Hi Nishtra,

                    I can't seem to get the better quarry mod to work; I've tried a lot of different settings in the config, but it still only seems to spawn 3-5 things daily... I really would love to use this mod though. My question is: would I need to have the other mod you did as well? Is this one somehow dependent on that one?
                     
                    • Nishtra

                      Nishtra Big Damn Hero

                      @Koutetsu What version of SMAPI did you use?
                      I switched to the to new version of SMAPI too quickly, so the current version of the mod is compatible exclusively with SMAPI 1.0 >_> I'll try to fix it today.
                      Otherwise the mod should work fine.

                      Also, the only setting that affects the number of spawned items is "guaranteedNumberOfObjects". Although, since selected tile can already be occupied, it's not really guaranteed number.
                       
                      • Koutetsu

                        Koutetsu Scruffy Nerf-Herder

                        I think I'm using SMAPI 40.1.1... I am not able to check it atm though. Thank you for offering to fix it to work with other versions, I really appreciate your help!!!!

                        Edit: I have updated to 1.0 and it works perfectly. Thanks a lot Nishtra, I didn't realise that SMAPI had been updated :zzz:
                         
                          Last edited: Nov 19, 2016
                        • Nishtra

                          Nishtra Big Damn Hero

                          I have finished patching my mods. So...
                          Update
                          Mining at the Farm updated to 1.3.2 versions for SMAPI 0.40 and SMAPI 1.1. Downloads are in the top post.
                          Better Quarry updated to 1.0.1 (mainly patching and small fixes) versions for SMAPI 0.40 and SMAPI 1.1. Downloads are in the top post.
                          Versions for SMAPI 0.40 will work with later versions for several future SMAPI updates (until old methods are fully deprecated)

                          PS @Koutetsu I ran a small test in the quarry

                          I set the "guaranteedNumberOfObjects" to 20
                          BetterQuarry 12th.jpg BetterQuarry 13th.jpg BetterQuarry log.jpg

                          As you can see in the log the real number is considerably smaller than what you set, but I don't want to rename the setting :)


                          PS I tried compiling a Mac/Linux versions using SDVCrosscompile and would greatly appreciate if someone who uses these OS confirmed if it works
                           

                            Attached Files:

                            Last edited: Nov 20, 2016
                          • ShneekeyTheLost

                            ShneekeyTheLost Master Astronaut

                            Testing Better Mining on Linux, and I have a question for you:

                            You say that in 1.3, you have removed the restriction on HillTop only, but it is still defaulting to HillTop Only, and to change the 'respective config setting'. Which config setting should be changed so that it works on other maps as well?

                            So far, at least it hasn't crashed, so I think it is working properly, but I don't have a HillTop map save (my least favorite map other than the fishing map), so I can't be certain.
                             
                            • Koutetsu

                              Koutetsu Scruffy Nerf-Herder

                              Hello again Nishtra, I am so sorry to be a pain, but SMAPI 1.2 is out and unfortunately your mod's not working again :zzz: any chance you could update this soon?

                              NVM: I reinstalled the version you did for SMAPI 0.40.03 and it loads normally
                               
                                Last edited: Nov 26, 2016
                              • Nishtra

                                Nishtra Big Damn Hero

                                What do you mean? I just double checked the code and there is not any references to the type of farm map, it should work on all farms. Can you play for a couple in-game days with attached config file (unpack and replace an existing one) and then look at SMAPI console - the mod logs a message when it successfully spawns an item like in the attached picture. This config is set to move the spawn area in front of the house and raise all spawn chances.

                                @Koutetsu Strange o_O I just ran the game with SMAPI 1.1 version of the mod active and there weren't any problems. Can you describe how it didn't work (OK, this is weird phrasing)? Did it log any messages in SMAPI console?
                                 

                                  Attached Files:

                                • Nishtra

                                  Nishtra Big Damn Hero

                                  UPDATE
                                  Mining at the Farm

                                  1.4
                                  Added "skillLevelCorrelation" (lock certain ores/gems from spawn until required skill level is reached) and "personalExperienceCorrelation" (lock certain ores/gems from spawn until they are found and shipped) settings.
                                  Added "bonusPerSkillLevel" setting to affect the number of items to spawn.
                                  Replaced "initialSpawnChance" with "baseNumber" to make the setting more understandable and give more stable results.
                                  Removed "explodeValuables" option to avoid confusion when using "Mining with Explosives" mod. All items except Mystic Stones can be destroyed with bombs.
                                  Changed "soilType" setting to accept several values.
                                  Items can now spawn in the grass (not just a tile with Grass property) and on hoed tiles.
                                  Reworked item selection code.
                                  1.5
                                  Added "discovering" new mineable objects (respawning rocks as new items) with shipping ores/gems and/or raising mining skill level.
                                  Added "verbose" setting to configure the amiunt of messages logged to console.

                                  The "special feature" of v1.5 is the reason I put off the release. The feature no one asked for, no one needed and few will see... [sarcasm] it was really smart to put so much time into it [/sarcasm]

                                  Better Quarry

                                  v1.1
                                  Added "skillLevelCorrelation" (lock certain ores/gems from spawn until required skill level is reached) and "personalExperienceCorrelation" (lock certain ores/gems from spawn until they are found and shipped) settings.
                                  Added "bonusPerSkillLevel" setting to affect the number of items to spawn.
                                  Added "discovering" new mineable objects (respawning rocks as new items) with shipping ores/gems and/or raising mining skill level.
                                  Added "verbose" setting to configure the amiunt of messages logged to console.
                                  Replaced "initialSpawnChance" with "baseNumber" to make the setting more understandable and give more stable results.
                                  Removed "explodeValuables" option to avoid confusion when using "Mining with Explosives" mod. All items except Mystic Stones can be destroyed with bombs.
                                  Reworked item selection code.


                                  Mining with Explosives
                                  A new mod highly reccomended to use with Mining at the Farm and/or Better Quarry.
                                   
                                  • Coolwyngs

                                    Coolwyngs Giant Laser Beams

                                    Sounds nice Nishtra thanks for your hard work.
                                     
                                    • Nishtra

                                      Nishtra Big Damn Hero

                                      UPDATE
                                      Mining at the Farm 1.6
                                      Added an option to exclude areas from spawn.
                                      Added base spawn chance for each ore to config.
                                      Reworked settings defining a spawn area. Now it is possible to select several areas.
                                      Reworked spawn area definition and tile selection code.
                                      Fixed bug that prevented spawning ores and gems.

                                      Better Quarry 1.2
                                      Added base spawn chance for each ore to config.
                                      Fixed bug that prevented spawning ores and gems.
                                       
                                      • MbahGondrong

                                        MbahGondrong Seal Broken

                                        Do I have to install both Mining at the Farm and Better Quary or only one of them will be sufficient?
                                         
                                        • Nishtra

                                          Nishtra Big Damn Hero

                                          @MbahGondrong Mining at the Farm affects farm quarry, Better Quarry affects quarry in the mountains that you gain access to after completing Crafts Room bundle. If you want better spawn rates for both of them, then you need to install both mods.
                                           
                                            MbahGondrong likes this.

                                          Share This Page