i created a mod just to learn how creating objects works but i ran into two problems the first is that the object itself is the size of a single material block but i set the size to 48x48 the second is the image of the object doesnt show up i dont know if those problems are related but im assuming they are if anyone can help me id really appreciate it because this is the first mod ive worked on files here: testbox.object Code: { "objectName" : "testbox", "rarity" : "Rare", "category" : "decorative", "price" : "0", "description" : "A testbox.", "shortdescription" : "testbox", "race" : "generic", "apexDescription" : "A testbox", "avianDescription" : "testbox", "floranDescription" : "testbox", "glitchDescription" : "testbox", "humanDescription" : "A testbox", "hylotlDescription" : "testbox", "inventoryIcon" : "testboxicon.png", "orientations" : [ { "dualImage" : "testbox.png", "imagePosition" : [0, 0], "frames" : 1, "animationCycle" : 1, "spaceScan" : 0.1, "anchors" : [ "bottom" ] } ] } testbox.frame Code: { "frameGrid" : { "size" : [48, 48], "dimensions" : [1], "names" : [ [ "default" ] ] } } the icon image works fine, and the textbox.png image is 48x48 picture of just the color black
Dimensions should be written like co-ordinates (ie. 1, 1) as said above. Also, I don't think there isn't a need for the 'dualImage' line- 'Image' should suffice for this object, right?
changed it back to [1,1] and changed testbox.object to this but still didnt work Code: { "objectName" : "testbox", "rarity" : "Rare", "category" : "decorative", "price" : "0", "description" : "A testbox.", "shortdescription" : "testbox", "race" : "generic", "apexDescription" : "A testbox", "avianDescription" : "testbox", "floranDescription" : "testbox", "glitchDescription" : "testbox", "humanDescription" : "A testbox", "hylotlDescription" : "testbox", "inventoryIcon" : "testboxicon.png", "orientations" : [ { "image" : "testbox.png", "imagePosition" : [0, 0], "frames" : 1, "animationCycle" : 1, "spaceScan" : 0.1, "anchors" : [ "bottom" ] } ] }
Code: { "objectName" : "testbox", "rarity" : "Rare", "category" : "decorative", "price" : "0", "description" : "A testbox.", "shortdescription" : "testbox", "race" : "generic", "apexDescription" : "A testbox", "avianDescription" : "testbox", "floranDescription" : "testbox", "glitchDescription" : "testbox", "humanDescription" : "A testbox", "hylotlDescription" : "testbox", "inventoryIcon" : "testboxicon.png", "orientations" : [ { "image" : "testbox.png:<color>", "imagePosition" : [0, 0], "frames" : 1, "animationCycle" : 1, "spaceScan" : 0.1, "anchors" : [ "bottom" ] } ] } Try this. Can you try uploading your files so I can take a better look at them? This is intriguing me.
After playing around with your mod for a little while, I managed to figure out what was wrong. I changed the .object file to this: Code: { "objectName" : "testbox", "rarity" : "Rare", "category" : "decorative", "price" : "0", "description" : "A testbox.", "shortdescription" : "testbox", "race" : "generic", "apexDescription" : "A testbox", "avianDescription" : "testbox", "floranDescription" : "testbox", "glitchDescription" : "testbox", "humanDescription" : "A testbox", "hylotlDescription" : "testbox", "inventoryIcon" : "testboxicon.png", "orientations" : [ { "dualImage" : "testbox.png", "imagePosition" : [-24, 0], "frames" : 1, "animationCycle" : 1, "spaceScan" : 0.1, "anchors" : [ "bottom" ] } ] } You had the line "dualImage" set as "image". Also, the line "imagePosition" needed to be set to [-24, 0]. The x needs to be set to half the width of the image, otherwise the game doesn't seem to recognize files larger than 32 x 32 as a .png image. When you run into problems, make sure to check the starbound.txt log file. The error that had been showing up was that testbox.png wasn't being recognized as a .png file.
It has to be a "dualImage"? Huh. Excuse my misdirection. Just "image" had always worked for me before. I never knew about the imageposition thing. Again, [0, 0] has always worked for me. I'll bear these in mind in future. Looks like you've helped two people out.
zima the code you gave me doesnt work on my end does it work for you? edit: could you also tell me where to find the "starbound.txt log file" i imagine that such a thing would help me if i decide to make another mod once this one is sorted out
Oh, I never knew that you could use just "image", I guess that was just my misunderstanding. However, it did not seem to work unless set to [-24, 0]. I'm not a pro at coding, so feel free to correct me if I'm wrong. Anyways, I forgot to mention that I actually re-made the testbox.png file in one of my attempts. Apparently however you're saving your .png files isn't readable to the game. I don't really use any fancy editors to make my sprites, I just use Game Maker's built-in sprite editor, since it's what I'm used to using. Here's my edited version that worked: https://dl.dropboxusercontent.com/u/37999906/test.zip
thankyou i didnt think about how the image itself might be the problem, i used gimp to try and make the image bigger so idk if that was the problem ill keep that in mind in future projects. thanks for the help though
You could try getting Paint.NET, it's essentially a free, dumbed-down version of Photoshop. http://www.getpaint.net/
I can second this. It's what I use and it serves me well in my spriting. The 'dumbed-down' part of that can be removed by installing some plugins, though!