Adding new type config help.

Discussion in 'Planets & Playfields' started by Qohorik, Feb 12, 2019.

  1. Qohorik

    Qohorik Ensign

    Joined:
    Aug 13, 2016
    Messages:
    6
    Likes Received:
    1
    Hello, trying to figure this SSG, managed to understand some parts of the SSG, but having trouble with adding new types of planets, they don't seem to update anywhere, and after I've added them, and tried to save config I get the following: "NullReferenceException: Object reference not set to an instance of an object Stacktrace"

    How do I add new planet types to generate with the default planet types?

    In case anyone tells me to check such and such guide, or check the forums and so on, i struggle to stay focused and concentrate on reading due to having a disability from serving, I find it easier and more helpful when my specific questions are answered directly.
     
    #1
  2. ravien_ff

    ravien_ff Rear Admiral

    Joined:
    Oct 22, 2017
    Messages:
    6,423
    Likes Received:
    12,029
    I don't think there is a guide yet for adding new planets. I can't type up how to do it at the moment but I'll get back to you if nobody else does!
     
    #2
  3. Qohorik

    Qohorik Ensign

    Joined:
    Aug 13, 2016
    Messages:
    6
    Likes Received:
    1
    Much appreciated! I'm still trying, but still not managed to figure it out, i'll keep trying until you are able to type it up, or someone else does as you said
     
    #3
  4. ravien_ff

    ravien_ff Rear Admiral

    Joined:
    Oct 22, 2017
    Messages:
    6,423
    Likes Received:
    12,029
    Okay here's how you add a new planet type that uses custom playfields.

    In your solarsystemconfig.yaml, you'll need to add 2 new entries.

    First, scroll down until you see the section that starts with this:

    Code:
     # for 3D map purposes, limit climate (optional for non-terrain types) to one of Lava, Temperate, Snow, Desert, Alien, or Barren
      PlanetTypes:      # come up with general categories of planet (playfield) types for distance purposes
          - Name: Lava
            Color: [0.3, 0.06, 0.04]
            Icon: Circle
            Distance: [100, 300]
            MoonProb: 0.5
            MoonType: [MoonNascent]   
            Climate: Lava      # added for description text prior to writing files
            PlayfieldLevel: [6,10]
            Playfields:
                - Lava
    This section is where your planet entries are placed. Simply copy and paste one of the planet entries directly below the others and then change the playfields in that entry to the names of your playfields in your scenario's folder. There are some that are player starts and some that have the code for adding extra moons. I'll go over what all this means below.

    Here's an example planet entry that will add a new planet to your solar system using custom playfields:
    Code:
          - Name: Custom
            Color: [0.04, 0.8, 0.1]
            Icon: Circle
            Distance: [400, 850]
            PlayerStart: true
            # Neighbor 'Name, Probability [0..1]'
            Neighbor:
              - Snow, 1
              - SpaceTradingStation, 0.3
            OrbitType: [OrbitStarter]         
            MoonProb: 1
            # MoonCount: [2,4]
            MoonType: [MoonStarter]       
            Climate: Temperate
            PlayfieldLevel: [1,1]
            Playfields:
                - Custom1, 0.4
                - Custom2, 0.6
    Okay so what does all this mean?


    - Name:
    The name of the planet entry. Has no effect in-game, it's just used by the solar system generator.

    Color: [0.04, 0.8, 0.1]
    Icon: Circle
    Changes what the planet looks like when viewed in the sector map in 2D mode.

    Distance: [400, 850]
    Min and max distance your planet can appear from the sun, in 1/10th of an AU. Also affected by the "MapScale" set at the top of the solarsystemconfig.

    PlayerStart: true
    Is this a starting planet?

    # Neighbor 'Name, Probability [0..1]'
    Neighbor:
    - Snow, 1
    - SpaceTradingStation, 0.3
    Neighbors are additional planets, asteroid fields, or trade stations that are spawned and attached to this planet within SV warp distance (15AU). Needed for resources or can be used to create groups of planets that all spawn together. The names reference the planet names in THIS section, NOT the playfield names. The number is the chance for it to spawn IE: this has a 100% chance of spawning a nearby snow planet and a 30% chance of spawning a nearby trade station.

    OrbitType: [OrbitStarter]
    You can set up a custom orbit to use. Orbits are defined below.

    MoonProb: 1
    Chance the planet will have any moons.

    MoonCount: [2,4]
    If it has a moon, the min and max number of moons it can have. Min is 1, max is 8. If left out or commented out, default is 1 moon.

    MoonType: [MoonCustom, MoonCustom2]
    Here you can define the moon(s) it can spawn. Moons are defined below.

    Climate: Temperate
    Has no effect in-game that I can tell. Changes the icon used when you preview the map in the SSG.

    PlayfieldLevel: [1,1]
    Min and max level of the enemies on the planet. NPC level can be further altered by the yaml settings of the planet for biomes and POIs.

    Playfields:
    - Custom1, 0.4
    - Custom2, 0.6
    This is the important part. In this section, you list the actual playfields you want your planet to have. You can add multiple playfields and the number after them is the chance for them to be picked. In this case, you use the folder names for your custom playfields.
    Note: your playfields MUST be set up with a playfield_static.yaml, playfield_dynamic.yaml, and terrain.ecf. You cannot use playfield.yaml files for random generation.
    In this example, it will choose between the playfields Custom1 and Custom2.

    After you have your planet entry set up (along with the entries for any custom orbit or moon(s)) you'll need to tell the config how many of your custom planet to spawn. This is done near the beginning in this section:

    Code:
      # solar system
      SectorPlanets:
        - TemperateStarter, [1]
        - AridStarter, [1]
        - Snow, [0,1]            # +1 used as neighbor
        - Arid, [1,2]            # needed for resources
        - Desert, [1]
        - Barren, [1,2]
        - Temperate, [0,2]
        - Lava, [1,2]
        - Alien, [1]
      SectorPOIs:
        - Sun, [1]               # one sun/star playfield is mandatory
        - AsteroidField, [1,3]
        - SpaceTradingStation, [1,2]
     
      StarTypes:
          - Name: Sun
            Color: [1, 1, 0]
            Icon: No
            Distance: [0, 0]
            HasOrbit: false
            Playfields:
                - Sun
    
    Simply add your custom planet like all the others listed, with the min and max number of it you want. For example:

    Code:
      # solar system
      SectorPlanets:
        - TemperateStarter, [1]
        - AridStarter, [1]
        - Snow, [0,1]            # +1 used as neighbor
        - Arid, [1,2]            # needed for resources
        - Desert, [1]
        - Barren, [1,2]
        - Temperate, [0,2]
        - Lava, [1,2]
        - Alien, [1]
        - Custom, [1,2]
      SectorPOIs:
        - Sun, [1]               # one sun/star playfield is mandatory
        - AsteroidField, [1,3]
        - SpaceTradingStation, [1,2]
     
      StarTypes:
          - Name: Sun
            Color: [1, 1, 0]
            Icon: No
            Distance: [0, 0]
            HasOrbit: false
            Playfields:
                - Sun
    
    This will spawn 1-2 of your custom planet.
     
    #4
    Needleship and Qohorik like this.
  5. ravien_ff

    ravien_ff Rear Admiral

    Joined:
    Oct 22, 2017
    Messages:
    6,423
    Likes Received:
    12,029
    To see how to make a random scenario, look at the Default Multiplayer scenario and just follow its folder structure. You can delete everything in the PDA folder if you want to use the default survival PDA.
     
    #5
    Needleship and Qohorik like this.
  6. Qohorik

    Qohorik Ensign

    Joined:
    Aug 13, 2016
    Messages:
    6
    Likes Received:
    1
    Very much appreciated! I'll give this a try later on when i'm back and shall let you no how it went! thank you for a very well constructed how to guide, looking at it, i'm sure I can manage it now, again i'll let you know later how it goes when i get back!
     
    #6
    ravien_ff likes this.
  7. ravien_ff

    ravien_ff Rear Admiral

    Joined:
    Oct 22, 2017
    Messages:
    6,423
    Likes Received:
    12,029
    Hope it works! Let me know in case I missed something and it doesn't work. :D
     
    #7
    Qohorik likes this.
  8. Qohorik

    Qohorik Ensign

    Joined:
    Aug 13, 2016
    Messages:
    6
    Likes Received:
    1
    You are a legend! sorry I never replied last night, didn't have much time, I tried a couple of times and failed, but reading over it again I managed to do it, so very much appreciated! I do have a couple of extra questions however, the new planet, will that work too the BarrenMetal planet? ill try it later on, just I don't see it located anywhere.

    And How do I change to coors, to load in the SSG, i made an edit, and loaded it, but it has no effect what so ever.
     
    #8
  9. ravien_ff

    ravien_ff Rear Admiral

    Joined:
    Oct 22, 2017
    Messages:
    6,423
    Likes Received:
    12,029
    The SSG is used to preview and create new randomly generated solar systems. Sadly it can't be used to edit existing scenarios.

    BarrenMetal is under the Barren planet entry in the random config. It has a 50/50 chance of generating a normal barren or a barrenmetal planet.

    Glad you got it working! :D
     
    #9
    Needleship likes this.
  10. Qohorik

    Qohorik Ensign

    Joined:
    Aug 13, 2016
    Messages:
    6
    Likes Received:
    1
    ah okie dokie then, so in regards to coors, if I changed the coors, will that be active in game? since it won't show in the SSG

    And much appreciated as long as I know BarrenMetal has a chance, I haven't seen it yet.
     
    #10
  11. ravien_ff

    ravien_ff Rear Admiral

    Joined:
    Oct 22, 2017
    Messages:
    6,423
    Likes Received:
    12,029
    Are you trying to create a random scenario where a new solar system is randomly generated each time you start a new game using the scenario and using playfield_dynamic.yaml and playfield_static.yaml for your planet files?

    Or are you trying to create a static scenario, where the solar system stays the same on each new game start and you can change the names and positions of the planets and use playfield.yaml for your planets?

    If you're doing the latter then you don't need to bother with the solarsystemconfig file at all if you don't want to. The way of adding planets to a static scenario is different.
     
    #11
    Needleship likes this.
  12. Qohorik

    Qohorik Ensign

    Joined:
    Aug 13, 2016
    Messages:
    6
    Likes Received:
    1
    Hmm, well i was trying to do a random scenario, but a static scenario? How do you make a static scenario? and how would the way of adding planets to a static version be different?

    Static version might play out better to be honest.
     
    #12
  13. Fenra369

    Fenra369 Commander

    Joined:
    Apr 5, 2016
    Messages:
    341
    Likes Received:
    139
    Static scenario doesn't procedurely generate. You won't have a seed I think and generally speaking everything will be exactly as it should in terms of terrain. I'm having a lot of trouble getting this down however... If you want to static place POIs or resources that's actually doable in a dynamic playfield.
     
    #13
  14. ravien_ff

    ravien_ff Rear Admiral

    Joined:
    Oct 22, 2017
    Messages:
    6,423
    Likes Received:
    12,029
    You still have a seed for random generation of terrain, resources, and POIs. But the seed won't change the layout of the solar system or the characteristics (gravity, atmo, etc) of a planet in a static scenario.
     
    #14
    Needleship likes this.

Share This Page