Generating abilities came up in another thread. One thing some folks like is having the random stats in a random order (maybe so not everyone of a given class has pretty much the same array, or maybe to let the dice guide what class they want). A sizeable subset of those folks don't actually make the players stick with the rolls if they are really bad. For those who don't like the point buy, one of the arguments is that it can lead to the situation where someone's character has much better stats than someone else's and that can lead to feel-bads.

The (totally not-optimized) code in the spoiler below should randomly generate a 27 point character from 5e, where the chance of the particular array showing up is proportional to the chance it would be observed using best 3 out of 4d6. (So imagine generating best 3 of 4d6 in order, and throwing them out until you get one that is 27 points) .

To run it, simply copy the spoilered code into either: Create a new R program - myCompiler - myCompiler or Run R code online , hit run, and wait a few seconds. It will generate ten of them. (Changing nchar= to a bigger number will make more of them).

zz<-0

x<-matrix(0,nrow=262144,ncol=6)

for (i in 8:15){

for (j in 8:15){

for (k in 8:15){

for (l in 8:15){

for (m in 8:15){

for (n in 8:15){

zz<-zz+1

x[zz,]<-c(i,j,k,l,m,n)

}}}}}}

costm<-x-8

costm[x==14]<-costm[x==14]+1

costm[x==15]<-costm[x==15]+2

cost<-apply(costm,1,sum)

x<-x[cost==27,]

probm<-matrix(0,nrow=dim(x)[1],ncol=dim(x)[2])

probm[x==8]<-0.0478

probm[x==9]<-0.0702

probm[x==10]<-0.0941

probm[x==11]<-0.1142

probm[x==12]<-0.1289

probm[x==13]<-0.1327

probm[x==14]<-0.1235

probm[x==15]<-0.1011

prob<-apply(probm*10,1,prod)

prob<-prob/sum(prob)

nchar=10

x[sample(1:dim(x)[1],nchar,prob=prob),]

Sample output:

I'm happy to modify the code if someone wants a different point buy or for the probabilities to match just 3d6 or whatever.

I'm also happy to hear why folks would absolutely hate this. (I'm guessing one reason is that actually rolling dice is fun!)

The (totally not-optimized) code in the spoiler below should randomly generate a 27 point character from 5e, where the chance of the particular array showing up is proportional to the chance it would be observed using best 3 out of 4d6. (So imagine generating best 3 of 4d6 in order, and throwing them out until you get one that is 27 points) .

To run it, simply copy the spoilered code into either: Create a new R program - myCompiler - myCompiler or Run R code online , hit run, and wait a few seconds. It will generate ten of them. (Changing nchar= to a bigger number will make more of them).

x<-matrix(0,nrow=262144,ncol=6)

for (i in 8:15){

for (j in 8:15){

for (k in 8:15){

for (l in 8:15){

for (m in 8:15){

for (n in 8:15){

zz<-zz+1

x[zz,]<-c(i,j,k,l,m,n)

}}}}}}

costm<-x-8

costm[x==14]<-costm[x==14]+1

costm[x==15]<-costm[x==15]+2

cost<-apply(costm,1,sum)

x<-x[cost==27,]

probm<-matrix(0,nrow=dim(x)[1],ncol=dim(x)[2])

probm[x==8]<-0.0478

probm[x==9]<-0.0702

probm[x==10]<-0.0941

probm[x==11]<-0.1142

probm[x==12]<-0.1289

probm[x==13]<-0.1327

probm[x==14]<-0.1235

probm[x==15]<-0.1011

prob<-apply(probm*10,1,prod)

prob<-prob/sum(prob)

nchar=10

x[sample(1:dim(x)[1],nchar,prob=prob),]

Sample output:

I'm happy to modify the code if someone wants a different point buy or for the probabilities to match just 3d6 or whatever.

I'm also happy to hear why folks would absolutely hate this. (I'm guessing one reason is that actually rolling dice is fun!)

Last edited: