[DOCUMENTATION] Terrain Generator (OUTDATED)

Discussion in 'Planets & Playfields' started by Needleship, Jun 29, 2017.

  1. Needleship

    Needleship Master of Custom Terrain

    Joined:
    Apr 13, 2017
    Messages:
    527
    Likes Received:
    835


    This documentation is outdated.

    Terrain creation now uses a completely different method
    (Stamp placement)




    Link to the official thread and download of the program: See post directly below.

    Version 1.0 for TG 1.0 --------------------------------------------------------------------------------------

    Hi everyone!

    Updated to the latest game changes (EGS v. 7.6),
    improved section for creating a new planet playfield (probably stable for EGS version 8.0?),
    added some teaks and workarounds for bugs, and the things I learned about .xml terrain performance.

    There are two versions in the .zip. One of them has the changes highlighted.


    Version 0.8 for TG 1.0 ------------------------------------------------------------------------------------------
    An expanded and mostly rewitten documentation, based on the Eleon one.
    I used this to learn the ins and outs of the terrain generator.

    Because of the personal use:
    - It's formatted like hell
    - Tone and writing style shift all over the place

    … but it should help a bit.
    ---
    If you can think of better wording / find stuff that's wrong / want to do formatting / insert more pictures... -Please improve! :)

    ----------------------------------------------------------------------------------------------------------------------------------------------


    Have fun building planets!
     

    Attached Files:

    #1
    Last edited: Sep 8, 2020
    rainyday likes this.
  2. Keith Hovey

    Keith Hovey Captain

    Joined:
    May 11, 2016
    Messages:
    221
    Likes Received:
    74
    Have a link to the generator by chance?

    *EDIT*

    Found the link, and it took some digging to find because i completely forgot what thread it was in hahahaha.

    Click Here

    Can we still import terrains in alpha 6.3? Im compiling a list of docs, and other information together on my web site (To later add to the forum) and i have not personally used this.
     
    #2
    Needleship likes this.
  3. Needleship

    Needleship Master of Custom Terrain

    Joined:
    Apr 13, 2017
    Messages:
    527
    Likes Received:
    835
    Hi @Keith Hovey!

    Sorry for the inconvenience. I included the link to the terrain generator in the document, but forgot to post it here in the thread.
    - Thanks for the digging!

    --
    .xml terrains still work fine for me (Alpha 6.3 1120, Single player).
    Don't know about the multiplayers, though.
     
    #3
  4. Keith Hovey

    Keith Hovey Captain

    Joined:
    May 11, 2016
    Messages:
    221
    Likes Received:
    74
    Creatures spawn like normal? Ive had some issues with certain critters.
     
    #4
  5. Needleship

    Needleship Master of Custom Terrain

    Joined:
    Apr 13, 2017
    Messages:
    527
    Likes Received:
    835
    @Keith Hovey
    Sorry, I don't know about those, and for now I haven't tried out anything with mobs.
    - The terrain import works for me in a way that it shows up in the game.
     
    #5
  6. Needleship

    Needleship Master of Custom Terrain

    Joined:
    Apr 13, 2017
    Messages:
    527
    Likes Received:
    835
    Hidden crash warning:

    'Clamp' kills your map, if 'upper bound' is set equal or lower than -1.

    - It doesn't matter if the clamp is actually used for the end product.
    The terrain generator seems to work fine and beautiful, but the game ends up in a CoQ-loop when loading.
     
    #6
  7. piddlefoot

    piddlefoot Rear Admiral

    Joined:
    Mar 4, 2015
    Messages:
    1,849
    Likes Received:
    1,615
    For each planet you make you will need to manually edit the file so the Biomes match the AI critters you want to spawn in that particular biome, for the animals to spawn.
     
    #7
  8. Keith Hovey

    Keith Hovey Captain

    Joined:
    May 11, 2016
    Messages:
    221
    Likes Received:
    74
    We do and I have no idea why they still do not spawn.

    We used an .xml terrain and took creature spawns down to one biome.

    Code:
    Terrain:
      Name: Canyons
      PoleLevel: 100
      NoiseStrength: 1
      ColorChange:
        YFadeCenter: 40
        YFadeRange: 30
        YFadeMin: 0.10000000000000001
        YFadeMax: -0.050000000000000003
    MainBiome:
      Textures:
      - [DirtCliff, 2]
      - [Cliff, 4]
      - [RockBrown01, 0]
      - [AlienBlack01, 2]
      Decorations:
      - [RocksmallA02, 0.35]
      - [RocksmallC01, 0.35]
    SubBiomes:
    - Altitude: 20
      Textures:
      - [RockLava02, 20]
      Decorations:
      - [RocksmallA02, 0.2]
    BiomeTextureReplacements: []
    Biome:
    - Altitude: [16, 20]
      Slope: [0, 12]
      BiomeClusterData:
      - Name: BarrenFog
        Id: 1
        ClusterSize: 250
        NbOfClusters: 30
        Radiation: 1
        Temperature: 50
        Decorations:
        - [CoralStone01-03, 0.3]
        - [CoralStone01-05, 0.25]
        - [CrystalsPyramidBlue, 0.5]
        - [SkeletonWhalePart, 0.2]
        - [RealRock1, 0]
        - [AlienPlantThorn2, 1]
        - [EggPlant, 0.5]
        - [AlienPlantThorn2, 0.2]
        - [AlienPlantWorm2, 0.1]
        - [ClusterShroom, 0.2]
        - [ScalyPods, 0.2]
        - [Pillar1, 0.02]
        - [Pillar3, 0.007]
    And in the biome BarrenFog we use these critters:

    Code:
    reatureSpawning:
    - Biome: BarrenFog
      Entities:
      - Name: CaveWormsWhite
        Period: Always
        Amount: 2
        Delay: 0
      - Name: WormsDesert
        Period: Always
        Amount: 2
        Delay: 0
      - Name: AlienBugs04
        Period: Always
        Amount: 2
        Delay: 0
      - Name: WormDesertLargeHerd
        Period: Always
        Amount: 2
        Delay: 0
    Only the WormDesertLargeHerd and WormsDesert show up. The rest never spawn in ANY biomes. It could be space related, it could be that critters will not spawn inside the canyons. We have no idea. ALL of the xml terrains act the same way for some reason though.

    Full yaml:

    Code:
    # Created by EPD v1.32.5.0, Playfield Version: 6.0.0 [1077] (Alpha 6.0.0)
    RealRadius: 1303.797294
    ScaledRadius: 1300
    Gravity: -7.8600000000000003
    AtmosphereDensity: 1.377
    AtmosphereO2: 0.050000000000000003
    Temperature: 35
    TemperatureDay: 70
    TemperatureNight: -4
    Music: barren
    Radiation: 1
    DayLength: 24
    PlanetType: Barren
    Water: ''
    PvP: False
    Difficulty: 5
    PlayfieldType: Planet
    Description: Explore this planet because we dont do accurate descriptions.
    SunFlare: EnvironmentalEffects/SunFlareBlue
    SpecialEffectsLocal:
    - Name: Pollen
      Biome: [BarrenRocks]
      Time: Day
      MaxHeight: 55
    - Name: FireFliesGreenFew
      Biome: [BarrenRocks, BarrenOpenPlains]
      Time: Night
      MaxHeight: 55
    - Name: FireFliesOrange
      Biome: [BarrenFog]
      Time: Night
      MaxHeight: 40
    - Name: Grime
      Biome: [BarrenFog]
      Time: Always
      MaxHeight: 40
    SpecialEffectsGlobal:
    - Name: Clear
      Type: Weather
      Delay: 2
      Lifetime: 600
    - Name: CloudsLight
      Type: Weather
      Delay: 2
      Lifetime: 1200
    - Name: CloudsMedium
      Type: Weather
      Delay: 2
      Lifetime: 1200
    - Name: CloudsDark
      Type: Weather
      Delay: 2
      Lifetime: 1200
    - Name: Wind
      Type: Weather
      Delay: 5
      Lifetime: 600
    - Name: FogRadiationGreen
      Type: Weather
      InitialDelay: 10
      Delay: 5
      Lifetime: 1000
    - Name: MeteorShower
      Biome: [BarrenOpenPlains]
      Time: Always
      InitialDelay: 3.5
      Delay: 5
      PlyDist: 200
      Struct: Avoid
      Lifetime: 60
      SpawnY: 100
    - Name: ThunderAndLightning
      Biome: [Any]
      Time: Always
      InitialDelay: 0.5
      Delay: 8
      PlyDist: 100
      Struct: Avoid
      Lifetime: 300
      SpawnY: 500
    AtmosphereColor: 0.19, 0.26, 0.35
    SkyColor: 0.6, 1, 0.1
    SkyHorizonColor: 0.3, 1, 0
    LightZenithColor: 1, 0.9, 0.8
    LightHorizonColor: 1, 0.5, 0
    DayLightIntensity: 1.2
    NightLightIntensity: 0.45000000000000001
    NightLightColor: 0.5, 0.78, 0.16
    DayShadowStrength: 0.94999999999999996
    AtmosphereFog: 0.29999999999999999
    FogCloudIntensity: 0.80000000000000004
    FogIntensity: 0.10000000000000001
    FogStartDistance: 400
    GroundFogIntensity: 0.29999999999999999
    GroundFogHeight: 10
    CloudsDensity: 1
    CloudsSharpness: 1
    CloudsBrightness: 1
    CloudsOpacity: 0.29999999999999999
    CloudsZenithColor: 0.6, 1, 0.1
    CloudsHorizonColor: 0, 1, 0
    WindSpeed: 3
    RandomResources:
    - Name: IronResource
      CountMinMax: [0, 0]
      SizeMinMax: [9, 16]
      DepthMinMax: [0, 1]
      DroneProb: 0.5
      MaxDroneCount: 1
    AsteroidResources:
        - Name: IronResource
          Amount: 6500
          InitialDelay: 1
          Delay: 22
        - Name: CopperResource
          Amount: 10000
          InitialDelay: 1
          Delay: 32
        - Name: GoldResource
          Amount: 5000
          InitialDelay: 240
          Delay: 200
    Terrain:
      Name: Canyons
      PoleLevel: 100
      NoiseStrength: 1
      ColorChange:
        YFadeCenter: 40
        YFadeRange: 30
        YFadeMin: 0.10000000000000001
        YFadeMax: -0.050000000000000003
    MainBiome:
      Textures:
      - [DirtCliff, 2]
      - [Cliff, 4]
      - [RockBrown01, 0]
      - [AlienBlack01, 2]
      Decorations:
      - [RocksmallA02, 0.35]
      - [RocksmallC01, 0.35]
    SubBiomes:
    - Altitude: 20
      Textures:
      - [RockLava02, 20]
      Decorations:
      - [RocksmallA02, 0.2]
    BiomeTextureReplacements: []
    Biome:
    - Altitude: [16, 20]
      Slope: [0, 12]
      BiomeClusterData:
      - Name: BarrenFog
        Id: 1
        ClusterSize: 250
        NbOfClusters: 30
        Radiation: 1
        Temperature: 50
        Decorations:
        - [CoralStone01-03, 0.3]
        - [CoralStone01-05, 0.25]
        - [CrystalsPyramidBlue, 0.5]
        - [SkeletonWhalePart, 0.2]
        - [RealRock1, 0]
        - [AlienPlantThorn2, 1]
        - [EggPlant, 0.5]
        - [AlienPlantThorn2, 0.2]
        - [AlienPlantWorm2, 0.1]
        - [ClusterShroom, 0.2]
        - [ScalyPods, 0.2]
        - [Pillar1, 0.02]
        - [Pillar3, 0.007]
        Grass:
        - Name: GrassBrown02c
          Density: 1000
          YScale: 0.80000000000000004
          Preset: GrassDense2
        - Name: Plant01Brown
          Density: 1000
          YScale: 0.80000000000000004
          Preset: GrassPatches3a
    - Altitude: [16, 45]
      Slope: [0, 15]
      BiomeClusterData:
      - Name: BarrenRocks
        Id: 2
        ClusterSize: 80
        NbOfClusters: 12
        Decorations:
        - [BulbShroom, 2]
        - [BulbShroomYoung, 2]
        - [RealRock4, 0.5]
        - [RealRock5, 0.5]
        - [RealRock6, 0.5]
        Grass:
        - Name: GrassBrown02c
          Density: 1000
          YScale: 0.80000000000000004
          Preset: GrassDense2
    DroneBaseSetup:
      Random:
      - GroupName: DroneBaseSetup
        DronesMinMax: [2, 3]
        ReserveCount: 5
        DroneProb: 1
        Difficulty: 6
        PresetStyle: 1
        Stock:
        - Name: DroneSmallFast01Plasma
          Amount: 200
        - Name: DroneLargeSlow01Plasma
          Amount: 200
        - Name: DroneLargeSlow02Minigun
          Amount: 200
        - Name: DroneLargeSlow02Cannon
          Amount: 200
        - Name: DroneLargeAttackBase
          Amount: Infinite
          Extra: 1
        - Name: EnemyDroneV2Minigun
          Amount: Infinite
          Extra: 1
        - Name: DroneTroopsTransport
          Amount: Infinite
          Extra: 2
        - Name: ZiraxRocket
          Amount: 500
          Extra: 3
        - Name: ZiraxLaser
          Amount: 500
          Extra: 3
        - Name: Crawler
          Amount: 250
          Extra: 3
        PlanetVesselBase:
          Name: PlanetVesselBaseSetup
          Position3D: [0, 102, 0]
          BaseType: PlanetVesselBase
          PlanetVessel:
          - Name: Patrol-S-Medium
            Mission: PlanetPatrol
            FixedMaxSpeed: 5
            RangePatrolCenter: [1500, 0]
            RangePatrolRadius: 800
            RangePatrolAltitude: 60
      Fixed: []
    POIs:
      Random:
      - GroupName: DroneBaseAkua
        DroneBaseSetup: DroneBaseSetup
        CountMinMax: [1, 1]
        DroneProb: 1
        DronesMinMax: [2, 3]
        ReserveCount: 5
        SpawnPOINear: []
        SpawnPOIAvoid: []
        SpawnResource: []
        Properties:
        - Key: Music
          Value: lava2
      - GroupName: PlanetVesselBase
        PlanetVesselBaseSetup: PlanetVesselBaseSetup
        CountMinMax: [1, 1]
        DroneProb: 1
        DronesMinMax: [2, 3]
        ReserveCount: 3
        SpawnPOINear: []
        SpawnPOIAvoid: []
        SpawnResource: []
        Properties:
        - Key: Music
          Value: lava
      - GroupName: MiningComplex
        CountMinMax: [1, 1]
        DroneProb: 1
        DronesMinMax: [2, 2]
        ReserveCount: 4
        TroopTransport: True
        SpawnPOINear: []
        SpawnPOIAvoid: []
        POIDistance: 1000
        SpawnResource: []
        Properties:
        - Key: Music
          Value: DarkSoundscape3
      - GroupName: CrashedShip
        CountMinMax: [1, 2]
        DroneProb: 0.80000000000000004
        DronesMinMax: [1, 2]
        ReserveCount: 4
        SpawnPOINear: []
        SpawnPOIAvoid: [Wreckage]
        POIDistance: 800
        SpawnResource: []
        Properties:
        - Key: MapMarker
          Value: Neutral
      - GroupName: CivilSettlement
        CountMinMax: [2, 3]
        DroneProb: 0.80000000000000004
        DronesMinMax: [1, 2]
        ReserveCount: 3
        SpawnPOINear: []
        SpawnPOIAvoid: []
        SpawnResource: []
        Properties:
        - Key: MapMarker
          Value: Neutral
      - GroupName: XenuTierII
        CountMinMax: [3, 4]
        DroneProb: 1
        DronesMinMax: [1, 2]
        ReserveCount: 3
        TroopTransport: True
        SpawnPOINear: []
        SpawnPOIAvoid: []
        POIDistance: 1000
        SpawnResource: []
        Properties: []
      Fixed: []
      FixedPlayerStart:
      - Mode: Debug
        Pos: [836, 35.7, 780]
        RotY: 125
        Items: [CrushedStone, CrushedStone, CrushedStone]
    DroneSpawning:
      Random:
      - DronesMinMax: [5, 13]
        CenterX: -2500
      - DronesMinMax: [5, 13]
        CenterX: 2500
    CreatureSpawning:
    - Biome: BarrenFog
      Entities:
      - Name: CaveWormsWhite
        Period: Always
        Amount: 2
        Delay: 0
      - Name: WormsDesert
        Period: Always
        Amount: 2
        Delay: 0
      - Name: AlienBugs04
        Period: Always
        Amount: 2
        Delay: 0
      - Name: WormDesertLargeHerd
        Period: Always
        Amount: 2
        Delay: 0
    
     
    #8
  9. jmcburn

    jmcburn Rear Admiral

    Joined:
    Jan 15, 2017
    Messages:
    1,113
    Likes Received:
    1,759
    Alienbugs04 are 'predators'. Predators always spawn only after an initialdelay of 24 ingame hours, independently of what is set in yaml. I' m not sure about the caveworms, but i' m guessing, it's the same. Try moving/ speeding up time via debugmenu and see if they spawn then.
     
    #9
    Kassonnade likes this.
  10. Keith Hovey

    Keith Hovey Captain

    Joined:
    May 11, 2016
    Messages:
    221
    Likes Received:
    74
    I thought maybe the same thing but new files have been in place since friday and this playfield just does not spawn any aggressive critters. I was on there for 9 in game days and nothing outside of those two types. Then again we do a LOT of experimenting so maybe we broke something elsewhere thats effecting it. Thats always possible. Thanks anyways guys :) was just hoping that maybe someone had proof to counter (So I KNOW it was something we did wrong) or could confirm it as an issue.
     
    #10
  11. Keith Hovey

    Keith Hovey Captain

    Joined:
    May 11, 2016
    Messages:
    221
    Likes Received:
    74
    By the by... Your tool is so freaking helpful! There is no way we could thank you enough.
     
    #11
    jmcburn likes this.
  12. jmcburn

    jmcburn Rear Admiral

    Joined:
    Jan 15, 2017
    Messages:
    1,113
    Likes Received:
    1,759
    Thx. Glad you like it. :)

    The other thing, i noticed, is, that you only use a slope range from 0-12 for that biome. That's a very narrow range for creatures to spawn. Maybe there's just not enough room for all NPCs.
    I'd suggest adding a second dummy biome with same altitude range, slope 0-90, same name and ID and one dummy deco 'RealRock1' with density '0', no grass at all.


    Take a look here on how to implement dummy biomes.
    http://empyriononline.com/threads/empyrion-playfield-designer-v1-33-3.9789/page-13#post-123342


    That way, you expand the area, creatures can spawn in without changing the decorations.

    Maybe that helps.
     
    #12
    Kassonnade likes this.
  13. Needleship

    Needleship Master of Custom Terrain

    Joined:
    Apr 13, 2017
    Messages:
    527
    Likes Received:
    835
    Design note:

    Selectors: NEVER feed another selector in the 'Select' slot- Neither directly or hidden in a stack of mods. This is especially true for the 'Blend' one.

    Tests with 7 consecutively stacked selectors yielded 100 to 200+ seconds load time.
    Things load as usual, when using the other slots (Input0, Input1) - Even with selectors.

    But if possible, just to be sure, choose Min, Max and Add as your mod combiners.

    ----
    Edit: Wording/ typo
     
    #13
    Kassonnade likes this.
  14. Hummel-o-War

    Hummel-o-War Administrator Staff Member Community Manager

    • Developer
    Joined:
    Jun 15, 2015
    Messages:
    5,506
    Likes Received:
    8,502
    /pinned/renamed
     
    #14
  15. Needleship

    Needleship Master of Custom Terrain

    Joined:
    Apr 13, 2017
    Messages:
    527
    Likes Received:
    835
    Tip: Selector select (again), and adding some sharp mountains on top of a base.

    I happily stacked mods without a plan and suddenly ended up with a nice terrain base.

    Since I didn't use a basic Perlin at the bottom of it all, those nice small billowing mountains in the terrain were the result of all the interactions of the complete stack. Was about 16 mods in.
    But now I just wanted to add some sharp peaks on top of it all. But what can one do?

    Tried it with a 'Selector' select that just catches the uppermost altitude, and with that to insert some terrain peaks. So I spawn the 'Selector' module, choose my whole 16 mod-stack to be the selection mask for itself and assign it to the 'Select'-slot of the Selector (bottom right input). Hmm, there is a 'Blend' selector hidden in my stack down there at the start...?
    - Well...

    Can't stress this enough: Really keep your stack for the selection mask short.
    - It's more feasible to scale with a 'Max' your entire stack of 16 mods through itself, than to do this once within the select slot.
    For the 'Max' combi, it were those 16 mods computation effort for input0, plus 18 mods for the modified peaks in imput1.
    Load time for my laptop was (Akua playfield) 20 seconds with Max vs. 70 seconds with the Select. Nearly the same terrain output with both methods.
    So, yeah.

    --
    /Edit: Typo. It was a 'Max', of course, not a Min. Sorry the confusion.
    I used the Min with itself to 'cut down' to the mountains I wanted to modify, before scaling them again back through the base with Max. So there were even thrice the amount of mods involved, compared to the Selector.
     
    #15
    Last edited: Jul 25, 2017
  16. Needleship

    Needleship Master of Custom Terrain

    Joined:
    Apr 13, 2017
    Messages:
    527
    Likes Received:
    835
    Possible bug: Memory leak in the Terrain Generator?

    - After multiple reloading of the same, 25 module terrain, I get a 'bonus' of about 4-9Mb more ram usage on top for each load.

    - Also, from the second load on, the TG freezes up for a while to sort out it's module windows (with refresh turned off). If I load the same terrain with a completely 'empty' program, everything is near instantly there.

    >>If you know you'll load something complex, use a freshly started program.
     
    #16
    Kassonnade likes this.
  17. Needleship

    Needleship Master of Custom Terrain

    Joined:
    Apr 13, 2017
    Messages:
    527
    Likes Received:
    835
    A terrain with about 20 mods kept frying my CPU for no reason,
    with loading times of about 100 seconds.


    A) 'Virtual' mod number vs. real mod number and CPU need

    The mod number in the Terrain Generator is somewhat misleading:
    While loading a save, the game creates the full algorithm for the terrain, and splits every double reference of mods in singular chains.
    This creates the true number of used mods.
    I built a double reference very late in the mod chain, generating a huge amount of 'hidden' mods with it, which then exploded the processing need.

    Example:
    I have a chain end of 'Min30', consisting of 30 mods. Then I create a mod 'Add31', which has as it's inputs the mod 'Min30' in both slots.

    By this I don't just add one mod with that, I will actually add 30 more in one click... Each branch is counted for it's own.

    In my build this double reference was even hidden: I modified my 'Min30' with some other mods, which only very lately got 'Add'ed back to the main Min30 chain.



    B) Inflated loading times due to playfield biomes clashing with the terrain

    During the game session load, the biomes get applied to the terrain. This takes longer, the more terrain is available in a given biome's altitude range, and the more complex that terrain at that altitude is.
    Akua has a lot of biomes, each with a hoard of deco objects which each check the terrain slope if they are allowed to spawn.
    My planet was highly diverse in the altitude range of both the rain forest and the open plains, and had as good as no open water. If I submerged the whole landscape in the seas, it loaded ten times faster.

    >>Temperate planets with complex terrains need large oceans and wide and high mountains. Nothing will spawn there, keeping the need to check the terrain slope to a minimum.
     
    #17
    Kassonnade likes this.
  18. Needleship

    Needleship Master of Custom Terrain

    Joined:
    Apr 13, 2017
    Messages:
    527
    Likes Received:
    835
    Bugs in ScalePoint mod.

    a) Typed values are ignored by the mod and the map view gets reset to zero when saving.
    The slider must be used to set a value.
    Then it saves fine.
    When using the slider, the values show up, but don't represent the slider position too much. (There's a hidden digit.)

    b) No matter the values, Scale point mod is always loaded back with 'zero' value into the Terrain Generator.
    >Note down your ScalePoint values; re-apply them with the slider when you continue to work on your project. Or, apply a roughly similar value with the slider, and (after saving) use Notepad++ and set the original values directly in the .xml.

    ---------
    /Edit: This mod's UI is really broken. Added point a).
     
    #18
    Last edited: Jul 30, 2017
    Kassonnade likes this.
  19. Hummel-o-War

    Hummel-o-War Administrator Staff Member Community Manager

    • Developer
    Joined:
    Jun 15, 2015
    Messages:
    5,506
    Likes Received:
    8,502
    I ll forward this to the devs asap.
     
    #19
    Needleship likes this.
  20. Needleship

    Needleship Master of Custom Terrain

    Joined:
    Apr 13, 2017
    Messages:
    527
    Likes Received:
    835
    Updated documentation for the Terrain Generator

    >At the beginning of the thread.
    There is a 'changes-highlighted' version, too.
     
    #20

Share This Page