Modding Help My first mod! (For this game anyway)

Discussion in 'Starbound Modding' started by ToddAndChips, Mar 31, 2018.

  1. ToddAndChips

    ToddAndChips Tentacle Wrangler

    Hello all!

    Completely new to this forum and very new to the modding of this game. Exciting stuff! Done some basic stuff on a couple of other games (Planetoid Pioneers and Arma 3) so my quite limited knowledge carried over a little. I did some reading around and looking at files etc and I've sort of made the basics of my own mod - an extraction station for recovering 1 ore when destroying (or spending) 1 bar of the same type. The long term plan would be to create an extraction station that can essentially retrieve, for example, 1 iron ore from an object (like a chair or something) that took a couple of iron bars to build. I'll be looking into the cost of building items and working out how much to give back per item (I think somewhere between 25% and 50% seems reasonable so you can't just nick chairs and melt them to make loads of stuff).

    Anyway, so I made this mod a week ago and I had the mechanics of it working - you could insert a bar and craft an ore from that bar. But at some point after changing nothing and reopening the next day, the extraction station just wouldn't show up. I spent about 8 hours straight trying all sorts of .png reformatting and code checking and I couldn't get it working again.

    So I pretty much dropped the idea for a bit to start fresh, and remade it this evening using a mod on the Steam workshop as a shortcut to save me writing all the code from scratch (the mod is Concoction Station I believe). Now, the image is working on the extraction station! Rejoice! It's not animated and the colours are all off, but it shows. But now I can't get the damn recipes to show up, and for the life of me I cannot figure out why it won't show up (I'm just trying iron for now). I have a feeling it's something to do with needing to discover iron ore first before it shows up in the extraction station perhaps?

    Anyway, if anybody would be willing to take a look and help me a little, I'd be eternally grateful! I'll attach the current .pak file of the mod to this thread (inside of a .7z file as I've just discovered .pak isn't uploadable!).

    All the best,


    Todd

    P.S. I'm not a strong coder, but for my day job I work as a sound designer and voice over artist, so if someone that helps me happens to be seeking a few sound effects, I'll be sure to throw a few (original ones) your way!
     

    Attached Files:

  2. DrPvtSkittles

    DrPvtSkittles Parsec Taste Tester

    Ahh welcome to modding!

    This:
    {
    "input" : [
    { "item" : "ironbar", "count" : 1 },
    ],
    "output" : { "item" : "ironore", "count" : 1 },
    "groups" : [ "extractables" ]
    }

    Needs to be this:
    {
    "input" : [
    { "item" : "ironbar", "count" : 1 }
    ],
    "output" : { "item" : "ironore", "count" : 1 },
    "groups" : [ "extractables" ]
    }

    No comma at the end of { "item" : "ironbar", "count" : 1 }

    It's important to check your log when you come into trouble. It's found in Starbound/storage. It's the log with no numbers.
    I got the error
    Line 153: [17:56:48.904] [Error] Exception caught loading asset: /recipes/extractionstation/ironextract.recipe, (AssetException) Could not read JSON asset /recipes/extractionstation/ironextract.recipe
    Line 202: Caused by: (JsonParsingException) Error parsing json: unexpected character parsing word at 4:3

    Which directed me to the pesky comma. Keep your eyes peeled :p
     
  3. projectmayhem

    projectmayhem Ketchup Robot

    Haha, you beat me to it! took me like 30 mins to find that extra comma.

    As skittles said though, welcome to the modding community! As you can see, people here are very helpful, so if you ever have anything that won't work, post away!

    Code:
    Caused by: (JsonParsingException) Error parsing json: unexpected character parsing word at 4:3
    Here is the code from above without the emoji, as he said, you can see its at like 4, and 3 spaces over. You always know to look in that general area.
    Most the time you get lucky and the game crashes when you mess up so you know to go to your error log straight away.
     
    DrPvtSkittles likes this.
  4. ToddAndChips

    ToddAndChips Tentacle Wrangler

    Ahhhh! You guys are absolute stars, thank you so much!

    This community does seem very lovely to be honest. A small pocket of the internet where everyone puts away their hostility and selfishness is always pleasant to stumble upon! So with that in mind, don't hesitate to ping me if you need a few sound effects or a VO produced for anything :)

    Time to get back to modding!!
     
  5. ToddAndChips

    ToddAndChips Tentacle Wrangler

    Evening folks!

    Thanks again for your pointers earlier - I had no idea where to look for errors (and since the game wasn't crashing I didn't know where to start), so that bit of advice about the log file really is greatly appreciated :)

    I've played with the animation and shading a little to keep it a bit more fitting with the rest of the crafting stations in game, but I'm really not a visual artist, so if you guys happen to fancy trying this mod out and throwing any feedback my way (brutally honest feedback is openly welcomed!) I'll happily look at revisiting the visual aspects. It's a bit of a boring square box - I made that really early on and wanted to keep it simple as a sort of placeholder test, but I ended up just getting used to it, so it might just need a rework. Also, can't decide if the lights caused by sparks are bright enough...

    Hopefully the functionality is all sorted (it works for me but if you guys test it and it doesn't work, please do let me know!).

    Once again, appreciate the tips. Saved me a lot of hours.

    Uploading a new version inside of a .7z now!
     

    Attached Files:

    projectmayhem likes this.
  6. DrPvtSkittles

    DrPvtSkittles Parsec Taste Tester

  7. ToddAndChips

    ToddAndChips Tentacle Wrangler

    Ooh, never even seen this page before and I've been perusing that site for a bit! Thanks buddy, I'll have a little graphic adjustment session soon!
     

Share This Page