Modding Discussion Dino Mayo?

Discussion in 'Mods' started by tcjaime, Jun 23, 2019.

  1. tcjaime

    tcjaime Scruffy Nerf-Herder

    Hello, Mod Savvy People!!

    Any chance at getting an artisan product for dino eggs? Maybe dino mayo? Dino cheese? Or whatever your lovely, creative minds come up with??

    Please? Pretty please with the Mayor's Shorts on top???
     
    • minervamaga

      minervamaga Pangalactic Porcupine

    • tcjaime

      tcjaime Scruffy Nerf-Herder

      I took a look at that mod, and wow, it adds a bunch of stuff. Cool stuff, but not things I want. Plus it has a bunch of mod prerequisites. I just want dinosaur mayonnaise with the existing machines. Pretty Please??
       
      • minervamaga

        minervamaga Pangalactic Porcupine

        It requires a SMAPI mod to modify the existing mayo machine then.
         
        • Digus

          Digus Spaceman Spiff

          I case anyone is interested in doing it, this is the part of the Object.performObjectDropInAction method that handle the Mayonnaise Machine.
          Code:
          if (this.name.Equals("Mayonnaise Machine"))
                {
                  switch (object1.ParentSheetIndex)
                  {
                    case 107:
                    case 174:
                    case 182:
                      this.heldObject.Value = new Object(Vector2.Zero, 306, (string) null, false, true, false, false)
                      {
                        Quality = 2
                      };
                      if (!probe)
                      {
                        this.minutesUntilReady.Value = 180;
                        who.currentLocation.playSound("Ship");
                      }
                      return true;
                    case 176:
                    case 180:
                      this.heldObject.Value = new Object(Vector2.Zero, 306, (string) null, false, true, false, false);
                      if (!probe)
                      {
                        this.minutesUntilReady.Value = 180;
                        who.currentLocation.playSound("Ship");
                      }
                      return true;
                    case 305:
                      this.heldObject.Value = new Object(Vector2.Zero, 308, (string) null, false, true, false, false);
                      if (!probe)
                      {
                        this.minutesUntilReady.Value = 180;
                        who.currentLocation.playSound("Ship");
                      }
                      return true;
                    case 442:
                      this.heldObject.Value = new Object(Vector2.Zero, 307, (string) null, false, true, false, false);
                      if (!probe)
                      {
                        this.minutesUntilReady.Value = 180;
                        who.currentLocation.playSound("Ship");
                      }
                      return true;
                  }
          With that info and my code for Custom Crystalarium Mod, it's not difficult to create a "Custom Mayonnaise Machine" equivalent.
          https://github.com/Digus/StardewValleyMods/tree/master/CustomCrystalariumMod
           
          • minervamaga

            minervamaga Pangalactic Porcupine

            Hmm, I may have my first SMAPI mod in the making right there. Thanks!
             
              Digus likes this.
            • minervamaga

              minervamaga Pangalactic Porcupine

              Update: I was able to get the machine to take the dino eggs, but it doesn't account for the value of the initial input. Have to quit for the night, but I'll keep taking a stab at it :D
               
              • Digus

                Digus Spaceman Spiff

                I'm not sure I understood what you mean by this.
                 
                • minervamaga

                  minervamaga Pangalactic Porcupine

                  So, with CFR machines, you can make it like kegs/preserves jars and make the value of the product equal "initial value of crop multiplied by X". So kegs are x 3, preserve jars are x 2. Putting a dino egg into the machine currently only makes regular mayo, which is worth less than the egg itself. So I want to include a way to make it output "*name of input* mayo", worth say x 2 of the input. Does that make sense?
                   
                  • Digus

                    Digus Spaceman Spiff

                    Ok, now I understood.
                    That is because Wine/Juice, Jam/Pickles work differently than any other item.
                    Mayonnaise from different eggs kinds are completely different item. Or the same item with different quality.
                    If you look at the original code, see that they create object with different ids for each egg.
                    Duck Eggs(442) become Duck Mayonnaise(307)
                    Void Eggs(305) become Void Mayonnaise(308)
                    White and Brown Eggs(176 and 180) become Mayonnaise(306)
                    Lage White, Large Brown and Dino Eggs become Mayonnaise(306) with Gold Star Quality.

                    So, if you see, Dino Eggs is already accepted by the machine, you just have to change the item.
                    You need to create a Dino Mayo with its own id and price as a different item.
                    Than, when the player place the Dino Egg in the machine, you create that object with that id and replace the regular egg with gold quality with it.
                     
                      minervamaga likes this.

                    Share This Page