Mixed Messages - Dungeons and Dragons Character Generator


I very much enjoyed this project - it was fun to see how I might use javascript to build something I might actually use. I’d say I spent probably 4 hours on this project in total.

I play a lot of D&D and am constantly having to come up with new characters, so I thought it might be fun to use this messages project to make a generator that builds characters on the fly.

I would love any feedback on how I could make this code more efficient, or perhaps if there are ways I could make it clearer to someone who wanted to add a feature? Here is the link to the project: GitHub - ConnorJLucas/mixed-messages-proj: Codecademy Practice Project

Thanks in advance for any feedback!


That’s a pretty cool idea, making a new D&D character really is a pain, haha.

If I may give you a suggestion, I’ve noticed that the final console.log() doesn’t display the name that was chosen. Perhaps that would be interesting.

Also, your pickName() function has some logic to make sure that the parameters are provided, right? But then pickCharName() and generateChar() don’t. I think, for the sake of consistency, maybe it’d be cool to include validation for all three of them or leave them all without it (since your logic already makes sure that all of them get called with the necessary arguments).

Nice code and nice idea, my friend! If you don’t mind, I’d love to hear your thoughts on my version of Mixed Messages. Cheers =)

Thanks very much for your response! Can’t believe I forgot to put the name in the final console.log - D’oh!

Good point about keeping things internally consistent with validation. Your input is appreciated, thank you!

This is excellent. It’s useful for a DM too to quickly generate some bare bones NPCs. Good for populating a tavern :slight_smile: I play a lot of D&D too and I’m looking forward to building some RPG tools using the skills we’re learning on this course.

Are you planning on expanding this in the future? Maybe adding more races, names and maybe even stats if you’re feeling adventurous? :slight_smile:

Hey thanks!

I definitely want to expand in the future. I think I’m actually going to modify some future Portfolio Projects to include this stuff - mainly just cuz if I am building something I’m familiar with I’m more likely to finish it! I want to add more customization and options to this tool (like, a setting where you could preselect a race for example), and once I get more into databases I’d like to build in the capability to save certain characters you like.

One day I’d even like to get it to generate a full NPC stat block based on the race/class and so forth. When I’m playing I often find myself asking questions like “hmm I wonder what a lvl 10 dwarven fighters attack modifier would be” and it would be awesome to have a tool where I could just tweak a few settings and get the answer right away.