Modding Help Is there shortcode for listing frames in .frames files?

Discussion in 'Starbound Modding' started by Pinchy, Dec 16, 2013.

  1. Pinchy

    Pinchy Subatomic Cosmonaut

    As an example the frames go:

    [ "default.1", "default.2", "default.3", "default.4" ]

    Is it possible to shorten the code to something like:

    [ "default.1" : "default.4" ]

    So it loads all the frames without having to manually type in all the numbers?

    Or is it possible to enter values into the .animation here:

    "active" : {
    "frames" : 20,

    "cycle" : 0.9,
    "mode" : "loop"
    },


    So that the 20 frames loop a certain amount of times?
     
  2. Nightmares

    Nightmares Scruffy Nerf-Herder

    [ "default.1" : "default.4" ] would simply mean you now have a field called "default.1" that has a value of "default.4" inside that index of the array (map basically).

    Since JSON is just a way to store data similar to xml and csv, and the names array wants a string value, the only way to do it would be to execute a script that would write it out for you. JSON is typically written by scripts or methods and very rarely by hand as far as I know. Since it's written and parsed by a program, the way you have it first is the only way to do it. Copy paste is your friend.
     

Share This Page