Modding Help any help on items pixel size?

Discussion in 'Starbound Modding' started by amirmiked12, Apr 15, 2017.

  1. amirmiked12

    amirmiked12 Parsec Taste Tester

    i wanna change 3bd3497d89174c9.png to size of throwingknife10.png without losing any pixel .
    any tip or help?
    i mean there should be something but i dont know .
    cause if u used csgo weapons mod you could see they are in a very high resolution but in small size.
     
  2. lazarus78

    lazarus78 The Waste of Time

    Well, for one, you made it 10 times larger than necessary.

    As for scaling, there is a way, but I don't recall how. It has to do with adding a property to the item json.
     
  3. amirmiked12

    amirmiked12 Parsec Taste Tester

    i just meant for example..
    can u remember it ?its a very big thing in modding.
    if i learn how to this
     
  4. bk3k

    bk3k Oxygen Tank

  5. amirmiked12

    amirmiked12 Parsec Taste Tester

    tnx a good source for modders.
    but can u explain this to me?
    "/interface/cockpit/initiatejumpover.png?scalenearest=0.5"
    "/interface/cockpit/initiatejumpover.png?scalebicubic=0.5"
    what are these ?
    and where should i add them?to the object file or i should make a lua file?
     
  6. Nexus Of Chaos

    Nexus Of Chaos Parsec Taste Tester

    technically they're directives for spawning in the items, but you might b able to put them in the weapon's file

    the ?scalenearest=0.5 would be like this
    /spawnitem <item> <#> '{"directives":"?scalenearest=0.5"}'
     
  7. amirmiked12

    amirmiked12 Parsec Taste Tester

    i wanna use it for objects not weapons
     
  8. Nexus Of Chaos

    Nexus Of Chaos Parsec Taste Tester

    oh


    just use it in the object's file instead. i suggest the bicubic tho
     
  9. amirmiked12

    amirmiked12 Parsec Taste Tester

    yeah but thats what i want to know how?
    do you know how to add it and where to add it?
     
  10. Nexus Of Chaos

    Nexus Of Chaos Parsec Taste Tester

    Code:
    {
      "objectName" : "poptopaf",
      "colonyTags" : ["pretty"],
      "rarity" : "Legendary",
      "category" : "actionFigure",
      "collectablesOnPickup" : { "actionfigures" : "poptopaf" },
      "price" : 5000,
      "printable" : false,
      "description" : "The label reads, \"The Poptop hums beautifully to confuse its prey.\"",
      "shortdescription" : "Poptop Figurine",
    
    
      "inventoryIcon" : "poptopaf.png",
      "orientations" : [
        {
          "image" : "poptopaf.png:<color>",
          "imagePosition" : [-2, 0],
          "direction" : "left",
          "flipImages" : true,
    
          "spaces" : [ [0, 0], [0, 1] ],
          "anchors" : [ "bottom" ]
        },
        {
          "image" : "poptopaf.png:<color>",
          "imagePosition" : [-2, 0],
          "direction" : "right",
    
          "spaces" : [ [0, 0], [0, 1] ],
          "anchors" : [ "bottom" ]
        }
      ],
      "directives":"?scalebicubic=0.5"
    }
    i always put any added data at the end, this example using the poptop action figure
     
  11. amirmiked12

    amirmiked12 Parsec Taste Tester

    Tnx I'll put in a good use.and when u added why didn't u use any bracket or something like that?
     
  12. Nexus Of Chaos

    Nexus Of Chaos Parsec Taste Tester

    the spawnitem command requires the beginning and end brackets. since the object file already has those, they are unnecessary to repeat
     
  13. projectmayhem

    projectmayhem Spaceman Spiff

    I don't really understand what it does. I added it to a couple of my items to test it out, and they stay the same size, and appear the same quality.
     
  14. Nexus Of Chaos

    Nexus Of Chaos Parsec Taste Tester

    if you were to replace bicubic with nearest, they would look like they would when scaled in paint (not .net)
     
  15. projectmayhem

    projectmayhem Spaceman Spiff

    Don't suppose you can post a before/after picture of the poptop with the "directives":"?scalebicubic=0.5" and without? I been messing around with it on my objects and they look the same no matter what. I don't really understand what it is suppose to help
     
  16. bk3k

    bk3k Oxygen Tank

    You don't add this at all
    Code:
    "/interface/cockpit/initiatejumpover.png?scalenearest=0.5"
    "/interface/cockpit/initiatejumpover.png?scalebicubic=0.5"
    That's an example of using it, not code to do so.

    Lets say in your JSON you had
    Code:
    "image" : "something.png",
    You'd use processing directives like this
    Code:
    "image" : "something.png?scalenearest=0.5",
    for example. Generally this would be in your animation files, but objects without animations would just add them into the PNG files specified.

    And yes you can do this in LUA if you want. Look at
    /items/active/weapons/melee/energyweaponmelee.lua
    /items/active/weapons/melee/broadsword/energybroadsword.animation

    With that, you can tagswap, and therefore change directives on the fly. Not sure you'd want to change the size dynamically, but other things you might.
     
    amirmiked12 likes this.
  17. amirmiked12

    amirmiked12 Parsec Taste Tester

    i did add it to object file but didnt change
    look:

    {
    "objectName" : "Gunsmith1",
    "rarity" : "rare",
    "interactAction" : "OpenCraftingInterface",
    "interactData" : {
    "config" : "/interface/windowconfig/craftingmerchant.config",
    "paneLayoutOverride" : {
    "windowtitle" : {
    "title" : "Barrett's armory",
    "subtitle" : "weapons",
    "icon" : {
    "file" : "/interface/Gunsmith1ui.png"
    }
    }
    },
    "filter" : [ "Gunsmith1" ]
    },
    "printable" : false,
    "description" : "Guns here",
    "shortdescription" : "Barret station",
    "race" : "generic",
    "category" : "crafting",
    "price" : 1000,


    "apexDescription" : "weapons",
    "avianDescription" : "weapons",
    "floranDescription" : "weapons",
    "glitchDescription" : "Excited.weapons",
    "humanDescription" : "weapons",
    "hylotlDescription" : "weapons",
    "novakidDescription" : "weapons",

    "inventoryIcon" : "Gunsmith1icon.png",

    "orientations" : [
    {
    "imageLayers" : [ { "image" : "Gunsmith1.png" } ],
    "imagePosition" : [-16, 0],

    "image" : "Gunsmith1.png?scalenearest=0.5",

    "direction" : "right",
    "flipImages" : true,

    "frames" : 1,
    "animationCycle" : 0.1,

    "spaceScan" : 0.1,
    "anchors" : [ "bottom" ]
    }
    ]
    }
     
  18. bk3k

    bk3k Oxygen Tank

    Well you wouldn't use both "imageLayers" and an external "image" too. I'm guessing the engine prioritizes "imageLayers" and only looks for "dualImage" and "image" when it isn't found.

    Therefore
    Code:
    "imageLayers" : [ { "image" : "Gunsmith1.png?scalenearest=0.5" } ]
    
     
  19. amirmiked12

    amirmiked12 Parsec Taste Tester

    i did it but my pixels changed i didnt want it
    i dont wanna change the pixel amout
    just wanna change the size or scale it
     
  20. lazarus78

    lazarus78 The Waste of Time

    You want to shrink pixels to less than a pixel. Can't be done.
     

Share This Page