🔡
Syllabore
GitHub
  • Overview
  • Starting Out
  • Fine-Tuning Generators
    • Positioning
    • Clusters
    • Weights
    • Chancing
    • Transforms
    • Filtering
  • More Techniques
    • Formatters
    • Generator Pools
    • Syllable Sets
    • Generator Serialization
  • More Examples
    • Soft/Hard-Sounding Names
    • Fantasy Names
    • Spaceship Names
    • Futuristic City Names
  • Class Docs
    • FilterCondition
    • FilterConstraint
    • GeneratorPool<T>
    • INameFilter
    • INameTransformer
    • IPotentialAction
    • IRandomizable
    • ISyllableGenerator
    • Name
    • NameFilter
    • NameFormat
    • NameFormatter
    • NameFormatterGeneratorOptions
    • NameGenerator
    • NameGeneratorSerializer
    • NameGeneratorTypeInformation
    • SerializedNameGenerator
    • SyllableGenerator
    • SyllableGeneratorFluentWrapper
    • SyllablePosition
    • SyllableSet
    • Symbol
    • SymbolGenerator
    • SymbolPosition
    • Transform
    • TransformSet
    • TransformStep
    • TransformStepType
Powered by GitBook
On this page
  • Constructors
  • Methods
  • Properties
  1. Class Docs

Transform

PreviousSymbolPositionNextTransformSet

Last updated 2 months ago

A is a mechanism for changing a source name into a new, modified name. Transforming names is useful for adding some determinism in name generation or for creating iterations on an established name. can have an optional condition that must be fulfilled for a transformation to occur.

Implements: , Archigen.IWeighted, ,

Constructors

Constructor
Description

Transform()

Instantiates a new . By default, a has no optional condition and a weight of 1.

Methods

Method
Returns
Description

AddStep( step)

Adds a new step to this transform.

Apply( name)

Applies this on the specified and returns a new as a result. The transform may result in no changes if a condition was added and is not met, or if the ** property is between 0 and 1 exclusive (less than 100%). This method leaves the source unchanged.

Modify( name)

System.Void

Applies this on the specified in a destructive manner. For a non-destructive alternative, use Syllabore.Transform.Apply instead. The transform may result in no changes if a condition was added and is not met, or if the ** property is between 0 and 1 exclusive (less than 100%).

Properties

Property
Type
Description

Chance

System.Double

The probability this will attempt to change a name when Syllabore.Transform.Apply is called. The value must be a double between 0 and 1 inclusive. Note that each in this can also have its own chance value.

ConditionalIndex

System.Nullable <System.Int32>

The index of the syllable that the condition operates on. A negative index can be provided to traverse right-to-left from the end of the name instead.

ConditionalRegex

System.String

A regular expression that must be satisfied for the transform to be applied.

Random

System.Random

Used to simulate randomness.

Steps

System.Collections.Generic.List <>

The that this transform will execute.

Weight

System.Int32

A positive integer that influences the probability of this transform being used over others. Given two transforms X and Y with a weight of 3 and 1 respectively, transform X will be applied 75% of the time. All transforms default to a weight of 1.

Transform
Transform
IPotentialAction
INameTransformer
IRandomizable
Transform
Transform
TransformStep
Transform
Name
Name
Transform
Name
Name
Name
Name
Transform
Name
Transform
TransformStep
Transform
TransformStep
TransformStep