Thursday, 29 May 2014

may 14- Starbound modding

 After searching for how to recolor objects i learned starbound uses some set colors which in the scripting files (in  this case the .chest and .legs files), are changed be multiple palettes.

In example

 "colorOptions" : [
    /* BLUE */
    { "ffca8a" : "96cbe7", "e0975c" : "5588d4", "a85636" : "344495", "6f2919" : "1a1c51" },
    /* BLACK */
    { "ffca8a" : "838383", "e0975c" : "555555", "a85636" : "383838", "6f2919" : "151515" },
    /* GREY */
    { "ffca8a" : "b5b5b5", "e0975c" : "808080", "a85636" : "555555", "6f2919" : "303030" },
    /* WHITE */
    { "ffca8a" : "e6e6e6", "e0975c" : "b6b6b6", "a85636" : "7b7b7b", "6f2919" : "373737" },
    /* RED */
    { "ffca8a" : "f4988c", "e0975c" : "d93a3a", "a85636" : "932625", "6f2919" : "601119" },
    /* ORANGE */
    { "ffca8a" : "ffd495", "e0975c" : "ea9931", "a85636" : "af4e00", "6f2919" : "6e2900" },
    /* YELLOW */
    { "ffca8a" : "ffffa7", "e0975c" : "e2c344", "a85636" : "a46e06", "6f2919" : "642f00" },
    /* GREEN */
    { "ffca8a" : "b2e89d", "e0975c" : "51bd3b", "a85636" : "247824", "6f2919" : "144216" },
    /* BLUE */
    { "ffca8a" : "96cbe7", "e0975c" : "5588d4", "a85636" : "344495", "6f2919" : "1a1c51" },
    /* PURPLE */
    { "ffca8a" : "d29ce7", "e0975c" : "a451c4", "a85636" : "6a2284", "6f2919" : "320c40" },
    /* PINK */
    { "ffca8a" : "eab3db", "e0975c" : "d35eae", "a85636" : "97276d", "6f2919" : "59163f" },
    /* BROWN */
    { "ffca8a" : "ccae7c", "e0975c" : "a47844", "a85636" : "754c23", "6f2919" : "472b13" }

  ]
}
Each line is a different pallet, the first of each two hex numbers (in this case ffca8a, e0975c , a85636 and 6f2919) is the colour on the image file. the second one is the hex number for the colour you want it to become. for example, the line under /*BLUE*/ will make the colour.

And when all of these colours are changed at once it will completely recolour the initial sprite sheet allowing multiple clothing colours without multiple image files.

I've found attempting to change the first number in the code causes starbound to crash. so i began to recoulour the spritesheet in the colours of the first numbers but was unable to finish.

No comments:

Post a Comment