Modding Help [SOLVED] Custom Object Showing Invisible

Discussion in 'Starbound Modding' started by Ebelle, Jan 4, 2014.

  1. Ebelle

    Ebelle Void-Bound Voyager

    Edit: This issue has been resolved. Check the last post for my best guess as to what the problem was and a link to download the working files for anyone else who has this issue.

    Hello,

    I have been trying to get a custom object into the game for a little bit now, with minimal success. I have remade the item 3 times, using different bases each time, however, as soon as I try to change the icon and image file into my own, the object becomes invisible in game. I can place it, but it doesn't show. I can even harvest it to get it back into my inventory. I can craft it properly, but it just won't show up.

    Here is my folder structure...

    ZZZZChickenCoop > assets > objects > human > chickenCoop

    Inside are 4 files, chickenCoop.frames, chickenCoop.object, chickenCoop.png, and chickenCoopIcon.png.

    chickenCoop.object:

    {
    "objectName" : "chickenCoop",
    "rarity" : "Common",
    "objectType" : "wired",
    "description" : "Accepts a bunch of different kinds of fuel.",
    "shortdescription" : "Working CC",
    "race" : "human",

    "apexDescription" : "A fuel hatch. Looks well-constructed.",
    "avianDescription" : "A robust fuel hatch.",
    "floranDescription" : "Floran learn not to drink from hatch.",
    "glitchDescription" : "Studying. This fuel hatch seems exceptionally well-optimised.",
    "humanDescription" : "In goes the fuel, out comes the fire.",
    "hylotlDescription" : "A fuel hatch.",

    "inventoryIcon" : "chickenCoopIcon.png",
    "orientations" : [
    {
    "dualImage" : "chickenCoop.png:<color>.<frame>",

    "imagePosition" : [-8, -12],
    "frames" : 4,
    "animationCycle" : 0.7,

    "spaceScan" : 0.1,
    "anchors" : [ "background" ]
    }
    ]
    }


    chickenCoop.frames:

    {

    "frameGrid" : {
    "size" : [16, 24],
    "dimensions" : [4, 1],
    "names" : [
    [ "default.0", "default.1", "default.2", "default.3" ]
    ]
    },

    "aliases" : {
    "default.default" : "default.0"
    }
    }



    Absolutely everything is working fine about the mod so far, aside from the image file not displaying and the object not showing in the world.

    It is probably something obvious, but any help would be much appreciated.
     
    Last edited: Jan 4, 2014
  2. M4CViz

    M4CViz Star Wrangler

    Can you put a link o the files so I can have a look it will be a lot easier
     
  3. titibond

    titibond Intergalactic Tourist

    I think you don't have to make an "assets" folder in your mod folder. Try with only "ZZZZChickenCoop > objects > human > chickenCoop. Don't use an assets folder :)

    Tell me if its working :)
     
  4. Ebelle

    Ebelle Void-Bound Voyager

    Thanks for the reply. I usually use an assets folder with the .modinfo's path set to "assets". I gave this a shot anyway, though, but no dice. Thanks for the suggestion, I wouldn't be surprised if the problem turned out to be something like this though. It's always the little stuff that causes big problems.
     
  5. titibond

    titibond Intergalactic Tourist

    Ok. I think normally its have to work, if you set de path to "assets". But have you tried to change it to "." and try without assets folder ?

    I know i'm boring :)
     
  6. M4CViz

    M4CViz Star Wrangler

    Ebelle can you send me the files so I can have a better look and try and fix the problem
     
  7. The | Suit

    The | Suit Agent S. Forum Moderator

    I don't understand why you use -8,-12 as image posistion?
    Is the chicken coop a painting [something to be hung on a wall]

    Otherwise you should use 0,0

    Image position is the location at which the image is anchored.
     
  8. Ebelle

    Ebelle Void-Bound Voyager

    I tried that as well. I think that the mod won't work if you don't change the path to "." without an assets folder. But thanks a lot for the clarification.


    Sure, I will pack it up and send it to you if xxswatelitexx's solution below doesn't work.


    Oh, I suppose I misunderstood the imagePoisition attribute. I thought that the imagePosition attribute related to where on the x,y coordinates the object was anchored to the mouse cursor. I will go change it to 0,0 and report back.
     
  9. neronix17

    neronix17 Scruffy Nerf-Herder

    Having the same issue, none of these solved it for me either. Maybe it's the way the image was saved?

    Edit: Also the imagePosition attribute is for where the image shows relative to the cursor during placement, where it is anchored to depends on the anchors attribute. 'background' has it sit on the tiles behind it and 'bottom' would place it on the floor, I'm not sure about anchoring to a roof but I would presume that would be 'top'.
     
  10. Ebelle

    Ebelle Void-Bound Voyager

    No luck on the 0,0 solution, xxswatelitexx. I am going to pack the file up and shoot it on over to M4Civ so they can have a look at it.

    Meanwhile, I am changing the anchor position to "bottom" and am going to try it again. I will also try to change my image up if I can.


    I am wondering that as well, but I am unsure of how it could be saved otherwise. Mine is a .png file with transparency.
     
  11. neronix17

    neronix17 Scruffy Nerf-Herder

    Yeah I saved mine the exact same as several others and the rest work fine. It's like it doesn't see the image.
     
  12. Ebelle

    Ebelle Void-Bound Voyager

    That sounds like what I am running into. You might be onto something with the image file. I am going to do some investigation into my image.
     
  13. neronix17

    neronix17 Scruffy Nerf-Herder

    Oh shouldn't "default.default" : "default.0" be in [ ] brackets? Like [ "default.default" : "default.0" ]
     
  14. The | Suit

    The | Suit Agent S. Forum Moderator

    It wasn't a solution - I was pointing out that the anchor was just in the wrong place.
    Unless the object is placed on a wall or requires some specific orientation. Its kept at 0,0

    Which means the anchor is at the bottom right of the image.
     
  15. neronix17

    neronix17 Scruffy Nerf-Herder

    I generally place it at the bottom middle (0, 0 is bottom left btw) if it's placed on the floor. Tend to find it makes it easier to place centered with other things.
     
    The | Suit likes this.
  16. Ebelle

    Ebelle Void-Bound Voyager

    I am trying that now. I replaced my image with the fuelHatch which is the object I used as a base this time, with no luck. It is still invisible. Strange.


    Ah, I was trying to change it to the bottom middle. I guess that would have been -8,0, though.
     
  17. neronix17

    neronix17 Scruffy Nerf-Herder

    Alright I got it working, I honestly have no idea what exactly was happening, I just brought in a file from a different object and it seems to have worked now, best I can suggest is to use the files from something else, maybe use a floor anchored object from the apex as a base.
     
  18. Magician Xy

    Magician Xy Ketchup Robot

    There should be an image called "chickenCoop.png" in the same folder as both your frames file and your object file. It should also have 4 frames of animation, with each frame being 16x24 pixels large. (This means the total image size should be 64x24 pixels large.) In addition, you've set it so it can only be placed if there's a background tile behind it. Is this the behavior you want? Does the icon show up for the item when crafting/looking at it in your inventory?

    I think the problem definitely has to do with the formatting of either the frames file or the png itself. You can also check the starbound.log file and see if maybe it was having trouble loading the image or something.

    Don't worry, we'll get this sorted out. If you're putting together a package to show someone, post it here publicly so other people can help as well. ;)
     
  19. Ebelle

    Ebelle Void-Bound Voyager

    I may end up doing that again. It's probably something little, it's just a matter of finding out what it is.

    Sure, I can do that. It can be found at medfire, below. Any help is much appreciated.

    Edit: The link has been removed, because the issue has been resolved. I will post the working file in a below post.
     
    Last edited: Jan 4, 2014
  20. M4CViz

    M4CViz Star Wrangler

    I fixed id and I sent you a message Ebelle
     

Share This Page