Problem: Semi procedural level from construction script, in combination with manual design in editor

Hi everyone, thank you for your interest.

I would like to hear your solution for the next problem.
Either it is very simple and I just overlooked the possibility or this might turn out to be an interesting discussion.

I’m trying to make a semi procedural level in blueprints. I would to have a tile map in the editor, on which the tiles are blueprint objects and are selectable to change properties (type of tile mainly)
The basic tiles are set by the artist (me) but further smaller detail generation should be done by the script, (eg. random mesh, connecting parts for tiles, etc)
Sound simple enough, but I have yet to find a elegant clean solution. I don’t want to use C++ code for this.

My idea is to have a Tile Manager Blueprint object in the level that managed the tiles and does the further detail generation after the overall design is done.

  • You can’t generate these tiles in the construction script once the map manager object is placed in the world, since I can’t spawn actors from the construction script, and that makes sence to me.

  • When I add the tiles as children components, they are visible in the editor, but I seem to be unable to select the children objects to change properties. If this is possible, and I just made myself look stupid, I would like to know how :stuck_out_tongue:

  • I looked at doing the overall map design in a text or excel file, and using this data to generate the map at event begin play, but the data import seems to need conventional code.

  • You could just place the tiles in the level by hand (easy enough with grid snapping and for a small project) problem is getting the tiles to know their neighbours to generate suitable connection meshes etc. I would have to sort all the tiles first by location and have them in a array in such a way that they can know their neighbours. Possible yes, but a lot of nodes, and not exactly elegant.

  • I could make a plugin, but as far as I could see, that is still done with c++ and not possible in blueprints. If I am mistakes please guide me to a guide to get started.

  • My current (best) solution that I came up with is to place enough Tile objects in the world manually, and let the TileManagerBlueprint gather all of them with a GetAllActorsFromClass node and let the manager place the tiles next to each other so that the neighbours are known. But somehow I have the feeling that smart people here should be able to have a cleaner solution than this.

( - I know I could generate a fully random level and let all the generation happen at BeginPlay, but that takes me quite a bit further. I would like to simple set some type types and some other properties in the level.)

I could find a lot of people having some sort of similar question in the answerHub, but no solutions except to totally work around this. So I thought I would give the forums a try. Please shine your light on this pleeeaase! crying smileys