rdBPtools Tutorial 9 – Nesting Blueprints
Last Updated: 31st October 2022
One of the most powerful features of rdBPtools blueprints is that they can be nested within each other – it becomes very easy to have sub-blueprints which have their own behaviors and randomization.
To keep it powerful, the random generator has to be able to work up and down the chain of nested Blueprints producing the correct (and repeatable) random numbers – all children Blueprints will get their random numbers from the top-most rdActor Parent – choosing a Seed for the parent will set what the random will be for all children. Using a random Seed each time produces random for all children too (except if over-ridden).
In this tutorial, we expand on the random plant from Tutorial 2.
Step 1. Build the RandomPlant from Tutorial 2.
If you haven’t already, go to Tutorial 2 and create the random plant from the 3 selected actors. This is our base blueprint.
Step 2. Create the randomization for the plant and a pot.
The next step is to tell our actors how we want them to be random. Copy a pot to the level, and then place the random plant blueprint onto the pot in a way that it looks like it is growing properly (allow for some random movement).
Right click on the RandomPlant blueprint and select “Randomize Settings” from the rdBPtools SubMenu.
Now enter some value to describe how we want it to be random. The image to the left shows how the plant will be a random Yaw around -180* and 180* and with some slight movement (between -1,-1 and 1,1 with z remaining static)
The scale is randomized too – only slightly in the x/y but slightly more in the z.
For the pot, just a slight movement and a random Yaw between -180 and 180 is used.
Step 3. Create a new Blueprint from those two actors.
Now we select both those actors, Right-Click and select “Create from Selection” in the rdBPtools Submenu of the context menu that opens.
We want it to be based on the BP_ContainerBase Blueprint so select that, and we want it Collated in Folder (just because), Randomized and have Instanced Static Meshes (there will be potentially 1000’s of these plants in my game).