Randomized Nested Groups
This page explains how to create RNGs

What are RNGs
Randomized Nested Groups (RNGs) are a special type of group, which allow for it's content to be randomized
They can be used just like normal groups, just that you get options allowing for control over when and how it's content are being spawned
As the name says, they can be nested, allowing to create complex, reusable and randomized prefabs
Why use them
RNGs can make adding details to a build significantly faster, especially for things like clutter and trash
While being randomized, they allow for rather fine control, such that the result still looks coherent
RNGs can be easily shared, so if you make a nice selection of them, feel free to share them with others on e.g. Nexus
RNGs can just like normal groups be saved as prefab, categorized, tagged and shared
Creating a RNG
To create a new base RNG, simply click the "Dice" icon next to the
Add Group
button, then create the group

Add Group
as usualNow simply start by adding some elements to the RNG, e.g. some soda cans
As you add new elements to the RNG (This can be single elements, but also groups or other RNGs), you will notice some of them being hidden due to the randomization

RNG Settings
To change the behavior of the RNG, select it, then expand the
Group Randmoization
header

Here you can also change the seed, or randomize it, this will re-randomize the RNG
If you don't like how the RNG looks, simply randomize its seed using the button to its right
Randomization Modes
There are two randomization modes:
Default:
Here, each contained element is spawned or not based on its own probability
Fixed:
Here, a fixed amount of the contained elements is spawned
You can either define a percentage (E.g. 75%), or a total amount (E.g. 2 elements should spawn)
In this mode, the individual probabilities of the contained elements are used to determine which are more likely to spawn
RNG Child Settings
Any element contained inside a RNG has its own settings
Change them under the
Entry Randomization
header

The
Spawning Probability
has a different effect based on the randomization mode of the parent RNGAdditionally, you can randomize the rotation of one axis
For entities and meshes, you can also randomize the used appearance
A RNG which is part of another RNG will have both the Group Randomization
and the Entry Randomization
headers
This is what makes RNGs very powerful, being able to nest RNGs inside RNGs
Example
In this example we will create RNG which consists of a vending machine, with some trash
Base RNG
Lets start by making a new RNG
The main use of this "Root" RNG is so that we can quickly re-seed all the contained RNGs
Since the root RNG does not need randomization, we will set it to fixed mode, and
100%

Vending Machine
Lets add the vending machine
base\gameplay\devices\vending_machines\vending_machine_1.ent
to it, spawned as EntitySince it has loads of appearances, also enable randomization of apps

Soda Single RNG
Lets also make a simple RNG for soda cans, which we will re-use
Make a new RNG, and put all the soda can meshes (Spawned as mesh) which you can find inside, all placed in the same position
Additionally also enable rotation randomization for each soda can mesh
Now, set the soda RNGs mode to fixed, and the total amount to
1
Now we have a RNG which spawns exactly one random soda can

Soda Multiple RNG
Lets take out single soda RNG and put three copies of it into yet another RNG
I will leave this new "multi" RNGs settings at default, so each single soda RNG has a chance of 50% of spawning
This leaves us with a group of 3 randomized soda cans
Now lets take this RNG, and put some copies into our root RNG, placed around the vending machine

Cardboard RNG
Lets make another RNG for some cardboards, we will add 3 cardboard meshes to it, and set each one to randomize its yaw rotation
The RNG will be set to fixed mode, and configured to spawn 2 of our 3 cardboard meshes

Decals RNG
Similar to the cardboard RNG, we will make another RNG containing some dirt and vomit decals
Once again, each decal is set to randomize its yaw rotation
We will configure the RNG to spawn 75% of the decals

Final result
After adding some more RNGs for trashbags and a trashcan you get a final RNG that you can make a favorite, to re-use it elsewhere
Drop the attached JSON file into
Cyberpunk 2077\bin\x64\plugins\cyber_engine_tweaks\mods\entSpawner\data\favorite
if you just want the finished prefab
Last updated
Was this helpful?