GenerateOptions¶
Namespace Nfty.Core.Generation in assembly Nfty.Core.
Everything one generation run needs to know.
Constructors¶
GenerateOptions(int, string, string?, int, bool, Parallelism?)¶
public GenerateOptions(int Count, string Seed, string? RecipeId = null, int MaxRerollsPerAsset = 10000, bool EnforceUniqueDna = true, Parallelism? Parallelism = null);
Parameters
Count(int) - How many assets to produce.Seed(string) - The string seed driving the RNG. The same cookbook and seed reproduce a run byte for byte, across machine locales and CPU architectures alike.RecipeId(string?) - Restrict the run to one Recipe, overriding the cookbook's weights entirely. Null rolls a Recipe per asset, which is the normal case.MaxRerollsPerAsset(int) - How many times a single asset may be re-rolled before the run gives up — a rule violation and a DNA collision both cost an attempt. Exhausting it raisesRuleConflictExceptionorUniqueSpaceExhaustedExceptiondepending on which is actually true of the book.EnforceUniqueDna(bool) - When true (the default), every asset must have distinct DNA: a roll colliding with one already produced is discarded and re-rolled, and a run that cannot fill its quota from the unique space fails withUniqueSpaceExhaustedException. When false, every roll is accepted even if its DNA repeats, and identity is carried by the sequential token id (the output number) as ERC-721 defines it — so any Count is producible regardless of the unique space. This skips both the dedup bookkeeping and the space-counting, which is the expensive part of a large run on a slow machine. Incompatibility rules are still enforced either way.Parallelism(Parallelism?) - How wide the render step may run; null meansParallelism.Default. Never changes a result, and is not recorded anywhere.
Fields¶
DefaultMaxRerolls¶
The reroll budget when a caller does not set one. Shared with the CLI's --max-rerolls default so the two cannot drift apart.
Properties¶
Count¶
How many assets to produce.
EnforceUniqueDna¶
When true (the default), every asset must have distinct DNA: a roll colliding with one already produced is discarded and re-rolled, and a run that cannot fill its quota from the unique space fails with UniqueSpaceExhaustedException. When false, every roll is accepted even if its DNA repeats, and identity is carried by the sequential token id (the output number) as ERC-721 defines it — so any Count is producible regardless of the unique space. This skips both the dedup bookkeeping and the space-counting, which is the expensive part of a large run on a slow machine. Incompatibility rules are still enforced either way.
MaxRerollsPerAsset¶
How many times a single asset may be re-rolled before the run gives up — a rule violation and a DNA collision both cost an attempt. Exhausting it raises RuleConflictException or UniqueSpaceExhaustedException depending on which is actually true of the book.
Parallelism¶
How wide the render step may run; null means Parallelism.Default. Never changes a result, and is not recorded anywhere.
RecipeId¶
Restrict the run to one Recipe, overriding the cookbook's weights entirely. Null rolls a Recipe per asset, which is the normal case.
Seed¶
The string seed driving the RNG. The same cookbook and seed reproduce a run byte for byte, across machine locales and CPU architectures alike.