I just wrote a tool to roll up NPCs for Dogs in the Vineyard in python.

```

import random
import math

def d(sides):
    return random.randint(0,sides-1)

def ndx (n, sides):
    for i in range(n):
      rolls.append(d(sides))
    return rolls

def getStats():
    dx = d(10)
    statBlock = [[4,3,2,2],[4,3,3,2],[4,4,3,2],[5,4,3,2],[5,5,3,2],[4,4,4,3],[5,4,4,3],[5,5,4,3],[6,5,4,3],[6,5,5,4]]
    random.shuffle(statBlock[dx])
    return statBlock[dx]

def getTraits():
    out = []
    traitBlock = ['2d4','1d4','1d6','1d8','1d10','2d6','2d8','2d10']
    for i in range(4):
        out.append(traitBlock[d(8)])
    return out

def getRelns():
    out = []
    relnBlock = ['2d4','1d4','1d6','1d8','1d10','2d6','2d8','2d10','3d6','3d8']
    for i in range(2):
        out.append(relnBlock[d(10)])
    return out

def freeDice():
    out = []
    freedice = ['2d4','2d6','4d6','1d8','2d8','1d10']
    for i in range(3):
        out.append(freedice[d(6)])
    return out

def getNPC():
    stats = []
    for i in range(6):
        stats.append(getStats())

    fd= "Free dice: {0}, {1}, {2}"
    print fd.format(*freeDice())    

    proto = '''

Name: ______________________
Stats
  Acuity: {0}d6\tBody: {1}d6
  Heart: {2}d6\tWill: {3}d6
Traits
  ___________ {4}\t___________ {5}
  ___________ {6}\t___________ {7}
Relationships
  Blood 1d6 
  ___________ {8}
  ___________ {9}

'''

    for npc in stats:
        npc.extend(getTraits())
        npc.extend(getRelns())
        print proto.format(*npc)

    traits = getTraits()
    reln = getRelns()
getNPC()

```

Would it be appropriate to post this as part of a "Software tools for DitV" question?