Modular Character System
  • Overview
  • Setup
  • Demo Scenes
  • System Overview
    • Modular Character
    • Wearable
    • Wearable Set
      • Character Preset
      • Wearable Set Data
    • Wearable Database
    • Character Style
    • Cosmetic Styles
      • Skin Style
      • Eye Style
    • Character Morphs
  • Troubleshooting
  • Asset Updates
  • Reference
    • Scripting Guide
      • Modular Character Manager Functions
        • Wearables
          • EquipWearable
          • RemoveWearable
        • Wearable Sets
          • EquipWearableSet
          • EquipWearablePreset
          • RevertSetToDefaults
          • GenerateRandomSetFromDatabase
        • Materials
          • SetWearableMaterial
          • SetWearableMaterialArray
          • SetEyeStyle
          • SetSkinStyle
          • SetBodyMaterial
          • SetFaceMaterial
          • SetEyeMaterial
        • Character Morphs
          • SetBlendshapeOnAllMeshes
          • UpdateSetMorphValues
          • ApplySetMorphValuesToCurrentSet
          • ApplyCurrentMorphValuesToNew...
        • Face Merging
          • MergeFace
          • UnmergeFace
          • DestroyMergedFace
        • Saving and Loading
          • SaveCharacterPrefab
          • SaveCharacterPreset
          • SaveDataAsJSON
          • LoadCharacterFromJSON
      • Character Style Functions
        • GetAllWearablesOfCategory
        • GetAllNonDefaultWearablesOfCategory
        • GetWearableByName
        • CheckIfDefaultItem
      • Hidden Wearable Manager Functions
        • SetSlotStatusFromManagerType
        • AddWearableSlotToHiddenList
        • CheckHiddenListForWearable
  • Changelog
  • EXTERNAL LINKS
    • Stellar Game Assets Website
    • Join me on Discord
Powered by GitBook
On this page
  1. Reference
  2. Scripting Guide
  3. Modular Character Manager Functions
  4. Wearable Sets

GenerateRandomSetFromDatabase

ModularCharacterManager.SaveCurrentSet

Declaration public WearableSet GenerateRandomSetFromDatabase(bool _mandatorySlots, bool _randomMorphs, bool _randomWearables, bool _randomStyles)

Parameters

Parameter
Description

bool _mandatorySlots

If true, mandatory slots will always be randomized and included.

bool _randomMorphs

If true, morphs will be randomized and included.

bool _randomWearables

If true, wearables will be randomized and included.

bool _randomStyles

If true, eye and skin styles will be randomized and included.

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)

Parameters

Parameter
Description

bool[] _slotsToUse

An array of bools corresponding to the Wearable Slot indices, which if set true, will always be randomized and included.

bool _randomMorphs

If true, morphs will be randomized and included.

bool _randomStyles

If true, eye and skin styles will be randomized and included.

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.

PreviousRevertSetToDefaultsNextMaterials

Last updated 2 months ago