Modding Help Getting IDs for non-JsonAssets custom items?

Discussion in 'Mods' started by Morigale, Dec 10, 2019.

  1. Morigale

    Morigale Scruffy Nerf-Herder

    I've been working on some bundle replacements for the community center with items from various mods, and the majority of them use JsonAssets so I've been able to just go through that to get the IDs.

    Then I tried to add a CFR machine as a reward and it turns out that JA's 'GetBigCraftableId' doesn't pick up outside mods.

    Is there another relatively simple method to get the ID for items it doesn't support?

    Thank you!
     
    • Melindee

      Melindee Big Damn Hero

      Sadly there's no set ID numbers for custom items. You need to add dependecies for your mod to work and be sure that the mods are compatible with the new update. CFR is being buggy at the moment so that might be an issue too.
       
      • Morigale

        Morigale Scruffy Nerf-Herder

        I realize there are no set ID numbers, that's why I'm looking for a way to get the IDs once they're assigned.

        I just tried setting CFR as a dependency, but that didn't let GetBigCraftable find the ID number - I also tried the name of a vanilla game item and it couldn't get the ID for that either, so that's why I assume it only gets its own items. (Asking it for a potted flower from Farmer to Florist worked fine.)
         
        • Melindee

          Melindee Big Damn Hero

          I think the only way is look at the SMAPI log.
           
          • Bonster42

            Bonster42 Void-Bound Voyager

            You can use the name in quotation marks. So if, for example, you wanted to use a lychee fruit, instead of a number you would use "lychee". So instead of something like :
            "Object": 246,
            you use
            "Object": "Lychee",

            Going into the SMAPI log wouldn't work because it assigns numbers in your particular game - so someone else using it, or uploading new mods that alter the order of numbering, will throw off your file.
             
            • Morigale

              Morigale Scruffy Nerf-Herder

              That works for Content Patcher, but not for SMAPI directly unless I've missed something major - putting the name in quotations just makes the game freak out and refuse to open the bundles menu, it requires a number. And I can't just pull them from the SMAPI log because that would only work for my game (and even then probably only until I installed something new)

              Also I'm sure that at the start of this I had custom items working in a bundle via content patcher, before I realized it wouldn't do what I needed, but after some trying I can't get it to work again - so I can't edit a Vault bundle to see if it will correctly reward a CFR machine.

              Just to clarify: It's an SMAPI mod, not a Content Patcher pack.

              (I'm added potential bundles to lists depending on what mods are installed then pulling a random bundle from the combined list based on a seed, none of which content patcher can do as far as I know.)
               

              Share This Page