August 19 - The day when all your mods died.

Discussion in 'Dev Blog' started by OmnipotentEntity, Aug 20, 2014.

  1. Ninjawa

    Ninjawa Void-Bound Voyager

    They died in honor. They died in glory. They sacrificed them selves for future generations. Lived a hero, and died a hero.
    In all the generations that follows, they will be considered heroes of the Starbound community.

    [​IMG]
     
    Last edited: Sep 14, 2014
  2. THE_____

    THE_____ Phantasmal Quasar

    and so the world ends with one post.
     
  3. Niran

    Niran Cosmic Narwhal

    Now the real question. How does this fix the following situation:

    Code:
    "genders" : [
        {
          "name" : "male",
          "image" : "/interface/title/male.png",
          "characterImage" : "/interface/title/avianmale.png",
          "hair" : [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24" ],
          "shirt" : [ "avianadventurershirt", "aviancommonershirt", "avianfancyshirt", "avianworkershirt", "nudechest" ],
          "pants" : [ "avianadventurerpants", "aviancommonerlegs", "avianfancyskirt", "avianworkerpants", "nudepants" , "underpants"],
          "facialHairGroup" : "fluff",
          "facialHair" : [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" ],
          "facialMaskGroup" : "beaks",
          "facialMask" : [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" ]
        },
        {
          "name" : "female",
          "image" : "/interface/title/female.png",
          "characterImage" : "/interface/title/avianfemale.png",
          "hair" : [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24" ],
          "shirt" : [ "avianadventurershirt", "aviancommonershirt", "avianfancyshirt", "avianworkershirt", "nudechest" , "underchest" ],
          "pants" : [ "avianadventurerpants", "aviancommonerlegs", "avianfancyskirt", "avianworkerpants", "nudepants" , "underpants" ],
          "facialHairGroup" : "fluff",
          "facialHair" : [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" ],
          "facialMaskGroup" : "beaks",
          "facialMask" : [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" ]
        }
      ]
    As we already knew we couldn't change or add things to shirt/pants as example, we had to replace the entire Gender part. With the new system this still doesn't work or am i misunderstanding it?

    Can we do it like this now?:
    { "op" : "merge", "path" : "/genders/1/shirt", "value" : stuff }

    I'm so confused sorry @.@

    Male and Female are in desperate need of a "male": [ { stuff } ] and "female": [ { stuff } ] foldering system otherwise this system still can't differentiate if i want to change male or female.
     
  4. SquarelyCircle

    SquarelyCircle Cosmic Narwhal

    Given the seemingly minor coding required to update the old mods to the new system, I wouldn't be surprised if some kind soul took requests to update mods. At least the unsupported ones might need a little CPR, since nobody is giving them any current love. That kind soul wouldn't be myself (not for lack of kindness, mind you).

    One way or the other, I doubt that everyone is going to jump suddenly at the chance to make their mods current, since a bug or other adjustment could require a similar change in the next couple weeks. Guess it depends on how actively the developers are using their own mods.
     
  5. GorunNova

    GorunNova Pangalactic Porcupine

    If my tinkering serves me right, you MAY actually be able to add a shirt by going...
    Code:
    [
         {"op": "add", "path": "/genders/0/shirt/-", "value": "newawesomemaleubershirt" },
         {"op": "add", "path": "/genders/1/shirt/-", "value": "newawesomefemaleubershirt" }
    ]
    
    ... but I could be very, very wrong.

    Edit: Corrected obvious mistakes, probably left the non-obvious ones right there in the open.
     
  6. Kawa

    Kawa Tiy's Beard

    Code:
    [
        //Add nudechests
        { "op" : "add", "path" : "/genders/0/shirt/-", "value" : "nudechest" },
        { "op" : "add", "path" : "/genders/1/shirt/-", "value" : "nudechest" },
        //Add nudepants
        { "op" : "add", "path" : "/genders/0/pants/-", "value" : "nudepants" },
        { "op" : "add", "path" : "/genders/1/pants/-", "value" : "nudepants" },
    
        //Add underpants
        { "op" : "add", "path" : "/genders/0/pants/-", "value" : "underpants" },
        { "op" : "add", "path" : "/genders/1/shirt/-", "value" : "underchest" },
        { "op" : "add", "path" : "/genders/1/pants/-", "value" : "underpants" }
    ]
    The /0 routes into the male case, /1 into female.

    Edit: fixed.
     
    TheNameless and GorunNova like this.
  7. Niran

    Niran Cosmic Narwhal

    Thanks.

    Finally! Now i just have to learn the entirety of JSON :/
    Can you toss me a documentary for Starbound if there's one?
     
  8. OmnipotentEntity

    OmnipotentEntity Code Monkey Forum Administrator

    Close, but there's 3 problems with your example. First, there is no "merge" operation. Possible values are "add", "remove", "copy", "move", "test", and "replace". Second, arrays are 0-indexed. Meaning the first member of the array is number 0. So if you have 3 members in an array they're numbered 0, 1, 2. Finally, you need to also address where in the array you're putting your stuff, you can put it at the beginning, somewhere in the middle, or at the end.

    If you want to add a shirt to the end of the male shirt list then you should use:

    Code:
    { "op" : "add", "path" : "/genders/0/shirt/-", "value" : "newShirt" }
    If you want to remove the "underchest" from the female list you should use:

    Code:
    {"op" : "test", "path" : "/genders/1/shirt/5", "value" : "underchest" }
    {"op" : "remove", "path" : "/genders/1/shirt/5" }
    The first part is only to make sure you're removing what you want to remove. It's not required, but I'm suggesting it for safety.

    If you want to move the "underchest" shirt from the female to the end of the male list, again this can be made safer with a test statement.

    Code:
    {"op" : "move", "from" : "/genders/1/shirt/5", "path" : "/genders/0/shirt/-" }
    If you want to replace the "underchest" shirt with "undershirt":

    Code:
    {"op" : "replace", "path" : "/genders/1/shirt/5", "value" : "undershirt" }
    Let's say I want to create an entirely new, third gender based on female (assuming that the engine supports such a thing, which it doesn't actually.)

    Code:
    {"op" : "copy", "from" : "/genders/1", "path" : "/genders/-" }
    {"op" : "replace", "path" : "/genders/2/name", "value" : "xemale" }
    etc
    
    EDIT: I guess I'm TOO SLOW D:
     
  9. Niran

    Niran Cosmic Narwhal

    Thank you anyway Omni, guess it will take some time to update all my mods and all objects. Especially since i have no idea about JSON and what we can do with it in Starbound now, which variables we can use etc etc.

    I need a documentation for this.
     
  10. Kawa

    Kawa Tiy's Beard

    Better put that on the todo list, before the social justice warriors find out. :)
     
  11. Dargona1018

    Dargona1018 Existential Complex

    Well, something to quickly say here since I am out of place as not being a modder or warlock-of-code . . .

    I had played one Nightly Build a while ago, hoping the Tile Render would allow me to run it, and you can all rest assured that you will not need mods to catch your attention for AT LEAST the first week of gameplay.
    Everywhere from the Quest, to the starting planet, to getting through tiers (with, hopefully, better bosses), to creating new things, to Novakids, etc etc, you will most likely get much more than a week out of it, even if you play 10 hours a day.
     
  12. Noranum

    Noranum Phantasmal Quasar


    That sounds nice, but I think it would not work when mods are your main focus. Let me make it short: I'm one of those annoying RP-freaks. I even write stories about my crew, which consists mainly of custom races. So, no mods, no crew. No crew, no canon. No canon, no game, at least for me.
    I don't want to complain. I'm excited and happy that they are still updating this wonderfull game. <3
    I'm just a little worried if I can catch up to all those additions.
     
    Dargona1018 likes this.
  13. Niran

    Niran Cosmic Narwhal

    Aaannd my next problem:

    I want to add the new sub category learnBlueprintsOnPickup, how do i do it?
    I suppose its something like this:
    Code:
    { "op" : "add", "path" : "/-", "value" : "learnBlueprintsOnPickup" },
    but i can't figure out why it won't work, my guess its "value" which breaks here since learnBlueprintsOnPickup is NOT a conventional value its more of a subpath containing values.
     
  14. Kawa

    Kawa Tiy's Beard

    { "op": "add", "path": "/learnBlueprintsOnPickup", "value": [ your blueprints here ] },
     
    starboundish and Tamorr like this.
  15. Type1Ninja

    Type1Ninja Hard-To-Destroy Reptile

    "Welcome to the modding tech support thread, courtesy Kawa and OmnipotentEntity."

    Seems legit.
     
  16. Niran

    Niran Cosmic Narwhal

    Looks like learnBlueprintsOnPickup doesn't work anymore, at least not on the yarnspinner.
     
  17. Kawa

    Kawa Tiy's Beard

    I was more concerned about the patch syntax tbh.
     
  18. Niran

    Niran Cosmic Narwhal

    I'm concerned that i can't update my mods because of the new JSON patching system.
     
  19. Kawa

    Kawa Tiy's Beard

    Pish-posh.
     
  20. Niran

    Niran Cosmic Narwhal

    Something must be wrong with my recipes... adding them as defaultBlueprints in player.config doesn't work too...

    Edit: I give up. I'll have to recreate my mod from scratch when a proper documentation is available because it seems like everything i try to do doesn't work.
     

Share This Page