How to spawn an Alien POI in a regular game?

Discussion in 'Questions, Discussions & Feedback' started by Redgum, Nov 8, 2019.

  1. Redgum

    Redgum Lieutenant

    Joined:
    Aug 11, 2016
    Messages:
    18
    Likes Received:
    11
    I've designed and built an Alien POI with some puzzles and a few secret rooms etc.

    TLDR: How do I put my EPB file (the actual building) into some game instance [ creative, survival or whatever ] so that it will spawn WITHOUT the terrain inside of it, so I can test?

    Problem:

    I want to test the POI in a game on a regular playfield without having terrain spawn inside. Additionally, the POI has some features that I can't really test in creative mode - I need to see the spawn points in action, the timings on my traps and turrets, and everything else.

    Working and developing the blueprint out of the F2 menu is fine in creative as I can fly underground. However, I want to TEST this thing as a regular player before making it available.

    I've been looking around for several hours tonight in between edits and can't find anything that tells me how to put my blueprint into an existing playfield so that when I start the game, my POI is spawned automatically making it available to test as a regular player.
     
    #1
  2. Vermillion

    Vermillion Rear Admiral

    Joined:
    Jul 15, 2018
    Messages:
    3,259
    Likes Received:
    8,933
    You can't put it into an existing playfield. You need a fresh game for a new POI to spawn, since POIs are spawned when the map is loaded.
    For it to spawn submerged in the ground with the interior cleared, you'll need to first open F2, find the blueprint and doubleclick it.

    You'll see a box for Spawn Name, which is the name that the POI will have when it spawns. By default, it will be the blueprint name but you generally don't want that for a POI with a name like... "BA_RadosDesertRefinery.epb".

    There'll also be a Group Name box, which is what the playfield_static.yaml specifies to spawn that POI. For example, the starter planet POIs for xenu use XenuAuxT1, XenuAuxT2, XenuMain, XenuBunker and XenuDefenseT2.
    Unless you write your own test scenario for testing POIs or get one from someone else, your best bet for testing a POI is to give it a group name that already spawns on the starter planet.

    There will also be an offset box which is used to raise or lower the POI into or over the ground. Every 1 point is half a BA block, so if your base has to be 8 blocks into the ground, you'd put -16. You can also fine-tune the depth with say... -9.75

    There's also some checkboxes like: "Save Damage states" which is only if blocks need to be pre-damaged or with Admin cores to make blocks destructible/store custom loot.
    You'll want to tick "Remove Terrain", which will remove any terrain the base displaces when sunk into the ground. Otherwise it will be full of dirt and rock.
    "Flatten Ground" should also be ticked, which'll flatten the ground under and around the POI, otherwise you'll end up with a weird hole or floating hills around the POI's edge.
    "Keep Top Soil" keeps the surface material, so you have a layer of grass or whatever when flattening/removing terrain. Not useful for sunken POIs because they remove the ground anyway.

    Unless you're using a scenario with a custom prefab folder, you'll need to take your finished epb file and put it in the prefabs folder (empyrion/content/prefabs), just make sure you delete it when you're done testing or you'll have it appearing in regular games with each iteration you update.
     
    #2
    ravien_ff likes this.
  3. Redgum

    Redgum Lieutenant

    Joined:
    Aug 11, 2016
    Messages:
    18
    Likes Received:
    11
    Thank you Vermillion,

    So the juicy bit:

    Ah, so I wondered which file the game engine actually uses because there's a similar file, 'dynamic' -- so wasn't sure which file to edit.

    OK, so I'll save the blueprint again with a group name matching something I can find in the playfield_static.yaml. I will assume that my "AlienResearchFacility.epb" once copied into the appropriate folder; /empyrion/content/prefabs will appear somewhere on the planet.

    I searched through the playfield files earlier using Agent Ransack (a search util) looking for specific base files like "BA_BigArsedDroneFactory" that I found in the content folder, but was puzzled that the specific filenames were not in the YAML. So this explains why - they're using a model grouping topology to categorize the structures for each type - yielding much greater flexibility and simplicity in the YAML.

    That's the missing detail I needed! Thank you!
     
    #3
  4. Redgum

    Redgum Lieutenant

    Joined:
    Aug 11, 2016
    Messages:
    18
    Likes Received:
    11
    Ok, the "Remove Terrain" is definitely not working. I've tried 6-ways to Sunday to get the POI to spawn without dirt and rock filling the cavities but it still spawns with dirt inside. I even saved it after clearing out the dirt and rock from a spawn, but that didn't fix it. The screenshots below show the POI with the various options ticked.

    Any other ideas? How do the drone bases spawn without dirt & rock inside of them???


    With 'Remove Terrain' and 'Flatten Ground' ticked:
    upload_2019-11-8_23-58-33.png

    With only 'Remove Terrain' ticked:
    upload_2019-11-9_0-34-21.png
    upload_2019-11-9_0-36-36.png
     
    #4
  5. Vermillion

    Vermillion Rear Admiral

    Joined:
    Jul 15, 2018
    Messages:
    3,259
    Likes Received:
    8,933
    The exavated area is the dimensions of the bounding box of the POI, so it will always be square.
    Your build is angled. That's a no-no. It MUST be square.
    You can make it square-ish, by filling the remaining space with filler blocks, which will turn into terrain when spawned as a POI.

    I'd recommend opening your blueprint factory (F2), click the computer icon at the top of the list which will let you spawn any game prefab, including POIs and search for the BA_RadosPowerplantSnow for an example of how that's done (just put "snow" into the filter if you can't find it).
    You can also double-click those POIs to see the spawn settings used on them. Just don't overwrite them.
     
    #5
    ravien_ff likes this.
  6. ravien_ff

    ravien_ff Rear Admiral

    Joined:
    Oct 22, 2017
    Messages:
    6,275
    Likes Received:
    11,936
    Underground POIs need to be completely square or rectangular, unless you are okay with an oddly shaped terrain cutout like in the pictures.

    Also use the following console command to make sure the POI's center is correct:


    Save the blueprint.

    Use the following command in the console:
    prefabinfo NameOfBlueprint -clearpivot

    If your blueprint name has spaces, use this instead:
    prefabinfo 'Name Of Blueprint' -clearpivot

    Then SPAWN a NEW copy of your blueprint.
    Resave this NEW copy over your current one.

    Then go to your Empyrion - Galactic Survival/Content/Prefabs folder and DELETE the copy of your blueprint that the game put there.

    Now retest your blueprint in a new game and see if it works better.
     
    #6
  7. Redgum

    Redgum Lieutenant

    Joined:
    Aug 11, 2016
    Messages:
    18
    Likes Received:
    11
    Ok Guys. Thanks for the notes - I think I understand the problem a lot better now. It's late and I've been play-testing this POI despite the issues, but tomorrow sometime will get back on it.

    I'll need to clear the pivot first, then encase / surround the entire below-ground area with filler blocks.... or add additional rooms ... with the end result being a square and aligned POI.

    (Then I guess the question would be, on the next build - how does one ensure that the build is aligned properly with the invisible build grid to start with? [ FWIW, I did my best to align the Base starter to a compass point])

    Thank you for your help
     
    #7
  8. Vermillion

    Vermillion Rear Admiral

    Joined:
    Jul 15, 2018
    Messages:
    3,259
    Likes Received:
    8,933
    With a submerged POI it's pretty much impossible unless you measure everything out exactly when you start. Far easier to just use the clearpivot command.
    For a surface POI, it's usually not as important because it doesn't clear the ground. But might off-center the flatten ground effect.
     
    #8

Share This Page