I've been trying to add a compressor object into the game and so far I've gotten the object in-game, but when it's interacted with by pressing E, the game crashes and I don't understand why. The .object file: Code: { "objectName" : "stargazer_plantcompressor", "rarity" : "Common", "description" : "A plant compressor. Maybe I can make fuels with this.", "shortdescription" : "Plant Compressor", "race" : "generic", "category" : "crafting", "objectType" : "container", "printable" : false, "interactData" : { "config" : "plantcompressor.config" }, "apexDescription" : "A compressor. The future is now.", "avianDescription" : "Compressing plants has never been easier.", "floranDescription" : "T-they compress what?!", "glitchDescription" : "Organic fuel. Technological advancement ensues.", "humanDescription" : "A plant compressor.", "hylotlDescription" : "A machine made for the compression of plants", "inventoryIcon" : "stargazer_plantcompressoricon.png", "orientations" : [ { "dualImage" : "stargazer_plantcompressor.png:<frame>", "imagePosition" : [0, 0], "frames" : 8, "animationCycle" : 1.0, "spaceScan" : 0.1, "anchors" : [ "bottom" ], "collision" : "platform" } ], "recipeGroup" : "stargazer_plantcompressor", "slotCount" : 2, "uiConfig" : "plantcompressor.config", "frameCooldown" : 67, "autoCloseCooldown" : 3600 } The .config code: Code: { "gui" : { "background" : { "type" : "background", "fileHeader" : "plantcompressor_header.png", "fileBody" : "plantcompressor_body.png", "fileFooter" : "plantcompressor_footer.png" } }, "toggleCrafting" : { "type" : "button", "position" : [5, 39], "base" : "compress.png", "hover" : "compressover.png" }, "itemGrid" : { "type" : "itemgrid", "position" : [74, 37], "dimensions" : [1, 1], "spacing" : [19, 19], "backingImage" : "empty.png" }, "outputItemGrid" : { "type" : "itemgrid", "slotOffset" : 1, "position" : [110, 37], "dimensions" : [1, 1], "spacing" : [19, 19], "backingImage" : "empty.png" } } All the resources are in the same folder and it hasn't caused any problems, the only issue I have is the crash and I have a feeling it's a problem with my coding. Can anybody see an error and help me out?
Your object file seems to be empty. Nah kidding, try and upload your starbound.txt file inside /starbound (it's an error log)
Code: [LIST=1] [*]Error: Could not load /stargazer/biofuelgen/stargazer_plantcompressor.png:default asset, attempting to use default. [*]AssetException: No such frame default in frames spec /stargazer/biofuelgen/stargazer_plantcompressor.frames [/LIST] I'm seeing this error, maybe something wrong with your animations on the item?
Nothing seems to be wrong with the animations though, I've tried making changes to it and it hasn't affected anything. One thing I noticed was that there was a section in the log saying this: Code: Error: VariantException: Variant type not map for get("gui"), is of type null 007C4FE2 (C:/starbound/source/core/StarVariant.hpp:14) 00751505 (C:/starbound/source/core/StarAny.hpp:488) 00464A25 (C:/starbound/source/frontend/StarContainerInterface.cpp:19) ... (2) 00404EF0 (C:/starbound/source/core/StarAny.hpp:488) 00407357 (C:/starbound/source/client/StarClientApplication.cpp:368) 0040A254 (C:/starbound/source/application/StarApplicationBase.cpp:199) 00407C7F (C:/starbound/source/client/main.cpp:49) 004DB911 (c:\SDL-1.2.15/./src/main/win32/SDL_win32_main.c:318) The only problem is I can't make much sense of it.
Have you added a completely new UI are are you trying to use a current one? e.g furnace or crafting table.
I rewrote the furnace one and I downloaded a few mods just to look at their codes to see if I was doing it right, so it's the same UI but with different sprites.
Allright so I may have found something, Compate these two files one of a Furnace and one is yours, look where the brackets are located, (Highlighted by the "<<<") The furnace Code: { "gui" : { "background" : { "type" : "background", "fileHeader" : "/interface/objectcrafting/campfire_header.png", "fileBody" : "/interface/objectcrafting/campfire_body.png", "fileFooter" : "/interface/objectcrafting/campfire_footer.png" },<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< "toggleCrafting" : { "type" : "button", "position" : [5, 39], "base" : "/interface/objectcrafting/smelt.png", "hover" : "/interface/objectcrafting/smeltover.png" }, "itemGrid" : { "type" : "itemgrid", "position" : [74, 37], "dimensions" : [1, 1], "spacing" : [19, 19], "backingImage" : "/interface/inventory/empty.png" }, "outputItemGrid" : { "type" : "itemgrid", "slotOffset" : 1, "position" : [110, 37], "dimensions" : [1, 1], "spacing" : [19, 19], "backingImage" : "/interface/inventory/empty.png" }, "pointer" : { "type" : "image", "position" : [96, 40], "file" : "/interface/objectcrafting/arrow.png" }, "overlay" : { "type" : "image", "file" : "/interface/objectcrafting/campfire_shine.png", "position" : [-20, 20] } } } Your code Code: { "gui" : { "background" : { "type" : "background", "fileHeader" : "plantcompressor_header.png", "fileBody" : "plantcompressor_body.png", "fileFooter" : "plantcompressor_footer.png" }<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< }, "toggleCrafting" : { "type" : "button", "position" : [5, 39], "base" : "compress.png", "hover" : "compressover.png" }, "itemGrid" : { "type" : "itemgrid", "position" : [74, 37], "dimensions" : [1, 1], "spacing" : [19, 19], "backingImage" : "empty.png" }, "outputItemGrid" : { "type" : "itemgrid", "slotOffset" : 1, "position" : [110, 37], "dimensions" : [1, 1], "spacing" : [19, 19], "backingImage" : "empty.png" } } Do you see the difference? Try using this code instead: Code: { "gui" : { "background" : { "type" : "background", "fileHeader" : "plantcompressor_header.png", "fileBody" : "plantcompressor_body.png", "fileFooter" : "plantcompressor_footer.png" }, "toggleCrafting" : { "type" : "button", "position" : [5, 39], "base" : "compress.png", "hover" : "compressover.png" }, "itemGrid" : { "type" : "itemgrid", "position" : [74, 37], "dimensions" : [1, 1], "spacing" : [19, 19], "backingImage" : "empty.png" }, "outputItemGrid" : { "type" : "itemgrid", "slotOffset" : 1, "position" : [110, 37], "dimensions" : [1, 1], "spacing" : [19, 19], "backingImage" : "empty.png" } } }
Okay so I corrected that, or at least I think I did. I'm probably missing something. Code: { "gui" : { "background" : { "type" : "background", "fileHeader" : "plantcompressor_header.png", "fileBody" : "plantcompressor_body.png", "fileFooter" : "plantcompressor_footer.png" }, "toggleCrafting" : { "type" : "button", "position" : [5, 39], "base" : "compress.png", "hover" : "compressover.png" }, "itemGrid" : { "type" : "itemgrid", "position" : [74, 37], "dimensions" : [1, 1], "spacing" : [19, 19], "backingImage" : "empty.png" }, "outputItemGrid" : { "type" : "itemgrid", "slotOffset" : 1, "position" : [110, 37], "dimensions" : [1, 1], "spacing" : [19, 19], "backingImage" : "empty.png" } } } It still crashes with the same error though.
Did you try to use the same object from the same save? Try crafting or obtaining another plant compressor or w/e it's called and place it down and interact. Sometimes things are stored in saves. I had 2 of the same gun with 2 different properties in 1 save.
If all the files are correct and the images are all correct too, I the only thing I can say is that you're missing "pointer" and "overlay" in your code compared to the stonefurnace but I'm 100% unsure about it's importance.
Nope, nothing changed. It still crashes whenever I try to interact with it, whether it's newly crafted or an old object.
All I did was: - Went to Starbound\assets\interface\crafting - Copied craftingtable.png and craftingbody.png - Placed them in my mod folder structure - Renamed them to match my crafting table - Copied the woodencraftingtable.config file and renamed it to match my custom table - Renamed the image links within the new config file to match the png names I made Interacting with the table crashed to desktop with no error and no persistant starbound.exe that didn't close properly. The table works fine in every aspect with no config edits.