A way to access the height map of a planet

Discussion in 'Empyrion API' started by Emperor Johnny, Apr 12, 2019.

  1. Emperor Johnny

    Emperor Johnny Commander

    Joined:
    Dec 27, 2015
    Messages:
    22
    Likes Received:
    20
    From the look of it I can see that spawning in blueprints is allowed and this has gotten me to think about spawning in bases in a predetermined configuration, but it would be really difficult to do this without knowing what the terrain is like at the place I want to spawn the base at.

    Giving us access to the height map would allow us to figure out how high up a base needs to be spawned.
     
    #1
  2. Germanicus

    Germanicus Rear Admiral

    Joined:
    Jan 22, 2018
    Messages:
    5,032
    Likes Received:
    8,757
    I don't think that this kind of "freedom" would be necessary. If a surface is too uneven, obstructed, rocky or else the clearing and flattening of the ground is a good choice before spawning in a Base. If you have the SI issue as soon as placed support he red area with some blocks to give it a firm footing. it is the best way to learn how to place BP's by learning from errors. Bases built in Space or Creative doe not tell you anything about SI on your place of choice.
    My 2 cts
     
    #2
  3. Sephrajin

    Sephrajin Rear Admiral

    Joined:
    Dec 22, 2017
    Messages:
    916
    Likes Received:
    2,917
    Have you tried the 'di' in the console?
    Try it, then jump while watching the numbers.
    Gl hf
     
    #3
  4. Emperor Johnny

    Emperor Johnny Commander

    Joined:
    Dec 27, 2015
    Messages:
    22
    Likes Received:
    20
    Thanks for the replies. Those are all good suggestions.

    What I'm actually looking to do is spawn in bases using an algorithm via the API.

    For example, if you wanted to set up a PVP arena...

    Lets say you want to spawn in 5 flak towers and one central base. First, you need to find an area of the map thats empty. This is already possible with the API by using xyz coords of structures in the structure list. Okay, you find a good spot. At what height should you then spawn in your bases using the "request_entity_spawn" API command? Also, once you spawn it in how will you know if the flak tower is right next to a mountain? It would be better to spawn it in on top of the mountain, not next to it.

    It seems to me that if you are going to use the "request_entity_spawn" command then a height map would be a support API call that would be very useful. You wouldn't need the entire playfields height map. Maybe the call could specifcally request the height map of X_min, X_max and Y_min and Y_mas
     
    #4
  5. Xango2000

    Xango2000 Captain

    Joined:
    Jun 15, 2016
    Messages:
    385
    Likes Received:
    202
    A really silly way to do this would be to use the CmdId.Request_Entity_Spawn function...
    spawn in a Base core, teleport it around the map
    if it destroys itself due to Structural Integrity then it is above terrain, record where you spawned it then spawn a new one and keep going.

    It will get you there but it will take awhile to map the entire planet.
     
    #5
  6. Emperor Johnny

    Emperor Johnny Commander

    Joined:
    Dec 27, 2015
    Messages:
    22
    Likes Received:
    20
    Good call. I've also thought that another way to do it would be to teleport your player around the map underneath it and let the game move it back to the terrain level.

    It would be nice to get an API function though.
     
    #6
  7. Ephoie

    Ephoie Captain

    Joined:
    Jan 27, 2018
    Messages:
    329
    Likes Received:
    515
    This may be a function that would be better done in the playfield yaml. Plot out a map, and choose the biomes like Plains for the Poi's you want. Then create entries for your POis to spawn near to each other.
     
    #7

Share This Page