<?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%2FPbP%2FRollPost%2FAddRoll_%28String%2C_RollerConfig%29</id>
	<title>Dice/PbP/RollPost/AddRoll (String, RollerConfig) - 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%2FPbP%2FRollPost%2FAddRoll_%28String%2C_RollerConfig%29"/>
	<link rel="alternate" type="text/html" href="https://skizzerz.net/DiceRoller/index.php?title=Dice/PbP/RollPost/AddRoll_(String,_RollerConfig)&amp;action=history"/>
	<updated>2026-05-03T05:25: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/PbP/RollPost/AddRoll_(String,_RollerConfig)&amp;diff=856&amp;oldid=prev</id>
		<title>Skizzerz: /* Remarks */</title>
		<link rel="alternate" type="text/html" href="https://skizzerz.net/DiceRoller/index.php?title=Dice/PbP/RollPost/AddRoll_(String,_RollerConfig)&amp;diff=856&amp;oldid=prev"/>
		<updated>2017-06-16T18:30:35Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Remarks&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 18:30, 16 June 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l44&quot; &gt;Line 44:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 44:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Evaluate ''diceExpr''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Evaluate ''diceExpr''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;If Pristine or Stored are saving invalid rolls (such as the dice expression {{c|1d20+}}), replacing them with a valid roll does not change the state, but will replace the invalid roll with the new (valid) one for all future iterations.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key skizzerz_dice:diff::1.12:old-785:rev-856 --&gt;
&lt;/table&gt;</summary>
		<author><name>Skizzerz</name></author>
		
	</entry>
	<entry>
		<id>https://skizzerz.net/DiceRoller/index.php?title=Dice/PbP/RollPost/AddRoll_(String,_RollerConfig)&amp;diff=785&amp;oldid=prev</id>
		<title>Skizzerz: Created page with &quot;{{APIdoc|RollPost.AddRoll Method (String, RollerConfig)}} Adds a new roll to the post using the given config if the roll needs to be evaluated.  {{ns}}  == Syntax == &lt;syntaxhi...&quot;</title>
		<link rel="alternate" type="text/html" href="https://skizzerz.net/DiceRoller/index.php?title=Dice/PbP/RollPost/AddRoll_(String,_RollerConfig)&amp;diff=785&amp;oldid=prev"/>
		<updated>2017-04-28T17:13:13Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{APIdoc|RollPost.AddRoll Method (String, RollerConfig)}} Adds a new roll to the post using the given config if the roll needs to be evaluated.  {{ns}}  == Syntax == &amp;lt;syntaxhi...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{APIdoc|RollPost.AddRoll Method (String, RollerConfig)}}&lt;br /&gt;
Adds a new roll to the post using the given config if the roll needs to be evaluated.&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 void AddRoll(&lt;br /&gt;
    string diceExpr,&lt;br /&gt;
    RollerConfig config&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
; ''diceExpr''&lt;br /&gt;
: Type: System.String&lt;br /&gt;
: The dice expression to add, will be evaluated then added to the end of [[../Current|Current]].&lt;br /&gt;
&lt;br /&gt;
; ''config''&lt;br /&gt;
: Type: [[Dice/RollerConfig|Dice.RollerConfig]]&lt;br /&gt;
: The configuration used for the roll. If {{cs|null}}, [[Dice/Roller/DefaultConfig|Roller.DefaultConfig]] is used.&lt;br /&gt;
&lt;br /&gt;
== Remarks ==&lt;br /&gt;
This will first attempt to use a previously evaluated version of this roll, if possible. If the roll does not matched the current position of [[../Pristine|Pristine]] or [[../Stored|Stored]], it will be evaluated anew via [[Dice/Roller/Roll|Roller.Roll]] using the given ''config''.&lt;br /&gt;
&lt;br /&gt;
When a new RollPost is made, it starts in the &amp;quot;pristine&amp;quot; state. When a roll is added via AddRoll(), the following chart indicates how it matches against saved roll results. Once all rolls have been added via AddRoll() and [[../Validate|Validate()]] has been called, the state the RollPost is currently in determines how valid the current version of the post is. In the chart below, Pristine[i] and Stored[i] refer to the ''i''th element of Pristine or Stored, where ''i'' is how many rolls have been added via AddRoll (so the first time AddRoll() is called, i = 0, then the next time it is called i = 1, and so on).&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Current state !! ''diceExpr'' == Pristine[i] !! ''diceExpr'' == Stored[i] !! Otherwise&lt;br /&gt;
|-&lt;br /&gt;
! Pristine&lt;br /&gt;
| Use stored Pristine[i] roll&lt;br /&gt;
| Use stored Stored[i] roll, move to state stored&lt;br /&gt;
| Evaluate ''diceExpr'', move to state divergent&lt;br /&gt;
|-&lt;br /&gt;
! Stored&lt;br /&gt;
| N/A (condition not checked)&lt;br /&gt;
| Use stored Stored[i] roll&lt;br /&gt;
| Evaluate ''diceExpr'', move to state divergent&lt;br /&gt;
|-&lt;br /&gt;
! Divergent&lt;br /&gt;
| N/A (condition not checked)&lt;br /&gt;
| N/A (condition not checked)&lt;br /&gt;
| Evaluate ''diceExpr''&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Skizzerz</name></author>
		
	</entry>
</feed>