<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://skizzerz.net/DiceRoller/index.php?action=history&amp;feed=atom&amp;title=Dice%2FFunctionTiming</id>
	<title>Dice/FunctionTiming - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://skizzerz.net/DiceRoller/index.php?action=history&amp;feed=atom&amp;title=Dice%2FFunctionTiming"/>
	<link rel="alternate" type="text/html" href="https://skizzerz.net/DiceRoller/index.php?title=Dice/FunctionTiming&amp;action=history"/>
	<updated>2026-05-03T01:06:46Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.0</generator>
	<entry>
		<id>https://skizzerz.net/DiceRoller/index.php?title=Dice/FunctionTiming&amp;diff=240&amp;oldid=prev</id>
		<title>Skizzerz: Created page with &quot;{{APIdoc|FunctionTiming Enumeration}} When registering a function, this indicates when this function is called in the evaluation of extras and functions.  {{ns}}  == Syntax ==...&quot;</title>
		<link rel="alternate" type="text/html" href="https://skizzerz.net/DiceRoller/index.php?title=Dice/FunctionTiming&amp;diff=240&amp;oldid=prev"/>
		<updated>2017-04-12T16:29:10Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{APIdoc|FunctionTiming Enumeration}} When registering a function, this indicates when this function is called in the evaluation of extras and functions.  {{ns}}  == Syntax ==...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{APIdoc|FunctionTiming Enumeration}}&lt;br /&gt;
When registering a function, this indicates when this function is called in the evaluation of extras and functions.&lt;br /&gt;
&lt;br /&gt;
{{ns}}&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C#&amp;quot;&amp;gt;&lt;br /&gt;
public enum FunctionTiming&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Members ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Member name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| First || The function should be executed before any other expressions.&lt;br /&gt;
|-&lt;br /&gt;
| BeforeExplode || The function should be executed before any explode extras.&lt;br /&gt;
|-&lt;br /&gt;
| AfterExplode || The function should be executed after any explode extras.&lt;br /&gt;
|-&lt;br /&gt;
| BeforeReroll || The function should be executed before any reroll extras.&lt;br /&gt;
|-&lt;br /&gt;
| AfterReroll || The function should be executed after any reroll extras.&lt;br /&gt;
|-&lt;br /&gt;
| BeforeKeep || The function should be executed before any keep extras.&lt;br /&gt;
|-&lt;br /&gt;
| AfterKeep || The function should be executed after any keep extras.&lt;br /&gt;
|-&lt;br /&gt;
| BeforeSuccess || The function should be executed before any success extras.&lt;br /&gt;
|-&lt;br /&gt;
| AfterSuccess || The function should be executed after any success extras.&lt;br /&gt;
|-&lt;br /&gt;
| BeforeCrit || The function should be executed before any crit extras.&lt;br /&gt;
|-&lt;br /&gt;
| AfterCrit || The function should be executed after any crit extras.&lt;br /&gt;
|-&lt;br /&gt;
| BeforeSort || The function should be executed before any sort extras.&lt;br /&gt;
|-&lt;br /&gt;
| AfterSort || The function should be executed after any sort extras.&lt;br /&gt;
|-&lt;br /&gt;
| Last || The function should be executed after all other expressions.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Remarks ==&lt;br /&gt;
The ordering of the above member list is the order in which functions are executed (in other words, BeforeReroll happens before AfterReroll, which happens before BeforeKeep). Even if a particular extra does not apply to a roll (such as grouped rolls not having rerolls), these timings still happen.&lt;br /&gt;
&lt;br /&gt;
If multiple functions are registered to the same timing, they will be executed in the order that the dice expression specifies them in. For example, if there are two functions {{c|.a()}} and {{c|.b()}} which both have {{cs|FunctionTiming.BeforeKeep}} as their timing, the dice expression {{c|1d20.a().b()}} will execute a before b, but {{c|1d20.b().a()}} will execute b before a.&lt;br /&gt;
&lt;br /&gt;
If a dice expression has multiple functions that have different timings, the functions are re-ordered so they are executed according to their timings. For example, if {{c|.a()}} was registered as {{cs|FunctionTiming.BeforeKeep}} and {{c|.b()}} was registered as {{cs|FunctionTiming.AfterSort}}, the dice expression {{c|4d6dl1.b().a()}} will execute a first, then drop the lowest die, then execute b.&lt;/div&gt;</summary>
		<author><name>Skizzerz</name></author>
		
	</entry>
</feed>