Menu
News
All News
Dungeons & Dragons
Level Up: Advanced 5th Edition
Pathfinder
Starfinder
Warhammer
2d20 System
Year Zero Engine
Industry News
Reviews
Dragon Reflections
White Dwarf Reflections
Columns
Weekly Digests
Weekly News Digest
Freebies, Sales & Bundles
RPG Print News
RPG Crowdfunding News
Game Content
ENterplanetary DimENsions
Mythological Figures
Opinion
Worlds of Design
Peregrine's Nest
RPG Evolution
Other Columns
From the Freelancing Frontline
Monster ENcyclopedia
WotC/TSR Alumni Look Back
4 Hours w/RSD (Ryan Dancey)
The Road to 3E (Jonathan Tweet)
Greenwood's Realms (Ed Greenwood)
Drawmij's TSR (Jim Ward)
Community
Forums & Topics
Forum List
Latest Posts
Forum list
*Dungeons & Dragons
Level Up: Advanced 5th Edition
D&D Older Editions
*TTRPGs General
*Pathfinder & Starfinder
EN Publishing
*Geek Talk & Media
Search forums
Chat/Discord
Resources
Wiki
Pages
Latest activity
Media
New media
New comments
Search media
Downloads
Latest reviews
Search resources
EN Publishing
Store
EN5ider
Adventures in ZEITGEIST
Awfully Cheerful Engine
What's OLD is NEW
Judge Dredd & The Worlds Of 2000AD
War of the Burning Sky
Level Up: Advanced 5E
Events & Releases
Upcoming Events
Private Events
Featured Events
Socials!
EN Publishing
Twitter
BlueSky
Facebook
Instagram
EN World
BlueSky
YouTube
Facebook
Twitter
Twitch
Podcast
Features
Top 5 RPGs Compiled Charts 2004-Present
Adventure Game Industry Market Research Summary (RPGs) V1.0
Ryan Dancey: Acquiring TSR
Q&A With Gary Gygax
D&D Rules FAQs
TSR, WotC, & Paizo: A Comparative History
D&D Pronunciation Guide
Million Dollar TTRPG Kickstarters
Tabletop RPG Podcast Hall of Fame
Eric Noah's Unofficial D&D 3rd Edition News
D&D in the Mainstream
D&D & RPG History
About Morrus
Log in
Register
What's new
Search
Search
Search titles only
By:
Forums & Topics
Forum List
Latest Posts
Forum list
*Dungeons & Dragons
Level Up: Advanced 5th Edition
D&D Older Editions
*TTRPGs General
*Pathfinder & Starfinder
EN Publishing
*Geek Talk & Media
Search forums
Chat/Discord
Menu
Log in
Register
Install the app
Install
Community
General Tabletop Discussion
*Pathfinder & Starfinder
Probability in Char. Gen.
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="RedShirtNo5" data-source="post: 2178379" data-attributes="member: 173"><p><span style="font-size: 10px">Final Result: 30.4633219726944</span></p><p><span style="font-size: 10px"></span></p><p><span style="font-size: 10px">Total Characters Accepted: 7790570</span></p><p><span style="font-size: 10px">Total Characters Rejected: 8986646</span></p><p> <span style="font-size: 10px"></span></p><p><span style="font-size: 10px">Frequency of 3: 1260600</span></p><p><span style="font-size: 10px">Frequency of 4: 6470160</span></p><p><span style="font-size: 10px">Frequency of 5: 16175400</span></p><p><span style="font-size: 10px">Frequency of 6: 42342300</span></p><p><span style="font-size: 10px">Frequency of 7: 76619400</span></p><p><span style="font-size: 10px">Frequency of 8: 151608600</span></p><p><span style="font-size: 10px">Frequency of 9: 222522300</span></p><p><span style="font-size: 10px">Frequency of 10: 352479960</span></p><p><span style="font-size: 10px">Frequency of 11: 427598640</span></p><p><span style="font-size: 10px">Frequency of 12: 556140060</span></p><p><span style="font-size: 10px">Frequency of 13: 572790960</span></p><p><span style="font-size: 10px">Frequency of 14: 613664640</span></p><p><span style="font-size: 10px">Frequency of 15: 502437924</span></p><p><span style="font-size: 10px">Frequency of 16: 401485656</span></p><p><span style="font-size: 10px">Frequency of 17: 230640696</span></p><p><span style="font-size: 10px">Frequency of 18: 98128044</span></p><p><span style="font-size: 10px"></span></p><p> </p><p>[code]</p><p>[size=2]Private Sub Command1_Click()[/size]</p><p> </p><p>[size=2]Dim V As Double</p><p>Dim P As Double</p><p>Dim A As Double</p><p>Dim Value As Double</p><p>Dim Probability As Double</p><p>Dim S As Integer</p><p>Dim D As Integer</p><p>Dim Co As Integer</p><p>Dim I As Integer</p><p>Dim W As Integer</p><p>Dim Ch As Integer</p><p>Dim TotalAccepted As Long</p><p>Dim TotalRejected As Long</p><p>Dim T(18) As Long</p><p>Dim Result As String[/size]</p><p> </p><p>[size=2]V = 0#</p><p>P = 0#[/size]</p><p> </p><p>[size=2]TotalAccepted = 0&</p><p>TotalRejected = 0&[/size]</p><p> </p><p>[size=2]' We will cycle through each possible stat array that could be created</p><p>For S = 3 To 18</p><p>For D = 3 To 18</p><p>For Co = 3 To 18</p><p>For I = 3 To 18</p><p>For W = 3 To 18</p><p>For Ch = 3 To 18[/size]</p><p> </p><p>[size=2]' If the stat array is a "worthless character", then skip it</p><p>If S > 13 Or D > 13 Or Co > 13 Or I > 13 Or W > 13 Or Ch > 13 Then</p><p> If Int((S - 10) / 2) + Int((D - 10) / 2) + Int((Co - 10) / 2) + Int((I - 10) / 2) + Int((W - 10) / 2) + Int((Ch - 10) / 2) > 0 Then[/size]</p><p> </p><p>[size=2]' If the stat array is not a worthless character, calculate the point buy value (PBV)</p><p>' and the probability of that character occurring</p><p> Value = PBV(S) + PBV(D) + PBV(Co) + PBV(I) + PBV(W) + PBV(Ch)</p><p> Probability = prob(S) * prob(D) * prob(Co) * prob(I) * prob(W) * prob(Ch)[/size]</p><p> </p><p>[size=2]' Add the weighted point buy value to a running total</p><p> V = V + Value * Probability</p><p> </p><p>' Track the total probability (P) of getting a "non-worthless" character for normalization below</p><p> P = P + Probability[/size]</p><p> </p><p>[size=2]' Track the total number of accepted characters</p><p> TotalAccepted = TotalAccepted + 1&</p><p> </p><p>' Track chances of each number</p><p> T(S) = T(S) + ways(S)</p><p> T(D) = T(D) + ways(D)</p><p> T(Co) = T(Co) + ways(Co)</p><p> T(I) = T(I) + ways(I)</p><p> T(W) = T(W) + ways(W)</p><p> T(Ch) = T(Ch) + ways(Ch)</p><p> </p><p> Else</p><p> </p><p> TotalRejected = TotalRejected + 1&</p><p> </p><p> End If[/size]</p><p> </p><p>[size=2]Else[/size]</p><p> </p><p>[size=2] TotalRejected = TotalRejected + 1&</p><p> </p><p>End If[/size]</p><p> </p><p>[size=2]Next</p><p>Next</p><p>Next</p><p>Next</p><p>Next</p><p>Next[/size]</p><p> </p><p>[size=2]' We know the probability (1-P) of rolling a worthless character, and we calculated the average point buy value (V) that results from a single roll of 4d6dl. Since you keep rolling until you get a non-worthless character, the percentage chance (1-P) of a worthless character gets distributed across the possible non-worthless characters. Thus, we simply need to normalize the result.</p><p>A = V / P[/size]</p><p> </p><p>[size=2]' Display results</p><p>Result = "Final Result:" + Str(A) + Chr(13)</p><p>Result = Result + "Total Accepted: " + Str(TotalAccepted) + Chr(13)</p><p>Result = Result + "Total Rejected: " + Str(TotalRejected) + Chr(13)</p><p>For j = 3 To 18</p><p>Result = Result + "Frequency of " + Str(j) + ": " + Str(T(j)) + Chr(13)</p><p>Next[/size]</p><p> </p><p>[size=2]Text1.Text = Result[/size]</p><p> </p><p>[size=2]End Sub</p><p>Function PBV(x)</p><p>' This assumes that point buy for stats below 8 scales linearly</p><p> </p><p>If x = 3 Then PBV = -5#</p><p>If x = 4 Then PBV = -4#</p><p>If x = 5 Then PBV = -3#</p><p>If x = 6 Then PBV = -2#</p><p>If x = 7 Then PBV = -1#</p><p>If x = 8 Then PBV = 0#</p><p>If x = 9 Then PBV = 1#</p><p>If x = 10 Then PBV = 2#</p><p>If x = 11 Then PBV = 3#</p><p>If x = 12 Then PBV = 4#</p><p>If x = 13 Then PBV = 5#</p><p>If x = 14 Then PBV = 6#</p><p>If x = 15 Then PBV = 8#</p><p>If x = 16 Then PBV = 10#</p><p>If x = 17 Then PBV = 13#</p><p>If x = 18 Then PBV = 16#</p><p>End Function[/size]</p><p> </p><p>[size=2]</p><p>Function prob(x)</p><p>'These percentages taken from dcollins ([url="http://javascript<b></b><img%20src="http://www.enworld.org/images/smilies/redface.gif"%20border="0"%20alt=""%20title="Embarrassment"%20smilieid="3"%20class="inlineimg"%20/>l('http://superdan.net.home.comcast.net/dndmisc/4d6curve.html');"][color=#0000ff]http://superdan.net.home.comcast.net/dndmisc/4d6curve.html[/color][/url])</p><p>If x = 3 Then prob = 1# / 1296#</p><p>If x = 4 Then prob = 4# / 1296#</p><p>If x = 5 Then prob = 10# / 1296#</p><p>If x = 6 Then prob = 21# / 1296#</p><p>If x = 7 Then prob = 38# / 1296#</p><p>If x = 8 Then prob = 62# / 1296#</p><p>If x = 9 Then prob = 91# / 1296#</p><p>If x = 10 Then prob = 122# / 1296#</p><p>If x = 11 Then prob = 148# / 1296#</p><p>If x = 12 Then prob = 167# / 1296#</p><p>If x = 13 Then prob = 172# / 1296#</p><p>If x = 14 Then prob = 160# / 1296#</p><p>If x = 15 Then prob = 131# / 1296#</p><p>If x = 16 Then prob = 94# / 1296#</p><p>If x = 17 Then prob = 54# / 1296#</p><p>If x = 18 Then prob = 21# / 1296#</p><p>End Function[/size]</p><p> </p><p>[size=2]Function ways(x)</p><p>'These numbers taken from dcollins ([url="http://javascript<b></b><img%20src="http://www.enworld.org/images/smilies/redface.gif"%20border="0"%20alt=""%20title="Embarrassment"%20smilieid="3"%20class="inlineimg"%20/>l('http://superdan.net.home.comcast.net/dndmisc/4d6curve.html');"][color=#0000ff]http://superdan.net.home.comcast.net/dndmisc/4d6curve.html[/color][/url])</p><p>If x = 3 Then ways = 1&</p><p>If x = 4 Then ways = 4&</p><p>If x = 5 Then ways = 10&</p><p>If x = 6 Then ways = 21&</p><p>If x = 7 Then ways = 38&</p><p>If x = 8 Then ways = 62&</p><p>If x = 9 Then ways = 91&</p><p>If x = 10 Then ways = 122&</p><p>If x = 11 Then ways = 148&</p><p>If x = 12 Then ways = 167&</p><p>If x = 13 Then ways = 172&</p><p>If x = 14 Then ways = 160&</p><p>If x = 15 Then ways = 131&</p><p>If x = 16 Then ways = 94&</p><p>If x = 17 Then ways = 54&</p><p>If x = 18 Then ways = 21&</p><p>[/code]</p><p>[/size]</p></blockquote><p></p>
[QUOTE="RedShirtNo5, post: 2178379, member: 173"] [size=2]Final Result: 30.4633219726944[/size] [size=2] Total Characters Accepted: 7790570 Total Characters Rejected: 8986646 Frequency of 3: 1260600 Frequency of 4: 6470160 Frequency of 5: 16175400 Frequency of 6: 42342300 Frequency of 7: 76619400 Frequency of 8: 151608600 Frequency of 9: 222522300 Frequency of 10: 352479960 Frequency of 11: 427598640 Frequency of 12: 556140060 Frequency of 13: 572790960 Frequency of 14: 613664640 Frequency of 15: 502437924 Frequency of 16: 401485656 Frequency of 17: 230640696 Frequency of 18: 98128044 [/size] [code] [size=2]Private Sub Command1_Click()[/size] [size=2]Dim V As Double Dim P As Double Dim A As Double Dim Value As Double Dim Probability As Double Dim S As Integer Dim D As Integer Dim Co As Integer Dim I As Integer Dim W As Integer Dim Ch As Integer Dim TotalAccepted As Long Dim TotalRejected As Long Dim T(18) As Long Dim Result As String[/size] [size=2]V = 0# P = 0#[/size] [size=2]TotalAccepted = 0& TotalRejected = 0&[/size] [size=2]' We will cycle through each possible stat array that could be created For S = 3 To 18 For D = 3 To 18 For Co = 3 To 18 For I = 3 To 18 For W = 3 To 18 For Ch = 3 To 18[/size] [size=2]' If the stat array is a "worthless character", then skip it If S > 13 Or D > 13 Or Co > 13 Or I > 13 Or W > 13 Or Ch > 13 Then If Int((S - 10) / 2) + Int((D - 10) / 2) + Int((Co - 10) / 2) + Int((I - 10) / 2) + Int((W - 10) / 2) + Int((Ch - 10) / 2) > 0 Then[/size] [size=2]' If the stat array is not a worthless character, calculate the point buy value (PBV) ' and the probability of that character occurring Value = PBV(S) + PBV(D) + PBV(Co) + PBV(I) + PBV(W) + PBV(Ch) Probability = prob(S) * prob(D) * prob(Co) * prob(I) * prob(W) * prob(Ch)[/size] [size=2]' Add the weighted point buy value to a running total V = V + Value * Probability ' Track the total probability (P) of getting a "non-worthless" character for normalization below P = P + Probability[/size] [size=2]' Track the total number of accepted characters TotalAccepted = TotalAccepted + 1& ' Track chances of each number T(S) = T(S) + ways(S) T(D) = T(D) + ways(D) T(Co) = T(Co) + ways(Co) T(I) = T(I) + ways(I) T(W) = T(W) + ways(W) T(Ch) = T(Ch) + ways(Ch) Else TotalRejected = TotalRejected + 1& End If[/size] [size=2]Else[/size] [size=2] TotalRejected = TotalRejected + 1& End If[/size] [size=2]Next Next Next Next Next Next[/size] [size=2]' We know the probability (1-P) of rolling a worthless character, and we calculated the average point buy value (V) that results from a single roll of 4d6dl. Since you keep rolling until you get a non-worthless character, the percentage chance (1-P) of a worthless character gets distributed across the possible non-worthless characters. Thus, we simply need to normalize the result. A = V / P[/size] [size=2]' Display results Result = "Final Result:" + Str(A) + Chr(13) Result = Result + "Total Accepted: " + Str(TotalAccepted) + Chr(13) Result = Result + "Total Rejected: " + Str(TotalRejected) + Chr(13) For j = 3 To 18 Result = Result + "Frequency of " + Str(j) + ": " + Str(T(j)) + Chr(13) Next[/size] [size=2]Text1.Text = Result[/size] [size=2]End Sub Function PBV(x) ' This assumes that point buy for stats below 8 scales linearly If x = 3 Then PBV = -5# If x = 4 Then PBV = -4# If x = 5 Then PBV = -3# If x = 6 Then PBV = -2# If x = 7 Then PBV = -1# If x = 8 Then PBV = 0# If x = 9 Then PBV = 1# If x = 10 Then PBV = 2# If x = 11 Then PBV = 3# If x = 12 Then PBV = 4# If x = 13 Then PBV = 5# If x = 14 Then PBV = 6# If x = 15 Then PBV = 8# If x = 16 Then PBV = 10# If x = 17 Then PBV = 13# If x = 18 Then PBV = 16# End Function[/size] [size=2] Function prob(x) 'These percentages taken from dcollins ([url="http://javascript<b></b><img%20src="http://www.enworld.org/images/smilies/redface.gif"%20border="0"%20alt=""%20title="Embarrassment"%20smilieid="3"%20class="inlineimg"%20/>l('http://superdan.net.home.comcast.net/dndmisc/4d6curve.html');"][color=#0000ff]http://superdan.net.home.comcast.net/dndmisc/4d6curve.html[/color][/url]) If x = 3 Then prob = 1# / 1296# If x = 4 Then prob = 4# / 1296# If x = 5 Then prob = 10# / 1296# If x = 6 Then prob = 21# / 1296# If x = 7 Then prob = 38# / 1296# If x = 8 Then prob = 62# / 1296# If x = 9 Then prob = 91# / 1296# If x = 10 Then prob = 122# / 1296# If x = 11 Then prob = 148# / 1296# If x = 12 Then prob = 167# / 1296# If x = 13 Then prob = 172# / 1296# If x = 14 Then prob = 160# / 1296# If x = 15 Then prob = 131# / 1296# If x = 16 Then prob = 94# / 1296# If x = 17 Then prob = 54# / 1296# If x = 18 Then prob = 21# / 1296# End Function[/size] [size=2]Function ways(x) 'These numbers taken from dcollins ([url="http://javascript<b></b><img%20src="http://www.enworld.org/images/smilies/redface.gif"%20border="0"%20alt=""%20title="Embarrassment"%20smilieid="3"%20class="inlineimg"%20/>l('http://superdan.net.home.comcast.net/dndmisc/4d6curve.html');"][color=#0000ff]http://superdan.net.home.comcast.net/dndmisc/4d6curve.html[/color][/url]) If x = 3 Then ways = 1& If x = 4 Then ways = 4& If x = 5 Then ways = 10& If x = 6 Then ways = 21& If x = 7 Then ways = 38& If x = 8 Then ways = 62& If x = 9 Then ways = 91& If x = 10 Then ways = 122& If x = 11 Then ways = 148& If x = 12 Then ways = 167& If x = 13 Then ways = 172& If x = 14 Then ways = 160& If x = 15 Then ways = 131& If x = 16 Then ways = 94& If x = 17 Then ways = 54& If x = 18 Then ways = 21& [/code] [/size] [/QUOTE]
Insert quotes…
Verification
Post reply
Community
General Tabletop Discussion
*Pathfinder & Starfinder
Probability in Char. Gen.
Top