Your idea:
I'm opening this on behalf of a discord user so hopefully I have the request right-- could variables somehow have their scope limited to some degree, such that a variable could be reassigned throughout the brew?
The idea is to be able to do something like this:
[TraitMagicResistance]: The $[Name] has magic resist
[Name]: Sally
$[TraitMagicResistance]
[Name]: Barney
$[TraitMagicResistance]
and get output like this:
The Sally has magic resist
The Barney has magic resist
So the Name variable could be reused within another variable template. To more precisely show the thinking of the requesting user, the TraitMagicResistance could take in another variable to fill slots, like this:
[TraitMagicResistance]: The $[Name] has magic resist
called like this
$[TraitMagicResistance][Sally]
$[TraitMagicResistance][Barney]
And I suppose with this latter syntax the trailing variables would just fill in from beginning to end if there were multiple. Sort of like regex The $1 has magic resist substitution.
Your idea:
I'm opening this on behalf of a discord user so hopefully I have the request right-- could variables somehow have their scope limited to some degree, such that a variable could be reassigned throughout the brew?
The idea is to be able to do something like this:
and get output like this:
So the
Namevariable could be reused within another variable template. To more precisely show the thinking of the requesting user, theTraitMagicResistancecould take in another variable to fill slots, like this:called like this
And I suppose with this latter syntax the trailing variables would just fill in from beginning to end if there were multiple. Sort of like regex
The $1 has magic resistsubstitution.