> For the complete documentation index, see [llms.txt](https://sacro.gitbook.io/syllabore/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sacro.gitbook.io/syllabore/class-docs/transformset.md).

# TransformSet

A [TransformSet](/syllabore/class-docs/transformset.md) takes a source name, applies one or more [Transform](/syllabore/class-docs/transform.md), then creates a new name. By default, all [Transform](/syllabore/class-docs/transform.md) of the same set are applied to the source name and in the order they were added. To randomize what transforms are applied, call *Syllabore.TransformSet.RandomlySelect* when configuring a [TransformSet](/syllabore/class-docs/transformset.md).

*Implements:* [*IPotentialAction*](/syllabore/class-docs/ipotentialaction.md)*,* [*INameTransformer*](/syllabore/class-docs/inametransformer.md)*,* [*IRandomizable*](/syllabore/class-docs/irandomizable.md)

## Constructors

| Constructor    | Description                                                                                                                                                                                                                                                                               |
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| TransformSet() | Instantiates a new [TransformSet](/syllabore/class-docs/transformset.md). By default, all future [Transform](/syllabore/class-docs/transform.md)s that are added to this set will be used in the order they were added unless there is a call to *Syllabore.TransformSet.RandomlySelect*. |

## Methods

| Method                                                          | Returns                                               | Description                                                                                                                                                                                                                                                                                                                                                                            |
| --------------------------------------------------------------- | ----------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Add([Transform](/syllabore/class-docs/transform.md) transform)  | [TransformSet](/syllabore/class-docs/transformset.md) | Adds a new [Transform](/syllabore/class-docs/transform.md) to this [TransformSet](/syllabore/class-docs/transformset.md).                                                                                                                                                                                                                                                              |
| Apply([Name](/syllabore/class-docs/name.md) sourceName)         | [Name](/syllabore/class-docs/name.md)                 | Returns a new [Name](/syllabore/class-docs/name.md) that is the result of one or more [Transform](/syllabore/class-docs/transform.md)s applied to the specified source [Name](/syllabore/class-docs/name.md). This method leaves the source [Name](/syllabore/class-docs/name.md) untouched. This method can result in no changes if *Syllabore.TransformSet.Chance* is less than 1.0. |
| Join([TransformSet](/syllabore/class-docs/transformset.md) set) | [TransformSet](/syllabore/class-docs/transformset.md) | Combines this [TransformSet](/syllabore/class-docs/transformset.md) with the specified [TransformSet](/syllabore/class-docs/transformset.md). A new [TransformSet](/syllabore/class-docs/transformset.md) that is the combination of the two is returned.                                                                                                                              |
| RandomlySelect(System.Int32 limit)                              | [TransformSet](/syllabore/class-docs/transformset.md) | Sets this [TransformSet](/syllabore/class-docs/transformset.md) to randomly select transforms to apply to the source name. The parameter specifies the maximum number of unique transforms that will be applied.                                                                                                                                                                       |

## Properties

| Property             | Type                                                                              | Description                                                                                                                                                                                                                                                                                                                     |
| -------------------- | --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Chance               | System.Double                                                                     | The probability this transform set will make changes to a name. This value must be between 0 and 1 inclusive. Note that each [Transform](/syllabore/class-docs/transform.md) in the set can also have its own chance value which is rolled separately.                                                                          |
| Random               | System.Random                                                                     | Used to simulate randomness when *Syllabore.TransformSet.UseRandomSelection* is true.                                                                                                                                                                                                                                           |
| RandomSelectionCount | System.Int32                                                                      | When *Syllabore.TransformSet.UseRandomSelection* is true, this property is used to determine how many random [Transform](/syllabore/class-docs/transform.md) are selected and applied.                                                                                                                                          |
| Transforms           | System.Collections.Generic.List <[Transform](/syllabore/class-docs/transform.md)> | The [Transform](/syllabore/class-docs/transform.md) that make up this [TransformSet](/syllabore/class-docs/transformset.md).                                                                                                                                                                                                    |
| UseRandomSelection   | System.Boolean                                                                    | When true, [Transform](/syllabore/class-docs/transform.md) are not applied in the order they were added. Instead, a random number of [Transform](/syllabore/class-docs/transform.md) are selected and applied. Property *Syllabore.TransformSet.RandomSelectionCount* is used to determine how many random selections are made. |
