Modding Help Help Creating a Custom Crop

Discussion in 'Starbound Modding' started by SamBunzly, May 5, 2019.

  1. SamBunzly

    SamBunzly Space Hobo

    Hi! I'll skip the niceties and get right to the chase.
    I've been watching the tutorials and reading guides on how to create your own mods but thus far all I can find are guides on how to create your own tool/gun or some kind of decorative object. There's little to nothing (that I've found yet) that show how to mod in your own crops, so I've resorted to good ol' trial and error.

    Using corn as a base template, I've changed the names and some parameters and here's the issues I'm running into so far.

    • I can spawn the "testcornseed" through the admin commands
    • I can plant and harvest "testcornseed" with some difficulty
    • When planted, the crop is invisible, making it impossible to tell when it's complete without physically checking to see if its ready to harvest. The scanner tool will still give the proper text when inspecting it
    • I'm unsure if the crop will actually spawn anything as I've not seen it through. I'm still trying to figure out why it's not loading the frames properly.
    • I haven't created a "testcorn" food item yet, so I doubt if it will actually drop anything at all.
  2. projectmayhem

    projectmayhem Spaceman Spiff

    post your files, cant really help you without those
  3. SamBunzly

    SamBunzly Space Hobo

    Didn't really consider that ;n; Frick.

    Attached Files:

  4. projectmayhem

    projectmayhem Spaceman Spiff

    Problem #1 - "largeImage" : "testcornseed.png:default.3.0" - you have no testcornseed.png file, I assume this is meant to be testcorn.png
    Problem #2 - "dualImage" : "cornseed.png:<color>.<stage>.<alt>" - you have no cornseed.png , i assume this is also suppose to be testcorn.png
  5. SamBunzly

    SamBunzly Space Hobo

    Well damn. That did it. Now I know what those two are for :0 Thanks for the help!
    Now you wouldn't happen to know how to make it drop an entirely new item, would you? :D Cuz so far I don't even have the slightest inkling as to how to do so without breaking something crucial :rofl:
  6. projectmayhem

    projectmayhem Spaceman Spiff

    "harvestPool" : "cornHarvest" --- you need to change this to access a new loot pool. So lets say for instance , you name this plant Juicy Fruit Plant... you would need to change the harvest pool to something like juicyHarvest or something.
    Then, in your mods base folder, you need to make a new folder called treasure
    Then, make a new file and name it after your mod. Using the above example, id name it juicyfruitmod.treasurepools - just change juicyfruit to whatever your mod is called.
    Now, inside that mod, you need to define a treasurepool, you can look at the vanilla cropharvest.treasurepools to see what they look like....but here would be an example for the file.

      "juicyHarvest" : [
        [0, {
          "pool" : [
            {"weight" : 0.89, "item" : "juicy"},   <---- this is the main item your plant drops
            {"weight" : 0.01, "item" : "juicyseed"}, <----- this is the seed
            {"weight" : 0.1, "item" : "plantfibre"} <---- plant fibre
          "poolRounds" : [
            [0.6, 1],
            [0.4, 2]
        } ]
    then of course, you need to go ahead and make the main item your plant drops, so you dont get an error when you try to test it out. You already have the seed made, so that drop wont be an issue
    pdodd likes this.
  7. SamBunzly

    SamBunzly Space Hobo

    Alrighty, so after I've added the files to my mod folder would i have to make it a .patch to prevent issues or would it be fine as-is?
  8. projectmayhem

    projectmayhem Spaceman Spiff

    the treasurepool file? No need for a patch, as long as you dont name it the same as any vanilla file in the same folder.
    Technically, you could add your crop to the cropharvest.treasurepools with a patch file, but I find it easier just to make my own treasure pool file for my mods, unless im changing an existing treasurepool
  9. SamBunzly

    SamBunzly Space Hobo

    Awesome. Is there any way to speed up the in game time so I can test to see if the crop grows and drops the right items? Google is redirecting me to mods for Stardew Valley, not Starbound.
  10. SamBunzly

    SamBunzly Space Hobo

    Update, I just found the /timewarp command. Woot! It worked. Spawned the correct item and everything :D Thank you friend!

    Bonus question if you feel like you wanna help a bit more. how can I make this plant spawn naturally on planets? :0
  11. SamBunzly

    SamBunzly Space Hobo

    UPDATE: Upon growing normal corn side by side as a comparison. Both grew to completion just fine with 0 errors. The TestCorn harvested perfectly fine, but the game would crash when harvesting the vanilla Corn. Know of anything that could be causing this issue?
  12. projectmayhem

    projectmayhem Spaceman Spiff

    Best thing to do, is harvest vanilla corn, let your game crash, then look through the error log. The error log is your best friend when modding. If you cant understand the log, just post it on pastebin and put the link on here
  13. pdodd

    pdodd Void-Bound Voyager

    If you'll permit a super-noob question, where does one find the error logs in the file directory?

    As an aside: reading through this thread has been very helpful. I think I'll follow along with your Testcorn farming experiment, SamBunzly :nuruhappy:
  14. Nexus Of Chaos

    Nexus Of Chaos Parsec Taste Tester

    your log file is found in the storage folder of your starbound directory. depending on your OS settings, the file will either appear as "starbound" or "starbound.log"
    pdodd likes this.
  15. FalcorDragon88

    FalcorDragon88 Intergalactic Tourist

    literally new to modding in the last 2 days, and so far I've managed beds, and now i'm onto crops, I found a mod download of a crop mod folder which has been incredibly useful, I have managed to create, grow and harvest crops, but does anybody know how to change the amount the plant drops when harvested? I assume it's in the treasurepools patch file, but I have no idea how to set it out, at the moment it looks like this...

    "op": "add",
    "path": "/lavenderHarvest",
    "value": [[0,
    "fill" : [
    {"item" : "lavender"}
    "pool" : [
    {"weight" : 0.89, "item" : "lavender"},
    {"weight" : 0.01, "item" : "lavenderseed"},
    {"weight" : 0.1, "item" : "plantfibre"}
    "poolRounds": [[0.6, 1], [0.4, 2]]

    I assume a "count" goes after the "item", but not sure how to set it out as stated.. any help would be fabulous. thank you!

Share This Page