Control asteroid and their frequency

Discussion in 'Planets & Playfields' started by LoSboccacc, Jan 24, 2019.

  1. LoSboccacc

    LoSboccacc Commander

    Joined:
    Nov 28, 2015
    Messages:
    15
    Likes Received:
    17
    How would you go configure a playfield that has no resource deposit but instead receives frequent random asteroids, say about one every hour?

    I only found where to list asteroid types and their relative chances, can't find frequency or spawn conditions .

    Would also be helpful to know how to control asteroid richness.
     
    #1
  2. ravien_ff

    ravien_ff Rear Admiral

    Joined:
    Oct 22, 2017
    Messages:
    6,423
    Likes Received:
    12,029
    Look in the +ExamplePlanet playfield_static.yaml file under the playfields folder.

    Specifically, the section that is as follows:

    Code:
    ### Resource Asteroids
    AsteroidResources:           
        - Name: IronResource        # Name of resource in asteroid: IronResource, CopperResource, PromethiumResource, SiliconResource, NeodymiumResource, MagnesiumResource, CobaltResource, SathiumResource,  ErestrumResource, ZascosiumResource, GoldResource, PentaxidResource         
          Threshold: 0.6            # Float [0, 1] - threshold (compared to the total amount of ore, NOT related to single deposits) below which asteroids will start to spawn
          Amount: 0.8               # Float [0, 1] - amount to restock (compared to the total amount of ore at game start)
    
        - Name: IronResource        # Possibility to spawn resource asteroids independent of the remaining amount of ore on a planet
          Amount: 5000              # Amount of ore that is spawned per event
          InitialDelay: 1           # Float [0, 10000] Initial delay in game hours before spawning of asteroids, if InitialDelay < 0 => no spawning
          Delay: 24                 # Float [0, 10000] Subsequent delay in game hours, if Delay = 0 => no spawning
          DespawnDelay: 5           # Float [0, 10000] Delay in game hours after which asteroid will be removed. If parameter is not set or set to 0, asteroid will not despawn  
    The second entry is the one you'd want. A word of warning: I had trouble getting them to work properly in alpha 8.0. They might still be a bit wonky.
     
    #2
    LoSboccacc likes this.
  3. LoSboccacc

    LoSboccacc Commander

    Joined:
    Nov 28, 2015
    Messages:
    15
    Likes Received:
    17
    fantastic the second sysntax is exactly what I was looking for, finger crossed they work :D
     
    #3
    ravien_ff likes this.

Share This Page