PLUG Tools
PLUG Tools
Spawners
![Spawners2.png](https://static.wixstatic.com/media/e9a1f4_c432fdc7c65347df8b6c4d796042e269~mv2.png/v1/crop/x_0,y_42,w_1936,h_1001/fill/w_968,h_500,al_c,q_90,usm_0.66_1.00_0.01,enc_avif,quality_auto/Spawners2.png)
Spawners are completely optional, the Dungeon does not require them to build a path. However, if you plan on adding items, enemies, or really anything procedurally to your Cells, this can be a fantastic tool. The Spawners will pull data from their Cell Block (if assigned) to automatically adjust their settings based on Cell Size, Difficulty, Path Index, etc.
​
The Spawners also have an Offline Mode, which will allow you to procedurally place objects directly into your Cells, not just at runtime. (View any of the Cave Path Cells under Paths/Demo/Cave for an example).
​
There are 6 Spawner Modes: Create, Collection, Settings, Markers, Config, and Multi.
​
The Collections, Settings, Config, and Multi Modes all have their own Blueprints that can be created and loaded. When a Blueprint is loaded, the Save button in the bottom left will be Green if the settings remain unchanged. The Save button will turn Red if the settings do not match, alerting you that you need to save your changes.
​
Now let's go into detail!
Creating a Spawner
![Spawners3.png](https://static.wixstatic.com/media/e9a1f4_a9ec2510b8944902968d1a56edb486f6~mv2.png/v1/crop/x_0,y_28,w_1936,h_1000/fill/w_968,h_500,al_c,q_90,usm_0.66_1.00_0.01,enc_avif,quality_auto/Spawners3.png)
For this example, we'll be using the Spawner_Mesh type, but there is also a Spawner_Actor type that allows you to use Actors instead of Static Meshes. The workflow is exactly the same, although the Spawner_Mesh has an extra option that the Spawner_Actor does not (Instanced Meshes).
​
These two Spawner Blueprints have also been set up in a way that filters the Widget to only show Spawner Settings and Spawner Collections that belong to this Spawner Type. This process will be outlined later in the document, but feel free to create your own Spawner Types (Children of PLUG_SpawnerType).
​
For now, let's select the Spawner_Mesh from the dropdown and select Create. This will place a temporary Spawner in the Cell. Much like the Light Blueprints, these are automatically destroyed (unless made Offline).
Creating a Spawner Collection
![Spawners4.png](https://static.wixstatic.com/media/e9a1f4_3cb21c6d2043409e9f39cb161a64b3b5~mv2.png/v1/crop/x_54,y_44,w_1832,h_994/fill/w_958,h_520,al_c,q_90,usm_0.66_1.00_0.01,enc_avif,quality_auto/Spawners4.png)
The Collections Mode allows you to select which objects you will spawn. While you can add objects directly to the Spawner and leave it at that, it's likely that you'll want to reuse this set of objects across multiple Spawners.
That's where Spawner Collections come in, a Blueprint that holds all of this information. You can create a new Spawner Collection by clicking the Plus icon next to the Selected Collection property at the top.
Adding Objects
![SpawnerCollection2.png](https://static.wixstatic.com/media/e9a1f4_2dcb6802a52b453aa774144d8d38aa98~mv2.png/v1/fill/w_975,h_399,al_c,q_90,usm_0.66_1.00_0.01,enc_avif,quality_auto/SpawnerCollection2.png)
When an object is added to a Spawner/Collection, it is temporarily loaded into the level in front of you. This allows you to set a correct Overlap Radius (located on the right), which the Spawner will use when doing its collision trace. A sphere collision added to the Collection allows you to visualize this radius.
​
You can also add a Selection Probability directly next to your selected object, which can be used for the Random Weighted Selection Type.
If you'd like to load a previously added object again, you can enter its Index into the Selection Index on the right (starting at 0).
​
You can also add Gameplay Tags to the Spawned Objects, although these are only used if the Add Spawnables option is checked (Under Settings/Collision).
​
If using the Mesh type, you also have the option of using Instanced Meshes with the checkbox at the top.
​
Once you're done adding and adjusting your objects, be sure to click the Save Collection button in the bottom right.
​
You can now recall this set of objects with their radius whenever you need!
Spawner Settings
![SpawnerSettings1.png](https://static.wixstatic.com/media/e9a1f4_fa49917d04be40c199711b3514323c19~mv2.png/v1/crop/x_47,y_41,w_1840,h_997/fill/w_961,h_521,al_c,q_90,usm_0.66_1.00_0.01,enc_avif,quality_auto/SpawnerSettings1.png)
Like the Collections Mode, the Settings Mode also has its own Blueprint, which follows the same process. A new one can be created by clicking the Plus icon at the top.
​
The Spawner Settings Mode has 4 Sub Modes: Main, Advanced, Collision, and Difficulty. Difficulty is only available if a Cell Block is detected.
​
Let's dive into the Main settings.
Main Settings
The Spawner can be Disabled by enabling the Disable checkbox at the top.
​
There are two options for determining the Spawner's size. Box Extent, which uses absolute values, and Auto Box, which is only available when a Cell Block is detected. It uses a multiplier value of the Cell Block's size.
![](https://static.wixstatic.com/media/e9a1f4_fa49917d04be40c199711b3514323c19~mv2.png/v1/crop/x_300,y_184,w_1194,h_691/fill/w_482,h_279,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/e9a1f4_fa49917d04be40c199711b3514323c19~mv2.png)
Regardless of selection, you can enter the size on the right.
​
There is a Min and Max option for the Spawn amount. If the Max is less than the Min value, it will be ignored.
​
There are 3 Selection Types for the Spawner: Single/Sequence, Random, and Random Weighted.
​
Single/Sequence will pick the objects in order, resetting when it reaches the end.
​
Random is what it says.
​
Random Weighted will use the Selection Probabilities you've added to the Collection to select an object to spawn.
​
There are also 5 Location Types for the Spawner: Center, Random Box, Surface Trace, Markers, and Ground Center Cull.
​
Center will spawn all objects at the Spawner's central location.
​
Random Box will spawn objects randomly within the Extents you've specified.
​
Surface Trace will show an additional panel that allows you to select up to six surfaces (Top, Bottom, Left, Right, Front, Back), which the Spawner will use for its location selection.
​
Markers will find Marker Blueprints within the Cell with the matching Gameplay Tags you've selected for its location selection. This will be covered in the next section.
​
Ground Center Cull at a value of 0 will be no different than a Surface Trace with only Bottom selected. A value of 1 will limit the Spawner to the edges. You can use this to create a border with controllable thickness around the Ground of your Cell.
​
The Spawner has a Spawn Multiplier checkbox, which will multiply the Spawn Amount by the size of your Cell, and is only available if a Cell Block is detected.
​
Finally, there is a Seed setting. If left at -1, the seed will be randomized every time the Spawner is run.
The Advanced Settings contains some additional, more obscure settings.
​
Spawn Delay allows you to delay the initial start for the Spawner. This only happens during Runtime.
​
Shrink allows you to move your objects closer to the Spawner's center point. A value of 0 leaves their locations unchanged, and a value of 1 moves them all fully to the center of the Spawner.
Advanced Settings
![SpawnerSettings2.png](https://static.wixstatic.com/media/e9a1f4_b6f0e82b1a32438c8d20cc28733bea89~mv2.png/v1/crop/x_381,y_174,w_1107,h_701/fill/w_478,h_303,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/SpawnerSettings2.png)
There are also two settings for offsetting the final Location of the spawned object, as well as the Rotation.
​
There is a Scale Min and Max. If the Scale Max is less than the Min, it is ignored.
​
There are 3 random rotation options, Random Roll, Random Pitch, and Random Yaw.
​
Enabling any of these options will display a respective Max Rotation value, as well as an Array. If the Array is not empty, the Spawner will randomly select one of the rotation options entered there. Otherwise, it will pick a value between 0 and the Max value you set.
Collision Settings
![SpawnerSettings3.png](https://static.wixstatic.com/media/e9a1f4_f38631c3ce51462ab68f8a1b59e9205f~mv2.png/v1/crop/x_300,y_178,w_1181,h_704/fill/w_481,h_287,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/SpawnerSettings3.png)
The Spawner offers options to Avoid other objects based on their Collision Type (and Gameplay Tags if selected), as well as Snap to specific objects using the same options.
​
We'll start with the Avoid settings.
Avoid Collision
The first Avoid setting is the Overlap Radius Multiplier, which will take the Overlap Radius you entered on the Collections tab for each object and multiply it by this value. Outside of specific circumstances, this should be left at 1, as we've already set the correct Radius on the Collections tab.
​
You can also select which Object Types the Spawner will avoid using the Avoid Object Types Array. The Avoid Debug allows you to visualize this.
​
Avoid GPTags forces the Spawner to check any hit objects for these tags before returning a successful check.
​
Location Check Offset allows you to offset the location that the Spawner checks without affecting the actual placement of the final spawned Object.
​
The Add Spawnable option will add an additional Blueprint at the location of every spawned object which will have a sphere collision and hold any Gameplay Tags you've selected. This is required in order for the Owned Tags setting to work and, as such, it is only visible when Add Spawnables is checked.
Snap Collision
Snap Collision has a few settings that are exactly the same as Avoid, and a few that are different which will be covered here.
​
When using Snap Collision, the Spawner will automatically take the normal direction of the hit location and use this is the new rotation for the spawned object. You can disabled this feature with the Ignore Rotation checkbox.
​
Overlap Radius Multiplier Snap does the same as the regular Overlap Radius Multiplier, but with a slightly different purpose. A common use for this feature would be to snap spawned objects to the ground. However, leaving the Radius at the full value would return successful hits well above the ground in most cases. Multiplying the radius down means the Spawner will only return successes when the object is truly close to the ground. This multiplier allows you to control how much that original radius is reduced.
​
Something to note, the more checks that are added the slower the Spawner will run. No collision will be the fastest, while using Avoid and Snap both with GPTags will be the slowest.
Difficulty Settings
The Difficulty Settings are only available if a Cell Block is detected, as it uses data from there to determine its own settings.
​
The first option is Difficulty Requirement.
![Difficulty.png](https://static.wixstatic.com/media/e9a1f4_b26d9d841ce3468786d661212547980d~mv2.png/v1/crop/x_293,y_187,w_1193,h_688/fill/w_481,h_277,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/Difficulty.png)
When the Dungeon builds a path, if the Difficulty Requirement option is enabled, the Spawner will not be enabled on any Path Index less than the Min value you enter here. It will also not be enabled for any Path Index higher than the Max value entered here. If it is a Percentage, it will be converted to a Path Index on build. There is a button to switch between Percent and Path Index for the values, which defaults to Percent.
​
Every Cell in a Path gets a Path Index which states the order it was placed in for that Path. The Dungeon converts the Path Indexes into Difficulty Values between 0-100 when it finishes building. Difficulty Probability Multiplier takes that Difficulty value, multiplies it by the value you enter here, and uses that as the weight for the Random Chance check.
In short, the higher the Difficulty (which can be multiplied), the more likely the Spawner will be enabled.
​
Difficulty Amount Multiplier follows the same concept, but instead of determining if the Spawner will be Enabled or not, it determines how much the Spawner will spawn. There are two values for multiplying the Spawn Min and Spawn Max amounts separately.
Markers
![](https://static.wixstatic.com/media/e9a1f4_c40f965f6e9c4da4bacbd3caa78611eb~mv2.png/v1/crop/x_0,y_61,w_1935,h_962/fill/w_972,h_483,al_c,q_90,usm_0.66_1.00_0.01,enc_avif,quality_auto/e9a1f4_c40f965f6e9c4da4bacbd3caa78611eb~mv2.png)
The Markers Mode allows you to place Markers into a Level, which the Spawner can use to place objects.
​
If you'd like, you can Name the Marker before Creating it in the bottom right. Once added to your Level, you can cycle through the available Markers using the Selected Marker property in the top left.
​
You can adjust the Marker's Location and Rotation using the top two properties, and you can add Gameplay Tags using the panel below. You can also Name the Marker in the bottom right.
![Markers2.png](https://static.wixstatic.com/media/e9a1f4_0d890a3a452041e29a293957103a520b~mv2.png/v1/crop/x_4,y_0,w_1783,h_1006/fill/w_482,h_272,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/Markers2.png)
The Image property allows you to place a material to the front of the Marker, to help further differentiate between them.
​
If you'd like to remove a marker, you can select the Destroy Marker at the top, which will need to be confirmed.
Config
![Config.png](https://static.wixstatic.com/media/e9a1f4_d468253bc8e14315aad87bb529d2cd8f~mv2.png/v1/crop/x_87,y_42,w_1751,h_1014/fill/w_967,h_560,al_c,q_90,usm_0.66_1.00_0.01,enc_avif,quality_auto/Config.png)
The Config Mode allows you to create a Spawner Config, which is a combination of Spawner Type, Spawner Collection, and Spawner Settings. A Spawner Preset.
The Spawner Type will automatically be pulled from the selected Spawner. If you have a Spawner Collection and/or Spawner Settings loaded already, they will be populated here. Otherwise, you can select the options for each here before Saving.
​
The MultiSpawner requires Spawner Configs to function, and they can also be used for Opening Blocks.
MultiSpawner
![Multi.png](https://static.wixstatic.com/media/e9a1f4_8a3e0410b04747bea3a6d0d285fab171~mv2.png/v1/crop/x_94,y_45,w_1751,h_1011/fill/w_954,h_551,al_c,q_90,usm_0.66_1.00_0.01,enc_avif,quality_auto/Multi.png)
The MultiSpawner spawns... Spawners.
​
There is one of these built into every Cell Block, as well as an array of MultiSpawner Configs.
​
It utilizes the Spawner Configs we created previously to sequentially create Spawners, meaning you can adjust the order the Spawners are loaded by changing their order in the array. This can be useful for spawning objects dependent on other spawned objects.
​
The Disable Array allows you to disable specific Spawners within the Spawner Config array.
​
The Use Markers and Spawner Marker Tags allow you to spawn the Spawners at a Marker's location.
​
The Global Disable disables all of the Spawner Configs in the array.
​
The Spawn Multiplier Min and Max will multiply the Spawn Amount for each of the Spawners by these amounts.