Generate Random Terrain at Runtime

So usually my Questions aren’t answered on here but I thought i’d give it one last try. It’s a bit of a complicated question but how would I go about having a replicated terrain that can be generated with a function or command. (It does not need to be infinite or editable) I just want to make randomly generated terrain that would be smooth like what you would see from the editor’s terrain tool which I know cannot be edited because of UE4’s eula or something along those lines. The Terrain would also need to perform well so i’m not sure if there’s a way of converting it into a static mesh at runtime of anything but if you have any ideas about that it’d be awesome. Also once I have this solution to Generate Random Terrain how would you go about generating random foliage on the top of it.

Thank you very much :slight_smile: