Tuesday 7 August 2018

A Python Script for Rolling Up Random Characters

I've been busy brushing up on basic Python programming skills, and for the past several days I've been working on a random generator for D&D characters.

e.g.

Jaden Starhammer
Rock Gnome
Folk Hero, Rogue 1
Str 12, Dex 16, Con 14, Int 16, Wis 13, Cha 11
Proficiencies: Animal Handling, Athletics, Insight, Perception, Persuasion, Survival
Expertise: Animal Handling, thieves' tools
Alignment: Chaotic Neutral
Appearance: Towering
Physical Detail: Hoarse voice
Clothing: Blood-stained
Personality: Grumpy
Mannerism: Breathy
 
Currently it only supports 1st-level, though some of the infrastructure is there for higher level.
 
I'd also like to write a script for generating BX characters, perhaps other systems.

You can get the source code here:
https://gitlab.com/wereoctopus/fantasy_character_generator
and I've uploaded two files of 1000 characters to my Google Drive folder
One uses the standard array to generate each character, the other rolls 4d6 and drops the lowest.

The generator uses some resources from:
  • Ben Milton's Maze Rats 
  • Janelle Shane's list of neural-network-generated D&D character names , here
  • and this dictionary of medieval names from European sources
(naturally, adding lists of non-European names is high on my to-do list)
 
I had a lot of fun writing this. It was just the right level of difficulty for my depression-brain to get into a flow state. How I've missed that :-)

If you have any suggestions or bug reports, you can submit them via gitlab. You can also write a comment here, but it'll be easier to keep track of them there.

No comments:

Post a Comment

hi! all comments are moderated (mostly for spam) before they're published.