Modding Help Making armor transparent without texture editing

Discussion in 'Starbound Modding' started by Nexus Of Chaos, Apr 14, 2017.

  1. Nexus Of Chaos

    Nexus Of Chaos Parsec Taste Tester

    I'm wanting to make all ice things, including armor, slightly transparent so its like real ice, but when editing the icearmor.chest to make transparency, I always end up spawning a fully opaque version no matter what I do. the log does not say anything about icearmorchest or icearmor.chest, so idk whats wrong. I tried replacing the values in the color options with aa appended to the end of each, replacing the original colors with ff appended, using "directives":"?multiply=FFFFFFAA", and none of that worked. Could some1 please help me?
     
  2. Symphony

    Symphony Giant Laser Beams

    That FFFFAA is three independent hexadecimal values. FF-FF-AA, R (Red)-G (Green)-B (Blue).

    So your FFFAA is essentially just telling it to multiply by some solid color. You can append another value, 'Alpha', to the RGB format to get RGBA, FF-FF-AA-??

    So - Essentially ... Just use FFFFFFAA instead!
     
  3. Errors4l

    Errors4l Spaceman Spiff

    Not what OP described. Edit: Apologies. I thought users could see when comments are modified. Thought wrong.

    Code:
    /spawnitem icearmorhead 1 '{"directives":"?replace;6f2919ff=45a0e0aa;a85636ff=86daa8aa;e0975cff=baeeffaa;ffca8aff=f0fcffaa"}'
    
    /spawnitem icearmorchest 1 '{"directives":"?replace;6f2919ff=45a0e0aa;a85636ff=86daa8aa;e0975cff=baeeffaa;ffca8aff=f0fcffaa"}'
    
    /spawnitem icearmorlegs 1 '{"directives":"?replace;6f2919ff=45a0e0aa;a85636ff=86daa8aa;e0975cff=baeeffaa;ffca8aff=f0fcffaa"}'
    
     
    Last edited: Apr 14, 2017
    IHart likes this.
  4. Nexus Of Chaos

    Nexus Of Chaos Parsec Taste Tester

    i made a typo, i actually did do FFFFFFAA, but messed up and left off 2 Fs (i'm used to 6 digit hex codes)
    i'm wanting to b able to just find/craft them transparent without spawning them in
     
  5. IHart

    IHart Scruffy Nerf-Herder

    I got it working immediately with the first strategy you described. My best guess is you made the error of changing the target color values with "aa" as well. In the color option pairs the first is the target color, you only need to change the second in each color pair.
     
    Errors4l likes this.
  6. Errors4l

    Errors4l Spaceman Spiff

    Patch the icearmor items to add translucent options, or replace the existing ones. The below worked just fine for me, so you may have made a mistake in changing stuff.
    Code:
    [
      {
        "op": "add",
        "path": "/colorOptions/-",
        "value": {
          "ffca8a": "f0fcffaa",
          "e0975c": "baeeffaa",
          "a85636": "86d7f8aa",
          "6f2919": "45a0e0aa"
        }
      }
    ]
    Code:
    /spawnitem icearmorhead 1 '{"colorIndex":12}'
    
    /spawnitem icearmorchest 1 '{"colorIndex":12}'
    
    /spawnitem icearmorlegs 1 '{"colorIndex":12}'
    Darn it, did it again! Force of habit.
    You should be able to figure out how to make the recipes, though :)

    Note that this does assume you're the only one adding an entry to the colorOptions. Sadly color options are not identified by key so there's no good way of telling if 12 is the right index!
     
  7. Nexus Of Chaos

    Nexus Of Chaos Parsec Taste Tester

    Code:
    {
      "itemName" : "icearmorchest",
      "price" : 2500,
      "inventoryIcon" : "icons.png:chest",
      "maxStack" : 1,
      "rarity" : "Rare",
      "category" : "chestwear",
      "description" : "A chestpiece formed from solid ice.",
      "shortdescription" : "Ice Armor Shirt",
      "tooltipKind" : "armor",
    
      "maleFrames" : {
        "body" : "chestm.png",
        "backSleeve" : "bsleeve.png",
        "frontSleeve" : "fsleeve.png"
      },
    
      "femaleFrames" : {
        "body" : "chestf.png",
        "backSleeve" : "bsleeve.png",
        "frontSleeve" : "fsleeve.png"
      },
    
      "statusEffects" : [
        "glow"
      ],
    
      "colorOptions" : [
        // ICE COLD
        { "ffca8a" : "f0fcffaa", "e0975c" : "baeeffaa", "a85636" : "86d7f8aa", "6f2919" : "45a0e0aa" },
        // BLACK
        { "ffca8a" : "838383aa", "e0975c" : "555555aa", "a85636" : "383838aa", "6f2919" : "151515aa" },
        // GREY
        { "ffca8a" : "b5b5b5aa", "e0975c" : "808080aa", "a85636" : "555555aa", "6f2919" : "303030aa" },
        // WHITE
        { "ffca8a" : "e6e6e6aa", "e0975c" : "b6b6b6aa", "a85636" : "7b7b7baa", "6f2919" : "373737aa" },
        // RED
        { "ffca8a" : "f4988caa", "e0975c" : "d93a3aaa", "a85636" : "932625aa", "6f2919" : "601119aa" },
        // ORANGE
        { "ffca8a" : "ffd495aa", "e0975c" : "ea9931aa", "a85636" : "af4e00aa", "6f2919" : "6e2900aa" },
        // YELLOW
        { "ffca8a" : "ffffa7aa", "e0975c" : "e2c344aa", "a85636" : "a46e06aa", "6f2919" : "642f00aa" },
        // GREEN
        { "ffca8a" : "b2e89daa", "e0975c" : "51bd3baa", "a85636" : "247824aa", "6f2919" : "144216aa" },
        // BLUE
        { "ffca8a" : "96cbe7aa", "e0975c" : "5588d4aa", "a85636" : "344495aa", "6f2919" : "1a1c51aa" },
        // PURPLE
        { "ffca8a" : "d29ce7aa", "e0975c" : "a451c4aa", "a85636" : "6a2284aa", "6f2919" : "320c40aa" },
        // PINK
        { "ffca8a" : "eab3dbaa", "e0975c" : "d35eaeaa", "a85636" : "97276daa", "6f2919" : "59163faa" },
        // BROWN
        { "ffca8a" : "ccae7caa", "e0975c" : "a47844aa", "a85636" : "754c23aa", "6f2919" : "472b13aa" }
      ]
    }
    
    image and log attached

    i've been told about the sheer number of errors in my log, so pls don't mention it unless there's 1 important to this
     

    Attached Files:

  8. Errors4l

    Errors4l Spaceman Spiff

    Where did you place this asset?
     
  9. Nexus Of Chaos

    Nexus Of Chaos Parsec Taste Tester

    i went to the unpacked assets (which i use for my game assets over packed.pak) and edited it directly, didn't move it or anything
     
  10. Errors4l

    Errors4l Spaceman Spiff

    Try putting it under your /assets/user folder.
     
  11. Nexus Of Chaos

    Nexus Of Chaos Parsec Taste Tester

    ... idk what to say, but ik when i changed water textures and other liquids, i left the png inside the unpacked assets and it was changed, but leaving configs don't change a thing
     
  12. Errors4l

    Errors4l Spaceman Spiff

    Did it work? I simply guessed one of your many mods is overwriting your changes.

    The "Loading assets" lines match the load order of all your assets. As you can see, the /assets/user folder is loaded last and the /assets/Unpacked folder is loaded first. Any files with the same name overwrite each other, in the order they're loaded in.
    This makes sense, because you expect your icearmor.chest file in the unpacked folder to overwrite the vanilla file. The game prioritizes the last loaded files, and any earlier files are simply ignored (the vanilla game assets being the first loaded files).

    This is where the patch system comes in, since it allows multiple mods to change the same files. Patches are applied from all sources.
    Problems:
    - Not everyone plays along with the patch system (they don't know of it, or don't care enough to bother).
    - Not everyone tests for values in their patches, which can easily lead to conflicts (IE. a patch removes something that another patch then tries to edit, or something similar).
    - If different mods try to patch the same thing, this can lead to unexpected results (IE. a patch modifies two things that work together, and another patch modifies one of those two things).

    I'll leave these links here, for people interested in learning more about the patch system:
    Simple yet extensive tutorial: http://community.playstarbound.com/threads/basic-patching-now-with-path-guide-v1-9.84496/
    Patch generator and other useful JSON links and tools: http://helmet.kafuka.org/sbmods/json/
     
    Last edited: Apr 14, 2017
    IHart likes this.
  13. Sparklink

    Sparklink Ketchup Robot

    If I need to make an armor translucent I simply draw it that way. The program I use allows me to set the opacity of the pixels; I use it for all of my armor's visors or other things that look like glass.
     
    projectmayhem likes this.
  14. Errors4l

    Errors4l Spaceman Spiff

    Nothing wrong with that! Even some vanilla items utilize the support for transparency in the sprites.

    Having that said however, OP isn't creating armor. They wanted to make the existing ice armor more authentic (it's fully opaque by default). This is (probably) easier done through JSON edits rather than texture swapping. In fact, the title even reads that they wanted to do it without editing textures.
     
  15. Nexus Of Chaos

    Nexus Of Chaos Parsec Taste Tester

    it worked
    the main goal of this was to avoid editing the textures so I could still dye them properly (i'm modifying vanilla stuff)
     
    Errors4l likes this.
  16. Nexus Of Chaos

    Nexus Of Chaos Parsec Taste Tester

    plus, if i did edit textures, i would still hav to edit the jsons so the items work right
     

Share This Page