Modding Help Trying to create Bundle

Discussion in 'Mods' started by blisfulloblivion, Mar 16, 2018.

  1. blisfulloblivion

    blisfulloblivion Scruffy Nerf-Herder

    To get more life out of the game and get more value out of the More Crops Mod I've been trying to figure out how to create custom bundles. I'm trying to use the Community Center Modifier by clsource. I have no coding experience, leaving me a bit lost.

    I want to incorporate custom crops into bundles and clsource's tool looks great. The Quick Use link only includes vanilla items. Can someone help me figure out how to download and install the necessary programs listed in the Readme file and how to modify the source files to include the extra crops?
     
      HopeWasHere likes this.
    • MysticTempest

      MysticTempest Spaceman Spiff

      The "Community Center Modifier" is just a graphical interface for editing the values in the "bundles.xnb" file.

      It looks like the CC Modifier has its own set of game data files in the "resources/yaml/" folder.
      That's probably all you would need to swap out, but I haven't tested it.

      ===========
      I'll give you a quick rundown of the manual way to edit these. Since learning this way will be better in the long run; especially with the new update on the way.

      It'll help to have these resources at the ready:
      SDV Wiki - Bundles(It's a good visual ref):
      https://stardewvalleywiki.com/Bundles

      XNBnode (for extracting the yamls from the following files): https://stardewvalleywiki.com/Modding:Editing_XNB_files#Getting_started

      Files:
      Content/Data/Bundles.xnb
      Content/Data/BigCraftablesInformation.xnb
      Content/Data/ObjectInformation.xnb

      MoreCropsUnofficialContinuation mod(so that you're using an up-to-date data set): https://community.playstarbound.com...icial-continuation.129349/page-6#post-3154045

      -----
      After you've extracted the yaml files from the XNBs above & have the wiki open as a good visual reference. Let's start.

      If we take a look at the first few data lines in the 'Bundles.yaml' we see this.
      Code:
        Pantry/0: "Spring Crops/O 465 20/24 1 0 188 1 0 190 1 0 192 1 0/0" #!String
        Pantry/1: "Summer Crops/O 621 1/256 1 0 260 1 0 258 1 0 254 1 0/3" #!String
        Pantry/2: "Fall Crops/BO 10 1/270 1 0 272 1 0 276 1 0 280 1 0/2" #!String
      
      1. Now, the name is obvious. That's the Pantry room of the community center.

      2. The 0,1 & 2 following "Pantry/" are signifiers that are written to the save file which the game uses for identifying specific bundles in the code.

      3. The "Spring/Summer/Fall Crops" are the names of the sub-bundles under the Pantry Room.

      4. This next part deals with the rewards.
      Code:
      /O 465 20/
      /O 621 1/
      /BO 10 1/
      
      The first value is a captial "O"; it stands for 'Object'. This means you'll need to reference the "ObjectInformation.yaml" file for the value that immediately follows the 'O'.
      If we take a peek in that file; we see the first 2 lines are Speed-Gro(465) & and a Quality Sprinkler(621).
      The number following the ObjectID# are how many of that item. So, the game gives you 20 Speed-Gro, and just 1 Quality Sprinkler.

      The Fall Crops bundle however uses "BO" instead of "O" which means it's not giving you an object; it's giving you a big object, aka.. big craftable.
      So, we reference the "BigCraftablesInformation.yaml" file for its number. And, we see that the BO# of 10 equates to a Bee House; and you are given only one.

      Not shown in my example snippet above, but there's also a 3rd value of "R". It stands for rings which the game does a little differently. However, you still reference the ObjectInformation file for these.

      5. These next values are the main parts you will want to edit. They are all the items the bundles accepts & how many. Their data is pulled from the "ObjectInformation.yaml" file.
      Also, the "0" in between each set of numbers are the quality of each item. "0" is default, aka normal quality.

      Quality levels:
      Normal - 0
      Silver - 1
      Gold - 2
      Iridium - 3


      For example, 24 is a Parsnip, and you only need 1, and it has no quality, so it's a normal parsnip. Then following that is a Green Bean, etc..
      Code:
      24 1 0 188 1 0 190 1 0 192 1 0/
      

      EDIT (after some further testing):
      6.
      The final numbers are related to the bundle colors.
      Code:
      0 = lime green
      1 = purple
      2 = orange
      3 = yellow
      4 = red
      5 = light blue
      6 = white
      
      So, the final "0, 3, and 2" in the Pantry crops above for Spring, Summer and Fall will have lime green, yellow and orange colored bundles respectively.

      Note:
      Some may have an extra number following the color number. For example, the "Animal" bundle has a '5' after the color number(4 which is red).
      Code:
      Pantry/4: "Animal/BO 16 1/186 1 0 182 1 0 174 1 0 438 1 0 440 1 0 442 1 0 639 1 0 640 1 0 641 1 0 642 1 0 643 1 0/4/5" #!String
      
      That number means the bundle only requires 5 of the chosen items listed.

      ---------------------------

      So, now that the basics are out of the way. You can check out the MoreCrops data; either the XNB or Content Pack(which doesn't need unpacking & has only mod data). They both have the needed data.
      And, look at the ObjectInformation section. The MoreCrops mod data currently starts at ObjectID# 797.

      From there you can swap out ObjectIDs, and adjust the data as you wish to create the custom bundles you're looking for.
      Hope that helps!
       
        Last edited: Mar 20, 2018
      • blisfulloblivion

        blisfulloblivion Scruffy Nerf-Herder

         
          Last edited: Mar 17, 2018
          MysticTempest likes this.
        • HopeWasHere

          HopeWasHere Existential Complex

          Is there a way to add new bundle locations this way, or would you need SMAPI for something like that?
           
          • MysticTempest

            MysticTempest Spaceman Spiff

            You'd need SMAPI. Editing is okay, but adding new data seems to not work; and will also glitch out the data file breaking new saves.
             
              HopeWasHere likes this.
            • ShneekeyTheLost

              ShneekeyTheLost Master Astronaut

              You might also want to go ahead and use Content Patcher for the edits, because that way it will be compatible with other mods that might edit the same file. It's a great way to do XNB style mods with a ton more support.
               
              • blisfulloblivion

                blisfulloblivion Scruffy Nerf-Herder

                It would be nice if extra bundles could be added to the furnace room since it only has 3 vs the 6 bundles most other rooms have. Add a recycle bundle and maybe a craftables bundle.
                 
                • blisfulloblivion

                  blisfulloblivion Scruffy Nerf-Herder

                  It also always bothered me that there is that an unused room (kitchen) in the upper left corner of the CC. It would be awesome if a new star was added to the center of the Star Board for the kitchen.
                   
                  • blisfulloblivion

                    blisfulloblivion Scruffy Nerf-Herder

                    Does anyone know where the images for the bundles are stored?
                     
                    • MysticTempest

                      MysticTempest Spaceman Spiff

                      It looks like the bundle sprite backgrounds are under: Content/LooseSprites/JunimoNote.xnb
                       
                      • blisfulloblivion

                        blisfulloblivion Scruffy Nerf-Herder

                        Thank you. I have another question. For some reason the Animal Bundle in the Pantry is all in one line instead of dispersing like the other bundles. Is there a way to fix that?

                        xxxx vs xxxxxxxx
                        xxxx

                        I figured out that the last number in the line effects required # to turn in (ex. the 3 in 182 1 0/6/3" #!String)
                        but what does the number before that do? I can't seem to figure it out (ex. the 6 in the line above)
                         
                        • MysticTempest

                          MysticTempest Spaceman Spiff

                          Hey blisfulloblivion, I'm not quite sure what you mean about the lines dispersing. Each bundle SHOULD be on one line; even if they're a bit longer than the other lines.
                          Make sure you don't have word-wrap active.


                          Yea, sorry about that. I was going off of memory when I wrote the guide part. I had some free time to go test things out again, and remembered(and updated my post).

                          As you mention the final #3 is related to required slots for the bundle.
                          While the 6 before it relates to the bundle color; in this case being White.

                          Color list:
                          Code:
                          0 = lime green
                          1 = purple
                          2 = orange
                          3 = yellow
                          4 = red
                          5 = light blue
                          6 = white
                          
                           
                          • blisfulloblivion

                            blisfulloblivion Scruffy Nerf-Herder

                            No need for apologies, I'm just grateful that you have taken the time to explain this for me :) And thank you for figuring out the bundle colors!


                            As for what I was asking about before if you look at bundles such as the Exotic Foraging bundle you will notice that the items needed are displayed in two rows where the Animal bundle is just one long row. Is there a way to make it split like the other bundles? Adding or reducing required items once it exceeds 4 seems to automatically start a new row except with the Animal bundle.
                             
                            • MysticTempest

                              MysticTempest Spaceman Spiff

                              Ah, no prob ^-^

                              Oh okay, I see what you mean now. I was thinking you meant the data in the yaml file, but you're talking about visually in the CC menu.
                              So, ConcernedApe actually added in some meats to the Animal bundle. But, since they were never officially used in-game there's no corresponding data, & are invisible.
                              If you delete them; the invisible line that they're on will be clear for the other items to wrap around on to.

                              Delete from "Animal bundle":
                              Code:
                              639 1 0 640 1 0 641 1 0 642 1 0 643 1 0
                              
                               
                              • PartyPan

                                PartyPan Void-Bound Voyager

                                does anyone know if it is possible to make a bundle in a spot that is not in the cc but in a new location you
                                made?
                                 
                                • Talkingcamara

                                  Talkingcamara Void-Bound Voyager

                                  Maybe look into Custom Community Centre mod?
                                   

                                  Share This Page