Modding Help Possible to use hueshift in treasure pools (Colored Dirt)?

Discussion in 'Starbound Modding' started by Xylia, Jul 29, 2016.

  1. Xylia

    Xylia Tiy's Beard

    So I want to make a Dirt Color Mod, and apparently you can't make a machine that crafts it, and I don't know LUA, so I thought that perhaps what we could do INSTEAD, is do this:

    1). Make new machine
    2). Said machine makes "reward bags" that have 1,000 dirt.

    Is that possible, at all?

    I know you can do this:

    Code:
    /spawnitem dirtmaterial 100 '{ "materialHueShift" : -180}'
    
    So... I don't get why we couldn't do this:

    Code:
    "dirtbagn180" : [
      [0, {
      "fill" : [
      {"item" : ["dirtmaterial", 1000], "materialHueShift" : -180}
      ]
      }]
      ]
    The dirt blocks can exist in your inventory hue-shifted, so I don't understand why we can't make a crafting machine, or a reward bag, or something that can produce HueShifted blocks?
     
  2. Peelz

    Peelz Giant Laser Beams

    It's kind of a long-shot, but maybe try it like this?
    Code:
    "dirtbagn180" : [
      [0, {
      "fill" : [
      {"item" : ["dirtmaterial", 1000, {"materialHueShift" : -180} ]}
      ]
      }]
      ]
     
  3. Mackinz

    Mackinz The Waste of Time

    My idea was to make a plugin for the Tabula Rasa which adds tons of recipes for hueShifted blocks. Much easier than what you're looking into, IMO.
     
  4. Xylia

    Xylia Tiy's Beard

    Well, I tried simply doing Dirt->Colored Dirt conversion but apparently you can't have multiple recipes that output the same item or at least it did not appear to work, nor did attempting to add materialHueShift into the recipe because it came out brown. Dunno what I did wrong, lol.

    I never claimed to actually know much about modding, but hey if you're gonna do it in your mod, that's awesome.

    Is said Plugin going to be stand-alone, that is, usable without Tabula Rasa? I was thinking of a smaller, more compact mod as some people might just want the dirt colors and nothing else.
     
  5. Mackinz

    Mackinz The Waste of Time

    Hardly perfect but...

    [​IMG]

    Here's a sample recipe:
    Code:
    {
      "input" : [
        { "item" : "dirtmaterial", "count" : 1 }
      ],
      "output" : { "item" : "dirtmaterial", "parameters" : { "shortdescription" : "Dirt -180", "materialHueShift" : -180 } },
      "groups" : [ "mod" ]
    }
    
    No, my mod will, hopefully, be all-encompassing for every block that is naturally generated by a biome. If someone just wants Dirt colors, my solution would be to only have Dirt blocks in your inventory and then click "Materials Available".
     
    Xylia likes this.
  6. Xylia

    Xylia Tiy's Beard

    Dunno how you got multiple of the same thing to show up but cool.

    Does that still work with the 1.0.3 changes, though? Or does their auto-coloring only happen if the block had no hueshift to begin with?
     
  7. Mackinz

    Mackinz The Waste of Time

    That's the first thing I tested before I made the image. And it works as it should - only blocks without a defined materialHueShift/hueShift value will be affected by the 1.0.3 change to how blocks work. Sorting will be an issue, though...
     
  8. Xylia

    Xylia Tiy's Beard

    Awesome. I was worried when I read the 1.0.3 notes and I was like "pleaseplease let that ONLY be for default blocks..." lol.

    Seems like best of all worlds possible... your mod + 1.0.3 = nobody should have a need to complain.
     
  9. Silent Strider

    Silent Strider Pangalactic Porcupine

    You might be interested in a little mod I made for my personal use; a machine that shifts the hue of any material you put on it. The UI and all graphics are very much placeholder, there is no recipe (so you need to spawn it using /spawnitem dw_colorwheel), and I'm not really planning on making it more user-friendly.

    How to use: install the attached mod, spawn the machine using /spawnitem dw_colorwheel and place it.

    The UI is as below:

    Clipboard01.jpg

    The top left slot is an item slot, the top right is a button that removes the hue shift (to allow the items to stack with unmodified ones), the rest are buttons that will set the color of the item.

    Feel free to use the code in any way you want.
     

    Attached Files:

  10. Mackinz

    Mackinz The Waste of Time

    Silent Strider, you should release that. It looks so good. It would do well on the repository and workshop.
     
  11. Silent Strider

    Silent Strider Pangalactic Porcupine

    That was the result of a little brainstorming about how better to supply the player with hue-shifted versions of any material desired; with 72 hues (I'm using your suggested number) and over two hundred materials for Vanilla alone, a vendor or crafting interface would get unwieldy quickly.

    Though before thinking about an official release I need to create some art for it (I mean, I'm still using the outpost's refrigerator) and figure out a workaround for when the hue shifting code in the button graphics refuses to apply for about two dozen tones; I'm afraid those two will take me more time to fix than it took to create the mod, so it could take a while.

    (For the recipe, I think I will keep to tier 1 crafting materials; the results are purely cosmetic, after all.)
     

Share This Page