Modding Help Trying to add ice giants. Where are worldTypes defined?

Discussion in 'Starbound Modding' started by Broconut, May 19, 2016.

  1. Broconut

    Broconut Cosmic Narwhal

    As we all know, gas giants can appear in Starbound. Because of this I thought, hey, we've got Uranus and Neptune in our own solar system, so why not have ice giants in Starbound too? I decided to try modding some ice giants into the game, but I've run into a bit of a problem.

    In the celestial.config file, planetaryTypes and satelliteTypes need to have a worldType attributed to them under the base parameters. Here's the bit of code for the moon planetaryType as an example:

    Code:
    "Moon" : {
          "satelliteProbability" : 0.0,
    
          "baseParameters" : {
            "worldType" : "Terrestrial",
            "description" : "Moon Planet",
            "smallImage" : "/celestial/system/planet_small.png",
    
            "terrestrialType" : [ "moon" ]
          },
    
          "variationParameters" : [
            {
              "imageScale" : 0.125,
              "smallImageScale" : 0.5,
              "worldSize" : "medium"
            }
          ]
        }
    Its worldType is "Terrestrial". If you look through the rest of celestial.config, there's a couple of different worldTypes. The ones I spotted were Terrestrial, Asteroids, FloatingDungeon and GasGiant. I want to make my own worldType, "IceGiant", but I have no idea where to do this. These worldTypes aren't defined in celestial.config. I've dug around the assets for quite a while and can't seem to find where they're hiding.

    If I set the worldType to GasGiant for my IceGiant planetaryType, it will just use the gas giant images and description.

    [​IMG]

    I've already added a new "ice_giant" folder in the celestial folder with the shadow and base images I'd like to use. This is the code that adds ice giants in celestial.config in case you need to know:

    Code:
    {
        "op" : "add",
        "path" : "/iceGiantGraphics",
        "value" : {
          "baseImage" : "/celestial/system/ice_giant/ice_giant_base.png",
          "shadowImages" : "/celestial/system/ice_giant/shadows/<num>.png",
          "shadowNumber" : [1, 9],
          "overlayImages" : "/celestial/system/ice_giant/ice_giant_clouds_<num>.png",
          "overlayCount" : 2,
    
          "primaryHueShiftRange" : [0, 360],
          "hueShiftOffsetRange" : [-10, 10]
        }
      }
    Code:
    {
        "op" : "add",
        "path" : "/planetaryTypes/IceGiant",
        "value" : {
          "satelliteProbability" : 0.5,
          "maxSatelliteCount" : 3,
    
          "baseParameters" : {
            "worldType" : "IceGiant", <---------------- This is what I'm having trouble with
            "description" : "Ice Giant Planet",
            "smallImage" : "/celestial/system/planet_large.png"
          },
    
          "variationParameters" : [
            {
              "imageScale" : 0.16,
              "smallImageScale" : 0.5
            },
            {
              "imageScale" : 0.18,
              "smallImageScale" : 0.5
            },
            {
              "imageScale" : 0.20,
              "smallImageScale" : 0.5
            }
          ]
        }
      }
    If I set the worldType to IceGiant for my IceGiant planetaryType, the game will still run just fine, but ice giants won't have any image, they're just invisible with "???" for the planet description.

    [​IMG]

    TLDR; I want to add ice giants with the same behavior as gas giants. Where are worldTypes originally defined for the planetaryTypes and satelliteTypes used in celestial.config?
     
    Last edited: May 19, 2016
  2. Inf_Wolf14

    Inf_Wolf14 Parsec Taste Tester

    Quote me if I'm wrong, because it's been a while since I've toyed with the planetary/system stuff in modding, but I believe that world types, unlike planetary types derive from some of the root assets in the game (which are unavailable to us).

    I think the most we are capable of is defining new system and terrestrial types, but not the level below.

    Again, this is my guess after looking through some of my old assets and getting an idea of the file hierarchy. By no means am I definite in my opinion.
     

Share This Page