There are severable variables you can include in your expressions that will change based on the results of the roll:
d20R{1} * rerollCount
Roll a d20, reroll it whenever it lands on a 1, and multiply the result by the number of times it has been re-rolled.
d20! * diceCount
Roll a d20, spawning new d20s whenever they roll max value, and multiply the result by the total number of dice rolled by the expression.
4d6 * pinCount
Roll 4d6, and multiply the result by the total number of dice that have been pinned.
4d6 * pinSum
Roll 4d6, and multiply the result by the total values of all dice that have been pinned.
4d6 * disregardCount
Roll 4d6, and multiply the result by the total number of dice that have been disregarded.
4d6 * disregardSum
Roll 4d6, and multiply the result by the total values of all dice that have been disregarded.
4d6!2 * explodedCount
Roll 4d6, exploding two new d6s whenever they roll max value, and multiply the result by the number of dice that exploded.
4d6!2 * explosionCount
Roll 4d6, exploding two new d6s whenever they roll max value, and multiply the result by the number of dice that have been spawned by explosions.
4d6K0 + diceSum
Roll 4d6, disregard them all, but count the sum of them anyway.
Preset variables only refer to dice that are part of the result/sub-expression where they are specified, to refer to all dice regardless of this scope, use an "all" version of the variable name. (eg, "allPinSum", "allExplodedCount").
There are also constant values which do not change: PI, Phi, DegToRad, RadToDeg.