> For the complete documentation index, see [llms.txt](https://stellar-game-assets.gitbook.io/modular-character-system/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://stellar-game-assets.gitbook.io/modular-character-system/reference/scripting-guide/modular-character-manager-functions/wearable-sets/generaterandomsetfromdatabase.md).

# GenerateRandomSetFromDatabase

**Declaration**\
public WearableSet **GenerateRandomSetFromDatabase**(**bool** \_mandatorySlots, **bool** \_randomMorphs, **bool** \_randomWearables, **bool** \_randomStyles)<br>

**Parameters**

<table data-full-width="false"><thead><tr><th width="217">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>bool</strong> _mandatorySlots</td><td><em>If true, mandatory slots will always be randomized and included.</em></td></tr><tr><td><strong>bool</strong> _randomMorphs</td><td><em>If true, morphs will be randomized and included.</em></td></tr><tr><td><strong>bool</strong> _randomWearables</td><td><em>If true, wearables will be randomized and included.</em></td></tr><tr><td><strong>bool</strong> _randomStyles</td><td><em>If true, eye and skin styles will be randomized and included.</em></td></tr></tbody></table>

**Description**\
Generates and applies a random Wearable Set from the current Character Style, using the specified parameters.

**Returns**\
The new WearableSet containing the newly generated random set.

**Declaration**\
public WearableSet **GenerateRandomSetFromDatabase**(**bool\[]** \_slotsToUse, **bool** \_randomMorphs, **bool** \_randomStyles)<br>

**Parameters**

<table data-full-width="false"><thead><tr><th width="217">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>bool[]</strong> _slotsToUse</td><td><em>An array of bools corresponding to the Wearable Slot indices, which if set true, will always be randomized and included.</em></td></tr><tr><td><strong>bool</strong> _randomMorphs</td><td><em>If true, morphs will be randomized and included.</em></td></tr><tr><td><strong>bool</strong> _randomStyles</td><td><em>If true, eye and skin styles will be randomized and included.</em></td></tr></tbody></table>

**Description**\
Generates and applies a random Wearable Set from the current Character Style, using the specified parameters, including an array that explicitly sets which slots to randomize.

**Returns**\
The new WearableSet containing the newly generated random set.
