RTS building placement problems

Hello… I don’t know if this is the correct thread to post this on but as it’s not related to blueprints only but what I need is basically ideas I decided to post here.

I started working on an RTS game loosely following a youtube playlist. The problem that I have (he has it as well) is about buildings placement.
How should I go about placing building on sloped areas?

Basically what I’m trying to make is an RTS that the map comes from World Machine with realistic sizes for hills/mountains etc and when I try to place a building on a sloped area it ends up partly floating since it is placed on the top part of the slope.

The ways that I thought about tackling this are three basically.

  1. Make the building prefabs with stilts but that will either require many models (if I make the stilts small and stack them one on top of the other with blueprints by checking the distance between a building’s floor and the terrain). It also doesn’t really fit on the scifi game I want to make.
  2. Use voxels, but it’s not well documented and it really doesn’t fit the realistic style I want to go for.
  3. Use this plugin, update it if needed and spend an enormous amount of time to get other generators up and working for a realistic terrain look, but that’s really not something I’m looking forward to.
  4. Keep the terrain I have but only allow building placement on completely flat areas (boring and half the map will be unusable).

What I wanted to do was to raise the ground a bit (like a ramp leading to a small flat area that the building is on) or dig a bit into it to flatten it, like humans would do in reality. But after searching for a while on the forums I see that this is not possible yet.

Any other ways to tackle it that I haven’t thought about?

The two options I’ve actually seen used are:

  1. Build buildings with “skirts” that poke into the ground. You don’t need multiple models; each model has a skirt, and if it’s in flat ground, the skirt simply is blocked by the ground and invisible.
  2. Modify the terrain when the building is placed, to make the terrain flat for the area the building takes up.

How would I go about the second option? From what I understood, I can’t modify the terrain on runtime.

Support was added recently for procedural meshes. You use this to ‘build’ your own ‘terrain’ at runtime. There are quite a few tutorials on this process for Unity. The same logic will be needed, just using the unreal API.