Modding Help Equipment Masks

Discussion in 'Starbound Modding' started by Inquisitribble, Jan 7, 2016.

  1. Inquisitribble

    Inquisitribble Void-Bound Voyager

    I've been messing around with some simple equipment mods, and I was simply wondering if chestpieces and/or pants support mask files like helmets do, and if they do, what are the dimensions of each animation frame and what would the dimensions of the mask file be? I would assume that if there are mask files for these pieces of equipment, you would need a mask for each animation frame, but I have no experience in this sort of thing.

    EDIT: Upon some digging around, animation frames seem to be 43x43. Do I need to mess with any JSON stuff to add in masks for chest/leg gear?
     
    Last edited: Jan 7, 2016
  2. Mackinz

    Mackinz The Waste of Time

    Best Answer
    It shouldn't matter where in the file it gets added, top or bottom. That it doesn't work, however, speaks to a technical limitation.

    Directives are very, very, very different from patch files. Directives are used in-game to do things like this:

    [​IMG]

    They affect the parameters of an item, object or tile. Do not use directives unless you know what you are doing or are willing to learn.
     
    Inquisitribble likes this.
  3. lazarus78

    lazarus78 The Waste of Time

    Check and see how helmets do it. I can't recall off hand if they define the use of a mask or not.
     
  4. Inquisitribble

    Inquisitribble Void-Bound Voyager

    I'm currently messing around with directives right now. Simply adding "mask" : "maskfile.png" to the .chest file didn't seem to do anything, but I'll see the addmask directive does anything if I add it to a .patch file.

    EDIT: That didn't work, this is what I tried to do in the patch file:
    Code:
    [
    {
      "op" : "addmask",
      "file" : "chestmask.png",
      "path" : ""
    }
    ]
    I wouldn't doubt it if I messed something up, but the game started up at least. I guess it also doesn't help that I know next to nothing about this sort of stuff.
     
    Last edited: Jan 7, 2016
  5. lazarus78

    lazarus78 The Waste of Time

    Did you look at the json for a helmet to see if it defines a mask file?
     
  6. Inquisitribble

    Inquisitribble Void-Bound Voyager

    If you're talking about looking in the game's assets for such a thing, then yes. In each folder that has an outfit or whatever, in the .head file, past the lines that define the frames for that item that goes in the hat/head slot, you would see:
    Code:
    ...
    "mask" : "mask.png"
    
    I have no idea if there are any files that define the general behavior of items in their respective slots though, but I would assume you're talking about that file.
     
  7. lazarus78

    lazarus78 The Waste of Time

    Try adding it to a chest or leg armor. See what happens. A lot of modding is tinkering.
     
  8. Inquisitribble

    Inquisitribble Void-Bound Voyager

    I've already attempted that, and unfortunately, it doesn't work.
     
  9. lazarus78

    lazarus78 The Waste of Time

    Now that I'm home, I'll take a quick look at it.
     
  10. Mackinz

    Mackinz The Waste of Time

    That's a malformed patch file. It does nothing except probably create an error in the log. Your patch file has to follow this format since it's adding something:

    Code:
    [
        {
            "op" : "add",
            "path" : "/mask",
            "value" : "mask.png"
        }
    ]
    
    I do not know if this will work in-game as desired, but it is proper patch syntax. You should make a habit of using a JSON patch validator if you are unsure of your patches into other files.
     
  11. TheElderScroller

    TheElderScroller Pangalactic Porcupine

    Afaik only head gear can have masks. I tried adding masks to all kind of armor in starcheat and it didnt work.
    But this does not mean it doesnt work at all. Some changes have to be made with mods...
     
  12. Inquisitribble

    Inquisitribble Void-Bound Voyager

    Thanks for showing me that, goes to show how little I know about JSON. Which is almost nothing, to be honest.

    Unfortunately, that just has the effect of adding "mask" : "mask.png" to the end of the .chest/.leg file, which doesn't seem to do anything. Perhaps this isn't possible to do, but my previous attempt to do stuff in the patch file was inspired by this post that I found while searching around.
     
  13. Mackinz

    Mackinz The Waste of Time

    Best Answer
    It shouldn't matter where in the file it gets added, top or bottom. That it doesn't work, however, speaks to a technical limitation.

    Directives are very, very, very different from patch files. Directives are used in-game to do things like this:

    [​IMG]

    They affect the parameters of an item, object or tile. Do not use directives unless you know what you are doing or are willing to learn.
     
    Inquisitribble likes this.
  14. Inquisitribble

    Inquisitribble Void-Bound Voyager

    I guess this answers my question then, that is, that it's currently not possible to do this.

    I see, thanks for pointing that out. Sounds interesting, but I assume that the setcolor directive is the only one that can be used with the spawnitem command ingame, so I don't think I can use this for what I want to accomplish. I could easily be wrong though.
     

Share This Page