Alright, I want to start out by saying I am a mediocre programmer at best. I am trying to make a mod that adds in a "Smelter" which will allow you to smelt multiple ores at a time in it (have no idea if this is even possible yet.) But when I try to add the item in, I get a perfectly generic item instead of my smelter item. Here is the code if you feel you can find the errror: .object file: Code: { "objectName" : "smelter", "rarity" : "Common", "description" : "A smelter, useful for making metal bars.", "shortdescription" : "Smelter", "race" : "generic", "subtitle" : "Advanced smelting.", "category" : "crafting", "price" : "200", "objectType" : "container", "printable" : false, "apexDescription" : "A steel smelter. I can smelt ore here.", "avianDescription" : "A smelter perfect for smelting.", "floranDescription" : "Smelter hisss, ssspit, burn. Floran brave it.", "glitchDescription" : "Craftsmanship. The smelter is the perfect temperature for creating metal bars.", "humanDescription" : "A smelter. Hot.", "hylotlDescription" : "A hot, imposing smelter.", "lightColor" : [229, 218, 207], "flickerDistance" : 0.5, "flickerStrength" : 0.1, "particleEmitter" : { "emissionRate" : 1.0, "emissionVariance" : 0.5, "particle" : { "type" : "ember", "size" : "1.0", "color" : [255, 100, 0, 255], "light" : [150, 50, 50], "fade" : 0.9, "initialVelocity" : [0.0, 5.0], "finalVelocity" : [0.0, 3.0], "approach" : [0, 20], "timeToLive" : 2, "layer" : "middle" }, "particleVariance" : { "initialVelocity" : [0.5, 2.0] } }, "inventoryIcon" : "smeltericon.png", "orientations" : [ { "dualImage" : "smelter.png:<color>.<frame>", "imagePosition" : [0, 0], "frames" : 4, "animationCycle" : 0.5, "spaceScan" : 0.1, "anchors" : [ "bottom" ], } ], "soundEffect" : "/sfx/objects/campfire.wav", "soundEffectRadius" : 50, "statusEffects" : [ { "kind" : "Warmth", "amount" : 70, "range" : 8 } ], "recipeGroup" : "stonefurnace", "openSounds" : [ "/sfx/objects/campfire_use.wav" ], "slotCount" : 2, "uiConfig" : "/interface/objectcrafting/smelter.config", "frameCooldown" : 67, "autoCloseCooldown" : 3600 } .frames file: Code: { "frameGrid" : { "size" : [24, 20], "dimensions" : [4, 1], "names" : [ [ "default.0", "default.1", "default.2", "default.3" ] ] }, "aliases" : { "default.default" : "default.0" } } .recipe file: Code: { "input" : [ { "item" : "steelbar", "count" : 1 }, { "item" : "coalore", "count" : 25 }, { "item" : "stonefurnace", "count" : 1 }, { "item" : "money", "count" : 450 } ], "output" : { "item" : "smelter", "count" : 1 }, "groups" : [ "metalworkstation", "objects", "all", "tools" ] } I put the blueprint in the player.config correctly as well (why it shows up in the crafting menu at all). I tried looking at another mod that adds in items to see what I was doing wrong but I couldn't find anything. I am pretty sure this is all the need information. Also if anyone more experienced with coding wants to take my idea to make it work, I would be okay with it as long as I am told how it is done so I can learn in the process. NOTE: This is not a finished product. I had not even started on the other item slots to allow for three ore smelting.
He's right. I'd also check your starbound.log in future. It is invaluable and will point out simple syntax errors like that. Code: "slotCount" : 2, "uiConfig" : "/interface/objectcrafting/smelter.config", If you're trying to smelt multiple ores at once, won't you need a few more input slots on the interface menu?
createse, thank you! I forgot I removed a line after the "anchors" part. DUH! Haha. And as far as the slots go yes, I will try to add them now that the item will generate properly. However, I saw you can't change gui currently which means this mod probably isn't possible.
User Notepad++ and set the language to "javascript" to get nice color coding of the text. The format for these is JSON (JavaScript Object Notation) Also you can use a free internet JSON parser to validate its properly formatted with proper data types (boolean, int, float, string) and will catch any syntax errors Here is a french one (still useable for us since all we need it for is validation) http://json.parser.online.fr/ and here is another heavier one http://jsonviewer.stack.hu/
First step in "my custom stuff is broken" should always be to run every file through http://jsonlint.com/. ^^ But yeah, bet you dollars to donuts that stray comma is the culprit.
Honestly, as one amateur modder to another almost anything I do doesn't work the first time, so I have to check the log file, tweak the game, check it again, etc.
Haha, yeah, I've found myself going apoplectic at a mod behavior not working and my girlfriend always has to remind me of "did you run it through jsonlint?" or "you're missing a comma, aren't you".
I'm at the point now where I prefer a simple missing comma as a reason things aren't working. I've been doing a lot of work on movement techs, and getting something to work the way I want it is often a coding error. I haven't figured out how to properly code in the parameters and functions I want.
It also doesn't help that there is a lack of documentation on the API... not faulting the devs... I know this stuff takes time but for the rest of us, its a bit of a shot i the dark