Modding Help Have a question about makeing a complex opject.

Discussion in 'Starbound Modding' started by kagato3, Aug 10, 2016.

  1. kagato3

    kagato3 Void-Bound Voyager

    I am a very new moder and am trying to make an animated Hen house that would allow you to harvest a greater number of eggs at once but with out having to deal with a lot of chickens but I want it to be balanced (the recipe will require multiple hen eggs) but so far I have been unable to figure out how to implement it. so far the best I've been able to do is make one that will give eggs every time it is interacted with here is that code
    Code:
    {
      "objectName" : "henhouse",
      "price" : 1500,
      "rarity" : "Common",
      "category" : "decorative",
      "description" : "A hen house you can get eggs from it",
      "shortdescription" : "Hen House",
     
    
      "apexDescription" : "",
      "avianDescription" : "",
      "floranDescription" : "",
      "glitchDescription" : "",
      "humanDescription" : "",
      "hylotlDescription" : "",
    
      "inventoryIcon" : "henhouseicon.png",
      "orientations" : [
        {
          "dualImage" : "henhouse.png:<color>.<frame>",
    
          "imagePosition" : [0, 0],
          "frames" : 16,
          "animationCycle" : 3.2,
    
          "spaceScan" : 0.1,
          "anchors" : [ "bottom" ]
    
        }
      ],
     
        "scripts" : [ "/objects/scripts/harvestable.lua" ],
      "scriptDelta" : 60,
    
      "itemDropOffset" : [0.5, 2.5],
      "stages" : [
        {
          "harvestPool" : "henHarvest"
        }
      ]
    }
    
    note henHarvest is a place holder until I get the object working right.

    ideally I want to be able to a) have the time between harvest about the same as a normal hen b)keep the animation but have some indication that it is ready to be harvested.

    Any suggestions
     
  2. Mioure

    Mioure Scruffy Nerf-Herder

    I would recommend copying the Moth House item that lets you harvest silk from it.
    Its essentially what you are looking for, just change the item image, and the output, and you're golden.
     
  3. kagato3

    kagato3 Void-Bound Voyager

    that was where I got the base and had to pair it down to this to get it to work. Unfortunately that doesn't seem to work. I can't seem to get the animation to work with the animation file and just adding in
    {
    "duration" : [85, 95]
    },
    to the Stages doesn't work as it never moves to the harvest stage
     
  4. Mioure

    Mioure Scruffy Nerf-Herder

    Honestly, I havent messed with any item like this before, So I'm just shooting in the dark.
    Have you tried looking at the Harvestable.lua file to see if theres anything specific in there you need to edit?
    Also I dont think you want the image position to be [0, 0] because last I checked, thats the bottom most left pixel possible, but I could be wrong.
    Honestly I would at least put some place-holder text in each description as a blank area could cause corruption and make it unable to be read in most cases (not completely sure about starbound's coding though, better safe than sorry)

    Other than that, without actual experience in the matter, im afraid i dont know what could possibly be the issue.
     

Share This Page