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="Asmor" data-source="post: 2173510" data-attributes="member: 1154"><p>Well, I made a program in Java to try and roll up every character imaginable, and ditch the "worthless" ones (worthless being +0 or less total mods OR no score higher than 13).</p><p></p><p>It's running right now, and I've got it giving me a "status update" every 6^8 characters... They're roughly 1 second apart. Which I believe means it should take around 6^16 seconds, which is well over 700 MILLION hours.</p><p></p><p>Here's the code, if anyone wants to try to optimize it (I'm a java noob) or port it to a faster, native language...</p><p></p><p>[code]</p><p>package com.asmor.dnd4d6dlcalc;</p><p></p><p>public class dnd4d6dlcalc {</p><p></p><p>public static int getMod(int stat) {</p><p> return (stat/2)-5;</p><p>}</p><p></p><p>public static int getStat(int die1, int die2, int die3, int die4) {</p><p> int dice[]={0, 0, 0, 0, 0}, lowest, i, toReturn;</p><p> dice[1]=die1;</p><p> dice[2]=die2;</p><p> dice[3]=die3;</p><p> dice[4]=die4;</p><p> lowest=1;</p><p> for (i=1; i<5; i++) {</p><p> if (dice[i]<dice[lowest]) {</p><p> lowest=i;</p><p> }</p><p> }</p><p> toReturn=0;</p><p> for (i=1; i<5; i++) {</p><p> if (lowest!=i) {</p><p> toReturn+=dice[i];</p><p> }</p><p> }</p><p> </p><p> return toReturn;</p><p>}</p><p></p><p>public static void main(String[] args) {</p><p>int r01=0, r02=0, r03=0, r04=0, r05=0, r06=0, r07=0,r08=0, r09=0, r10=0, r11=0, r12=0, r13=0, r14=0, r15=0, r16=0, r17=0, r18=0, r19=0, r20=0, r21=0, r22=0, r23=0, r24=0;</p><p>int scores[]={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, stats[]={0, 0, 0, 0, 0, 0, 0}, mods[]={0, 0, 0, 0, 0, 0, 0}, toss, i, totalMod;</p><p></p><p>for (r01=1; r01<7; r01++) {</p><p>for (r02=1; r02<7; r02++) {</p><p>for (r03=1; r03<7; r03++) {</p><p>for (r04=1; r04<7; r04++) {</p><p>for (r05=1; r05<7; r05++) {</p><p>for (r06=1; r06<7; r06++) {</p><p>for (r07=1; r07<7; r07++) {</p><p>for (r08=1; r08<7; r08++) {</p><p>for (r09=1; r09<7; r09++) {</p><p>for (r10=1; r10<7; r10++) {</p><p>for (r11=1; r11<7; r11++) {</p><p>for (r12=1; r12<7; r12++) {</p><p>for (r13=1; r13<7; r13++) {</p><p>for (r14=1; r14<7; r14++) {</p><p>for (r15=1; r15<7; r15++) {</p><p>for (r16=1; r16<7; r16++) {</p><p>for (r17=1; r17<7; r17++) {</p><p>for (r18=1; r18<7; r18++) {</p><p>for (r19=1; r19<7; r19++) {</p><p>for (r20=1; r20<7; r20++) {</p><p>for (r21=1; r21<7; r21++) {</p><p>for (r22=1; r22<7; r22++) {</p><p>for (r23=1; r23<7; r23++) {</p><p>for (r24=1; r24<7; r24++) {</p><p></p><p> stats[0]=getStat(r01, r02, r03, r04);</p><p> mods[0]=getMod(stats[0]);</p><p> stats[1]=getStat(r05, r06, r07, r08);</p><p> mods[1]=getMod(stats[1]);</p><p> stats[2]=getStat(r09, r10, r11, r12);</p><p> mods[2]=getMod(stats[2]);</p><p> stats[3]=getStat(r13, r14, r15, r16);</p><p> mods[3]=getMod(stats[3]);</p><p> stats[4]=getStat(r17, r18, r19, r20);</p><p> mods[4]=getMod(stats[4]);</p><p> stats[5]=getStat(r21, r22, r23, r24);</p><p> mods[5]=getMod(stats[5]);</p><p> </p><p> toss=1;</p><p> for (i=0; i<6; i++) {</p><p> if (stats[i]>13) {</p><p> toss=0;</p><p> }</p><p> }</p><p> totalMod=mods[0]+mods[1]+mods[2]+mods[3]+mods[4]+mods[5];</p><p> if (totalMod<=0) {</p><p> toss=1;</p><p> }</p><p> </p><p> if (toss==0) {</p><p> for (i=0; i<6; i++) {</p><p> scores[stats[i]]++;</p><p> }</p><p> }</p><p></p><p>}}}}</p><p>}}}}</p><p>System.out.print(r01+" "+r02+" "+r03+" "+r04+" "+r05+" "+r06+" "+r07+" "+r08+" "+r09+" "+r10+" "+r11+" "+r12+" "+r13+" "+r14+" "+r15+" "+r16+" "+r17+" "+r18+" "+r19+" "+r20+" "+r21+" "+r22+" "+r23+" "+r24+"\n");</p><p>}}}}</p><p>}}}}</p><p>}}}}</p><p>}}}}</p><p></p><p>String outString="";</p><p></p><p>for (i=3; i<19; i++) {</p><p> outString+=i+": "+scores[i]+"\n";</p><p>}</p><p></p><p>System.out.print(outString);</p><p></p><p>}</p><p>}</p><p>[/code]</p></blockquote><p></p>
[QUOTE="Asmor, post: 2173510, member: 1154"] Well, I made a program in Java to try and roll up every character imaginable, and ditch the "worthless" ones (worthless being +0 or less total mods OR no score higher than 13). It's running right now, and I've got it giving me a "status update" every 6^8 characters... They're roughly 1 second apart. Which I believe means it should take around 6^16 seconds, which is well over 700 MILLION hours. Here's the code, if anyone wants to try to optimize it (I'm a java noob) or port it to a faster, native language... [code] package com.asmor.dnd4d6dlcalc; public class dnd4d6dlcalc { public static int getMod(int stat) { return (stat/2)-5; } public static int getStat(int die1, int die2, int die3, int die4) { int dice[]={0, 0, 0, 0, 0}, lowest, i, toReturn; dice[1]=die1; dice[2]=die2; dice[3]=die3; dice[4]=die4; lowest=1; for (i=1; i<5; i++) { if (dice[i]<dice[lowest]) { lowest=i; } } toReturn=0; for (i=1; i<5; i++) { if (lowest!=i) { toReturn+=dice[i]; } } return toReturn; } public static void main(String[] args) { int r01=0, r02=0, r03=0, r04=0, r05=0, r06=0, r07=0,r08=0, r09=0, r10=0, r11=0, r12=0, r13=0, r14=0, r15=0, r16=0, r17=0, r18=0, r19=0, r20=0, r21=0, r22=0, r23=0, r24=0; int scores[]={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, stats[]={0, 0, 0, 0, 0, 0, 0}, mods[]={0, 0, 0, 0, 0, 0, 0}, toss, i, totalMod; for (r01=1; r01<7; r01++) { for (r02=1; r02<7; r02++) { for (r03=1; r03<7; r03++) { for (r04=1; r04<7; r04++) { for (r05=1; r05<7; r05++) { for (r06=1; r06<7; r06++) { for (r07=1; r07<7; r07++) { for (r08=1; r08<7; r08++) { for (r09=1; r09<7; r09++) { for (r10=1; r10<7; r10++) { for (r11=1; r11<7; r11++) { for (r12=1; r12<7; r12++) { for (r13=1; r13<7; r13++) { for (r14=1; r14<7; r14++) { for (r15=1; r15<7; r15++) { for (r16=1; r16<7; r16++) { for (r17=1; r17<7; r17++) { for (r18=1; r18<7; r18++) { for (r19=1; r19<7; r19++) { for (r20=1; r20<7; r20++) { for (r21=1; r21<7; r21++) { for (r22=1; r22<7; r22++) { for (r23=1; r23<7; r23++) { for (r24=1; r24<7; r24++) { stats[0]=getStat(r01, r02, r03, r04); mods[0]=getMod(stats[0]); stats[1]=getStat(r05, r06, r07, r08); mods[1]=getMod(stats[1]); stats[2]=getStat(r09, r10, r11, r12); mods[2]=getMod(stats[2]); stats[3]=getStat(r13, r14, r15, r16); mods[3]=getMod(stats[3]); stats[4]=getStat(r17, r18, r19, r20); mods[4]=getMod(stats[4]); stats[5]=getStat(r21, r22, r23, r24); mods[5]=getMod(stats[5]); toss=1; for (i=0; i<6; i++) { if (stats[i]>13) { toss=0; } } totalMod=mods[0]+mods[1]+mods[2]+mods[3]+mods[4]+mods[5]; if (totalMod<=0) { toss=1; } if (toss==0) { for (i=0; i<6; i++) { scores[stats[i]]++; } } }}}} }}}} System.out.print(r01+" "+r02+" "+r03+" "+r04+" "+r05+" "+r06+" "+r07+" "+r08+" "+r09+" "+r10+" "+r11+" "+r12+" "+r13+" "+r14+" "+r15+" "+r16+" "+r17+" "+r18+" "+r19+" "+r20+" "+r21+" "+r22+" "+r23+" "+r24+"\n"); }}}} }}}} }}}} }}}} String outString=""; for (i=3; i<19; i++) { outString+=i+": "+scores[i]+"\n"; } System.out.print(outString); } } [/code] [/QUOTE]
Insert quotes…
Verification
Post reply
Community
General Tabletop Discussion
*Pathfinder & Starfinder
Probability in Char. Gen.
Top