Modding Help More abundant ore veins for FU

Discussion in 'Starbound Modding' started by DominatorLegend, Jan 17, 2017.

  1. DominatorLegend

    DominatorLegend Scruffy Nerf-Herder

    OK... Look, I'm sorry, I'm really sorry, but I am 100% lost. The problem with all of this is that I know nothing about Starbound codes and scripting (the only mod I've made for Starbound was just and AI replacer). I don't know what most of these things mean. If we go back, we can see that Lazarus said how familiar I was with modding Starbound, to what I quoted: "I have no problem (I use both Workshop's and Forums' mods), and I have a LOT of experience in general modding too (Half Life, TES, Fallout, Saints Row, GTA...)". The thing is that I was familiar as a MOD USER and not a modder (this is all my fault, not blaming anyone here other than myself), so I what I'd like to know now is where can I read a "Modding Starbound for dummies" kind of guide, so I can understand all this language.
    Thanks for standing such an annoyance of user.
  2. bk3k

    bk3k Oxygen Tank

    Well this doesn't involve scripting anything on your end. This is pure JSON. You can consider it a data storage format. In the context of Starbound, others have compared it to filling out a form. And you could see my example as editing the form. You can get the basic idea from and JSON is used in far more than just Starbound so you may find other uses later.

    These particular structures are - for someone not familiar with JSON - a bit complicated. There is a bit of nesting going on and I can't say this is the best area to wet your feet in. But lets look at the basics of JSON.

    "This is a string"
    commas separate elements and thus do not go after the last element
    numbers do not get encased in " " unless you intend them to be strings instead of numbers
    ditto with true, false, null

    [ ] begins and ends JSON arrays which are a type of container

    arrays can contain
    strings, true, false, null, numbers, objects, and other arrays
    an example would be
         "string within a nested array",
    Now that indentation is voluntary, but highly recommended. This is the same thing.
    ["string",true,["string within a nested array",34,55.2],"anotherString"]
    Clearly one is easier to read that the other!

    { } begins and ends JSON objects which are a type of container
    objects can contain
    strings, true, false, null, numbers, arrays, and other objects
    However everything in an object has a namespace in the form of a string, for example
      "first" : "a string",
      "somethingElse : [
        "nested string within an array"
      "the cake" : "a lie",
      "someNumber" : 14.7,
      "isObject" : true,
      "nestedObject" : {
        "nestedNamespace" : true
    So with that in mind, look at a standard object. I just picked the iron table

      "objectName" : "irontable",
      "colonyTags" : ["commerce"],
      "rarity" : "Common",
      "description" : "A table with swords for legs. Not ideal for playing footsie.",
      "shortdescription" : "Sharp Table",
      "race" : "generic",
      "category" : "furniture",
      "price" : 105,
      "apexDescription" : "This table brings a sense of finality to stubbing one's toe.",
      "avianDescription" : "Sitting here would be enough to make anyone edgy.",
      "floranDescription" : "Floran cut on table. Now, Floran cut WITH table.",
      "glitchDescription" : "Comfort. A casual table. Others seem wary of it.",
      "humanDescription" : "I'm extremely hesitant to sit here.",
      "hylotlDescription" : "Perhaps this is slightly too dangerous as an alternate use of weapons.",
      "inventoryIcon" : "irontableicon.png",
      "orientations" : [
          "dualImage" : "irontable.png:<color>",
          "imagePosition" : [-16, 0],
          "frames" : 1,
          "animationCycle" : 1.0,
          "spaceScan" : 0.1,
          "anchors" : [ "bottom" ],
          "collision" : "platform"
    At that point you might not understand what changing everything in there does. Starbound's engine attributes certain things with certain namespaces and you'll probably never remember them all(what the wiki is for). But hopefully you have an idea of the structure of the file and how it all fits together now.

    Those numbers I edited in the biome example from before likely represent "weights", or so I rationally assume. Something that is 0.20 appears more often than 0.10. Something with 0.00 weight will never appear at all. Nothing arcane about it. But you are looking at nested structures there and I'm simply more accustomed to looking at that and being able to tell when one ends, and another begins. Viewing that in notepad++ with bracket highlighting on will make it MUCH easier to parse especially when you aren't used to JSON. All the more so if you have a JSON profile(such as what I attached in this thread). Short of that, use the language menu and select JavaScript for a close enough improvement(JSON stands for JavaScript Object Notation as that's where it originally came from).

    Now having hopefully got that out of the way, Lots of mod tutorials here

    addition: now lets look at just one of those distribution lists
        [ "coal", 0.90 ],
        [ "copper", 0.60 ],
        [ "silver", 0.00 ],
        [ "gold", 0.00 ],
        [ "diamond", 0.00 ],
        [ "corefragment", 0.00 ],
        [ "iron", 0.60 ],
        [ "tungsten", 0.00 ],
        [ "titanium", 0.00 ],
        [ "durasteel", 0.00 ],
        [ "aegisalt", 0.00 ],
        [ "ferozium", 0.00 ],
        [ "violium", 0.00 ],
        [ "solarium", 0.00 ]
    Possibly that's easier to read?
    Last edited: Jan 20, 2017
  3. DominatorLegend

    DominatorLegend Scruffy Nerf-Herder

    Aaah yes. Now I CAN see where this is going, it's still complicated, but I can understand it now. That ore distribution code must be compressed in a PAK file after dealing with it, right? I'm not using FU right now, but I can still test it with base game's diamonds, right?
  4. bk3k

    bk3k Oxygen Tank

    pak files aren't necessary. Just like any manually installed mod. You have the files(in this case patches) and the _metadata file which itself has
    "includes" : [ "FrackinUniverse" ],
    along with the regular stuff you'd find in any _metadata file
  5. DominatorLegend

    DominatorLegend Scruffy Nerf-Herder

    That's all I needed to know. Many many thanks :D

Share This Page