Modding Help Object Frame File Problem

Discussion in 'Starbound Modding' started by Blake81, Sep 20, 2018.

  1. Blake81

    Blake81 Cosmic Narwhal

    So, I'm trying to make a simple mod that turns the Soft Couch into a bed. And while the bed part seems to work (my char sleeps in it and all) whenever I place them, they look like this now.

    20180915151904_1.jpg


    I checked the image file, and that couch seems to come with all those color variants (was it ever possible to dye it!?). Someone told me it was a FRAMES issue, so I tried copying the FRAMES file to my mod folder, but stayed the same.

    So, what do I have to do to avoid this issue? I found no references to the FRAME file within the OBJECT file. Is there something I should add to the script?

    Thanks in advance.
     
  2. Nexus Of Chaos

    Nexus Of Chaos Parsec Taste Tester

    beds are supposed to have an image (the bed) and an overlay (the cover). when you changed the furniture to a bed, it took the entire image as the image, rather than what the frames file pointed to

    and dying furniture was either planned but not implemented or implemented then removed
     
  3. The Avelon

    The Avelon Phantasmal Quasar

    The reference is in orientations:
    "image" : "woodencouch2.png:<color>"

    Interestingly, this is also found in some objects that DON'T have extra frames for dying, but nevertheless the frames file for them is 1x9 just like this object. (objects/biome/swamp/swampybed for example).

    The frames file isn't being referenced however and I am not sure why this didn't cause the problem to begin with without a frames file reference.

    Try this:
    "image" : "woodencouch2.png:<color>.<frame>",
    "frames" : 1

    EDIT: or whatever you named it.png of course
     
  4. Noah Nebula

    Noah Nebula Sandwich Man

    I have several theories that can be causing this. I will need to look over your files, send me the .object and the .frames. I can get this fixed, and explain to you what I did. :)
     
  5. bk3k

    bk3k Oxygen Tank

    The base idea of the frames file is to take a png and cut it into parts. So one png file can store multiple related images. The .frames file is tied to an identically named .png file. So example.png should have example.frames but default.frames can work too. But this is only necessary in the case the image represents more than one frame - which if you look at the original picture you would see it is the case. If you aren't referencing the frame of an image, the you're are referencing the entire image as a whole.

    Now when you see this line -
    Code:
    "image" : "apexcouch.png:<color>"
    let me explain it.
    <color> is a tag that currently is always swapped by the engine for "default". It used to allow you to change the color of objects, and I don't get why they stripped the ability. Well there are ways around it via modding, but that's beyond the point. Always see "apexcouch.png:<color>" as "apexcouch.png:default"
    Now here is the frames file for that.
    Code:
    {
    
      "frameGrid" : {
        "size" : [40, 20],
        "dimensions" : [1, 1],
        "names" : [
          [ "default" ]
        ]
      }
    }
    That image has only 1 frame anyhow. But compare that to the frames for the original png you started with.
     
  6. Blake81

    Blake81 Cosmic Narwhal

    The FRAMES I'm working with looks like this:

    Code:
    {
      "frameGrid" : {
        "size" : [40, 18],
        "dimensions" : [1, 9],
        "names" : [
          [ "default" ],
          [ "red" ],
          [ "blue" ],
          [ "green" ],
          [ "yellow" ],
          [ "orange" ],
          [ "pink" ],
          [ "black" ],
          [ "white" ]
        ]
      }
    }
    
    Also, I think the OBJECT one is not the one at fault; just tried it with the avian couch (woodencouch1) which has only one frame, and it works like a charm. Does that mean I should just remove all those other colors from this FRAMES file?

    EDIT: nvm, all fixed. Stupid me made a mistake when renaming; had swapped the cover and no-cover lines of code. All working now. Thanks everyone, anyway.
     
    Last edited: Sep 21, 2018
  7. The Avelon

    The Avelon Phantasmal Quasar

Share This Page