RELEASED Custom Crystalarium Mod [v1.1.0]

Discussion in 'Mods' started by Digus, Jul 15, 2018.

  1. Digus

    Digus Spaceman Spiff

    Custom Crystalarium Mod

    Current version:
    1.1.0
    • Adds an option to the config that let you get your object back if you change it on the crystalarium or if you remove it from its place.
    • Adds an option to the config that let you immediately get the object back after placement.
    Objective:
    The first objective of this mod was to add the prismatic shard to the crystalarium as some players wished for. To make it balanced, the shard takes 14 days to be cloned. It makes the prismatic shard slightly worst than the diamond to make money with the crystalarium, so the advantage is a way to get most loved gift consistently. But will take 14 days to get the gem back, and a full month to get a second one.
    Since I was already modding that, is seemed useful and easy to let players choose which ever object they want to place in the cristalarium for cloning. You can even change the current time it takes to clone the gems and minerals.

    Disclaimer:
    This mod only work with Stardew Valley 1.3.X-beta
    There is now two version, one compatible with the beta 1.3.X and an alternative version compatible with Stardew Valley 1.2

    Installation:
    How does it work:
    • You will receive a letter explaining the changes, saying that they were wrong about the effects of the EMF interacting negatively with the shard. Since we have a book in the library giving a reason for the prismatic shard not to work, I thought it was needed to retify the game lore.
    • The letter is just for flavor though, once you install the mod it should already be working, you can even disable the letter in the config file.
    • Once you start the game for the first time, the file 'CrystalariumData.json' will be created in the 'data' folder of the mod.
    • Here is an example on how to add more items in the file. This adds the iridium bar with 7 days time to clone, and all trash items will be cloned in 30 minutes:
      {
      "74": 20160,
      "337": 10080,
      "-20": 30
      }
    • The format of the file is an serialization of a C# Dictionary.
    • You need to place an object Id or Category between double quotation marks, followed by colon and the time on in game minutes to clone the object. If you want another object, you need to place a comma and repeat. Everything needs to be between braces.
    • A full in game day is 1440 minutes.
    • There are two config options to change the deafult way the crystalarium works, these are the options:
      • Default: The crystalarium destroy the object to copy it.
      • BackOnChange: The crystalarium hold the object to copy it.
      • BackImmediately: The cystalarium scan the object to copy it.
    Config options:
    Run the game at least one with the mod installed to create the config.json file. You can edit this file to change the configuration.
    • "DisableLetter": (false|true) Enable or disable the letter explaining about the change to the crystalarium.
    • "GetObjectBackOnChange": (false|true) If true, you will get any item you place back from the cystalarium if you place a new item or remove if from the ground.
    • "GetObjectBackImmediately": (false|true) If true, the crystalarium will let you get the item you placed back immediately. Also, the GetObjectBackOnChange option will be ignored.
    Internationalization:
    This mod is compatible with SMAPI support to i18n files. It has an official translation for pt-BR, but you can translating for your language following this instructions: https://stardewvalleywiki.com/Modding:SMAPI_APIs#Translation

    Uninstall:
    • Delete the mod from the installation folder.
    Special Thanks:
    • Takizuzufu - Who requested for the prismatic shard to be compatible with the crystalarium at the official forums.
    • coldazrael - Who requested for the crystalarium to give the item back if you accidentally hit it with the pickaxe.
    • Everyone on the modding discord channel that are always super helpful
    [​IMG]

    [​IMG]
    [​IMG]
    [​IMG]


    Source:

    https://github.com/Digus/StardewValleyMods/tree/master/CustomCrystalariumMod

    My Other Mods:
     
      Last edited: Aug 4, 2018
    • Digus

      Digus Spaceman Spiff

      Since someone requested. I released an alternative version of the mod that works with Stardew Valley version 1.2
      Just get the optional file in the nexus page.
      It requires MailFrameworkMod 1.2.0
       
      • coldazrael

        coldazrael Existential Complex

        Hey there, does this mod do some kind of 'refund'?
        I mean its like when I accidentally swung a pickaxe on a working crystalarium, could I get the prismatic shard back?
         
        • Digus

          Digus Spaceman Spiff

          It might be some troublesome to implement that.
          What I'm thinking of adding is a config option to immediately get back the item you placed. It would be like if you scanned the item but the crystalarium does not need to keep it to copy.

          edit: I was able to implement both ideas. I will prepare a version with both of them. Yours will be set enable by default since its something that is balanced and make sense. But I will let people disable it.
          I will also let people enable the option of the get the item back immediately, but when that is enabled, they won't get the item back when removing the crystalarium even if enabled, since that would let them clone the object without waiting anytime.
          Thank you for the idea.
           
            Last edited: Jul 18, 2018
          • coldazrael

            coldazrael Existential Complex

            I should be the one who thanked you, man o_O I was just spitting shit cuz I lost my only diamond and I didn't expect it turned out to be an idea lol
            Go with it, it's still takes long time to use this mod anyway, since right now I only owned 1 prismatic shard atm, and obviously I'd rather farm another one before putting it in, and i should be extra careful before i swing a tool around any crystalarium lol

            I used all your mods and they never disappoint me (although the custom crystalarium needs to be on hold), keep up the great work man :up:
             
              Digus likes this.
            • Digus

              Digus Spaceman Spiff

              I gave it some thought and I actually think I need to implement an item swap option when changing the item. Otherwise to get the best of the suggestion you gave, you would always want to remove the crystalarium before placing another object, or you would lose an potential item.
              So I will make two options:
              AlwaysGetYouObjectBack and GetObjectBackImmediately

              AlwaysGetYouObjectBack will give your item back when you change it, or when removing.
              GetObjectBackImmediately will give your item back as soon as you place it in. But you won't get any on swap or removing since you already got your item back.

              The second option is kind of cheat since you can set any number of crystalarium using just one prismatic shard, without having to wait anything.
              The first option is just a little bit cheat, the only exploit I see is, if you just want two of the same item, you just need to produce one than remove the first from the crystalarium. Before, you would have two wait two full cycles.

              So I will make them both optional by default. They will be on the config file.
              But I'm also thinking of adding an in game way of changing it. But that would involving adding more options to the MailFrameworkMod and would take more time. I will probably just release the config options for now.
               
                Last edited: Jul 18, 2018
                HopeWasHere likes this.
              • Digus

                Digus Spaceman Spiff

                Just released version 1.1.0
                Changed the names of config options a little, but everything is working as explained before.
                 
                • coldazrael

                  coldazrael Existential Complex

                  I guess ill pick the less-cheating one..

                  Another question
                  you know that if you swing a tool to a contained chest, the chest won't be removed, could this feature be implemented in a working crystalarium? so the crystalarium could only be removed if the duplicated item is ready
                   
                  • Digus

                    Digus Spaceman Spiff

                    I could look into it.
                    But this has some implementation problems. In the case of chest, you can just remove the items from inside and than remove the chest. Crystalarium once you put the item inside you can only wait. If you want to remove it, you could have to wait up to 7 days to get your diamond. If you forget to use the pickaxe instead picking it first, another seven days. And it won't even be easy to hit the crystalarium without getting the item back since once you are on range and put the cursor over it, it will change to get the item.
                    I could try to make it need two or more hits before removing it, but this could be troublesome to implement.
                    I think the way it is now is fair enough, you might lose progress if you accidentally hit it, but you won't lose the item.
                    I have plans for another mod now, so I will work on it first.
                     
                    • coldazrael

                      coldazrael Existential Complex

                      Oh dear looks like I overthink myself lol, yeah you're right, losing the progress is quite okay as long not losing the item. Just scratch that idea, this is totally enough for me after I rethink myself. Thank you so much man.

                      About the two hits though, I don't know it's really that troublesome to implement, is the code structure somehow different with the two hits that you implemented on your animal husbandry mod? I thought it would be easier for you since you already experienced the two hits on your animal husbandry mod.
                      PS : Just asking though, no need to implement this idea anyway imo xD
                       
                        Digus likes this.
                      • Digus

                        Digus Spaceman Spiff

                        Its different because the meat cleaver is a whole new tool. The whole code for it function was made by me. Its easier to control the logic that way.
                        In this case, the pikeaxe would still be the one to remove the Crystalarium. So I would have to do it by patching the game code. It can be done, just more troublesome, like I said.
                         

                        Share This Page